/* ═══ CYBER-SAFETY COMMON STYLES ═══ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&family=Bangers&family=Comfortaa:wght@400;600;700&display=swap');

:root {
    --bg: #0f172a;
    --accent: #38bdf8;
    --accent2: #a855f7;
    --gold: #fbbf24;
    --green: #22c55e;
    --red: #ef4444;
    --fire: #ff6432;
    --text: #e5e5e5;
    --muted: #64748b;
    --glass: rgba(15,23,42,0.85);
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body { width:100%; height:100%; overflow:hidden; }
body { background:var(--bg); color:var(--text); }

/* ═══ SLIDES ═══ */
.slide {
    position:fixed; inset:0;
    display:none; flex-direction:column;
    align-items:center; justify-content:center;
    text-align:center; padding:4vh 5vw 10vh;
    opacity:0; transition:opacity .4s;
    overflow-y:auto; z-index:1;
}
.slide.active { display:flex; opacity:1; }

/* ═══ LOCK SCREEN OVERLAY ═══ */
#lockOverlay {
    position:fixed; inset:0; z-index:99999;
    background:linear-gradient(135deg,#0a0a1a,#1a0a2e);
    display:none; flex-direction:column;
    align-items:center; justify-content:center;
    text-align:center;
}
#lockOverlay.active { display:flex; }
#lockOverlay .lock-icon { font-size:120px; margin-bottom:20px; animation:lockFloat 3s ease-in-out infinite; }
#lockOverlay .lock-text { font-size:clamp(1.8rem,5vw,3.5rem); font-weight:900; color:#fff; max-width:80%; line-height:1.3; }
#lockOverlay .lock-sub { font-size:1rem; color:var(--muted); margin-top:15px; }
@keyframes lockFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }

/* ═══ TYPOGRAPHY — readable from far ═══ */
h1 { font-size:clamp(2.5rem,6vw,4.5rem); font-weight:900; margin-bottom:12px; line-height:1.1; }
h2 { font-size:clamp(2rem,5vw,3.5rem); font-weight:900; margin-bottom:12px; line-height:1.2; }
h3 { font-size:clamp(1.3rem,3vw,2rem); font-weight:700; margin-bottom:10px; }
p { font-size:clamp(1rem,2.5vw,1.4rem); color:rgba(255,255,255,.7); line-height:1.7; margin-bottom:8px; max-width:800px; }
.big-emoji { font-size:clamp(60px,15vw,120px); margin-bottom:15px; filter:drop-shadow(0 0 25px rgba(255,255,255,.12)); }
.stat-number { font-size:clamp(4rem,12vw,8rem); font-weight:900; line-height:1; margin:10px 0; }

/* ═══ BUTTONS ═══ */
.btn {
    padding:14px 32px; border-radius:14px; border:2px solid transparent;
    cursor:pointer; font-weight:700; font-size:clamp(.9rem,2vw,1.15rem);
    color:#fff; transition:all .25s; display:inline-flex; align-items:center; gap:8px;
}
.btn:hover { transform:scale(1.05); filter:brightness(1.1); }
.btn:disabled { opacity:.3; transform:none!important; }
.btn-fire { background:var(--fire); border-color:var(--fire); box-shadow:4px 4px 0 var(--accent2); }
.btn-purple { background:var(--accent2); box-shadow:4px 4px 0 var(--fire); }
.btn-green { background:var(--green); box-shadow:4px 4px 0 var(--accent2); }
.btn-red { background:var(--red); box-shadow:4px 4px 0 var(--accent2); }
.btn-gold { background:linear-gradient(135deg,#f59e0b,#b45309); box-shadow:0 6px 30px rgba(245,158,11,.4); }
.btn-warn { background:var(--gold); color:#0a0a0a; border-color:var(--gold); }
.btn-ghost { background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.15); }
.btn-sm { padding:10px 20px; font-size:.9rem; }

/* ═══ NAV ═══ */
.nav { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); display:flex; gap:12px; z-index:1000; }
.nav-btn {
    width:50px; height:50px; border-radius:12px;
    display:flex; align-items:center; justify-content:center;
    font-size:1.3rem; background:rgba(0,0,0,.4); backdrop-filter:blur(10px);
    border:2px solid rgba(255,255,255,.1); cursor:pointer; color:#fff; transition:all .25s;
}
.nav-btn:hover { background:rgba(255,255,255,.1); transform:scale(1.1); }
.nav-btn.hide { display:none; }

/* ═══ HUD ═══ */
.hud { position:fixed; top:14px; right:22px; font-size:1.1rem; font-weight:900; z-index:1000; }
.hud-slide { position:fixed; top:14px; left:22px; font-size:.8rem; z-index:1000; color:rgba(255,255,255,.3); }

/* ═══ SCENARIO BOX ═══ */
.scenario {
    margin:18px 0; padding:25px 30px;
    background:rgba(0,0,0,.25); border-radius:16px;
    border:2px solid rgba(255,255,255,.08);
    max-width:750px; width:100%;
}
.scenario-emoji { font-size:clamp(40px,10vw,70px); margin-bottom:8px; }
.scenario-text { font-size:clamp(1rem,3vw,1.4rem); font-weight:700; }

/* ═══ NOISE METER ═══ */
.noise-area { max-width:700px; width:100%; margin:12px 0; }
.noise-bars { display:flex; gap:12px; }
.noise-col { flex:1; }
.noise-bar-bg { width:100%; height:55px; background:rgba(0,0,0,.3); border-radius:12px; overflow:hidden; border:2px solid rgba(255,255,255,.08); position:relative; }
.noise-fill { height:100%; width:0%; border-radius:12px; transition:width .1s; }
.nf-green { background:linear-gradient(90deg,#064e3b,#22c55e); }
.nf-red { background:linear-gradient(90deg,#7f1d1d,#ef4444); }
.noise-label { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:clamp(.8rem,2vw,1.1rem); color:rgba(255,255,255,.2); pointer-events:none; font-weight:700; }

/* ═══ GAME ELEMENTS ═══ */
.crowd-result { font-size:clamp(.9rem,2.5vw,1.1rem); font-weight:700; min-height:50px; margin-top:10px; line-height:1.5; max-width:750px; }
.game-btns { display:flex; gap:10px; flex-wrap:wrap; justify-content:center; margin-top:10px; }
.game-prog { margin-top:6px; font-size:.8rem; color:rgba(255,255,255,.25); }

/* ═══ TIMER RING ═══ */
.timer-ring {
    width:100px; height:100px; border-radius:50%;
    border:5px solid rgba(255,255,255,.1);
    display:flex; align-items:center; justify-content:center;
    font-size:2.5rem; font-weight:900; margin:12px auto;
}
.timer-ring.pulse { animation:ringPulse .5s ease-out; }
@keyframes ringPulse { 0%{transform:scale(1);border-color:rgba(251,191,36,.5)} 50%{transform:scale(1.12);border-color:var(--gold)} 100%{transform:scale(1);border-color:rgba(255,255,255,.1)} }

/* ═══ BLITZ ═══ */
.blitz-q { font-size:clamp(1.1rem,3vw,1.6rem); font-weight:700; margin:12px 0; max-width:750px; }
.blitz-timer-bar { width:100%; max-width:600px; height:10px; background:rgba(0,0,0,.3); border-radius:5px; margin:8px auto; overflow:hidden; }
.blitz-fill { height:100%; background:linear-gradient(90deg,#22c55e,#f59e0b,#ef4444); transition:width .1s linear; border-radius:5px; }
.blitz-answer { font-size:clamp(1.3rem,4vw,2.2rem); font-weight:900; margin:12px 0; min-height:50px; opacity:0; transform:scale(.5); transition:all .4s; }
.blitz-answer.show { opacity:1; transform:scale(1); }

/* ═══ QR DISPLAY ═══ */
.qr-slide { display:flex; flex-direction:column; align-items:center; gap:15px; }
.qr-slide img { width:min(350px,60vw); height:min(350px,60vw); border-radius:20px; box-shadow:0 0 60px rgba(56,189,248,.2); }
.qr-slide .qr-label { font-size:clamp(1.2rem,3vw,1.8rem); font-weight:700; }
.qr-slide .qr-url { font-size:.9rem; color:var(--muted); font-family:monospace; }

/* ═══ TEAM SCOREBOARD ═══ */
.scoreboard { display:flex; gap:15px; flex-wrap:wrap; justify-content:center; margin:15px 0; max-width:800px; }
.score-card { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:14px; padding:15px 20px; min-width:150px; text-align:center; }
.score-card .team-n { font-size:1rem; font-weight:700; color:var(--gold); }
.score-card .team-s { font-size:2rem; font-weight:900; color:var(--green); }

/* ═══ INTERACTIVE TIMER BAR ═══ */
.slide-timer { position:fixed; top:0; left:0; right:0; height:4px; z-index:5000; }
.slide-timer-fill { height:100%; background:linear-gradient(90deg,var(--green),var(--gold),var(--red)); transition:width .5s linear; }

/* ═══ POPUP RESULT ═══ */
.res-overlay { position:fixed; inset:0; background:rgba(0,0,0,.92); display:none; align-items:center; justify-content:center; z-index:9998; padding:20px; }
.res-overlay.open { display:flex; }
.res-box { max-width:520px; width:100%; background:#1a1a2e; border-radius:16px; padding:35px; text-align:center; animation:popIn .3s; }
.res-box.good { border-top:5px solid var(--green); }
.res-box.bad { border-top:5px solid var(--red); }
@keyframes popIn { from{transform:scale(.8);opacity:0} to{transform:scale(1);opacity:1} }

/* ═══ ACTION BUBBLE ═══ */
.action-bubble { position:fixed; font-weight:900; font-size:2.5rem; pointer-events:none; z-index:8000; animation:bPop .8s ease-out forwards; }
@keyframes bPop { 0%{transform:scale(.5) rotate(-10deg);opacity:1} 50%{transform:scale(1.4) rotate(5deg);opacity:1} 100%{transform:scale(.8) translateY(-60px);opacity:0} }
