:root {
  --bg-1: #071428;
  --bg-2: #103a63;
  --bg-3: #1e6c8f;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --ink: #0b1224;
  --muted: #334155;
  --accent: #0284c7;
  --accent-2: #22d3ee;
  --ok: #16a34a;
  --warn: #f97316;
  --bad: #dc2626;
  --line: rgba(2, 132, 199, 0.25);
  --shadow: 0 18px 40px rgba(3, 10, 25, 0.28);
  --radius: 18px;
  --rose: #fb7185;
  --gold: #facc15;
  --mint: #2dd4bf;
  --sky: #38bdf8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Trebuchet MS", "Verdana", "Tahoma", sans-serif;
  background: radial-gradient(1200px 620px at 8% 10%, #1a4f79 0%, transparent 55%),
    radial-gradient(900px 580px at 92% 0%, #1f3f85 0%, transparent 58%),
    linear-gradient(140deg, var(--bg-1), var(--bg-2) 52%, var(--bg-3));
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.12), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(14, 165, 233, 0.12), transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: bg-float 20s ease-in-out infinite alternate;
}

@keyframes bg-float {
  from {
    transform: translate3d(-1.5%, -1.5%, 0) scale(1);
  }
  to {
    transform: translate3d(1.5%, 1.5%, 0) scale(1.03);
  }
}

.app {
  max-width: 1660px;
  margin: 0 auto;
  padding: 26px;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  padding: 24px;
  margin-bottom: 18px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  z-index: 0;
  filter: blur(10px);
}

.hero-card::after {
  content: "";
  position: absolute;
  left: -120px;
  bottom: -120px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 72%);
  z-index: 0;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card-host::before {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.34), transparent 46%),
    radial-gradient(circle at 72% 68%, rgba(45, 212, 191, 0.28), transparent 42%);
}

.hero-card-play::before {
  background: radial-gradient(circle at 35% 35%, rgba(251, 113, 133, 0.3), transparent 46%),
    radial-gradient(circle at 72% 68%, rgba(250, 204, 21, 0.24), transparent 42%);
}

.hero-card-admin::before {
  background: radial-gradient(circle at 35% 35%, rgba(56, 189, 248, 0.28), transparent 46%),
    radial-gradient(circle at 72% 68%, rgba(251, 113, 133, 0.24), transparent 42%);
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  gap: 24px;
  align-items: center;
}

.hero-copy {
  max-width: 52rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 74, 110, 0.1);
  color: #0c4a6e;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), var(--sky));
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.4);
}

.hero-title {
  margin: 14px 0 10px;
}

.hero-subtitle {
  margin-bottom: 0;
  max-width: 42rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(2, 132, 199, 0.15);
  background: rgba(255, 255, 255, 0.72);
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.hero-art-wrap {
  position: relative;
}

.hero-art-wrap::before {
  content: "";
  position: absolute;
  inset: 32px 12px 4px;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.28), transparent 42%),
    radial-gradient(circle at 70% 75%, rgba(34, 211, 238, 0.18), transparent 36%);
  filter: blur(18px);
  z-index: 0;
}

.hero-art-frame {
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.58));
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: 0 28px 60px rgba(2, 8, 23, 0.18);
}

.hero-art-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

.hero-art-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

h1,
h2 {
  margin: 0 0 8px;
  font-family: "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  letter-spacing: 0;
}

h1 {
  font-size: 3.2rem;
}

h2 {
  font-size: 2.1rem;
}

p,
li {
  font-size: 1.08rem;
  line-height: 1.42;
}

.muted {
  color: var(--muted);
}

.warn-inline {
  color: var(--bad);
  font-weight: 800;
}

.join-url {
  display: inline-block;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-family: "Consolas", "DejaVu Sans Mono", monospace;
}

.join-extra {
  margin: 8px 0 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.col-7 {
  grid-column: span 7;
}

.col-5 {
  grid-column: span 5;
}

.col-12 {
  grid-column: span 12;
}

@media (max-width: 980px) {
  .col-7,
  .col-5 {
    grid-column: span 12;
  }
}

@media (max-width: 1100px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-art-wrap {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
  }
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.26);
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: linear-gradient(135deg, #334155, #475569);
  box-shadow: 0 10px 22px rgba(51, 65, 85, 0.25);
}

.btn.warn {
  background: linear-gradient(135deg, #ea580c, #f97316);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28);
}

.btn.good {
  background: linear-gradient(135deg, #15803d, #16a34a);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.3);
}

.btn.ghost {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.32);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.music-controls {
  margin-top: 12px;
  padding: 16px;
  border: 1px dashed rgba(2, 132, 199, 0.4);
  background: rgba(224, 242, 254, 0.45);
  border-radius: 12px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-weight: 700;
}

.slider-row input[type="range"] {
  width: min(420px, 92%);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 700;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

@media (max-width: 760px) {
  .kpi {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi .item {
  background: linear-gradient(155deg, #d9f2ff, #e0f2fe 50%, #f0f9ff);
  border: 1px solid rgba(125, 211, 252, 0.65);
  border-radius: 12px;
  padding: 12px;
}

.kpi .label {
  font-size: 1.02rem;
  color: var(--muted);
}

.kpi .value {
  font-size: 2.1rem;
  font-weight: 900;
}

.kpi .item.timer .value {
  color: #0c4a6e;
}

.question {
  font-size: 2.6rem;
  line-height: 1.2;
  font-weight: 900;
  margin: 6px 0 18px;
  text-wrap: balance;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 760px) {
  .options {
    grid-template-columns: 1fr;
  }
}

.option-btn {
  border: 2px solid #7dd3fc;
  background: linear-gradient(155deg, #ecfeff, #f0f9ff 60%, #dbeafe);
  border-radius: 14px;
  padding: 18px;
  text-align: left;
  font-size: 1.38rem;
  line-height: 1.24;
  font-weight: 800;
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 16px rgba(2, 132, 199, 0.2);
}

.option-btn .prefix {
  display: inline-block;
  min-width: 34px;
  font-size: 1.1em;
  color: #075985;
}

.option-btn.selected {
  border-color: #0284c7;
  background: linear-gradient(155deg, #bfdbfe, #dbeafe);
}

.option-btn.correct {
  border-color: #16a34a;
  background: linear-gradient(155deg, #dcfce7, #bbf7d0);
}

.option-btn.wrong {
  border-color: #dc2626;
  background: linear-gradient(155deg, #fee2e2, #fecaca);
}

.vote-bar {
  margin-top: 8px;
  height: 10px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}

.vote-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.04rem;
}

th,
td {
  padding: 9px;
  border-bottom: 1px solid #e2e8f0;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 800;
}

tbody tr.rank-1 {
  background: linear-gradient(90deg, rgba(253, 224, 71, 0.32), rgba(254, 243, 199, 0.5));
}

tbody tr.rank-2 {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.25), rgba(226, 232, 240, 0.45));
}

tbody tr.rank-3 {
  background: linear-gradient(90deg, rgba(251, 146, 60, 0.2), rgba(254, 215, 170, 0.45));
}

.status-pill {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-pill.lobby {
  background: #e2e8f0;
}

.status-pill.question {
  background: #bae6fd;
  color: #0c4a6e;
}

.status-pill.reveal {
  background: #bbf7d0;
  color: #14532d;
}

.status-pill.finished {
  background: #fecaca;
  color: #7f1d1d;
}

.big-answer {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.16;
  color: #14532d;
  margin: 10px 0;
  text-shadow: 0 1px 0 rgba(20, 83, 45, 0.14);
}

.help {
  font-size: 1.08rem;
  color: var(--muted);
}

.input {
  width: 100%;
  font-size: 1.45rem;
  padding: 14px;
  border: 2px solid #7dd3fc;
  background: var(--panel-strong);
  border-radius: 12px;
}

.input:focus {
  outline: 0;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.hide {
  display: none;
}

.vote-status {
  margin: 4px 0 12px;
  font-size: 1.18rem;
  font-weight: 900;
  color: #0f172a;
}

.vote-status.done {
  color: #166534;
  text-shadow: 0 1px 0 rgba(22, 101, 52, 0.16);
}

@media (max-width: 920px) {
  .app {
    padding: 14px;
  }
  .card {
    padding: 14px;
  }
  .hero-art-frame {
    padding: 14px;
  }
  .question {
    font-size: 1.9rem;
  }
}

/* 2026 visual polish: offline, framework-free, tuned for classroom screens. */
:root {
  --bg-1: #f6f8fc;
  --bg-2: #eef8f4;
  --bg-3: #f8fafc;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #14b8a6;
  --ok: #16a34a;
  --warn: #f59e0b;
  --bad: #e11d48;
  --line: rgba(100, 116, 139, 0.22);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

html {
  background: var(--bg-1);
}

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 184, 166, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 58%, var(--bg-3));
  background-size: 42px 42px, 42px 42px, auto;
}

body::before {
  content: none;
}

.app {
  max-width: 1520px;
  padding: clamp(14px, 2.2vw, 28px);
}

.card {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: clamp(18px, 2vw, 28px);
  margin-bottom: 18px;
}

h1,
h2 {
  color: #0f172a;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
  line-height: 1.02;
}

h1 {
  font-size: 3.2rem;
}

h2 {
  font-size: 2.1rem;
}

h3 {
  color: #172033;
  margin: 18px 0 10px;
}

p,
li {
  font-size: 1.08rem;
  line-height: 1.5;
}

.muted,
.help {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: none;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
}

.btn.secondary {
  background: #475569;
  border-color: rgba(71, 85, 105, 0.24);
  box-shadow: 0 10px 20px rgba(71, 85, 105, 0.16);
}

.btn.warn {
  background: #ea580c;
  border-color: rgba(234, 88, 12, 0.22);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.18);
}

.btn.good {
  background: #16a34a;
  border-color: rgba(22, 163, 74, 0.22);
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
}

.btn.ghost {
  background: #111827;
  border-color: rgba(17, 24, 39, 0.22);
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.18);
}

.btn-row {
  gap: 8px;
}

.input,
input,
select,
textarea {
  accent-color: var(--accent);
}

.input {
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.03);
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.join-url {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.grid {
  gap: 16px;
}

.kpi {
  gap: 8px;
}

.kpi .item {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 8px;
}

.kpi .label {
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kpi .value {
  color: #0f172a;
  font-size: 2.1rem;
  letter-spacing: 0;
}

.question {
  color: #0f172a;
  font-size: 2.6rem;
  letter-spacing: 0;
}

.options {
  gap: 10px;
}

.option-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  border-radius: 8px;
  font-size: 1.38rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.option-btn:hover {
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1);
}

.option-btn .prefix {
  color: var(--accent);
}

.option-btn.selected {
  border-color: var(--accent);
  background: #eff6ff;
}

.option-btn.correct {
  border-color: var(--ok);
  background: #ecfdf5;
}

.option-btn.wrong {
  border-color: var(--bad);
  background: #fff1f2;
}

table {
  border-collapse: collapse;
  font-size: 1.04rem;
}

th,
td {
  padding: 11px 10px;
}

tbody tr.rank-1 {
  background: #fef9c3;
}

tbody tr.rank-2 {
  background: #f1f5f9;
}

tbody tr.rank-3 {
  background: #ffedd5;
}

.status-pill {
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.86rem;
  letter-spacing: 0;
}

.status-pill.lobby {
  background: #e2e8f0;
  color: #334155;
}

.status-pill.question {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.reveal {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.finished {
  background: #ffe4e6;
  color: #be123c;
}

.music-controls {
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 8px;
}

.vote-status {
  color: #334155;
  font-size: 1.18rem;
}

.big-answer {
  color: #15803d;
  font-size: 2.8rem;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .app {
    padding: 14px;
  }

  .card {
    padding: 16px;
  }

  .btn {
    width: auto;
    min-height: 46px;
  }

  .kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.host-page .app {
  max-width: 1600px;
}

.host-page .host-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  align-items: start;
}

.host-page .host-hero h1 {
  font-size: 5.2rem;
  margin-bottom: 0;
}

.host-page .host-intro > p:first-of-type {
  margin-top: -6px;
  font-size: 1.45rem;
}

.host-page .host-intro {
  min-width: 0;
}

.host-page .host-qr-panel {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 8px;
}

.host-page #qrBox {
  margin: 0;
  text-align: center;
}

.host-page .host-action-row,
.host-page .music-controls {
  grid-column: 1 / -1;
}

.host-page .music-controls .help {
  font-size: 0.98rem;
}

.player-page .app {
  max-width: 820px;
}

.player-page .join-card {
  max-width: 560px;
  margin: clamp(10px, 4vh, 40px) auto 0;
}

.player-page .join-card h1 {
  font-size: 4.4rem;
}

.player-page #gameCard {
  margin-top: clamp(8px, 2vh, 20px);
}

.admin-page .app {
  max-width: 1380px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.42);
  font-size: 0.9rem;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.hero-badges.compact {
  margin: 10px 0 14px;
}

.hero-badges.compact span {
  color: #1e293b;
  background: #eef6ff;
  border-color: #bfdbfe;
}

.admin-page .admin-shell {
  padding: 0;
  overflow: hidden;
}

.admin-page .admin-shell > :not(.admin-hero) {
  margin-left: clamp(18px, 2vw, 28px);
  margin-right: clamp(18px, 2vw, 28px);
}

.admin-page .admin-shell > :last-child {
  margin-bottom: clamp(18px, 2vw, 28px);
}

.admin-page .admin-hero {
  min-height: 330px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: clamp(24px, 4vw, 56px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 12, 30, 0.94) 0%, rgba(8, 20, 48, 0.82) 42%, rgba(8, 20, 48, 0.2) 100%),
    url("/static/img/classrally-hero.webp") center / cover no-repeat;
}

.admin-page .admin-hero h1 {
  color: #fff;
  font-size: 4.7rem;
  margin-bottom: 8px;
}

.admin-page .admin-hero .admin-lead {
  color: #dbeafe;
  max-width: 650px;
  font-size: 1.18rem;
}

.admin-page .admin-hero .eyebrow {
  color: #7dd3fc;
}

.admin-page .admin-hero-actions {
  justify-content: flex-end;
}

.admin-page #playerUrlBar {
  margin-top: 18px !important;
}

.host-page .host-hero {
  color: #fff;
  border: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 30, 0.96) 0%, rgba(8, 20, 48, 0.86) 46%, rgba(8, 20, 48, 0.25) 100%),
    url("/static/img/classrally-hero.webp") center / cover no-repeat;
}

.host-page .host-intro h1,
.host-page .host-intro strong {
  color: #fff;
}

.host-page .host-intro .muted {
  color: #dbeafe;
}

.host-page .host-intro .eyebrow {
  color: #7dd3fc;
}

.host-page .host-qr-panel,
.host-page .music-controls {
  background: rgba(248, 250, 252, 0.92);
  color: #111827;
}

.host-page .music-controls .help {
  color: #64748b;
}

.join-art {
  min-height: 220px;
  margin: -6px -6px 18px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
  box-shadow: inset 0 -70px 70px rgba(15, 23, 42, 0.26);
}

.play-art {
  background-image: url("/static/img/classrally-play.webp");
}

.exam-art {
  background-image: url("/static/img/classrally-exam.webp");
}

.player-page .join-card,
.exam-page #joinSection {
  overflow: hidden;
}

.player-page .join-card .eyebrow,
.exam-page #joinSection .eyebrow {
  color: #2563eb;
}

@media (max-width: 760px) {
  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  p,
  li {
    font-size: 1rem;
  }

  .kpi .value {
    font-size: 1.85rem;
  }

  .question {
    font-size: 1.9rem;
  }

  .option-btn {
    font-size: 1.12rem;
  }

  .big-answer {
    font-size: 2rem;
  }

  .host-page .host-hero h1,
  .player-page .join-card h1 {
    font-size: 3rem;
  }

  .host-page .host-hero {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 22px;
  }

  .admin-page .admin-hero h1 {
    font-size: 3rem;
  }

  .admin-page .admin-hero-actions {
    justify-content: flex-start;
  }

  .join-art {
    min-height: 190px;
  }
}

@media (max-width: 640px) {
  .hero-badges {
    gap: 8px;
  }

  .hero-badge {
    font-size: 0.88rem;
  }

  .hero-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
  }
}

/* ── Language switcher ───────────────────────────────────────────── */
.i18n-switcher {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 9000;
  display: flex;
  gap: 3px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 3px 5px;
}

.i18n-switcher button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 3px 6px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  line-height: 1;
}

.i18n-switcher .i18n-flag {
  font-size: 1.05rem;
  line-height: 1;
}

.i18n-switcher .i18n-code {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.i18n-switcher button:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.i18n-switcher button.active {
  background: rgba(2, 132, 199, 0.75);
  color: #fff;
}

@media (max-width: 480px) {
  .i18n-switcher {
    top: 6px;
    right: 8px;
    gap: 1px;
  }

  .i18n-switcher button {
    padding: 2px 4px;
  }

  .i18n-switcher .i18n-flag {
    font-size: 0.95rem;
  }

  /* flag only: the code line made the switcher overlap page headers */
  .i18n-switcher .i18n-code {
    display: none;
  }
}
