:root {
  --neon: #5BA3F5;
  --hivis: #FF6B00;
  --bg: #000000;
  --panel: #0a0a0a;
  --border: #27272a;
  --muted: #a1a1aa;
  --font-display: "League Spartan", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

body {
  font-family: var(--font-display);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(91, 163, 245, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 163, 245, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  color: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  /* Chrome is sticky in-flow — do NOT use a fixed guess for header height */
  padding: 0 clamp(10px, 3vw, 30px) max(12px, env(safe-area-inset-bottom));
  gap: 16px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(91, 163, 245, 0.03) 0px,
    rgba(91, 163, 245, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 100;
}

.whizarc-chrome {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  max-width: 100vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  border-bottom: 2px solid var(--border);
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(8px);
}

.whizarc-chrome__brand {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--neon);
  text-transform: uppercase;
}

.whizarc-chrome__brand span {
  color: #71717a;
}

.whizarc-chrome__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
}

.whizarc-chrome__player {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--hivis);
  text-transform: uppercase;
}

.high-score-bar {
  flex: 1 1 100%;
  order: 5;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon);
  border: 1px solid var(--border);
  background: #000;
  padding: 6px 8px;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

.back-home {
  position: static;
  z-index: 1000;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: #000;
  border: 2px solid #000;
  padding: 12px 18px;
  border-radius: 0;
  background: var(--hivis);
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.12s steps(2), box-shadow 0.15s ease;
}

.back-home:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
  color: #000;
}

#mode-selector {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 20px);
  width: 100%;
  max-width: 950px;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
}

#mode-selector p {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.14em;
  color: var(--neon);
}

#mode-selector button {
  flex: 1 1 220px;
  max-width: 280px;
  min-height: clamp(120px, 20vh, 180px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 900;
  font-family: var(--font-display);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: #0a0a0a !important;
  border: 2px solid var(--border) !important;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s steps(2);
  padding: 15px;
}

#mode-selector button::before {
  font-size: clamp(2rem, 4vw, 3rem);
  font-style: normal;
  display: block;
  margin-bottom: 2px;
}

#mode-selector button[onclick*="math"]::before { content: "01"; color: var(--neon); font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.2em; }
#mode-selector button[onclick*="vocab"]::before { content: "02"; color: var(--neon); font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.2em; }
#mode-selector button[onclick*="truefalse"]::before { content: "03"; color: var(--neon); font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.2em; }
#mode-selector button[onclick*="memory"]::before { content: "04"; color: var(--neon); font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.2em; }

#mode-selector button:hover {
  transform: translate(-2px, -2px);
  border-color: var(--neon) !important;
  box-shadow: 4px 4px 0 #000, 0 0 16px rgba(91, 163, 245, 0.2);
  color: var(--neon);
}

.quiz-container {
  position: relative;
  width: 100%;
  max-width: 1150px;
  background-color: var(--panel);
  padding: clamp(20px, 3vw, 35px);
  border: 2px solid var(--border);
  border-radius: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
  box-shadow: none;
}

.quiz-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  opacity: 0.5;
}

.game-main-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 25px;
  flex: 1 1 500px;
  min-width: 280px;
  padding-top: 30px;
}

#timer-display {
  position: absolute;
  top: -5px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  z-index: 10;
}

.timer-green { color: var(--neon); text-shadow: 0 0 12px rgba(91, 163, 245, 0.45); }
.timer-orange { color: var(--hivis); text-shadow: 0 0 12px rgba(255, 107, 0, 0.4); }
.timer-red { color: #ff4444; text-shadow: 0 0 12px rgba(255, 68, 68, 0.4); }
.timer-ended { color: #ffffff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.35); }

#round-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 15px;
}

#multiplier-badge {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hivis);
  text-shadow: 0 0 12px rgba(255, 107, 0, 0.5);
  min-height: 20px;
  margin-top: -15px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#multiplier-badge.active {
  opacity: 1;
  transform: scale(1);
  animation: firePulse 1.4s infinite alternate cubic-bezier(0.25, 1, 0.5, 1);
}

#equationdisplay {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.02em;
  padding: 24px 12px;
  min-height: clamp(120px, 22vh, 220px);
  color: #ffffff;
  word-wrap: break-word;
  overflow-wrap: break-word;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--neon);
  background: #050505;
  margin: 8px 0 4px;
}

.action-strip {
  display: flex;
  gap: 15px;
  width: 100%;
  max-width: 640px;
  margin: 8px auto 0;
}

.action-strip button {
  flex: 1;
  max-width: 300px;
  min-height: 84px;
  padding: 22px 16px;
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.02em;
  background-color: var(--hivis) !important;
  color: #000000 !important;
  border: 2px solid #000 !important;
  border-radius: 0;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2);
  white-space: normal;
  word-break: break-word;
}

.action-strip button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

.action-strip button:disabled {
  background-color: #18181b !important;
  color: #52525b !important;
  border-color: var(--border) !important;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

#score {
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-weight: 600;
  text-align: center;
  color: var(--neon);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: block;
  margin: 0 auto;
}

.stats-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.stats-row .hud-divider {
  display: block !important;
  width: 1px !important;
  height: 14px !important;
  background-color: var(--border) !important;
}

.stats-row span {
  font-family: var(--font-mono);
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  color: var(--muted);
}

#streak-counter { color: var(--hivis); }
#accuracy-rate { color: var(--neon); }

.on-fire {
  color: var(--hivis) !important;
  text-shadow: 0 0 15px rgba(255, 107, 0, 0.6) !important;
}

#review-log-details {
  flex: 1 1 280px;
  width: 100%;
  min-height: 250px;
  max-height: 380px;
  background-color: #000;
  border: 2px solid var(--border) !important;
  border-radius: 0;
  padding: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-align: left;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.8;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  white-space: normal;
  letter-spacing: 0.02em;
}

.review-line {
  margin-bottom: 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #18181b;
}

.review-line--ok {
  color: var(--neon);
}

.review-line--bad,
.review-line--timeout {
  color: var(--hivis);
}

.practice-words {
  flex: 1 1 100%;
  width: 100%;
  border: 2px solid var(--border);
  background: #000;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: left;
}

.practice-title {
  color: var(--neon);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  font-size: 0.75rem;
}

.practice-item {
  color: #e4e4e7;
  margin-bottom: 6px;
}

.end-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

#print-review-btn {
  padding: 12px 28px;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background-color: transparent;
  color: var(--neon);
  border: 2px solid var(--neon);
  border-radius: 0;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
}

#print-review-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

#review-log-details::-webkit-scrollbar {
  width: 4px;
}
#review-log-details::-webkit-scrollbar-thumb {
  background: var(--border);
}

#restart-btn {
  width: 100%;
  max-width: 250px;
  padding: 12px 35px;
  font-size: clamp(0.9rem, 1.4vw, 1.05rem);
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background-color: var(--neon);
  color: #000;
  border: 2px solid #000 !important;
  border-radius: 0;
  margin: 10px auto 0 auto;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
  transition: transform 0.12s steps(2), box-shadow 0.12s steps(2);
}

#restart-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #000;
}

@keyframes firePulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.02); }
}

@media (max-width: 850px) {
  .whizarc-chrome {
    flex-wrap: wrap;
    padding: 8px 10px;
    padding-top: max(8px, env(safe-area-inset-top));
    gap: 6px 8px;
  }
  .whizarc-chrome__brand {
    display: none;
  }
  .whizarc-chrome__title {
    font-size: 0.8rem;
    flex: 1 1 auto;
    min-width: 0;
  }
  .whizarc-chrome__player {
    font-size: 9px;
    width: 100%;
    order: 4;
    text-align: center;
  }
  .high-score-bar {
    order: 5;
    font-size: 9px;
    letter-spacing: 0.06em;
    padding: 5px 6px;
  }
  .back-home {
    padding: 8px 10px;
    font-size: 11px;
    box-shadow: 2px 2px 0 #000;
  }
  .quiz-container {
    padding: 14px 12px 18px;
    gap: 14px;
    flex-direction: column;
    width: 100%;
  }
  .game-main-panel {
    padding-top: 28px;
    flex: 1 1 100%;
    order: 1;
    gap: 12px;
    min-width: 0;
  }
  #timer-display {
    position: absolute;
    top: 0;
    right: 0;
    width: auto;
    font-size: 0.8rem;
  }
  #equationdisplay {
    font-size: clamp(1.35rem, 7.2vw, 2.1rem);
    min-height: 52px;
    padding: 8px 4px;
    position: relative;
    z-index: 2;
  }
  #round-title {
    font-size: clamp(1rem, 4.5vw, 1.35rem);
    padding-bottom: 10px;
  }
  #review-log-details {
    flex: 1 1 100%;
    order: 2;
    min-height: 140px;
    max-height: 220px;
  }
  .practice-words,
  .end-actions {
    order: 3;
  }
  .action-strip {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
  }
  .action-strip button {
    width: 100%;
    max-width: 100%;
    min-height: 64px;
    padding: 18px 14px;
    font-size: 1.15rem;
  }
  .stats-row {
    flex-direction: column;
    gap: 8px;
  }
  .stats-row .hud-divider {
    display: none !important;
  }
  #mode-selector button {
    height: auto;
    min-height: 110px;
    flex: 1 1 100%;
    max-width: 100% !important;
  }
  .boss-arena {
    margin-bottom: 4px;
  }
}

@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    display: block !important;
    padding: 24px !important;
  }
  body::before,
  .whizarc-chrome,
  .action-strip,
  .stats-row,
  #timer-display,
  #mute-btn,
  #restart-btn,
  #print-review-btn,
  #multiplier-badge {
    display: none !important;
  }
  .quiz-container {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    max-width: none !important;
    background: #fff !important;
  }
  #round-title,
  #score,
  .practice-words,
  #review-log-details {
    color: #000 !important;
    border-color: #ccc !important;
    max-height: none !important;
  }
  .review-line--ok,
  .review-line--bad,
  .review-line--timeout {
    color: #000 !important;
  }
  #equationdisplay {
    display: none !important;
  }
}

#mute-btn {
  background: none !important;
  border: none !important;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--neon);
}

#mute-btn:hover {
  transform: scale(1.15);
}

/* —— Arcade fight (Number Whiz) — BOSS // CALCULOUS —— */
.boss-arena {
  display: block !important;
  width: 100%;
  margin: 0 0 16px 0;
  border: 3px solid var(--hivis);
  background: #050505;
  padding: 14px 16px;
  box-shadow: 0 0 0 2px #000, 4px 4px 0 #000;
}
.boss-arena__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 10px;
}
.boss-arena__label span:last-child {
  color: var(--hivis);
  font-size: 14px;
}
.boss-hp {
  height: 28px;
  border: 2px solid #000;
  background: #111;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border);
}
.boss-hp__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff3b3b, var(--hivis));
  transition: width 0.35s steps(4);
}
.boss-arena.boss-down {
  border-color: #333;
}
.boss-arena.boss-down .boss-hp__fill { background: #333; }
.screen-shake { animation: wa-shake 0.35s steps(4); }
.screen-flash::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(91, 163, 245, 0.22);
  pointer-events: none;
  z-index: 9998;
  animation: wa-flash 0.28s ease-out forwards;
}
.parry-banner {
  display: none;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hivis);
  text-shadow: 0 0 12px rgba(255, 107, 0, 0.5);
  margin: 6px 0;
  font-size: clamp(0.9rem, 2vw, 1.2rem);
}
.parry-banner.show { display: block; animation: wa-flash 0.4s ease-out; }
@keyframes wa-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(3px, 1px); }
}
@keyframes wa-flash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* —— Truth Bomb: Burn + shrinking cage —— */
.burn-panel {
  display: none;
  width: 100%;
  border: 2px solid var(--neon);
  background: #050a12;
  padding: 18px 16px;
  text-align: center;
  margin-bottom: 12px;
}
.burn-panel.show { display: block; }
.burn-panel__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--neon);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.burn-panel__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.burn-panel__hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #71717a;
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}
.burn-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.burn-panel__actions button {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid #000;
  padding: 12px 18px;
  cursor: pointer;
  min-height: 48px;
}
.burn-btn-go {
  background: var(--hivis);
  color: #000;
  box-shadow: 4px 4px 0 #000;
}
.burn-btn-safe {
  background: #111;
  color: var(--neon);
  border-color: var(--border);
}
.timer-cage {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 900;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: inset 0.2s linear, border-color 0.15s, box-shadow 0.15s;
}
.timer-cage.active {
  border-color: var(--neon);
  box-shadow: inset 0 0 24px rgba(91, 163, 245, 0.15);
}
.timer-cage.pulse {
  animation: cage-pulse 0.35s steps(2) infinite;
}
.timer-cage.snap {
  inset: 0 !important;
  border-color: #fff;
  box-shadow: inset 0 0 40px rgba(91, 163, 245, 0.55);
}
@keyframes cage-pulse {
  0%, 100% { border-color: var(--neon); box-shadow: inset 0 0 18px rgba(91, 163, 245, 0.25); }
  50% { border-color: var(--hivis); box-shadow: inset 0 0 28px rgba(255, 107, 0, 0.35); }
}
body.tf-clear {
  background-image: none !important;
  background-color: #061018 !important;
}
body.tf-clear::before { opacity: 0.35; }

/* —— Vocab glow link + typewriter —— */
.vocab-reveal {
  display: none;
  min-height: 1.2em;
  margin: 4px 0 10px;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  letter-spacing: 0.06em;
  color: var(--neon);
  text-shadow: 0 0 10px rgba(91, 163, 245, 0.35);
}
.vocab-reveal.show { display: block; }
.vocab-glow-line {
  position: fixed;
  height: 2px;
  margin: 0;
  padding: 0;
  transform-origin: 0 50%;
  background: var(--neon);
  box-shadow: 0 0 8px rgba(91, 163, 245, 0.85), 0 0 16px rgba(91, 163, 245, 0.45);
  z-index: 950;
  pointer-events: none;
  animation: vocab-line-draw 0.35s ease-out forwards;
  opacity: 0;
}
@keyframes vocab-line-draw {
  0% { opacity: 0; filter: brightness(2); }
  30% { opacity: 1; }
  100% { opacity: 1; filter: brightness(1); }
}
#equationdisplay.vocab-pulse,
#p1-input.vocab-pulse,
#enter-btn.vocab-pulse {
  animation: vocab-pulse 0.55s ease-out;
  border-color: var(--neon) !important;
  box-shadow: 0 0 18px rgba(91, 163, 245, 0.45);
}
@keyframes vocab-pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
#equationdisplay.vocab-wrong-flash {
  animation: vocab-wrong 0.45s ease-out;
  color: #ff6b6b !important;
}
@keyframes vocab-wrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Arcade initials + leaderboard */
.wa-initials-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  padding: 16px;
}
.wa-initials-overlay[hidden] { display: none !important; }
.wa-initials-panel {
  width: min(420px, 100%);
  border: 2px solid var(--neon);
  background: #0a0a0a;
  padding: 28px 24px;
  box-shadow: 0 0 24px rgba(91, 163, 245, 0.35);
}
.wa-initials-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--neon);
  margin-bottom: 10px;
}
.wa-initials-panel h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.wa-initials-hint,
.wa-initials-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.wa-initials-input {
  width: 100%;
  background: #000;
  border: 2px solid var(--neon);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-align: center;
  text-transform: uppercase;
  padding: 14px;
  margin-bottom: 16px;
  outline: none;
}
.wa-initials-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.wa-initials-submit {
  flex: 1;
  background: var(--hivis);
  color: #000;
  border: 2px solid #000;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
}
.wa-initials-skip {
  background: transparent;
  color: var(--muted);
  border: 2px solid #27272a;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 16px;
  cursor: pointer;
}
.wa-lb-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}
.wa-lb-table th,
.wa-lb-table td {
  border-bottom: 1px solid #27272a;
  padding: 10px 8px;
  text-align: left;
}
.wa-lb-table th {
  color: var(--neon);
  letter-spacing: 0.12em;
  font-size: 10px;
}
.wa-lb-tag {
  color: var(--hivis);
  font-weight: 700;
  letter-spacing: 0.2em;
}
.wa-lb-empty,
.wa-lb-loading {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
}
.wa-lb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.wa-lb-filters button {
  background: #0a0a0a;
  border: 2px solid #27272a;
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 10px;
  cursor: pointer;
}
.wa-lb-filters button.active {
  border-color: var(--neon);
  color: var(--neon);
}

.board-submit-hivis {
  background: var(--hivis) !important;
  color: #000 !important;
  border: 2px solid #000 !important;
  font-family: var(--font-display) !important;
  font-weight: 900 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 12px 18px !important;
  box-shadow: 4px 4px 0 #000 !important;
  cursor: pointer;
}

/* Vocab shatter + red punch */
.vocab-shatter-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}
.vocab-shard {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 900;
  color: #ff4d4d;
  text-shadow: 0 0 8px rgba(255, 40, 40, 0.8);
  animation: vocab-fall 0.55s ease-in forwards;
  will-change: transform, opacity;
}
@keyframes vocab-fall {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), 120vh) rotate(var(--rot)); opacity: 0; }
}
.streak-explode {
  animation: streak-blast 0.45s ease-out forwards;
  color: #ff4d4d !important;
}
@keyframes streak-blast {
  0% { transform: scale(1); filter: blur(0); opacity: 1; }
  40% { transform: scale(1.35); filter: blur(0.5px); }
  100% { transform: scale(1.8); filter: blur(2px); opacity: 0; }
}
.vocab-red-punch {
  position: fixed;
  inset: 0;
  background: rgba(180, 0, 0, 0.55);
  border: 6px solid #ff2020;
  z-index: 3000;
  pointer-events: none;
  animation: red-punch 0.2s steps(2) forwards;
}
@keyframes red-punch {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* Math time drain + combo */
.time-drain-banner {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 90;
  overflow: hidden;
  background: #1a0a00;
  border-top: 2px solid var(--hivis);
  border-bottom: 2px solid var(--hivis);
  color: var(--hivis);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 0;
  pointer-events: none;
}
.time-drain-banner span {
  display: inline-block;
  white-space: nowrap;
  animation: drain-marquee 1.2s linear infinite;
  padding-left: 100%;
}
@keyframes drain-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.combo-critical {
  position: fixed;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%) scale(0.4);
  z-index: 95;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 6vw, 3rem);
  color: var(--hivis);
  text-shadow: 0 0 24px rgba(255, 107, 0, 0.8);
  letter-spacing: 0.08em;
  pointer-events: none;
  animation: combo-pop 0.7s ease-out forwards;
}
@keyframes combo-pop {
  0% { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  35% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* Win banner */
.win-banner {
  display: none;
  text-align: center;
  border: 2px solid var(--hivis);
  background: #120800;
  padding: 18px 14px;
  margin-bottom: 8px;
  animation: win-pop 0.45s ease-out;
}
.win-banner.show { display: block; }
.win-banner__star {
  font-size: 2.5rem;
  color: var(--hivis);
  line-height: 1;
  text-shadow: 0 0 16px rgba(255, 107, 0, 0.6);
}
.win-banner__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-top: 6px;
}
.win-banner__score {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--neon);
  margin-top: 8px;
}
@keyframes win-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Start gate: Timed vs Practice */
.start-gate {
  width: min(520px, 100%);
  margin: 24px auto;
  border: 2px solid var(--border);
  background: var(--panel);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.start-gate h2 {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1.4rem;
  text-align: center;
}
.start-gate p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.06em;
  line-height: 1.5;
}
.start-gate button {
  min-height: 64px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid #000;
  cursor: pointer;
  box-shadow: 4px 4px 0 #000;
}
.start-gate__timed {
  background: var(--hivis);
  color: #000;
}
.start-gate__practice {
  background: #000;
  color: var(--neon);
  border-color: var(--neon);
  box-shadow: 4px 4px 0 var(--neon);
}
.practice-pill {
  display: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hivis);
  border: 1px solid var(--hivis);
  padding: 4px 8px;
  text-align: center;
  margin: 0 auto;
  width: fit-content;
}
.practice-pill.show { display: block; }

.daily-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  background: var(--hivis);
  border: 2px solid #000;
  padding: 4px 8px;
  box-shadow: 3px 3px 0 #000;
}

/* ===== QUIZ V2 — polished play UI (cyan/orange) ===== */
body.quiz-v2 { gap: 0; padding-left: 0; padding-right: 0; }
body.quiz-v2 .chrome-slim {
  flex-wrap: nowrap; gap: 8px; padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
}
body.quiz-v2 .chrome-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 2px solid var(--neon); color: var(--neon); text-decoration: none;
  font-size: 22px; font-weight: 900; background: #050505;
}
body.quiz-v2 .whizarc-chrome__title { flex: 1; text-align: center; font-size: 1rem; }
body.quiz-v2 .whizarc-chrome__brand,
body.quiz-v2 .back-home { display: none !important; }

.start-gate--clean {
  border: none !important; box-shadow: none !important; background: transparent !important;
  gap: 18px; max-width: 360px;
}
.start-gate--clean h2, .start-gate--clean p { display: none; }
.start-mark {
  font-family: var(--font-display); font-weight: 900; font-size: 4rem;
  color: var(--neon); text-shadow: 0 0 24px rgba(91,163,245,.45); text-align: center;
}
.start-gate--clean .start-gate__timed,
.start-gate--clean .start-gate__practice { width: 100%; min-height: 64px; font-size: 1.2rem; }

.quiz-v2-layout {
  width: 100%; max-width: 520px; margin: 0 auto; border: none !important;
  box-shadow: none !important; background: transparent !important; padding: 12px 16px 24px !important;
}
.game-main-panel--flush {
  border: none !important; background: transparent !important; box-shadow: none !important;
  padding: 0 !important; gap: 14px !important;
}

.quiz-progress { width: 100%; }
.quiz-progress__meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  color: var(--neon); text-transform: uppercase; margin-bottom: 10px;
}
.timer-pill {
  display: inline-block !important; position: static !important; width: auto !important;
  padding: 6px 12px; border: 2px solid var(--hivis); color: var(--hivis) !important;
  background: #0a0500; font-weight: 700; font-size: 13px !important; text-shadow: none !important;
}
.quiz-progress__track { display: flex; gap: 5px; width: 100%; }
.quiz-progress__pill {
  flex: 1; height: 8px; border-radius: 999px; background: #1a1a1a; border: 1px solid #2a2a2a;
}
.quiz-progress__pill.done { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 8px rgba(91,163,245,.5); }
.quiz-progress__pill.now { background: var(--hivis); border-color: var(--hivis); box-shadow: 0 0 8px rgba(255,107,0,.55); }

.question-card {
  border: 2px solid var(--neon) !important; background: #050505 !important;
  min-height: clamp(140px, 26vh, 240px) !important; padding: 28px 18px !important;
  font-size: clamp(2rem, 7vw, 3.4rem) !important; margin: 0 !important;
  box-shadow: 0 0 0 1px #000, 0 0 28px rgba(91,163,245,.12);
}

.answer-grid {
  display: grid !important; gap: 12px !important; width: 100% !important;
  max-width: none !important; margin: 0 !important;
}
.answer-grid--4 { grid-template-columns: 1fr 1fr; }
.answer-grid--2 { grid-template-columns: 1fr; }
@media (min-width: 480px) {
  .answer-grid--2 { grid-template-columns: 1fr 1fr; }
}
.answer-btn {
  min-height: 72px !important; max-width: none !important; width: 100% !important;
  border-radius: 14px !important; border: 2px solid var(--neon) !important;
  background: #0a0a0a !important; color: #fff !important; box-shadow: none !important;
  font-size: 1.15rem !important; letter-spacing: .04em;
}
.answer-btn:hover:not(:disabled) {
  transform: none !important; border-color: var(--hivis) !important; color: #000 !important;
  background: var(--hivis) !important;
}
.answer-btn:disabled { opacity: .55; }

.hud-mini {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-family: var(--font-mono); font-size: 14px; color: var(--neon); letter-spacing: .1em;
}
.hud-mini #mute-btn { font-size: 1.1rem; }
.hud-mini #score { color: #fff; font-weight: 700; }
.hud-mini #streak-counter { color: var(--hivis); }

.burn-panel--clean {
  border: 2px solid var(--hivis); background: #0a0500; padding: 16px; gap: 12px;
}
.burn-panel--clean .burn-panel__title,
.burn-panel--clean .burn-panel__hint { display: none; }
.burn-panel--clean .burn-panel__cat {
  text-align: center; font-family: var(--font-mono); letter-spacing: .16em; color: var(--neon);
}
.burn-panel--clean .burn-panel__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

body.quiz-v2 .review-log[hidden],
body.quiz-v2 #accuracy-rate[hidden] { display: none !important; }

@media (max-width: 850px) {
  body.quiz-v2 #timer-display.timer-pill {
    position: static !important; top: auto !important; right: auto !important;
  }
  body.quiz-v2 #equationdisplay.question-card {
    font-size: clamp(1.7rem, 8vw, 2.4rem) !important;
    min-height: 120px !important;
  }
  body.quiz-v2 .answer-btn { min-height: 68px !important; }
}

body.quiz-v2 #timer-display.timer-green { color: var(--neon) !important; border-color: var(--neon); }
body.quiz-v2 #timer-display.timer-orange { color: var(--hivis) !important; border-color: var(--hivis); }
body.quiz-v2 #timer-display.timer-red { color: #ff3355 !important; border-color: #ff3355; }
body.quiz-v2 #timer-display.timer-ended { color: #888 !important; border-color: #444; }

/* TRUE / FALSE fixed colors — burn removed */
body.quiz-v2 .burn-panel { display: none !important; }
.answer-btn--true {
  border-color: #22c55e !important;
  color: #22c55e !important;
  background: #06140c !important;
}
.answer-btn--true:hover:not(:disabled) {
  background: #22c55e !important;
  color: #000 !important;
  border-color: #22c55e !important;
}
.answer-btn--false {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  background: #140606 !important;
}
.answer-btn--false:hover:not(:disabled) {
  background: #ef4444 !important;
  color: #000 !important;
  border-color: #ef4444 !important;
}
