/* ===== 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;
}

/* ===== EMF METER (GLASSMORPHISM CARD) ===== */
.emf-meter {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 24px;
    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;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 220px;
}

/* ===== LED BARS ===== */
.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.2s ease-in-out, box-shadow 0.2s ease-in-out, transform 0.15s 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.4);
    transition: color 0.2s ease;
}

/* Active LED glow colors */
.led.active.level-1 {
    background: linear-gradient(135deg, #4caf50, #2e7d32);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    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), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.led.active.level-3 {
    background: linear-gradient(135deg, #ffeb3b, #f9a825);
    box-shadow: 0 0 20px rgba(255, 235, 59, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.led.active.level-4 {
    background: linear-gradient(135deg, #ff9800, #e65100);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.led.active.level-5 {
    background: linear-gradient(135deg, #f44336, #b71c1c);
    box-shadow: 0 0 25px rgba(244, 67, 54, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: scale(1.04);
}

.led.active::after {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== CONTROL PANEL (GLASSMORPHISM CARD) ===== */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px 28px;
    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;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    width: 340px;
    max-width: 90vw;
}

.control-panel button {
    font-family: 'Outfit', sans-serif;
    font-size: 1em;
    font-weight: 600;
    padding: 16px 28px;
    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 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#btn-default:hover {
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

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

#btn-level5:hover {
    box-shadow: 0 6px 25px rgba(239, 83, 80, 0.5);
}

/* ===== PULSE ANIMATION (reusable) ===== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
