* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.dashboard {
    width: 100%;
    max-width: 400px;
    background-color: #1e1e1e;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.status-safe {
    color: #4ade80; /* Green */
}

.status-danger {
    color: #ef4444; /* Red */
}

.header p {
    color: #a3a3a3;
    font-size: 0.9rem;
    margin-top: 5px;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background-color: #000;
    aspect-ratio: 3/4;
    display: flex;
    justify-content: center;
    align-items: center;
}

video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    z-index: 10;
}

#loading {
    position: absolute;
    z-index: 20;
    font-weight: bold;
    color: #fbbf24;
}

.metrics {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 16px;
}

.metric-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.75rem;
    color: #a3a3a3;
    margin-bottom: 5px;
}

.value {
    font-size: 1.2rem;
    font-weight: bold;
}

.warning-text {
    color: #ef4444;
}

.btn {
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #2563eb;
}
