/* ===== RESET & BASE ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 50%, #16213e 100%);
    color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.05), transparent),
        radial-gradient(2px 2px at 60% 20%, rgba(255, 255, 255, 0.08), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255, 255, 255, 0.06), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(255, 255, 255, 0.07), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(255, 255, 255, 0.04), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ===== CONTAINER ===== */
.container {
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLASSMORPHISM CARD ===== */
.emf-meter,
.control-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== EMF METER ===== */
.emf-meter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 240px;
}

.led {
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 14px;
    font-weight: 600;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.led::after {
    content: 'Niveau ' attr(data-level);
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

/* LED active states with premium gradients & glow */
.led.active.level-1 {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5), 0 0 40px rgba(76, 175, 80, 0.2);
    transform: scale(1.02);
}

.led.active.level-2 {
    background: linear-gradient(135deg, #8bc34a, #558b2f);
    box-shadow: 0 0 20px rgba(139, 195, 74, 0.5), 0 0 40px rgba(139, 195, 74, 0.2);
    transform: scale(1.02);
}

.led.active.level-3 {
    background: linear-gradient(135deg, #fdd835, #f9a825);
    box-shadow: 0 0 20px rgba(253, 216, 53, 0.5), 0 0 40px rgba(253, 216, 53, 0.2);
    transform: scale(1.02);
}

.led.active.level-4 {
    background: linear-gradient(135deg, #ffa726, #e65100);
    box-shadow: 0 0 20px rgba(255, 167, 38, 0.5), 0 0 40px rgba(255, 167, 38, 0.2);
    transform: scale(1.02);
}

.led.active.level-5 {
    background: linear-gradient(135deg, #ef5350, #b71c1c);
    box-shadow: 0 0 20px rgba(239, 83, 80, 0.5), 0 0 40px rgba(239, 83, 80, 0.2);
    transform: scale(1.04);
}

.led.active::after {
    color: #fff;
}

/* ===== CONTROL PANEL ===== */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 340px;
    max-width: 90vw;
}

.control-panel button {
    font-family: 'Outfit', sans-serif;
    font-size: 1em;
    font-weight: 600;
    padding: 16px 30px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    color: #fff;
    letter-spacing: 1px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.control-panel button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-panel button:active {
    transform: scale(0.96);
}

#btn-default,
#btn-orbs-on {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#btn-level5,
#btn-orbs-off,
#btn-dots-off {
    background: linear-gradient(135deg, #ef5350, #b71c1c) !important;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3);
}

#btn-dots-on {
    background: linear-gradient(135deg, #00e676, #00c853) !important;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
    color: #0a1a0a;
}

/* ===== FILTER GROUPS ===== */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-label {
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.filter-separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    margin: 8px 0;
}

#btn-screamer {
    background: linear-gradient(135deg, #d32f2f, #b71c1c, #880e0e) !important;
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.4);
    animation: screamer-pulse 2s ease-in-out infinite;
}

@keyframes screamer-pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(211, 47, 47, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(211, 47, 47, 0.7), 0 0 15px rgba(211, 47, 47, 0.3);
    }
}

/* ===== VIDEO CANVAS (index.html) ===== */
#video-canvas {
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    max-width: 90vw;
    max-height: 80vh;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ===== STATUS TEXT ===== */
#status {
    margin-top: 20px;
    font-size: 0.75em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1px;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}