/* One Strike Trivia player site: arcade game-show look.
   Lilita One for anything that should feel like a game (logo, numbers, questions),
   Nunito for reading. Each answer has its own color, like buzzers on a quiz show. */
:root {
  --night: #1b1150; --night-2: #140c3d; --panel: #2b1d74; --panel-edge: #170e45; --line: #4a3a9e;
  --text: #ffffff; --muted: #c3baf0;
  --gold: #ffcf33; --gold-edge: #b8860b; --gold-ink: #3a2500;
  --coral: #ff5464; --coral-edge: #b3263a; --sky: #22b8f0; --sky-edge: #10709a;
  --lime: #7bd13b; --lime-edge: #4a8a1c; --orange: #ff9a1f; --orange-edge: #b05e00;
  --good: #7bd13b; --bad: #ff5464;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(circle at 50% -10%, #4b2fc0 0%, transparent 55%),
    radial-gradient(rgba(255, 255, 255, .07) 1.5px, transparent 1.6px) 0 0 / 22px 22px,
    var(--night);
  background-attachment: fixed;
}
.top { display: flex; justify-content: center; align-items: center; padding: 18px 18px 10px; max-width: 520px; margin: 0 auto; }
.brand {
  font-family: var(--display); font-size: 30px; letter-spacing: .5px; color: var(--gold);
  text-shadow: 0 3px 0 var(--gold-edge), 0 6px 14px rgba(0, 0, 0, .45);
  transform: rotate(-2deg);
}
main { max-width: 520px; margin: 0 auto; padding: 4px 16px 32px; display: grid; gap: 16px; }

.card {
  background: var(--panel); border: 3px solid var(--line); border-radius: 22px; padding: 22px 20px;
  box-shadow: 0 7px 0 var(--panel-edge), 0 14px 28px rgba(0, 0, 0, .35);
}
.center { text-align: center; }
.muted { color: var(--muted); }
h1, h2 { margin: 0 0 8px; line-height: 1.15; font-family: var(--display); font-weight: 400; letter-spacing: .3px; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
p { margin: 6px 0; line-height: 1.5; }
.big {
  font-family: var(--display); font-size: 64px; line-height: 1.05; color: var(--gold);
  font-variant-numeric: tabular-nums; text-shadow: 0 4px 0 var(--gold-edge);
  margin: 4px 0 6px;
}
.label { font-size: 15px; color: var(--muted); }
label { display: block; font-size: 15px; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 18px; font-weight: 800; color: var(--text); background: var(--night-2);
  border: 3px solid var(--line); border-radius: 14px; padding: 13px 14px;
}
input::placeholder { color: #8c82c4; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); }

button.primary {
  width: 100%; margin-top: 20px; font-family: var(--display); font-size: 24px; letter-spacing: .5px;
  border: 0; border-radius: 16px; padding: 14px; cursor: pointer;
  background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 6px 0 var(--gold-edge), 0 10px 18px rgba(0, 0, 0, .35);
  transition: transform .08s, box-shadow .08s;
}
button.primary:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--gold-edge); }
button.primary:disabled { opacity: .6; }
.error { color: #ff8a95; font-size: 14px; margin-top: 8px; min-height: 1em; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--night-2); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-family: var(--display); font-weight: 400; font-size: 28px; font-variant-numeric: tabular-nums; }

/* ---------- question ---------- */
.qhead { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.qhead > span:first-child {
  font-family: var(--display); font-size: 18px; color: var(--gold-ink); background: var(--gold);
  border-radius: 999px; padding: 3px 14px 2px; box-shadow: 0 3px 0 var(--gold-edge);
}
.qhead { gap: 8px; }
.qhead .topic { font-size: 14px; color: #fff; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: 4px 12px; }
.qhead .spacer { flex: 1; }
.options.words .opt { font-size: 21px; line-height: 1.15; padding: 28px 10px 14px; }
.timer { height: 16px; background: var(--night-2); border: 3px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.timer span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--orange) 40%, var(--gold)); border-radius: 999px; transition: width .2s linear; }
.question {
  font-family: var(--display); font-size: 34px; text-align: center; margin: 6px 0 22px; line-height: 1.2;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .3);
}
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; counter-reset: opt; }
.opt {
  --c: var(--coral); --e: var(--coral-edge);
  position: relative; min-height: 96px; padding: 26px 10px 14px; border: 0; border-radius: 18px; cursor: pointer;
  font-family: var(--display); font-size: 30px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  background: var(--c); box-shadow: 0 7px 0 var(--e), 0 12px 20px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: transform .08s, box-shadow .08s, opacity .25s, filter .25s;
}
.opt::before {
  counter-increment: opt; content: counter(opt, upper-alpha);
  position: absolute; top: 8px; left: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 0, 0, .22); font-size: 16px; line-height: 27px; text-align: center; text-shadow: none;
}
.opt:nth-child(2) { --c: var(--sky); --e: var(--sky-edge); }
.opt:nth-child(3) { --c: var(--lime); --e: var(--lime-edge); }
.opt:nth-child(4) { --c: var(--orange); --e: var(--orange-edge); }
.opt:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 2px 0 var(--e); }
.opt:disabled { cursor: default; }
/* after answering: the picked one stays lit and pressed in, the rest fade */
.options:has(.picked) .opt:not(.picked) { opacity: .35; filter: saturate(.5); }
.opt.picked { transform: translateY(5px); box-shadow: 0 2px 0 var(--e), 0 0 0 4px #fff; }
/* reveal: the right answer glows, a wrong pick shakes */
.options:has(.right) .opt:not(.right):not(.wrong) { opacity: .3; filter: saturate(.4); }
.opt.right { opacity: 1; filter: none; box-shadow: 0 7px 0 var(--e), 0 0 0 5px #fff, 0 0 30px 6px rgba(255, 255, 255, .55); animation: pop .45s ease-out; }
.opt.right::after { content: "✓"; position: absolute; top: 6px; right: 10px; font-size: 24px; }
.opt.wrong { opacity: .85; box-shadow: 0 7px 0 var(--e), 0 0 0 5px var(--night-2); animation: shake .45s; }
.opt.wrong::after { content: "✕"; position: absolute; top: 6px; right: 10px; font-size: 22px; }
.opt small { font-family: "Nunito", system-ui, sans-serif; font-size: 14px; font-weight: 800; opacity: .9; }
@keyframes pop { 0% { transform: scale(.94); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

.result { text-align: center; font-family: var(--display); font-size: 26px; margin-top: 20px; }
.result.good { color: var(--good); text-shadow: 0 3px 0 var(--lime-edge); }
.result.bad { color: var(--bad); text-shadow: 0 3px 0 var(--coral-edge); }
.result.muted { font-family: inherit; font-size: 17px; }

/* ---------- champion ---------- */
.champ {
  position: relative; overflow: hidden; text-align: center; border-color: var(--gold);
  background: radial-gradient(circle at 50% 0%, #6a4bd6, var(--panel) 70%);
  box-shadow: 0 7px 0 var(--gold-edge), 0 0 40px rgba(255, 207, 51, .35);
}
.champ::before {
  content: ""; position: absolute; inset: -60%; z-index: 0; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 207, 51, .16) 0 10deg, transparent 10deg 20deg);
  animation: spin 30s linear infinite;
}
.champ > * { position: relative; z-index: 1; }
.champ h1 { color: var(--gold); font-size: 34px; text-shadow: 0 4px 0 var(--gold-edge); }
@keyframes spin { to { transform: rotate(360deg); } }

.count { text-align: right; font-size: 13px; color: var(--muted); margin-top: 4px; }
.notice { font-size: 13px; color: var(--muted); text-align: center; }
code { background: var(--night-2); padding: 2px 6px; border-radius: 6px; }
.country-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 6px; font-size: 17px; }
.country-row .label { font-size: 15px; }
button.link { font: inherit; font-size: 15px; background: none; border: 0; padding: 4px; color: var(--gold); text-decoration: underline; cursor: pointer; }
#country { margin-top: 6px; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline-offset: 0; }
.offline { position: sticky; top: 0; z-index: 5; background: var(--coral); color: #fff; text-align: center; font-weight: 800; padding: 10px 16px; }
@media (max-width: 360px) {
  .opt { font-size: 24px; min-height: 84px; }
  .question { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .opt:active:not(:disabled), button.primary:active { transform: none; }
}
