:root {
    --primary: #00ff9d;
    --danger: #ff4444;
    --warn: #ffb700;
    --bg-color: #121212;
    --surface-color: #1e1e1e;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header { margin-top: 20px; text-align: center; padding: 0 20px; }
h1 { font-size: 1.5rem; margin-bottom: 5px; }

.viewport-container {
    position: relative;
    margin-top: 20px;
    width: 95vw; 
    max-width: 640px;
    aspect-ratio: 4/3; 
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stats-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #ccc;
    z-index: 20;
    backdrop-filter: blur(4px);
    min-width: 120px;
}

.stat-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-value { color: var(--primary); font-weight: bold; }

.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

button {
    background: var(--surface-color);
    border: 1px solid #333;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

button.active { border-color: var(--primary); color: var(--primary); background: rgba(0, 255, 157, 0.05); }
button.inactive { border-color: var(--danger); color: var(--danger); background: rgba(255, 68, 68, 0.05); }
button.blur-active { border-color: var(--warn); color: var(--warn); background: rgba(255, 183, 0, 0.05); }

.privacy-note {
    margin: 30px 20px;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
    max-width: 400px;
}