/* ============================================================
   KIDS TRIVIA — style.css  (Soft Daylight theme)
   Palette: warm white sky + pastel clouds + gentle accents
   Fonts: Fredoka One (display) + Nunito (body)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:         #0d1b3e;
  --bg2:        #111d40;
  --card:       rgba(255,255,255,0.07);
  --card2:      rgba(255,255,255,0.04);
  --card3:      rgba(255,255,255,0.03);
  --a1:         #ff6b9d;
  --a2:         #ffd93d;
  --a3:         #4fffb0;
  --a4:         #5eb3ff;
  --purple:     #c084fc;
  --orange:     #ff9f43;
  --pink:       #f472b6;
  --txt:        #e8f0ff;
  --txt2:       #b8c8e8;
  --muted:      #7891b8;
  --border:     rgba(100,160,255,0.18);
  --border2:    rgba(100,160,255,0.10);
  --shadow:     0 4px 24px rgba(0,10,40,0.5);
  --shadow-lg:  0 8px 48px rgba(0,10,40,0.6);
  --c-green-bg: rgba(79,255,176,0.12);
  --c-green-bd: #4fffb0;
  --c-red-bg:   rgba(255,107,157,0.12);
  --c-red-bd:   #ff6b9d;
  --r:          18px;
  --r-sm:       12px;
  --neon-blue:  #5eb3ff;
  --neon-pink:  #ff6b9d;
  --neon-green: #4fffb0;
  --neon-yell:  #ffd93d;
  --neon-purp:  #c084fc;
}

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

/* ── Base font scale ── */
html { font-size: 18px; }

/* ══ GAMING BACKGROUND ══ */
body {
  min-height: 100vh;
  background: #0d1b3e;
  background-image:
    /* Deep space gradient */
    radial-gradient(ellipse 120% 80% at 50% 0%,   #1a0e4e 0%, transparent 60%),
    radial-gradient(ellipse 80%  60% at 0%   100%, #0a2a1a 0%, transparent 55%),
    radial-gradient(ellipse 60%  50% at 100% 80%,  #1a1040 0%, transparent 55%);
  font-family: 'Nunito', sans-serif;
  color: var(--txt);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 80px;
  overflow-x: hidden;
}

/* ── Animated star field ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at  7%  6%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 18% 18%, rgba(255,255,255,.7), transparent),
    radial-gradient(2px 2px at 32%  4%, rgba(200,220,255,.8), transparent),
    radial-gradient(1px 1px at 45% 22%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 58%  9%, rgba(255,255,255,.9), transparent),
    radial-gradient(2px 2px at 72% 15%, rgba(200,220,255,.7), transparent),
    radial-gradient(1px 1px at 84%  3%, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 93% 25%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 11% 40%, rgba(255,255,255,.4), transparent),
    radial-gradient(2px 2px at 27% 55%, rgba(200,220,255,.5), transparent),
    radial-gradient(1px 1px at 63% 48%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 78% 62%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 40% 75%, rgba(200,220,255,.5), transparent),
    radial-gradient(2px 2px at 55% 88%, rgba(255,255,255,.4), transparent),
    radial-gradient(1px 1px at 88% 82%, rgba(200,220,255,.6), transparent),
    radial-gradient(1px 1px at  3% 72%, rgba(255,255,255,.5), transparent),
    radial-gradient(1px 1px at 95% 45%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 50% 35%, rgba(255,255,255,.3), transparent),
    radial-gradient(2px 2px at 22% 90%, rgba(200,220,255,.4), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,.5), transparent);
  animation: starTwinkle 6s ease-in-out infinite alternate;
}

/* ── Neon grid overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(94,179,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94,179,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 80%);
  animation: gridPulse 8s ease-in-out infinite;
}

/* ── Floating neon orbs ── */
#bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

@keyframes starTwinkle {
  0%   { opacity: .7; }
  50%  { opacity: 1; }
  100% { opacity: .6; }
}
@keyframes gridPulse {
  0%,100% { opacity: .6; }
  50%     { opacity: 1; }
}

#app { position:relative; z-index:1; width:100%; max-width:960px; display:flex; flex-direction:column; align-items:center; gap:0; }

/* ── Screens ── */
.screen { display:none; width:100%; }
.screen.active { display:flex; flex-direction:column; align-items:center; }

/* ══════════════════════════════════════════════════
   FIXED CONTROLS
══════════════════════════════════════════════════ */
.fixed-controls {
  position: fixed; top:14px; right:14px; z-index:200;
  display: flex; align-items: center; gap:8px;
  background: rgba(10,20,60,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  box-shadow: 0 4px 20px rgba(100,140,200,0.18);
  backdrop-filter: blur(8px);
}
.ctrl-btn {
  width:34px; height:34px; border-radius:50%;
  border: 1.5px solid var(--border);
  background: var(--card2);
  color: var(--muted);
  font-size:.95rem; cursor:pointer;
  transition:all .2s;
  display:flex; align-items:center; justify-content:center;
}
.ctrl-btn:hover { border-color:var(--a4); color:var(--a4); background:#e0f0ff; }
.ctrl-btn.muted  { opacity:.45; }
.volume-wrap { display:flex; align-items:center; gap:6px; }
.vol-icon    { font-size:.85rem; color:var(--muted); }
.vol-slider  {
  -webkit-appearance:none; appearance:none;
  width:68px; height:5px; border-radius:99px;
  background: linear-gradient(90deg,#a0c4ff,#c4b5fd);
  outline:none; cursor:pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:15px; height:15px;
  border-radius:50%; background:#60a5fa; cursor:pointer;
  box-shadow:0 2px 6px rgba(96,165,250,.4);
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.game-header { text-align:center; padding:32px 0 10px; animation:fadeDown .6s ease both; }
.logo-emoji  { font-size:2.8rem; display:block; margin-bottom:6px; animation:bounce 2.5s ease-in-out infinite; }
.logo-title  {
  font-family:'Fredoka One',cursive;
  font-size: clamp(2.2rem,7vw,3.6rem);
  background: linear-gradient(135deg,#ffd93d 0%,#ff6b9d 30%,#c084fc 60%,#5eb3ff 100%);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
  letter-spacing:2px; filter:drop-shadow(0 0 20px rgba(94,179,255,.6)) drop-shadow(0 0 40px rgba(192,132,252,.3));
}
.logo-subtitle {
  font-size:1rem; color:var(--muted); margin-top:8px;
  font-weight:700; letter-spacing:2.5px; text-transform:uppercase;
}

/* ══════════════════════════════════════════════════
   LANDING GRID
══════════════════════════════════════════════════ */
.landing-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr));
  gap:16px; width:100%; padding:20px 0; animation:fadeUp .5s ease both;
}
.mode-card {
  background:var(--card); border:1.5px solid var(--border);
  border-radius:var(--r); padding:30px 20px; text-align:center;
  cursor:pointer; transition:all .25s; box-shadow:var(--shadow);
  position:relative; overflow:hidden;
}
.mode-card::before { content:''; position:absolute; top:0;left:0;right:0; height:4px; border-radius:var(--r) var(--r) 0 0; }
.mode-card:nth-child(1)::before { background:linear-gradient(90deg,#f59e0b,#f87171); }
.mode-card:nth-child(2)::before { background:linear-gradient(90deg,#34d399,#60a5fa); }
.mode-card:nth-child(3)::before { background:linear-gradient(90deg,#60a5fa,#a78bfa); }
.mode-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-lg); border-color:rgba(148,163,184,.4); }
.mode-icon  { font-size:3rem; margin-bottom:12px; }
.mode-card h2 { font-family:'Fredoka One',cursive; font-size:1.65rem; margin-bottom:10px; color:var(--txt); }
.mode-card p  { color:var(--muted); font-size:1rem; font-weight:600; line-height:1.5; margin-bottom:20px; }

/* ══════════════════════════════════════════════════
   SHARED CARD
══════════════════════════════════════════════════ */
.welcome-card {
  width:100%; background:rgba(20,40,90,0.6);
  border:1.5px solid var(--border);
  backdrop-filter:blur(16px);
  border-radius:var(--r); padding:32px;
  box-shadow:var(--shadow); position:relative;
  animation:fadeUp .4s ease both; overflow:hidden;
}
.welcome-card::before {
  content:''; position:absolute; top:0;left:0;right:0; height:4px;
  background:linear-gradient(90deg,#60a5fa,#a78bfa,#f87171,#f59e0b);
}
.back-btn {
  background:transparent; border:1.5px solid var(--border);
  border-radius:50px; color:var(--muted);
  font-family:'Nunito',sans-serif; font-weight:700; font-size:.85rem;
  padding:5px 14px; cursor:pointer; margin-bottom:16px; transition:all .2s;
}
.back-btn:hover { border-color:var(--a4); color:var(--a4); background:#e8f4ff; }
.welcome-title { font-family:'Fredoka One',cursive; font-size:clamp(1.7rem,5vw,2.4rem); margin-bottom:12px; color:var(--txt); }
.welcome-desc  { color:var(--muted); font-size:1.05rem; line-height:1.6; font-weight:600; margin-bottom:20px; }
.rules-list    { list-style:none; margin-bottom:22px; }
.rules-list li { padding:8px 0; font-size:1.05rem; font-weight:700; display:flex; align-items:center; gap:12px; color:var(--txt2); }
.rules-list .bullet {
  width:26px; height:26px;
  background:linear-gradient(135deg,#60a5fa,#a78bfa);
  border-radius:7px; display:flex; align-items:center;
  justify-content:center; font-size:.85rem; flex-shrink:0;
}

/* ── Inputs ── */
.name-row,.join-form { display:flex; flex-direction:column; gap:12px; margin-bottom:20px; }
.name-input,.code-input {
  padding:14px 18px; border-radius:var(--r-sm);
  border:2px solid var(--border);
  background:var(--card2); color:var(--txt);
  font-family:'Nunito',sans-serif; font-size:1.1rem; font-weight:700;
  outline:none; transition:border-color .2s; text-transform:uppercase;
}
.name-input { text-transform:none; }
.name-input:focus,.code-input:focus { border-color:var(--a4); box-shadow:0 0 0 3px rgba(96,165,250,.15); }
.join-error { color:var(--a1); font-size:.85rem; font-weight:700; min-height:20px; }

/* ── Buttons ── */
.start-btn {
  padding:16px 36px; border-radius:50px; border:none; cursor:pointer;
  font-family:'Fredoka One',cursive; font-size:1.3rem; letter-spacing:.5px;
  transition:all .25s; display:inline-block;
}
.start-btn.yellow { background:linear-gradient(135deg,#fbbf24,#f87171); color:#fff; box-shadow:0 4px 18px rgba(248,113,113,.30); }
.start-btn.green  { background:linear-gradient(135deg,#34d399,#60a5fa); color:#fff; box-shadow:0 4px 18px rgba(52,211,153,.30); }
.start-btn.blue   { background:linear-gradient(135deg,#60a5fa,#a78bfa); color:#fff; box-shadow:0 4px 18px rgba(96,165,250,.30); }
.start-btn:hover:not(:disabled) { transform:translateY(-3px) scale(1.02); }
.start-btn:disabled { opacity:.4; cursor:not-allowed; transform:none; }

.btn-primary  { padding:14px 32px; border-radius:50px; border:none; background:linear-gradient(135deg,#34d399,#60a5fa); color:#fff; font-family:'Fredoka One',cursive; font-size:1.1rem; cursor:pointer; transition:all .25s; box-shadow:0 4px 18px rgba(52,211,153,.28); }
.btn-primary:hover { transform:translateY(-2px); }
.btn-secondary{ padding:12px 22px; border-radius:50px; border:2px solid var(--border); background:var(--card2); color:var(--txt2); font-family:'Fredoka One',cursive; font-size:1rem; cursor:pointer; transition:all .25s; }
.btn-secondary:hover { border-color:var(--a4); color:var(--a4); background:#e8f4ff; }
.action-btns  { display:flex; gap:12px; flex-wrap:wrap; justify-content:center; }

/* ── Filter Bar ── */
.filter-bar { width:100%; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; padding:16px 0 8px; }
.filter-btn {
  padding:6px 16px; border-radius:50px;
  border:2px solid var(--border);
  background:var(--card); color:var(--muted);
  font-family:'Nunito',sans-serif; font-weight:700; font-size:.78rem;
  cursor:pointer; transition:all .2s; white-space:nowrap;
}
.filter-btn:hover  { border-color:var(--a4); color:var(--a4); background:#e8f4ff; }
.filter-btn.active { background:var(--a4); border-color:var(--a4); color:#fff; box-shadow:0 2px 12px rgba(96,165,250,.35); }

/* ── Host Code ── */
.host-code-box { background:linear-gradient(135deg,#e0f2fe,#ede9fe); border:1.5px solid rgba(96,165,250,.25); border-radius:var(--r-sm); padding:22px; text-align:center; margin-bottom:16px; }
.code-label    { font-size:.8rem; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:2px; margin-bottom:10px; }
.big-code      { font-family:'Fredoka One',cursive; font-size:clamp(2.2rem,8vw,3.2rem); color:#f59e0b; letter-spacing:8px; filter:drop-shadow(0 2px 8px rgba(245,158,11,.3)); }
.copy-btn      { margin-top:10px; padding:7px 18px; border-radius:50px; border:1.5px solid var(--border); background:white; color:var(--txt2); font-family:'Nunito',sans-serif; font-weight:700; font-size:.85rem; cursor:pointer; transition:all .2s; }
.copy-btn:hover{ border-color:var(--a2); color:var(--a2); }
.host-settings { margin:10px 0 16px; }
.setting-row   { display:flex; align-items:center; justify-content:space-between; gap:12px; font-weight:700; font-size:.9rem; color:var(--txt2); }
.setting-select{ background:var(--card2); border:1.5px solid var(--border); border-radius:8px; color:var(--txt); padding:6px 10px; font-family:'Nunito',sans-serif; font-weight:700; font-size:.9rem; cursor:pointer; }
.players-list-wrap{ margin:14px 0; }
.players-title { font-weight:800; font-size:.9rem; margin-bottom:10px; color:var(--muted); text-transform:uppercase; letter-spacing:1px; }
.players-list  { display:flex; flex-wrap:wrap; gap:8px; min-height:40px; }
.player-chip   { padding:6px 16px; border-radius:50px; font-weight:700; font-size:.85rem; animation:fadeUp .3s ease both; }
.waiting-msg   { color:var(--muted); font-size:.88rem; font-weight:600; width:100%; }

/* ── Join Waiting ── */
.join-waiting  { text-align:center; margin-top:20px; }
.join-waiting p{ font-weight:700; color:var(--a3); margin:12px 0; }
.spinner       { width:40px; height:40px; border:4px solid rgba(96,165,250,.2); border-top-color:var(--a4); border-radius:50%; animation:spin .8s linear infinite; margin:0 auto; }

/* ── Join hint ── */
.join-hint-box { background:rgba(254,243,199,.6); border:1.5px solid rgba(245,158,11,.3); border-radius:var(--r-sm); padding:12px 16px; font-size:.84rem; color:#78350f; line-height:1.6; margin-bottom:8px; }
.join-hint-box strong { color:#b45309; }
.join-hint-box code   { background:rgba(0,0,0,.07); padding:1px 5px; border-radius:4px; font-size:.81rem; color:#1d4ed8; }
.join-hint-box kbd    { background:rgba(0,0,0,.07); padding:1px 6px; border-radius:4px; font-size:.79rem; border:1px solid rgba(0,0,0,.12); }

/* ── Multi Ticker ── */
.multi-ticker  { width:100%; background:linear-gradient(90deg,#e0f2fe,#ede9fe); border:1.5px solid var(--border); border-radius:var(--r-sm); padding:8px 16px; margin-top:12px; overflow:hidden; white-space:nowrap; }
.ticker-inner  { display:flex; gap:20px; align-items:center; }
.ticker-item   { font-size:.82rem; font-weight:700; flex-shrink:0; color:var(--txt2); }
.ticker-item.leader { color:#f59e0b; }

/* ══════════════════════════════════════════════════
   SCORE BAR
══════════════════════════════════════════════════ */
.score-bar {
  width:100%; display:flex; justify-content:space-between; align-items:center;
  background:rgba(15,30,80,0.7); border:1.5px solid var(--border);
  backdrop-filter:blur(12px);
  border-radius:var(--r); padding:12px 20px; margin-top:14px;
  box-shadow:var(--shadow); animation:fadeUp .5s .2s ease both;
}
.score-item  { display:flex; flex-direction:column; align-items:center; gap:2px; }
.score-label { font-size:.8rem; color:var(--muted); text-transform:uppercase; letter-spacing:1.5px; font-weight:700; }
.score-value { font-family:'Fredoka One',cursive; font-size:1.7rem; color:var(--a2); line-height:1; }
.score-value.correct  { color:var(--a3); }
.score-value.wrong    { color:var(--a1); }
.player-name-sm { font-size:1rem; max-width:80px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--a4); }

/* ══════════════════════════════════════════════════
   PROGRESS
══════════════════════════════════════════════════ */
.progress-wrapper { width:100%; margin-top:14px; animation:fadeUp .5s .25s ease both; }
.progress-meta    { display:flex; justify-content:space-between; font-size:.78rem; color:var(--muted); font-weight:700; margin-bottom:6px; }
.q-count          { color:var(--txt2); font-size:1rem; font-weight:800; }
.progress-track   { width:100%; height:9px; background:var(--card3); border-radius:99px; overflow:hidden; border:1px solid var(--border2); }
.progress-fill    { height:100%; border-radius:99px; background:linear-gradient(90deg,#60a5fa,#a78bfa); transition:width .5s cubic-bezier(.4,0,.2,1); box-shadow:0 0 8px rgba(96,165,250,.4); }

/* ══════════════════════════════════════════════════
   QUESTION CARD
══════════════════════════════════════════════════ */
.question-card {
  width:100%; background:rgba(15,35,85,0.75); border:1.5px solid var(--border);
  backdrop-filter:blur(16px);
  border-radius:var(--r); padding:28px 28px 24px; margin-top:18px;
  box-shadow:var(--shadow); animation:cardSlideIn .4s ease both;
  position:relative; overflow:hidden;
}
.question-card::before {
  content:''; position:absolute; top:0;left:0;right:0; height:4px;
  background:linear-gradient(90deg,#60a5fa,#a78bfa,#f87171,#f59e0b);
}

/* Category pills */
.category-pill { display:inline-flex; align-items:center; gap:5px; padding:7px 18px; border-radius:50px; font-size:.85rem; font-weight:800; letter-spacing:1.2px; text-transform:uppercase; margin-bottom:18px; }
.cat-science           { background:#dbeafe; color:#2563eb; border:1.5px solid #bfdbfe; }
.cat-us-history        { background:#fee2e2; color:#dc2626; border:1.5px solid #fecaca; }
.cat-movies            { background:#fef3c7; color:#d97706; border:1.5px solid #fde68a; }
.cat-tv-shows          { background:#f3e8ff; color:#7c3aed; border:1.5px solid #e9d5ff; }
.cat-interesting-facts { background:#d1fae5; color:#059669; border:1.5px solid #a7f3d0; }
.cat-current-affairs   { background:#ffedd5; color:#ea580c; border:1.5px solid #fed7aa; }
/* new categories */
.cat-general-knowledge { background:#e0f2fe; color:#0369a1; border:1.5px solid #bae6fd; }
.cat-history           { background:#fee2e2; color:#dc2626; border:1.5px solid #fecaca; }
.cat-movies-tv         { background:#fef3c7; color:#d97706; border:1.5px solid #fde68a; }
.cat-celebrities       { background:#fce7f3; color:#be185d; border:1.5px solid #fbcfe8; }
.cat-cultures-religions{ background:#ecfdf5; color:#065f46; border:1.5px solid #a7f3d0; }
.cat-tech-current-affairs{ background:#ede9fe; color:#6d28d9; border:1.5px solid #ddd6fe; }

/* Timer section */
.timer-section   { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:24px; }
.question-text   { font-family:'Fredoka One',cursive; font-size:clamp(1.3rem,3.5vw,1.9rem); line-height:1.45; flex:1; color:var(--txt); }
.timer-ring-wrap { position:relative; width:88px; height:88px; flex-shrink:0; }
.timer-ring      { transform:rotate(-90deg); }
.timer-ring-bg   { fill:none; stroke:#e0f2fe; stroke-width:6; }
.timer-ring-fill { fill:none; stroke:#f59e0b; stroke-width:6; stroke-linecap:round; transition:stroke-dashoffset 1s linear,stroke .4s; filter:drop-shadow(0 0 4px rgba(245,158,11,.4)); }
.timer-ring-fill.warn { stroke:#f87171; filter:drop-shadow(0 0 6px rgba(248,113,113,.5)); }
.timer-number    { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-family:'Fredoka One',cursive; font-size:1.5rem; color:#f59e0b; }
.timer-number.warn { color:#f87171; }

/* Options */
.options-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:480px){ .options-grid{ grid-template-columns:1fr; } .question-card{ padding:20px 16px; } }
.option-btn {
  width:100%; display:flex; align-items:center; gap:10px;
  padding:16px 20px; border-radius:var(--r-sm);
  border:2px solid var(--border);
  background:rgba(20,45,100,0.6); color:var(--txt);
  font-family:'Nunito',sans-serif; font-weight:700; font-size:1.05rem;
  cursor:pointer; transition:all .2s; text-align:left; line-height:1.4;
}
.option-btn:hover:not(:disabled) { border-color:var(--a4); background:rgba(94,179,255,0.15); transform:translateY(-2px); box-shadow:0 4px 14px rgba(96,165,250,.2); }
.option-btn:disabled { cursor:default; }
.option-letter {
  width:38px; height:38px; border-radius:10px;
  background:linear-gradient(135deg,rgba(94,179,255,0.25),rgba(192,132,252,0.25));
  display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:1.1rem; flex-shrink:0;
  color:var(--a4); transition:all .2s;
}
.option-btn.correct { background:var(--c-green-bg)!important; border-color:var(--c-green-bd)!important; animation:correctPop .4s ease; }
.option-btn.correct .option-letter { background:var(--c-green-bd); color:#fff; }
.option-btn.wrong   { background:var(--c-red-bg)!important;   border-color:var(--c-red-bd)!important;   animation:wrongShake .4s ease; }
.option-btn.wrong .option-letter   { background:var(--c-red-bd);   color:#fff; }

/* Feedback */
.feedback-panel { width:100%; margin-top:14px; border-radius:var(--r); padding:16px 20px; display:none; align-items:flex-start; gap:12px; animation:fadeUp .3s ease; }
.feedback-panel.show       { display:flex; }
.feedback-panel.correct-fb { background:rgba(79,255,176,0.1); border:1.5px solid #4fffb0; box-shadow:0 0 20px rgba(79,255,176,0.2); }
.feedback-panel.wrong-fb   { background:rgba(255,107,157,0.1); border:1.5px solid #ff6b9d; box-shadow:0 0 20px rgba(255,107,157,0.2); }
.feedback-icon    { font-size:1.7rem; flex-shrink:0; line-height:1; }
.feedback-status  { font-family:'Fredoka One',cursive; font-size:1.2rem; margin-bottom:5px; }
.feedback-panel.correct-fb .feedback-status { color:#059669; }
.feedback-panel.wrong-fb   .feedback-status { color:#dc2626; }
.feedback-explanation { font-size:1rem; color:var(--muted); line-height:1.6; font-weight:600; }

/* Multi answers */
.multi-answers { width:100%; margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.multi-chip    { padding:5px 12px; border-radius:50px; font-size:.8rem; font-weight:700; }
.multi-chip.mc { background:var(--c-green-bg); border:1px solid var(--c-green-bd); color:#059669; }
.multi-chip.mw { background:var(--c-red-bg);   border:1px solid var(--c-red-bd);   color:#dc2626; }
.multi-chip.mp { background:#fef3c7; border:1px solid #fde68a; color:#d97706; }

/* Controls */
.controls-row { width:100%; display:flex; justify-content:flex-end; margin-top:16px; gap:10px; animation:fadeUp .4s .3s ease both; }
.next-btn { padding:15px 36px; border-radius:50px; border:none; background:linear-gradient(135deg,#60a5fa,#a78bfa); color:#fff; font-family:'Fredoka One',cursive; font-size:1.2rem; cursor:pointer; transition:all .25s; box-shadow:0 4px 16px rgba(96,165,250,.3); }
.next-btn:hover    { transform:translateY(-2px); }
.next-btn:disabled { opacity:.4; cursor:not-allowed; transform:none; }

/* ══════════════════════════════════════════════════
   BREAK SCREEN
══════════════════════════════════════════════════ */
.break-card {
  width:100%; background:rgba(15,35,80,0.75); border:1.5px solid var(--border);
  backdrop-filter:blur(16px);
  border-radius:var(--r); padding:36px 28px; text-align:center;
  box-shadow:var(--shadow); animation:fadeUp .5s ease both;
  position:relative; overflow:hidden;
}
.break-card::before { content:''; position:absolute; top:0;left:0;right:0; height:4px; background:linear-gradient(90deg,#34d399,#60a5fa,#a78bfa,#f59e0b); }
.break-emoji    { font-size:3.5rem; display:block; margin-bottom:8px; animation:bounce 2s ease-in-out infinite; }
.break-title    {
  font-family:'Fredoka One',cursive; font-size:clamp(1.6rem,6vw,2.4rem);
  background:linear-gradient(135deg,#34d399,#60a5fa);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; margin-bottom:6px;
}
.break-subtitle { color:var(--muted); font-size:.95rem; font-weight:600; margin-bottom:24px; }

/* Break timer ring */
.break-timer-wrap   { position:relative; width:150px; height:150px; margin:0 auto 24px; }
.break-timer-wrap svg { transform:rotate(-90deg); }
.break-ring-bg    { fill:none; stroke:#e0f2fe; stroke-width:10; }
.break-ring-fill  { fill:none; stroke:#34d399; stroke-width:10; stroke-linecap:round; transition:stroke-dashoffset 1s linear,stroke .5s; filter:drop-shadow(0 0 6px rgba(52,211,153,.5)); }
.break-ring-fill.warn   { stroke:#f59e0b; filter:drop-shadow(0 0 6px rgba(245,158,11,.5)); }
.break-ring-fill.danger { stroke:#f87171; filter:drop-shadow(0 0 6px rgba(248,113,113,.5)); }
.break-time-overlay { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.break-time-num { font-family:'Fredoka One',cursive; font-size:2.4rem; color:#059669; line-height:1; }
.break-time-lbl { font-size:.72rem; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:1.5px; }

/* Game selector tabs */
.game-tabs { display:flex; gap:8px; justify-content:center; margin-bottom:16px; flex-wrap:wrap; }
.game-tab  {
  padding:6px 16px; border-radius:50px; cursor:pointer;
  font-family:'Nunito',sans-serif; font-weight:700; font-size:.82rem;
  border:2px solid var(--border); background:var(--card2); color:var(--muted);
  transition:all .2s;
}
.game-tab:hover  { border-color:var(--a4); color:var(--a4); }
.game-tab.active { background:var(--a4); border-color:var(--a4); color:#fff; box-shadow:0 2px 10px rgba(96,165,250,.3); }

/* Mini game wrapper */
.mini-game-wrap { background:var(--card2); border:1.5px solid var(--border); border-radius:var(--r-sm); padding:20px; margin-bottom:20px; }
.mini-title     { font-family:'Fredoka One',cursive; font-size:1.1rem; margin-bottom:14px; color:var(--txt2); }
.mini-game-area { min-height:120px; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; align-items:center; }
.mini-controls  { display:flex; justify-content:space-between; align-items:center; margin-top:12px; }
.mini-score-label { font-size:.88rem; font-weight:700; color:var(--muted); }
.mini-score-label strong { color:var(--a3); }

/* Memory card */
.mem-card {
  width:58px; height:58px; border-radius:10px;
  border:2px solid var(--border); background:linear-gradient(135deg,#e0f2fe,#ede9fe);
  cursor:pointer; font-size:1.6rem;
  display:flex; align-items:center; justify-content:center;
  transition:all .25s; user-select:none; position:relative;
}
.mem-card .mem-front { opacity:0; transition:opacity .2s; }
.mem-card .mem-back  { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:1.4rem; color:var(--a4); }
.mem-card.flipped .mem-front { opacity:1; }
.mem-card.flipped .mem-back  { opacity:0; }
.mem-card.matched { background:linear-gradient(135deg,#d1fae5,#a7f3d0)!important; border-color:var(--a3); cursor:default; }
.mem-card:hover:not(.matched):not(.flipped) { border-color:var(--a4); transform:scale(1.07); box-shadow:0 4px 12px rgba(96,165,250,.2); }

/* Mini Chess */
.chess-board { display:grid; grid-template-columns:repeat(8,1fr); gap:0; border:2px solid var(--border); border-radius:8px; overflow:hidden; width:100%; max-width:320px; margin:0 auto; box-shadow:var(--shadow); }
.chess-cell  { aspect-ratio:1; display:flex; align-items:center; justify-content:center; font-size:1.4rem; cursor:pointer; transition:all .15s; user-select:none; }
.chess-cell.light  { background:#f0d9b5; }
.chess-cell.dark   { background:#b58863; }
.chess-cell.selected   { background:#7fc97f!important; box-shadow:inset 0 0 0 3px #34d399; }
.chess-cell.move-hint  { position:relative; }
.chess-cell.move-hint::after { content:''; position:absolute; width:30%; height:30%; border-radius:50%; background:rgba(52,211,153,.5); }
.chess-cell:hover { opacity:.85; }
.chess-info { font-size:.82rem; font-weight:700; color:var(--muted); text-align:center; margin-top:8px; }

/* Mini Minesweeper */
.mine-board  { display:inline-grid; gap:2px; margin:0 auto; }
.mine-cell   {
  width:32px; height:32px; border-radius:6px;
  font-size:.8rem; font-weight:800; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:all .15s; user-select:none; border:none;
  font-family:'Fredoka One',cursive;
}
.mine-cell.hidden   { background:linear-gradient(135deg,#bfdbfe,#ddd6fe); color:transparent; }
.mine-cell.hidden:hover { background:linear-gradient(135deg,#93c5fd,#c4b5fd); transform:scale(1.05); }
.mine-cell.revealed { background:var(--card); color:var(--txt); cursor:default; }
.mine-cell.mine     { background:#fee2e2; color:#dc2626; }
.mine-cell.flagged  { background:linear-gradient(135deg,#fef3c7,#fed7aa); }
.mine-cell.n1{color:#2563eb;} .mine-cell.n2{color:#16a34a;} .mine-cell.n3{color:#dc2626;}
.mine-cell.n4{color:#7c3aed;} .mine-cell.n5{color:#92400e;} .mine-cell.n6{color:#0e7490;}
.mine-info  { font-size:.82rem; font-weight:700; color:var(--muted); margin-top:8px; text-align:center; }
.mine-controls { display:flex; gap:8px; justify-content:center; margin-top:8px; flex-wrap:wrap; }
.mine-btn { padding:5px 14px; border-radius:50px; border:1.5px solid var(--border); background:var(--card); color:var(--txt2); font-family:'Nunito',sans-serif; font-weight:700; font-size:.8rem; cursor:pointer; transition:all .2s; }
.mine-btn:hover { border-color:var(--a4); color:var(--a4); }
.mine-btn.active { background:var(--a4); border-color:var(--a4); color:#fff; }

.break-score-recap { font-size:.9rem; font-weight:700; color:var(--muted); margin-bottom:16px; }
.break-score-recap strong { color:var(--a2); }

/* ══════════════════════════════════════════════════
   FINAL SCREEN
══════════════════════════════════════════════════ */
.final-card { width:100%; background:rgba(15,35,85,0.75); border:1.5px solid var(--border);
  backdrop-filter:blur(16px); border-radius:var(--r); padding:32px 28px; margin-bottom:16px; text-align:center; box-shadow:var(--shadow); position:relative; overflow:hidden; }
.final-card::before { content:''; position:absolute; top:0;left:0;right:0; height:4px; background:linear-gradient(90deg,#60a5fa,#a78bfa,#f87171,#f59e0b); }
.final-emoji        { font-size:3.8rem; display:block; margin-bottom:10px; animation:bounce 1.5s ease-in-out infinite; }
.final-title        { font-family:'Fredoka One',cursive; font-size:clamp(1.6rem,5vw,2.5rem); background:linear-gradient(135deg,#f59e0b,#f87171); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; margin-bottom:6px; }
.final-score-display{ font-family:'Fredoka One',cursive; font-size:clamp(3.5rem,12vw,5.5rem); color:var(--a2); line-height:1; filter:drop-shadow(0 2px 8px rgba(245,158,11,.35)); }
.final-score-label  { color:var(--muted); font-size:.95rem; font-weight:700; margin-top:4px; }
.final-grade        { font-family:'Fredoka One',cursive; font-size:1.3rem; margin:14px auto 0; padding:8px 22px; border-radius:50px; display:inline-block; }
.grade-star { background:#fef3c7; color:#d97706; border:2px solid #fde68a; }
.grade-good { background:#d1fae5; color:#059669; border:2px solid #a7f3d0; }
.grade-ok   { background:#dbeafe; color:#2563eb; border:2px solid #bfdbfe; }
.grade-try  { background:#fee2e2; color:#dc2626; border:2px solid #fecaca; }
.stats-row  { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; margin-top:20px; }
.stat-box   { background:var(--card2); border:1.5px solid var(--border); border-radius:var(--r-sm); padding:14px 20px; text-align:center; min-width:90px; }
.stat-num   { font-family:'Fredoka One',cursive; font-size:1.9rem; line-height:1; }
.stat-num.green { color:var(--a3); } .stat-num.red { color:var(--a1); } .stat-num.yellow { color:var(--a2); }
.stat-label { font-size:.72rem; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:1px; margin-top:3px; }

/* Leaderboard */
.leaderboard-list { width:100%; display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.lb-row   { display:flex; align-items:center; gap:12px; background:var(--card2); border:1.5px solid var(--border); border-radius:var(--r-sm); padding:12px 16px; }
.lb-rank  { font-family:'Fredoka One',cursive; font-size:1.3rem; width:36px; text-align:center; flex-shrink:0; }
.lb-rank.gold   { color:#d97706; } .lb-rank.silver { color:#94a3b8; } .lb-rank.bronze { color:#92400e; }
.lb-name  { flex:1; font-weight:700; font-size:.95rem; text-align:left; color:var(--txt); }
.lb-score { font-family:'Fredoka One',cursive; font-size:1.2rem; color:var(--a2); }
.lb-row.is-me { background:#e0f2fe; border-color:#bae6fd; }

/* Category breakdown */
.cat-breakdown      { text-align:left; }
.cat-breakdown h3   { font-family:'Fredoka One',cursive; font-size:1rem; color:var(--muted); letter-spacing:1px; margin-bottom:12px; text-align:center; }
.cat-row            { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.cat-row-name       { font-size:.8rem; font-weight:700; min-width:120px; color:var(--txt2); }
.cat-row-bar-track  { flex:1; height:8px; background:var(--card3); border-radius:99px; overflow:hidden; }
.cat-row-bar-fill   { height:100%; border-radius:99px; background:linear-gradient(90deg,#60a5fa,#a78bfa); transition:width .8s cubic-bezier(.4,0,.2,1); }
.cat-row-pct        { font-size:.78rem; font-weight:800; color:var(--a4); min-width:34px; text-align:right; }

/* Confetti */
.confetti { position:fixed; width:10px; height:10px; top:-10px; border-radius:2px; pointer-events:none; animation:confettiFall linear forwards; z-index:300; }

/* ══ Keyframes ══ */
@keyframes fadeDown    { from{opacity:0;transform:translateY(-18px)} to{opacity:1;transform:none} }
@keyframes fadeUp      { from{opacity:0;transform:translateY(14px)}  to{opacity:1;transform:none} }
@keyframes cardSlideIn { from{opacity:0;transform:translateX(28px)}  to{opacity:1;transform:none} }
@keyframes bounce      { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes correctPop  { 0%{transform:scale(1)} 40%{transform:scale(1.04)} 100%{transform:scale(1)} }
@keyframes wrongShake  { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-6px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }
@keyframes spin        { to{transform:rotate(360deg)} }
@keyframes confettiFall{ 0%{transform:translateY(0) rotate(0deg);opacity:1} 100%{transform:translateY(100vh) rotate(720deg);opacity:0} }
@keyframes timerPulse  { 0%,100%{transform:scale(1)} 50%{transform:scale(1.12)} }
@keyframes chipPop     { from{opacity:0;transform:scale(.6)} to{opacity:1;transform:scale(1)} }

/* ══ Responsive ══ */
@media(max-width:600px){
  .score-bar{padding:10px 14px;}
  .score-value{font-size:1.2rem;}
  .final-card,.break-card,.welcome-card{padding:24px 18px;}
  .stats-row{gap:8px;}
  .stat-box{padding:10px 14px;min-width:76px;}
  .controls-row{justify-content:center;}
  .mode-card{padding:20px 14px;}
  .big-code{font-size:2rem;letter-spacing:4px;}
  .fixed-controls{top:10px;right:10px;padding:5px 10px;gap:6px;}
  .vol-slider{width:50px;}
  .chess-cell{font-size:1.1rem;}
  .mine-cell{width:28px;height:28px;font-size:.75rem;}
}

/* ══════════════════════════════════════════════════
   VOICE CALL PANEL
══════════════════════════════════════════════════ */
.voice-panel {
  position: fixed;
  bottom: 20px; right: 20px;
  z-index: 500;
  background: rgba(255,255,255,0.95);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 8px 32px rgba(96,165,250,0.22);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 220px;
  max-width: 260px;
  animation: fadeUp .4s ease both;
}
.voice-panel.hidden { display: none; }
.voice-header {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Fredoka One', cursive;
  font-size: 1rem; color: var(--txt2);
}
.voice-status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d1d5db; display: inline-block; margin-right: 6px;
  transition: background .3s;
}
.voice-status-dot.connected  { background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,.6); animation: pulse-dot 1.5s ease-in-out infinite; }
.voice-status-dot.connecting { background: #f59e0b; animation: pulse-dot 1s ease-in-out infinite; }
.voice-close-btn {
  background: none; border: none; cursor: pointer; font-size: 1rem;
  color: var(--muted); padding: 2px 4px; border-radius: 6px;
  transition: all .2s;
}
.voice-close-btn:hover { background: #fee2e2; color: var(--a1); }
.voice-peers {
  display: flex; flex-direction: column; gap: 6px;
  min-height: 32px;
}
.voice-peer {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 700; color: var(--txt2);
  padding: 5px 8px; border-radius: 10px;
  background: var(--card2); border: 1px solid var(--border);
}
.voice-peer .peer-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.voice-peer.speaking { background: #d1fae5; border-color: #34d399; }
.voice-peer .peer-vol {
  display: flex; gap: 2px; align-items: flex-end; margin-left: auto;
}
.voice-peer .peer-vol span {
  width: 3px; border-radius: 2px; background: #d1d5db;
  transition: height .1s, background .1s;
}
.voice-peer.speaking .peer-vol span { background: #34d399; }
.voice-controls {
  display: flex; gap: 8px; justify-content: center;
}
.voice-btn {
  flex: 1; padding: 9px 0; border-radius: 12px; border: none;
  font-family: 'Fredoka One', cursive; font-size: .9rem;
  cursor: pointer; transition: all .2s; display: flex;
  align-items: center; justify-content: center; gap: 5px;
}
.voice-btn.join-call  { background: linear-gradient(135deg,#34d399,#60a5fa); color: #fff; box-shadow: 0 3px 12px rgba(52,211,153,.3); }
.voice-btn.leave-call { background: linear-gradient(135deg,#f87171,#f59e0b); color: #fff; box-shadow: 0 3px 12px rgba(248,113,113,.3); }
.voice-btn.mute-btn   { background: var(--card2); color: var(--txt2); border: 1.5px solid var(--border); }
.voice-btn.mute-btn.muted { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.voice-btn:hover { transform: translateY(-1px); }
.voice-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.voice-label {
  font-size: .78rem; color: var(--muted); font-weight: 700;
  text-align: center; letter-spacing: .5px;
}
.voice-toggle-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 499;
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: linear-gradient(135deg,#60a5fa,#a78bfa);
  color: #fff; font-size: 1.4rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(96,165,250,.4);
  transition: all .25s; display: flex; align-items: center; justify-content: center;
}
.voice-toggle-fab:hover { transform: scale(1.08); }
.voice-toggle-fab.active { background: linear-gradient(135deg,#34d399,#60a5fa); }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }
@media(max-width:600px){
  .voice-panel { bottom:10px; right:10px; min-width:190px; max-width:220px; }
  .voice-toggle-fab { bottom:10px; right:10px; width:46px; height:46px; font-size:1.2rem; }
}

/* ══════════════════════════════════════════════════
   DRAW & GUESS
══════════════════════════════════════════════════ */

/* Landing card 4th slot */
.mode-card--draw::before { background:linear-gradient(90deg,#a78bfa,#f472b6) !important; }
.start-btn.purple { background:linear-gradient(135deg,#a78bfa,#f472b6); color:#fff; box-shadow:0 4px 18px rgba(167,139,250,.35); }

/* Draw lobby notice */
.draw-voice-notice {
  background:linear-gradient(135deg,rgba(96,165,250,.1),rgba(167,139,250,.1));
  border:1.5px solid rgba(96,165,250,.3);
  border-radius:var(--r-sm); padding:10px 16px;
  font-size:.9rem; font-weight:700; color:var(--a4);
  display:flex; align-items:center; gap:8px;
  margin-bottom:16px;
}

/* ── Draw Screen top bar ── */
.draw-topbar {
  width:100%; display:flex; align-items:center; justify-content:space-between;
  background:var(--card); border:1.5px solid var(--border);
  border-radius:var(--r); padding:10px 18px; margin-top:14px;
  box-shadow:var(--shadow);
}
.draw-round-info { font-family:'Fredoka One',cursive; font-size:1.1rem; color:var(--txt2); }
.draw-drawer-info { font-size:.95rem; font-weight:800; color:var(--a4); text-align:right; }

/* Draw timer ring */
.draw-timer-wrap { position:relative; width:60px; height:60px; flex-shrink:0; }
.draw-timer-svg  { transform:rotate(-90deg); }
.draw-timer-bg   { fill:none; stroke:#e0f2fe; stroke-width:5; }
.draw-timer-fill { fill:none; stroke:#f59e0b; stroke-width:5; stroke-linecap:round;
  transition:stroke-dashoffset 1s linear, stroke .4s; }
.draw-timer-fill.warn   { stroke:#f87171; }
.draw-timer-fill.urgent { stroke:#dc2626; animation:timerPulse .5s ease-in-out infinite; }
.draw-timer-num {
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:1.2rem; color:#f59e0b;
}
.draw-timer-num.warn   { color:#f87171; }
.draw-timer-num.urgent { color:#dc2626; }

/* Word banner */
.draw-word-banner {
  width:100%; text-align:center; padding:10px 0;
  font-family:'Fredoka One',cursive; font-size:1.5rem; color:var(--txt);
  letter-spacing:1px; animation:fadeDown .3s ease both;
}
#draw-word-display { background:linear-gradient(135deg,#a78bfa,#f472b6);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }

/* Canvas */
.draw-canvas-wrap {
  width:100%; max-width:700px; position:relative;
  border-radius:var(--r); overflow:hidden;
  box-shadow:var(--shadow-lg); border:2px solid var(--border);
  margin:10px auto 0; background:#fff;
}
#draw-canvas {
  display:block; width:100%; height:auto;
  cursor:crosshair; touch-action:none;
}
.draw-canvas-overlay {
  position:absolute; inset:0; display:flex;
  align-items:center; justify-content:center;
  background:rgba(240,247,255,.85); backdrop-filter:blur(2px);
  transition:opacity .3s;
}
.draw-canvas-overlay.hidden { display:none; }
.draw-overlay-msg {
  font-family:'Fredoka One',cursive; font-size:1.3rem;
  color:var(--txt2); text-align:center; padding:20px;
}

/* Toolbar */
.draw-toolbar {
  width:100%; max-width:700px; margin:10px auto 0;
  background:var(--card); border:1.5px solid var(--border);
  border-radius:var(--r); padding:12px 16px;
  box-shadow:var(--shadow); display:flex; flex-direction:column; gap:10px;
}
.draw-colors { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.color-swatch {
  width:32px; height:32px; border-radius:50%; border:3px solid transparent;
  cursor:pointer; transition:transform .15s, border-color .15s;
  flex-shrink:0;
}
.color-swatch:hover  { transform:scale(1.15); }
.color-swatch.active { border-color:#60a5fa; transform:scale(1.2); box-shadow:0 0 0 2px #fff,0 0 0 4px #60a5fa; }
.draw-tools {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.draw-tool-btn {
  padding:7px 12px; border-radius:10px; border:1.5px solid var(--border);
  background:var(--card2); font-size:1.1rem; cursor:pointer; transition:all .2s;
}
.draw-tool-btn:hover  { border-color:var(--a4); background:#e8f4ff; }
.draw-tool-btn.active { background:var(--a4); border-color:var(--a4); }
.draw-size-slider {
  -webkit-appearance:none; appearance:none;
  height:5px; border-radius:99px; flex:1; min-width:80px; max-width:140px;
  background:linear-gradient(90deg,#a0c4ff,#c4b5fd);
  outline:none; cursor:pointer;
}
.draw-size-slider::-webkit-slider-thumb {
  -webkit-appearance:none; width:18px; height:18px;
  border-radius:50%; background:#60a5fa; cursor:pointer;
  box-shadow:0 2px 6px rgba(96,165,250,.4);
}

/* Bottom scores */
.draw-bottom {
  width:100%; display:flex; align-items:center;
  justify-content:space-between; flex-wrap:wrap;
  gap:10px; margin-top:12px;
}
.draw-scores {
  display:flex; flex-wrap:wrap; gap:8px; flex:1;
}
.draw-score-chip {
  padding:6px 14px; border-radius:50px; font-weight:700; font-size:.88rem;
  border:1.5px solid; animation:chipPop .3s ease both;
}
.draw-score-chip.is-drawer { border-style:dashed; }
.draw-quit-btn { white-space:nowrap; }

/* Round transition overlay */
.draw-round-overlay {
  position:fixed; inset:0; z-index:800;
  background:rgba(240,247,255,.95); backdrop-filter:blur(8px);
  display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:16px;
  animation:fadeUp .4s ease both;
}
.draw-round-overlay h2 {
  font-family:'Fredoka One',cursive;
  font-size:clamp(1.8rem,6vw,3rem);
  background:linear-gradient(135deg,#a78bfa,#f472b6);
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.draw-round-overlay .word-reveal {
  font-family:'Fredoka One',cursive; font-size:clamp(1.3rem,4vw,2rem);
  color:var(--txt); text-align:center;
}
.draw-round-overlay .countdown-num {
  font-family:'Fredoka One',cursive; font-size:4rem;
  color:var(--a4); animation:bounce .6s ease-in-out infinite;
}

/* Responsive */
@media(max-width:600px){
  .draw-canvas-wrap { border-radius:var(--r-sm); }
  .color-swatch { width:28px; height:28px; }
  .draw-timer-wrap { width:50px; height:50px; }
  .draw-timer-num { font-size:1rem; }
}

/* ══════════════════════════════════════════════════
   KARAOKE
══════════════════════════════════════════════════ */

/* Landing card */
.mode-card--karaoke::before { background:linear-gradient(90deg,#f59e0b,#ec4899) !important; }
.start-btn.karaoke {
  background: linear-gradient(135deg,#f59e0b,#ec4899);
  color: #fff;
  box-shadow: 0 4px 18px rgba(245,158,11,.35);
}

/* Top bar */
.karaoke-topbar {
  width:100%; display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  background:var(--card); border:1.5px solid var(--border);
  border-radius:var(--r); padding:12px 18px; margin-top:14px;
  box-shadow:var(--shadow);
}
.karaoke-song-info { flex:1; min-width:0; }
.karaoke-song-title {
  display:block; font-family:'Fredoka One',cursive; font-size:1.15rem;
  color:var(--txt); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.karaoke-song-sub {
  display:block; font-size:.82rem; color:var(--muted); font-weight:700; margin-top:2px;
}
.karaoke-track-badge {
  font-family:'Fredoka One',cursive; font-size:.95rem;
  background:linear-gradient(135deg,rgba(245,158,11,.15),rgba(236,72,153,.15));
  border:1.5px solid rgba(245,158,11,.3);
  color:#d97706; padding:5px 14px; border-radius:50px; white-space:nowrap;
}
.karaoke-quit-btn { white-space:nowrap; }

/* YouTube player wrapper */
.karaoke-player-wrap {
  width:100%; position:relative;
  border-radius:var(--r); overflow:hidden;
  box-shadow:var(--shadow-lg);
  background:#000; margin:10px 0;
  aspect-ratio:16/9; max-height:55vh;
}
#karaoke-yt-player,
#karaoke-yt-player iframe {
  width:100% !important; height:100% !important;
  position:absolute; inset:0; border:none;
}

/* Player overlay */
.karaoke-player-overlay {
  position:absolute; inset:0; z-index:10;
  background:linear-gradient(135deg,rgba(245,158,11,.92),rgba(236,72,153,.92));
  display:flex; align-items:center; justify-content:center;
  transition:opacity .4s;
}
.karaoke-player-overlay.hidden { display:none; }
.karaoke-overlay-inner { text-align:center; padding:20px; }
.karaoke-big-emoji  { font-size:4rem; margin-bottom:8px; animation:bounce 1.5s ease-in-out infinite; }
.karaoke-overlay-title { font-family:'Fredoka One',cursive; font-size:clamp(1.4rem,5vw,2.2rem); color:#fff; margin-bottom:6px; }
.karaoke-overlay-sub   { font-size:1rem; color:rgba(255,255,255,.85); font-weight:700; margin-bottom:8px; }

/* Manager (host) */
.karaoke-manager {
  width:100%; display:flex; flex-direction:column; gap:10px;
}
.karaoke-search-bar,
.karaoke-url-bar {
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
.karaoke-search-note {
  font-size:.8rem; color:var(--muted); font-weight:700; margin-top:-4px;
  padding:0 2px;
}

/* Search results */
.karaoke-results {
  display:flex; flex-direction:column; gap:8px;
  max-height:260px; overflow-y:auto; padding-right:4px;
}
.karaoke-result-item {
  display:flex; align-items:center; gap:10px;
  background:var(--card2); border:1.5px solid var(--border);
  border-radius:var(--r-sm); padding:10px 12px;
  cursor:pointer; transition:all .2s;
}
.karaoke-result-item:hover {
  border-color:var(--a2); background:#fff8f0; transform:translateX(3px);
}
.karaoke-result-thumb {
  width:72px; height:48px; border-radius:8px; object-fit:cover; flex-shrink:0;
}
.karaoke-result-info { flex:1; min-width:0; }
.karaoke-result-title {
  font-weight:700; font-size:.9rem; color:var(--txt);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.karaoke-result-channel { font-size:.78rem; color:var(--muted); margin-top:2px; }
.karaoke-result-add {
  padding:5px 12px; border-radius:50px; border:none;
  background:linear-gradient(135deg,#f59e0b,#ec4899);
  color:#fff; font-weight:700; font-size:.82rem; cursor:pointer;
  flex-shrink:0; white-space:nowrap;
}

/* Playlist */
.karaoke-playlist-wrap {
  background:var(--card2); border:1.5px solid var(--border);
  border-radius:var(--r); padding:14px;
}
.karaoke-playlist-header {
  display:flex; align-items:center; justify-content:space-between;
  font-family:'Fredoka One',cursive; font-size:1rem; color:var(--txt2);
  margin-bottom:10px;
}
.karaoke-ctrl-btn {
  padding:6px 14px; border-radius:50px;
  border:1.5px solid var(--border); background:var(--card);
  font-weight:700; font-size:.88rem; cursor:pointer; transition:all .2s;
  color:var(--txt2);
}
.karaoke-ctrl-btn:hover { border-color:var(--a2); color:var(--a2); }
.karaoke-playlist { display:flex; flex-direction:column; gap:6px; max-height:180px; overflow-y:auto; }
.karaoke-playlist-item {
  display:flex; align-items:center; gap:8px;
  padding:8px 10px; border-radius:10px;
  background:var(--card); border:1.5px solid var(--border);
  cursor:pointer; transition:all .2s; font-size:.88rem; font-weight:700;
}
.karaoke-playlist-item:hover  { border-color:var(--a2); background:#fff8f0; }
.karaoke-playlist-item.active { background:linear-gradient(135deg,rgba(245,158,11,.12),rgba(236,72,153,.12)); border-color:rgba(245,158,11,.4); }
.karaoke-playlist-item .pl-num { font-family:'Fredoka One',cursive; color:var(--a2); width:20px; flex-shrink:0; }
.karaoke-playlist-item .pl-title { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.karaoke-playlist-item .pl-remove { color:var(--a1); cursor:pointer; padding:0 4px; font-size:1rem; opacity:.6; }
.karaoke-playlist-item .pl-remove:hover { opacity:1; }

/* Guest panel */
.karaoke-guest-msg {
  text-align:center; font-family:'Fredoka One',cursive; font-size:1.1rem;
  color:var(--txt2); padding:16px;
  background:linear-gradient(135deg,rgba(245,158,11,.1),rgba(236,72,153,.1));
  border:1.5px solid rgba(245,158,11,.2); border-radius:var(--r);
}

/* Participants */
.karaoke-participants {
  width:100%; display:flex; flex-wrap:wrap; gap:8px;
  padding:8px 0; justify-content:center; min-height:44px;
}
.karaoke-participant {
  display:flex; align-items:center; gap:6px;
  padding:6px 14px; border-radius:50px;
  font-weight:700; font-size:.88rem;
  border:1.5px solid; animation:chipPop .3s ease both;
}
.karaoke-participant.singing { animation:chipPop .3s ease both, singPulse 1.2s ease-in-out infinite; }
@keyframes singPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.06)} }

/* Scrollbar styling for results/playlist */
.karaoke-results::-webkit-scrollbar,
.karaoke-playlist::-webkit-scrollbar { width:5px; }
.karaoke-results::-webkit-scrollbar-thumb,
.karaoke-playlist::-webkit-scrollbar-thumb { background:var(--border); border-radius:99px; }

@media(max-width:600px){
  .karaoke-topbar { padding:10px 14px; }
  .karaoke-search-bar,.karaoke-url-bar { flex-direction:column; }
  .karaoke-search-bar input,.karaoke-url-bar input { width:100%; }
}

/* ══════════════════════════════════════════════════
   LANDING PAGE REDESIGN — Game Sections
══════════════════════════════════════════════════ */

/* Override old landing grid */
.landing-grid { display: none !important; }

/* Full-width section layout */
.game-section {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px 24px 24px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  animation: fadeUp .5s ease both;
  overflow: hidden;
  position: relative;
}
.game-section:nth-child(1) { animation-delay: 0s;   }
.game-section:nth-child(2) { animation-delay: .08s; }
.game-section:nth-child(3) { animation-delay: .16s; }

/* Coloured left border per section */
.game-section:nth-child(1)::before { content:''; position:absolute; left:0;top:0;bottom:0; width:5px; background:linear-gradient(180deg,#fbbf24,#f87171); border-radius:var(--r) 0 0 var(--r); }
.game-section:nth-child(2)::before { content:''; position:absolute; left:0;top:0;bottom:0; width:5px; background:linear-gradient(180deg,#a78bfa,#f472b6); border-radius:var(--r) 0 0 var(--r); }
.game-section:nth-child(3)::before { content:''; position:absolute; left:0;top:0;bottom:0; width:5px; background:linear-gradient(180deg,#f59e0b,#ec4899); border-radius:var(--r) 0 0 var(--r); }

/* Section header row */
.game-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding-left: 8px;
}
.game-section-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.08));
}
.game-section-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--txt);
  margin: 0 0 2px;
}
.game-section-sub {
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
  margin: 0;
}

/* Cards row inside a section */
.game-section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

/* Cards inside sections — slightly compact */
.game-section .mode-card {
  padding: 22px 18px;
  margin: 0;
}
.game-section .mode-card h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}
.game-section .mode-card p {
  font-size: .88rem;
  margin-bottom: 16px;
}
.game-section .mode-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

/* Join card — slightly lighter bg to differentiate from Host */
.mode-card--join {
  background: var(--card2) !important;
}
.mode-card--join::before {
  opacity: .6;
}

/* Outline buttons for Join variants */
.start-btn.purple-outline {
  background: transparent;
  color: #7c3aed;
  border: 2.5px solid #a78bfa;
  box-shadow: none;
}
.start-btn.purple-outline:hover:not(:disabled) {
  background: rgba(167,139,250,.12);
  border-color: #7c3aed;
}
.start-btn.karaoke-outline {
  background: transparent;
  color: #b45309;
  border: 2.5px solid #f59e0b;
  box-shadow: none;
}
.start-btn.karaoke-outline:hover:not(:disabled) {
  background: rgba(245,158,11,.12);
  border-color: #d97706;
}

/* Responsive stacking */
@media(max-width:620px){
  .game-section { padding: 16px 16px 20px; }
  .game-section-cards { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   COMPACT GAME COMBO CARDS
══════════════════════════════════════════════════ */

/* Hide old section CSS from previous iteration */
.game-section { display: none !important; }

.game-cards-grid {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 16px;
  animation: fadeUp .5s ease both;
}

/* ── Single combo card ── */
.game-combo-card {
  width: 100%;
  background: rgba(15,30,80,0.7);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  position: relative;
}
.game-combo-card:hover {
  box-shadow: 0 0 30px rgba(94,179,255,.25), var(--shadow-lg);
  transform: translateY(-2px);
}

/* Left accent strip per game */
.trivia-combo  { border-left: 5px solid #fbbf24; }
.draw-combo    { border-left: 5px solid #a78bfa; }
.karaoke-combo { border-left: 5px solid #f59e0b; }

/* Left info panel */
.gcc-left {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  flex: 1;
  min-width: 0;
}
.gcc-icon {
  font-size: 2.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.08));
}
.gcc-info { min-width: 0; }
.gcc-title {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  color: var(--txt);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gcc-sub {
  font-size: .8rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* Right actions panel */
.gcc-actions {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-left: 1.5px solid var(--border);
  height: 100%;
}

/* Thin vertical divider between solo col and host/join col */
.gcc-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  margin: 10px 0;
}

/* Column of action buttons */
.gcc-action-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gcc-action-col--two {
  flex-direction: row;
}

/* Individual action button */
.gcc-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 22px;
  border: none;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all .18s;
  min-width: 88px;
  border-left: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  height: 100%;
}
.gcc-btn:last-child { border-bottom: none; }
.gcc-btn:hover { background: rgba(94,179,255,0.12); }
.gcc-btn:active { transform: scale(.97); }

.gcc-btn-icon  { font-size: 1.5rem; line-height: 1; }
.gcc-btn-label {
  font-family: 'Fredoka One', cursive;
  font-size: .95rem;
  color: var(--txt);
  line-height: 1;
}
.gcc-btn-desc {
  font-size: .68rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .3px;
}

/* Solo button — yellow tint */
.gcc-solo { background: linear-gradient(135deg,rgba(251,191,36,.12),rgba(248,113,113,.08)); }
.gcc-solo:hover { background: linear-gradient(135deg,rgba(251,191,36,.22),rgba(248,113,113,.14)); }
.gcc-solo .gcc-btn-label { color: #b45309; }

/* Host button — green tint */
.gcc-host { background: linear-gradient(135deg,rgba(52,211,153,.12),rgba(96,165,250,.08)); }
.gcc-host:hover { background: linear-gradient(135deg,rgba(52,211,153,.22),rgba(96,165,250,.14)); }
.gcc-host .gcc-btn-label { color: #059669; }

/* Join button — blue tint */
.gcc-join { background: linear-gradient(135deg,rgba(96,165,250,.12),rgba(167,139,250,.08)); }
.gcc-join:hover { background: linear-gradient(135deg,rgba(96,165,250,.22),rgba(167,139,250,.14)); }
.gcc-join .gcc-btn-label { color: #2563eb; }

/* Draw overrides */
.draw-host-btn        { background: linear-gradient(135deg,rgba(167,139,250,.12),rgba(244,114,182,.08)); }
.draw-host-btn:hover  { background: linear-gradient(135deg,rgba(167,139,250,.25),rgba(244,114,182,.16)); }
.draw-host-btn .gcc-btn-label { color: #7c3aed; }
.draw-join-btn        { background: linear-gradient(135deg,rgba(244,114,182,.10),rgba(167,139,250,.07)); }
.draw-join-btn:hover  { background: linear-gradient(135deg,rgba(244,114,182,.20),rgba(167,139,250,.14)); }
.draw-join-btn .gcc-btn-label { color: #be185d; }

/* Karaoke overrides */
.karaoke-host-btn       { background: linear-gradient(135deg,rgba(245,158,11,.12),rgba(236,72,153,.08)); }
.karaoke-host-btn:hover { background: linear-gradient(135deg,rgba(245,158,11,.24),rgba(236,72,153,.14)); }
.karaoke-host-btn .gcc-btn-label { color: #b45309; }
.karaoke-join-btn       { background: linear-gradient(135deg,rgba(236,72,153,.10),rgba(245,158,11,.07)); }
.karaoke-join-btn:hover { background: linear-gradient(135deg,rgba(236,72,153,.20),rgba(245,158,11,.12)); }
.karaoke-join-btn .gcc-btn-label { color: #9d174d; }

/* Responsive — stack on mobile */
@media(max-width:560px){
  .game-combo-card { flex-direction: column; align-items: stretch; }
  .gcc-left { padding: 14px 16px 10px; }
  .gcc-actions { border-left: none; border-top: 1.5px solid var(--border); }
  .gcc-action-col { flex-direction: row; }
  .gcc-action-col--two { flex-direction: row; }
  .gcc-btn { padding: 12px 16px; min-width: 0; flex: 1; border-bottom: none; }
  .gcc-divider { width: 0; margin: 0; }
}

/* ══════════════════════════════════════════════════
   GAMING THEME — Neon effects & animations
══════════════════════════════════════════════════ */

/* Logo pulse glow animation */
.logo-title {
  animation: logoGlow 3s ease-in-out infinite alternate !important;
}
@keyframes logoGlow {
  0%   { filter: drop-shadow(0 0 12px rgba(94,179,255,.5)) drop-shadow(0 0 30px rgba(192,132,252,.3)); }
  50%  { filter: drop-shadow(0 0 22px rgba(255,107,157,.6)) drop-shadow(0 0 45px rgba(255,217,61,.3)); }
  100% { filter: drop-shadow(0 0 18px rgba(79,255,176,.5)) drop-shadow(0 0 35px rgba(94,179,255,.35)); }
}

/* Neon border glow on cards */
.question-card,
.welcome-card,
.break-card,
.final-card {
  border-color: rgba(94,179,255,0.25) !important;
  transition: box-shadow .3s, border-color .3s !important;
}
.question-card:hover,
.welcome-card:hover {
  border-color: rgba(94,179,255,0.45) !important;
  box-shadow: 0 0 20px rgba(94,179,255,.15), var(--shadow) !important;
}

/* Correct answer — green neon flash */
.option-btn.correct {
  background: rgba(79,255,176,0.15) !important;
  border-color: #4fffb0 !important;
  box-shadow: 0 0 20px rgba(79,255,176,0.5), 0 0 40px rgba(79,255,176,0.25) !important;
  animation: correctPop .4s ease, neonFlashGreen .6s ease !important;
}
.option-btn.correct .option-letter {
  background: #4fffb0 !important;
  color: #0d1b3e !important;
  box-shadow: 0 0 12px rgba(79,255,176,0.8) !important;
}
@keyframes neonFlashGreen {
  0%  { box-shadow: 0 0 5px #4fffb0; }
  40% { box-shadow: 0 0 40px #4fffb0, 0 0 80px #4fffb0; }
  100%{ box-shadow: 0 0 20px rgba(79,255,176,0.5); }
}

/* Wrong answer — red neon flash */
.option-btn.wrong {
  background: rgba(255,107,157,0.15) !important;
  border-color: #ff6b9d !important;
  box-shadow: 0 0 20px rgba(255,107,157,0.4) !important;
  animation: wrongShake .4s ease, neonFlashRed .5s ease !important;
}
.option-btn.wrong .option-letter {
  background: #ff6b9d !important;
  color: #fff !important;
  box-shadow: 0 0 12px rgba(255,107,157,0.8) !important;
}
@keyframes neonFlashRed {
  0%  { box-shadow: 0 0 5px #ff6b9d; }
  40% { box-shadow: 0 0 30px #ff6b9d, 0 0 60px rgba(255,107,157,.4); }
  100%{ box-shadow: 0 0 15px rgba(255,107,157,.3); }
}

/* Option button hover — neon glow */
.option-btn:hover:not(:disabled) {
  border-color: rgba(94,179,255,0.7) !important;
  box-shadow: 0 0 16px rgba(94,179,255,0.3), 0 4px 14px rgba(94,179,255,.15) !important;
}

/* Score values — neon colours */
.score-value          { color: #ffd93d !important; text-shadow: 0 0 10px rgba(255,217,61,.6); }
.score-value.correct  { color: #4fffb0 !important; text-shadow: 0 0 10px rgba(79,255,176,.6); }
.score-value.wrong    { color: #ff6b9d !important; text-shadow: 0 0 10px rgba(255,107,157,.6); }

/* Progress bar glow */
.progress-fill {
  box-shadow: 0 0 16px rgba(94,179,255,.8), 0 0 4px rgba(79,255,176,.6) !important;
}

/* Timer ring — neon yellow */
.timer-ring-fill      { stroke: #ffd93d !important; filter: drop-shadow(0 0 6px rgba(255,217,61,.8)) !important; }
.timer-ring-fill.warn { stroke: #ff6b9d !important; filter: drop-shadow(0 0 8px rgba(255,107,157,.9)) !important; }
.timer-number         { color: #ffd93d  !important; text-shadow: 0 0 8px rgba(255,217,61,.7); }
.timer-number.warn    { color: #ff6b9d  !important; text-shadow: 0 0 10px rgba(255,107,157,.9); }

/* Break timer */
.break-ring-fill      { stroke: #4fffb0 !important; filter: drop-shadow(0 0 8px rgba(79,255,176,.7)) !important; }
.break-time-num       { color: #4fffb0  !important; text-shadow: 0 0 10px rgba(79,255,176,.6); }

/* Big code neon */
.big-code { color: #ffd93d !important; text-shadow: 0 0 14px rgba(255,217,61,.7); filter: none !important; }

/* Category pills — neon */
.cat-science            { background:rgba(94,179,255,.15)  !important; color:#5eb3ff !important; border-color:rgba(94,179,255,.4) !important; }
.cat-general-knowledge  { background:rgba(79,255,176,.12)  !important; color:#4fffb0 !important; border-color:rgba(79,255,176,.35) !important; }
.cat-history            { background:rgba(255,107,157,.12) !important; color:#ff6b9d !important; border-color:rgba(255,107,157,.35) !important; }
.cat-movies-tv          { background:rgba(255,217,61,.12)  !important; color:#ffd93d !important; border-color:rgba(255,217,61,.35) !important; }
.cat-celebrities        { background:rgba(192,132,252,.12) !important; color:#c084fc !important; border-color:rgba(192,132,252,.35) !important; }
.cat-cultures-religions { background:rgba(251,146,60,.12)  !important; color:#fb923c !important; border-color:rgba(251,146,60,.35) !important; }

/* Buttons — neon tint */
.start-btn.yellow { background: linear-gradient(135deg,#ffd93d,#ff6b9d) !important; box-shadow: 0 4px 20px rgba(255,217,61,.4) !important; color:#0d1b3e !important; }
.start-btn.green  { background: linear-gradient(135deg,#4fffb0,#5eb3ff) !important; box-shadow: 0 4px 20px rgba(79,255,176,.4) !important; color:#0d1b3e !important; }
.start-btn.blue   { background: linear-gradient(135deg,#5eb3ff,#c084fc) !important; box-shadow: 0 4px 20px rgba(94,179,255,.4) !important; }
.start-btn:hover:not(:disabled) { filter: brightness(1.15) !important; box-shadow: 0 4px 30px rgba(255,255,255,.25) !important; }

/* Next btn */
.next-btn {
  background: linear-gradient(135deg,#5eb3ff,#c084fc) !important;
  box-shadow: 0 4px 20px rgba(94,179,255,.5) !important;
}

/* Filter buttons */
.filter-btn.active {
  background: rgba(94,179,255,.2) !important;
  border-color: rgba(94,179,255,.7) !important;
  box-shadow: 0 0 14px rgba(94,179,255,.35) !important;
}

/* Inputs dark theme */
.name-input, .code-input {
  background: rgba(15,30,80,0.7) !important;
  border-color: rgba(94,179,255,.25) !important;
  color: var(--txt) !important;
}
.name-input:focus, .code-input:focus {
  border-color: rgba(94,179,255,.7) !important;
  box-shadow: 0 0 0 3px rgba(94,179,255,.15) !important;
}
.name-input::placeholder, .code-input::placeholder { color: var(--muted) !important; }

/* Player chips neon */
.player-chip {
  border-width: 1.5px !important;
  box-shadow: 0 0 8px rgba(0,0,0,.3) !important;
}

/* Feedback panel dark bg */
.feedback-panel.correct-fb { background:rgba(79,255,176,0.08) !important; }
.feedback-panel.wrong-fb   { background:rgba(255,107,157,0.08) !important; }
.feedback-status, .feedback-explanation { color: var(--txt) !important; }
.feedback-panel.correct-fb .feedback-status { color: #4fffb0 !important; text-shadow: 0 0 8px rgba(79,255,176,.5); }
.feedback-panel.wrong-fb   .feedback-status { color: #ff6b9d !important; text-shadow: 0 0 8px rgba(255,107,157,.5); }

/* Multi ticker dark */
.multi-ticker { background:rgba(15,30,80,0.7) !important; backdrop-filter:blur(8px); }

/* Game combo card neon border on hover */
.game-combo-card:hover {
  border-color: rgba(94,179,255,.5) !important;
}
.trivia-combo  { border-left-color: #ffd93d !important; }
.draw-combo    { border-left-color: #c084fc !important; }
.karaoke-combo { border-left-color: #ff6b9d !important; }

/* GCC label neons */
.gcc-solo  .gcc-btn-label { color: #ffd93d !important; text-shadow: 0 0 6px rgba(255,217,61,.4); }
.gcc-host  .gcc-btn-label { color: #4fffb0 !important; text-shadow: 0 0 6px rgba(79,255,176,.4); }
.gcc-join  .gcc-btn-label { color: #5eb3ff !important; text-shadow: 0 0 6px rgba(94,179,255,.4); }

/* Score bar items */
.score-label { color: rgba(184,200,232,.7) !important; }
.q-count     { color: rgba(184,200,232,.9) !important; }

/* Feedback icon bounce */
.feedback-icon { animation: feedbackBounce .4s ease both; }
@keyframes feedbackBounce { 0%{transform:scale(0)} 60%{transform:scale(1.3)} 100%{transform:scale(1)} }

/* Firework particles */
@keyframes emojiRain {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}
@keyframes rippleOut {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(3);   opacity: 0; }
}

/* Spinner neon */
.spinner { border-color:rgba(94,179,255,.2) !important; border-top-color:#5eb3ff !important; }

/* Welcome-card back btn */
.back-btn { border-color:rgba(94,179,255,.3) !important; color:var(--muted) !important; }
.back-btn:hover { border-color:#5eb3ff !important; color:#5eb3ff !important; background:rgba(94,179,255,.1) !important; }

/* Break title gradient */
.break-title { background:linear-gradient(135deg,#4fffb0,#5eb3ff) !important; -webkit-background-clip:text !important; background-clip:text !important; }

/* Final score */
.final-score-display { color:#ffd93d !important; filter:drop-shadow(0 0 16px rgba(255,217,61,.6)) !important; }
.final-title { background:linear-gradient(135deg,#ffd93d,#ff6b9d) !important; -webkit-background-clip:text !important; background-clip:text !important; }

/* Stat boxes dark */
.stat-box    { background:rgba(15,30,80,0.5) !important; }
.stat-num.green  { color:#4fffb0 !important; text-shadow:0 0 8px rgba(79,255,176,.5); }
.stat-num.red    { color:#ff6b9d !important; text-shadow:0 0 8px rgba(255,107,157,.5); }
.stat-num.yellow { color:#ffd93d !important; text-shadow:0 0 8px rgba(255,217,61,.5); }

/* Leaderboard dark */
.lb-row   { background:rgba(15,30,80,0.5) !important; }
.lb-rank.gold   { color:#ffd93d !important; text-shadow:0 0 10px rgba(255,217,61,.6); }
.lb-rank.silver { color:#b8c8e8 !important; }
.lb-rank.bronze { color:#fb923c !important; text-shadow:0 0 8px rgba(251,146,60,.5); }
.lb-row.is-me { background:rgba(94,179,255,.15) !important; border-color:rgba(94,179,255,.4) !important; }

/* Grade badges dark */
.grade-star { background:rgba(255,217,61,.15) !important; color:#ffd93d !important; border-color:rgba(255,217,61,.4) !important; }
.grade-good { background:rgba(79,255,176,.12) !important; color:#4fffb0 !important; border-color:rgba(79,255,176,.35) !important; }
.grade-ok   { background:rgba(94,179,255,.12) !important; color:#5eb3ff !important; border-color:rgba(94,179,255,.35) !important; }
.grade-try  { background:rgba(255,107,157,.12) !important; color:#ff6b9d !important; border-color:rgba(255,107,157,.35) !important; }

/* Karaoke dark */
.karaoke-topbar,
.karaoke-playlist-wrap,
.karaoke-manager { background:rgba(15,30,80,0.7) !important; backdrop-filter:blur(12px) !important; }
.karaoke-result-item { background:rgba(20,40,90,0.7) !important; }
.karaoke-result-item:hover { background:rgba(94,179,255,.12) !important; border-color:rgba(94,179,255,.5) !important; }
.karaoke-playlist-item { background:rgba(20,45,100,0.7) !important; }
.karaoke-playlist-item.active { background:rgba(94,179,255,.15) !important; border-color:rgba(94,179,255,.4) !important; }

/* Draw toolbar dark */
.draw-toolbar { background:rgba(15,30,80,0.75) !important; backdrop-filter:blur(12px) !important; }
.draw-topbar  { background:rgba(15,30,80,0.75) !important; backdrop-filter:blur(12px) !important; }

/* Mini game dark */
.mini-game-wrap { background:rgba(15,30,80,0.6) !important; }
.mem-card { background:linear-gradient(135deg,rgba(94,179,255,.2),rgba(192,132,252,.2)) !important; }
.chess-cell.light { background:#1a3a5c !important; }
.chess-cell.dark  { background:#0d2040 !important; }

/* Multi chip dark */
.multi-chip.mc { background:rgba(79,255,176,.12) !important; border-color:rgba(79,255,176,.4) !important; color:#4fffb0 !important; }
.multi-chip.mw { background:rgba(255,107,157,.12) !important; border-color:rgba(255,107,157,.4) !important; color:#ff6b9d !important; }

/* Confetti still exists as CSS fallback */
.confetti { position:fixed; top:-10px; border-radius:2px; pointer-events:none; animation:confettiFall linear forwards; z-index:300; }

/* ══════════════════════════════════════════════════
   GEO GUESS GAME
══════════════════════════════════════════════════ */

/* Landing card */
.geo-combo { border-left: 5px solid #4fffb0 !important; }
.geo-solo-btn .gcc-btn-label { color: #4fffb0 !important; }
.geo-host-btn .gcc-btn-label { color: #5eb3ff !important; }
.geo-join-btn .gcc-btn-label { color: #c084fc !important; }
.geo-solo-btn { background:linear-gradient(135deg,rgba(79,255,176,.12),rgba(94,179,255,.08)) !important; }
.geo-host-btn { background:linear-gradient(135deg,rgba(94,179,255,.12),rgba(79,255,176,.08)) !important; }
.geo-join-btn { background:linear-gradient(135deg,rgba(192,132,252,.12),rgba(94,179,255,.08)) !important; }
.geo-solo-btn:hover { background:linear-gradient(135deg,rgba(79,255,176,.25),rgba(94,179,255,.15)) !important; }
.geo-host-btn:hover { background:linear-gradient(135deg,rgba(94,179,255,.25),rgba(79,255,176,.15)) !important; }
.geo-join-btn:hover { background:linear-gradient(135deg,rgba(192,132,252,.25),rgba(94,179,255,.15)) !important; }

/* Start button */
.start-btn.geo-btn {
  background: linear-gradient(135deg,#4fffb0,#5eb3ff);
  color: #0d1b3e;
  box-shadow: 0 4px 20px rgba(79,255,176,.4);
}
.start-btn.geo-btn:hover:not(:disabled) {
  filter: brightness(1.15);
  box-shadow: 0 4px 30px rgba(79,255,176,.6);
}

/* ── Top bar ── */
.geo-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15,30,80,0.7);
  backdrop-filter: blur(12px);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 10px 18px;
  margin-top: 14px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.geo-score-area {
  display: flex; flex-direction: column; align-items: center;
}
.geo-score-label { font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.geo-score-val   { font-family:'Fredoka One',cursive; font-size: 1.6rem; color: #4fffb0; text-shadow: 0 0 10px rgba(79,255,176,.6); }
.geo-round-area  { flex:1; text-align:center; font-family:'Fredoka One',cursive; font-size:1.1rem; color:var(--txt2); }

/* Geo timer */
.geo-timer-wrap  { position:relative; width:58px; height:58px; flex-shrink:0; }
.geo-timer-svg   { transform:rotate(-90deg); }
.geo-timer-bg    { fill:none; stroke:rgba(94,179,255,.15); stroke-width:5; }
.geo-timer-fill  { fill:none; stroke:#4fffb0; stroke-width:5; stroke-linecap:round;
  transition:stroke-dashoffset 1s linear, stroke .4s;
  filter:drop-shadow(0 0 5px rgba(79,255,176,.7)); }
.geo-timer-fill.warn   { stroke:#ffd93d; filter:drop-shadow(0 0 6px rgba(255,217,61,.8)); }
.geo-timer-fill.urgent { stroke:#ff6b9d; filter:drop-shadow(0 0 8px rgba(255,107,157,.9)); animation:timerPulse .5s ease-in-out infinite; }
.geo-timer-num  { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:1.15rem; color:#4fffb0; }
.geo-timer-num.warn   { color:#ffd93d; }
.geo-timer-num.urgent { color:#ff6b9d; }

/* ── Main layout ── */
.geo-main {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
@media(max-width:700px){
  .geo-main { grid-template-columns: 1fr; }
}

/* ── Globe ── */
.geo-globe-wrap {
  position: relative;
  background: rgba(5,15,50,0.8);
  border: 1.5px solid rgba(79,255,176,.3);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 0 30px rgba(79,255,176,.1), var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  max-width: 560px; width: 100%;
}
#geo-globe {
  width: 100% !important; height: 100% !important;
  cursor: crosshair;
  display: block;
}
.geo-globe-hint {
  position: absolute;
  bottom: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.8);
  font-size: .78rem; font-weight: 700;
  padding: 5px 14px; border-radius: 50px;
  white-space: nowrap;
  pointer-events: none;
}
.geo-controls {
  position: absolute; top: 10px; right: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.geo-ctrl-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(79,255,176,.4);
  background: rgba(0,20,60,.7); backdrop-filter: blur(6px);
  color: #4fffb0; font-size: 1rem; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; justify-content: center;
}
.geo-ctrl-btn:hover { background: rgba(79,255,176,.2); border-color: #4fffb0; }

/* ── Info panel ── */
.geo-info-panel {
  background: rgba(15,30,80,0.75);
  backdrop-filter: blur(16px);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
  min-height: 340px;
  display: flex; align-items: stretch;
}

.geo-state-panel {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; width: 100%; text-align: center;
}
.geo-state-emoji { font-size: 3rem; animation: bounce 2s ease-in-out infinite; }
.geo-state-title { font-family:'Fredoka One',cursive; font-size:1.2rem; color:var(--txt); }
.geo-state-sub   { font-size:.88rem; color:var(--muted); font-weight:600; }

/* Landmark photo */
.geo-landmark-img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(79,255,176,.3);
  box-shadow: 0 0 20px rgba(79,255,176,.15);
}
.geo-landmark-clue {
  background: rgba(79,255,176,.08);
  border: 1.5px solid rgba(79,255,176,.25);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: .9rem; font-weight: 700; color: var(--txt2);
  width: 100%; text-align: left;
}
.geo-clue-label { color: #4fffb0; margin-right: 6px; }

.geo-host-name {
  background: linear-gradient(135deg,rgba(79,255,176,.12),rgba(94,179,255,.08));
  border: 1.5px solid rgba(79,255,176,.4);
  border-radius: var(--r-sm); padding: 10px 16px;
  font-size: 1.05rem; color: var(--txt);
  text-align: center; width: 100%;
  box-shadow: 0 0 14px rgba(79,255,176,.2);
}
.geo-host-name strong { color: #4fffb0; font-size: 1.15rem; }

.geo-guesser-area { width: 100%; }
.geo-guess-prompt {
  background: linear-gradient(135deg,rgba(255,217,61,.1),rgba(79,255,176,.08));
  border: 1.5px solid rgba(255,217,61,.35);
  border-radius: var(--r-sm); padding: 12px;
  font-family:'Fredoka One',cursive; font-size:1rem; color:#ffd93d;
  text-align:center; animation: pulse-dot 1.5s ease-in-out infinite;
}
.geo-reveal-hint {
  background: rgba(94,179,255,.1);
  border: 1.5px solid rgba(94,179,255,.3);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: .95rem; color: var(--txt2); text-align: center;
  margin-top: 8px;
}
.geo-reveal-hint strong { color: #5eb3ff; font-size: 1.05rem; }

.geo-tags {
  display: flex; flex-wrap: wrap; gap: 6px; width: 100%; justify-content: center;
}
.geo-tag {
  padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 700;
  border: 1.5px solid; animation: chipPop .3s ease both;
}
.geo-fact {
  font-size: .82rem; color: var(--muted); font-weight: 600;
  line-height: 1.5; font-style: italic; text-align: center;
  padding: 4px 8px; border-top: 1px solid var(--border); width:100%; padding-top:10px;
}

/* ── Players bar ── */
.geo-players-bar {
  width: 100%; display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 0; justify-content: center;
}

/* Globe quit */
.geo-quit-btn { white-space:nowrap; }

/* Dot pulse on globe */
@keyframes geoDotPulse {
  0%,100%{ opacity:.6; transform:scale(1); }
  50%    { opacity:1;  transform:scale(1.4); }
}

/* ══════════════════════════════════════════════════
   LANDING — Big Icon Tiles
══════════════════════════════════════════════════ */
.landing-icons-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 10px 0 20px;
}
@media(max-width:750px){ .landing-icons-grid { grid-template-columns: repeat(3,1fr); } }
@media(max-width:480px){ .landing-icons-grid { grid-template-columns: repeat(2,1fr); gap:10px; } }

.landing-icon-tile {
  position: relative;
  background: rgba(15,30,85,0.72);
  border: 1.5px solid rgba(94,179,255,0.2);
  border-radius: 20px;
  padding: 26px 16px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  overflow: hidden;
  backdrop-filter: blur(12px);
  animation: fadeUp .5s ease both;
  user-select: none;
}
.landing-icon-tile:nth-child(1){animation-delay:.0s}
.landing-icon-tile:nth-child(2){animation-delay:.06s}
.landing-icon-tile:nth-child(3){animation-delay:.12s}
.landing-icon-tile:nth-child(4){animation-delay:.18s}
.landing-icon-tile:nth-child(5){animation-delay:.24s}
.landing-icon-tile:hover { transform:translateY(-5px) scale(1.03); }
#tile-trivia:hover  { border-color:#ffd93d; box-shadow:0 0 28px rgba(255,217,61,.3); }
#tile-draw:hover    { border-color:#c084fc; box-shadow:0 0 28px rgba(192,132,252,.3); }
#tile-karaoke:hover { border-color:#ff6b9d; box-shadow:0 0 28px rgba(255,107,157,.3); }
#tile-geo:hover     { border-color:#4fffb0; box-shadow:0 0 28px rgba(79,255,176,.3); }
#tile-math:hover    { border-color:#5eb3ff; box-shadow:0 0 28px rgba(94,179,255,.3); }

.lit-glow {
  position: absolute; inset: 0; border-radius: 20px;
  opacity: 0; transition: opacity .3s;
}
.landing-icon-tile:hover .lit-glow { opacity: 1; }
.trivia-glow  { background: radial-gradient(ellipse at 50% 0%, rgba(255,217,61,.18), transparent 70%); }
.draw-glow    { background: radial-gradient(ellipse at 50% 0%, rgba(192,132,252,.18), transparent 70%); }
.karaoke-glow { background: radial-gradient(ellipse at 50% 0%, rgba(255,107,157,.18), transparent 70%); }
.geo-glow     { background: radial-gradient(ellipse at 50% 0%, rgba(79,255,176,.18),  transparent 70%); }
.math-glow    { background: radial-gradient(ellipse at 50% 0%, rgba(94,179,255,.18),  transparent 70%); }

.lit-emoji { font-size: clamp(2.4rem,6vw,3.2rem); z-index:1; transition: transform .2s; }
.landing-icon-tile:hover .lit-emoji { transform: scale(1.15); }
.lit-name  { font-family:'Fredoka One',cursive; font-size:clamp(.9rem,2.5vw,1.15rem); color:var(--txt); z-index:1; text-align:center; }
.lit-sub   { font-size:.72rem; color:var(--muted); font-weight:700; z-index:1; text-align:center; line-height:1.3; }

/* ── Mode picker modal ── */
.mode-picker-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(5,10,35,.7); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeUp .25s ease both;
}
.mode-picker-card {
  background: rgba(15,30,85,0.95);
  border: 1.5px solid rgba(94,179,255,.35);
  border-radius: 24px;
  padding: 28px 28px 24px;
  width: 100%; max-width: 420px;
  box-shadow: 0 0 60px rgba(0,10,50,.8), 0 0 30px rgba(94,179,255,.15);
  animation: cardSlideIn .3s ease both;
}
.mode-picker-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 22px;
}
.mode-picker-emoji { font-size: 2.4rem; }
.mode-picker-title {
  font-family:'Fredoka One',cursive; font-size:1.4rem; color:var(--txt);
}
.mode-picker-sub  { font-size:.82rem; color:var(--muted); font-weight:700; }
.mode-picker-close {
  margin-left:auto; background:none; border:none; color:var(--muted);
  font-size:1.2rem; cursor:pointer; padding:4px 8px; border-radius:8px;
  transition:all .2s;
}
.mode-picker-close:hover { background:rgba(255,107,157,.15); color:#ff6b9d; }
.mode-picker-btns {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
.mode-picker-btns.two-col { grid-template-columns: 1fr 1fr; }

.mpb {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 18px 12px 16px;
  border-radius: 16px; border: 1.5px solid rgba(94,179,255,.25);
  background: rgba(255,255,255,.04);
  cursor: pointer; transition: all .2s;
}
.mpb:hover { transform: translateY(-3px); border-color:rgba(94,179,255,.6); }
.mpb-icon  { font-size: 1.8rem; }
.mpb-label { font-family:'Fredoka One',cursive; font-size:1rem; color:var(--txt); }
.mpb-desc  { font-size:.72rem; color:var(--muted); font-weight:700; }
.mpb-solo    { background:linear-gradient(135deg,rgba(255,217,61,.12),rgba(255,107,157,.08)); }
.mpb-solo:hover { background:linear-gradient(135deg,rgba(255,217,61,.22),rgba(255,107,157,.15)); border-color:#ffd93d; }
.mpb-host    { background:linear-gradient(135deg,rgba(79,255,176,.12),rgba(94,179,255,.08)); }
.mpb-host:hover { background:linear-gradient(135deg,rgba(79,255,176,.22),rgba(94,179,255,.15)); border-color:#4fffb0; }
.mpb-join    { background:linear-gradient(135deg,rgba(94,179,255,.12),rgba(192,132,252,.08)); }
.mpb-join:hover { background:linear-gradient(135deg,rgba(94,179,255,.22),rgba(192,132,252,.15)); border-color:#5eb3ff; }

/* ── Fun Math styles ── */
.start-btn.math-btn {
  background: linear-gradient(135deg,#5eb3ff,#c084fc);
  color: #fff; box-shadow: 0 4px 20px rgba(94,179,255,.4);
}

/* ── Leaflet map overrides ── */
.geo-globe-wrap { position:relative; overflow:hidden; border-radius:var(--r); }
#geo-leaflet-map { border-radius: inherit; }
.leaflet-container { border-radius: inherit; background: #030d20; }
.geo-tooltip {
  background: rgba(10,20,60,0.95) !important;
  border: 1.5px solid rgba(79,255,176,.5) !important;
  border-radius: 8px !important;
  color: #4fffb0 !important;
  font-family: 'Fredoka One', cursive !important;
  font-size: .9rem !important;
  box-shadow: 0 0 14px rgba(79,255,176,.25) !important;
  white-space: nowrap;
}
.geo-tooltip::before { border-top-color: rgba(79,255,176,.5) !important; }
.leaflet-attribution-flag { display:none !important; }
@keyframes geoPinPulse {
  0%,100% { transform:scale(1); box-shadow:0 0 8px rgba(255,60,60,0.8); }
  50%      { transform:scale(1.3); box-shadow:0 0 18px rgba(255,60,60,1); }
}

/* Leaflet map customisation */
.leaflet-container { background: #030d20 !important; font-family: 'Nunito', sans-serif; }
.leaflet-tile-pane { filter: saturate(1.15) contrast(1.05); }
.geo-tooltip, .leaflet-tooltip.geo-tooltip {
  background: rgba(10,20,60,0.92) !important;
  border: 1.5px solid rgba(79,255,176,.5) !important;
  color: #e8f0ff !important;
  font-family: 'Fredoka One', cursive !important;
  font-size: .9rem !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(79,255,176,.2) !important;
}
.leaflet-tooltip-top::before { border-top-color: rgba(79,255,176,.5) !important; }
.leaflet-control-zoom a {
  background: rgba(10,20,60,0.9) !important;
  color: #4fffb0 !important;
  border-color: rgba(79,255,176,.3) !important;
}
.leaflet-control-zoom a:hover { background: rgba(79,255,176,.2) !important; }
@keyframes geoPinPulse {
  0%,100%{ box-shadow: 0 0 8px rgba(255,60,60,.8); }
  50%    { box-shadow: 0 0 18px rgba(255,60,60,1), 0 0 30px rgba(255,100,100,.5); }
}

/* ══════════════════════════════════════════════════
   SCRAMBLE GAME
══════════════════════════════════════════════════ */

/* Landing tile */
.scramble-glow { background: radial-gradient(ellipse at 50% 0%, rgba(255,180,50,.2), transparent 70%); }
#tile-scramble:hover { border-color:#ffb432; box-shadow:0 0 28px rgba(255,180,50,.4); }

/* Lobby start button */
.start-btn.sc-start-btn {
  background: linear-gradient(135deg,#ffb432,#ff6b9d);
  color:#fff; box-shadow: 0 4px 20px rgba(255,180,50,.35);
}
.start-btn.sc-start-btn:hover:not(:disabled){
  filter:brightness(1.12); box-shadow:0 4px 30px rgba(255,180,50,.55);
}

/* ── Game layout ── */
.sc-wrap {
  width:100%; max-width:680px;
  display:flex; flex-direction:column; align-items:center; gap:0;
}

/* Top bar */
.sc-topbar {
  width:100%; display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  background:rgba(15,30,80,.7); backdrop-filter:blur(12px);
  border:1.5px solid var(--border); border-radius:var(--r);
  padding:10px 16px; box-shadow:var(--shadow); margin-bottom:0;
}
.sc-stat { display:flex; flex-direction:column; align-items:center; min-width:36px; }
.sc-stat-label { font-size:.68rem; color:var(--muted); font-weight:700; text-transform:uppercase; }
.sc-stat-val { font-family:'Fredoka One',cursive; font-size:1.5rem; color:var(--txt); }
.sc-stat-val.green { color:#4fffb0; text-shadow:0 0 8px rgba(79,255,176,.5); }
.sc-stat-val.red   { color:#ff6b9d; text-shadow:0 0 8px rgba(255,107,157,.5); }

/* Timer */
.sc-timer-wrap { position:relative; width:54px; height:54px; flex-shrink:0; }
.sc-timer-svg  { transform:rotate(-90deg); overflow:visible; }
.sc-timer-bg   { fill:none; stroke:rgba(255,180,50,.15); stroke-width:5; }
.sc-timer-ring { fill:none; stroke:#ffb432; stroke-width:5; stroke-linecap:round;
  transition:stroke-dashoffset 1s linear, stroke .3s;
  filter:drop-shadow(0 0 5px rgba(255,180,50,.7)); }
.sc-timer-ring.warn   { stroke:#ff6b9d; filter:drop-shadow(0 0 7px rgba(255,107,157,.9)); }
.sc-timer-num { position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:1.1rem; color:#ffb432; }
.sc-timer-num.warn { color:#ff6b9d; animation:timerPulse .5s ease-in-out infinite; }

/* Level badge */
.sc-level-badge {
  margin-left:auto; padding:4px 12px; border-radius:50px;
  font-family:'Fredoka One',cursive; font-size:.82rem;
  border:1.5px solid; transition:all .4s;
}
.sc-level-badge.easy   { color:#4fffb0; border-color:rgba(79,255,176,.4); background:rgba(79,255,176,.08); }
.sc-level-badge.medium { color:#ffd93d; border-color:rgba(255,217,61,.4); background:rgba(255,217,61,.08); }
.sc-level-badge.hard   { color:#ff6b9d; border-color:rgba(255,107,157,.4); background:rgba(255,107,157,.08); }
.sc-level-badge.expert { color:#c084fc; border-color:rgba(192,132,252,.4); background:rgba(192,132,252,.08); }

/* Word card */
.sc-card {
  width:100%; background:rgba(15,30,80,.75); backdrop-filter:blur(16px);
  border:1.5px solid var(--border); border-radius:var(--r);
  padding:24px 20px 18px; box-shadow:var(--shadow);
  display:flex; flex-direction:column; align-items:center; gap:14px;
  animation:cardSlideIn .35s ease both;
  margin-top:8px;
}
.sc-category {
  font-family:'Fredoka One',cursive; font-size:.88rem;
  padding:4px 16px; border-radius:50px;
  background:rgba(255,180,50,.12); border:1.5px solid rgba(255,180,50,.35);
  color:#ffb432; letter-spacing:.5px;
}

/* Scrambled letter tiles */
.sc-scrambled-row {
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
  min-height:56px; padding:4px 0;
}
.sc-letter {
  width:48px; height:52px;
  display:flex; align-items:center; justify-content:center;
  font-family:'Fredoka One',cursive; font-size:1.6rem; color:#fff;
  background:linear-gradient(135deg,rgba(255,180,50,.2),rgba(255,107,157,.1));
  border:2px solid rgba(255,180,50,.45); border-radius:10px;
  box-shadow:0 3px 10px rgba(0,0,0,.3), 0 0 12px rgba(255,180,50,.15);
  animation:scLetterPop .3s ease both;
  transition:transform .15s;
}
.sc-letter:hover { transform:translateY(-3px) scale(1.08); }
@keyframes scLetterPop {
  from { opacity:0; transform:scale(.5) rotate(-10deg); }
  to   { opacity:1; transform:scale(1) rotate(0deg); }
}

/* Hint */
.sc-hint-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:center; }
.sc-hint-btn {
  padding:6px 16px; border-radius:50px; font-size:.82rem; font-weight:700;
  background:rgba(94,179,255,.12); border:1.5px solid rgba(94,179,255,.3);
  color:#5eb3ff; cursor:pointer; transition:all .2s;
}
.sc-hint-btn:hover { background:rgba(94,179,255,.25); border-color:#5eb3ff; }
.sc-hint-btn:disabled { opacity:.4; cursor:not-allowed; }
.sc-hint-text {
  font-size:.88rem; font-weight:700; color:var(--txt2);
  background:rgba(94,179,255,.08); border:1px solid rgba(94,179,255,.2);
  padding:4px 12px; border-radius:8px;
}

/* Input row */
.sc-input-row { display:flex; gap:8px; width:100%; }
.sc-input {
  flex:1; padding:12px 16px; font-size:1.1rem; font-weight:700; font-family:'Nunito',sans-serif;
  background:rgba(255,255,255,.06); border:2px solid rgba(255,180,50,.3);
  border-radius:var(--r-sm); color:var(--txt); outline:none;
  transition:border-color .2s, box-shadow .2s;
  text-transform:uppercase; letter-spacing:2px;
}
.sc-input:focus { border-color:#ffb432; box-shadow:0 0 14px rgba(255,180,50,.25); }
.sc-input.correct-flash { border-color:#4fffb0; box-shadow:0 0 16px rgba(79,255,176,.5); animation:neonFlashGreen .4s ease; }
.sc-input.wrong-flash   { border-color:#ff6b9d; box-shadow:0 0 16px rgba(255,107,157,.5); animation:neonFlashRed .4s ease; }
.sc-submit-btn {
  padding:12px 18px; font-family:'Fredoka One',cursive; font-size:1rem;
  background:linear-gradient(135deg,#ffb432,#ff6b9d); color:#fff;
  border:none; border-radius:var(--r-sm); cursor:pointer;
  box-shadow:0 3px 14px rgba(255,180,50,.35); transition:all .2s;
  white-space:nowrap;
}
.sc-submit-btn:hover { filter:brightness(1.1); transform:translateY(-1px); }
.sc-submit-btn:disabled { opacity:.4; cursor:not-allowed; transform:none; }

/* Shuffle button */
.sc-shuffle-btn {
  padding:8px 20px; border-radius:50px; font-size:.85rem; font-weight:700;
  background:rgba(192,132,252,.12); border:1.5px solid rgba(192,132,252,.3);
  color:#c084fc; cursor:pointer; transition:all .2s;
}
.sc-shuffle-btn:hover { background:rgba(192,132,252,.25); border-color:#c084fc; }

/* Scoreboard (multiplayer) */
.sc-scoreboard {
  width:100%; margin-top:10px;
  display:flex; flex-wrap:wrap; gap:8px; justify-content:center;
}
.sc-score-chip {
  padding:6px 14px; border-radius:50px; font-size:.82rem; font-weight:700;
  border:1.5px solid; display:flex; gap:6px; align-items:center;
}

/* ══════════════════════════════════════════════════
   AI CHATBOT
══════════════════════════════════════════════════ */

/* FAB button */
#chat-fab {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg,#5eb3ff,#c084fc);
  box-shadow: 0 4px 20px rgba(94,179,255,.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 500;
  transition: transform .2s, box-shadow .2s;
  border: 2px solid rgba(255,255,255,.15);
}
#chat-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(94,179,255,.7); }
#chat-fab:active{ transform: scale(.96); }
#chat-fab-emoji { font-size: 1.7rem; z-index:1; }

.chat-fab-pulse {
  position: absolute; width: 100%; height: 100%;
  border-radius: 50%;
  background: rgba(94,179,255,.35);
  animation: chatPulse 2s ease-out infinite;
}
@keyframes chatPulse {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(1.55);opacity: 0;  }
}

/* Chat panel */
#chat-panel {
  position: fixed;
  bottom: 96px; left: 20px;
  width: 340px; max-width: calc(100vw - 32px);
  height: 480px; max-height: calc(100vh - 120px);
  background: rgba(10,18,55,0.97);
  border: 1.5px solid rgba(94,179,255,.3);
  border-radius: 22px;
  box-shadow: 0 8px 40px rgba(0,0,0,.7), 0 0 30px rgba(94,179,255,.1);
  display: flex; flex-direction: column;
  z-index: 500; overflow: hidden;
  animation: chatSlideUp .25s ease both;
}
@keyframes chatSlideUp {
  from { opacity:0; transform: translateY(20px) scale(.95); }
  to   { opacity:1; transform: translateY(0)    scale(1);   }
}

/* Header */
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
  background: linear-gradient(135deg,rgba(94,179,255,.15),rgba(192,132,252,.1));
  border-bottom: 1px solid rgba(94,179,255,.2);
  flex-shrink: 0;
}
.chat-header-avatar { font-size: 2rem; }
.chat-header-name { font-family:'Fredoka One',cursive; font-size:1.05rem; color:var(--txt); }
.chat-header-sub  { font-size:.72rem; color:var(--muted); font-weight:700; }
.chat-close-btn {
  margin-left:auto; background:rgba(255,107,157,.12);
  border:1px solid rgba(255,107,157,.3); color:#ff6b9d;
  font-size:.9rem; cursor:pointer; padding:4px 9px;
  border-radius:8px; transition:all .2s; flex-shrink:0;
}
.chat-close-btn:hover { background:rgba(255,107,157,.25); }

/* Messages area */
.chat-messages {
  flex: 1; overflow-y: auto; padding: 14px 12px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width:4px; }
.chat-messages::-webkit-scrollbar-thumb { background:rgba(94,179,255,.3); border-radius:4px; }

/* Individual messages */
.chat-msg {
  display: flex; gap: 8px; align-items: flex-end;
  animation: chatMsgIn .25s ease both;
}
@keyframes chatMsgIn {
  from { opacity:0; transform:translateY(8px); }
  to   { opacity:1; transform:translateY(0);   }
}
.chat-msg.bot  { flex-direction: row; }
.chat-msg.user { flex-direction: row-reverse; }

.chat-avatar { font-size:1.3rem; flex-shrink:0; margin-bottom:2px; }

.chat-bubble {
  max-width: 80%; padding: 10px 13px;
  border-radius: 16px; font-size:.86rem;
  font-weight: 600; line-height: 1.5; color:var(--txt);
}
.chat-msg.bot  .chat-bubble {
  background: rgba(94,179,255,.12);
  border: 1px solid rgba(94,179,255,.25);
  border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg,rgba(192,132,252,.2),rgba(94,179,255,.15));
  border: 1px solid rgba(192,132,252,.3);
  border-bottom-right-radius: 4px;
  text-align: right;
}

/* Typing dots indicator */
.chat-typing .chat-bubble {
  padding: 12px 16px;
}
.typing-dots { display:flex; gap:4px; align-items:center; }
.typing-dots span {
  width:7px; height:7px; border-radius:50%;
  background:#5eb3ff; animation:typingDot 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2){ animation-delay:.2s; }
.typing-dots span:nth-child(3){ animation-delay:.4s; }
@keyframes typingDot {
  0%,80%,100%{ transform:scale(.6); opacity:.4; }
  40%        { transform:scale(1);  opacity:1;  }
}

/* Input area */
.chat-input-row {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid rgba(94,179,255,.15);
  flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 10px 14px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(94,179,255,.25);
  border-radius: 50px; color:var(--txt);
  font-size:.88rem; font-weight:600; font-family:'Nunito',sans-serif;
  outline:none; transition: border-color .2s;
}
.chat-input:focus { border-color:#5eb3ff; }
.chat-send-btn {
  width:40px; height:40px; border-radius:50%;
  background:linear-gradient(135deg,#5eb3ff,#c084fc);
  border:none; color:#fff; font-size:1rem;
  cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  transition: transform .15s, box-shadow .15s;
  box-shadow:0 2px 10px rgba(94,179,255,.4);
}
.chat-send-btn:hover  { transform:scale(1.1); }
.chat-send-btn:active { transform:scale(.95); }

/* GameBot speaking animation */
@keyframes chatSpeakPulse {
  from { transform: scale(1);    filter: brightness(1); }
  to   { transform: scale(1.25); filter: brightness(1.4) drop-shadow(0 0 6px #4fffb0); }
}

/* Mic button active state (defined here for specificity) */
#chat-mic-btn:hover { background:rgba(79,255,176,.25) !important; transform:scale(1.08); }
#chat-mic-btn:active{ transform:scale(.94); }
