/* Get Buzzed: the live-quiz landing page (/play). Black stage, neon edges, like the phone buzzer page. System fonts only, so it loads fast on mobile data. */
:root {
  --bg: #07070d; --card: #10122a; --card2: #171a3a; --line: rgba(255,255,255,.13);
  --text: #eef0fa; --muted: #aab2d0;
  --cyan: #19b6e6; --lime: #d6e41f; --green: #6ab42b; --red: #e8283a; --orange: #ff9a1e; --pink: #e63cb4;
  --rainbow: linear-gradient(90deg, var(--cyan), var(--lime), var(--green), var(--red), var(--orange));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 500 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden; -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(760px 420px at 10% -5%, rgba(25,182,230,.20), transparent 62%),
    radial-gradient(680px 420px at 98% 8%, rgba(230,60,180,.16), transparent 62%),
    radial-gradient(800px 520px at 50% 112%, rgba(214,228,31,.09), transparent 62%);
}
a { color: var(--cyan); }
img { display: block; max-width: 100%; height: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; border-radius: 8px; }

.play {
  width: min(560px, 100%); margin: 0 auto; text-align: center;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(34px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.preview-bar { margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; background: rgba(255,154,30,.16); border: 1px solid rgba(255,154,30,.5); color: #ffd9a8; font-size: .85rem; font-weight: 600; }

/* ------------------------------------------------------------ top: logo, status chip, heading */
.top { position: relative; padding-bottom: 14px; margin-bottom: 14px; }
.top::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 0; height: 3px; border-radius: 3px; background: var(--rainbow); opacity: .9; }
.logo { width: 150px; height: auto; margin: 6px auto 8px; filter: drop-shadow(0 6px 22px rgba(25,182,230,.45)); }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); font-size: .78rem; font-weight: 800; letter-spacing: .12em; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }
body[data-state=live] .chip { color: #eaffc4; border-color: rgba(214,228,31,.55); background: rgba(106,180,43,.18); }
body[data-state=live] .dot { background: var(--lime); box-shadow: 0 0 12px var(--lime); }
body[data-state=standby] .chip { color: var(--muted); }
body[data-state=standby] .dot { background: #6c7391; box-shadow: none; }
h1 { margin: 0; font-size: clamp(2.1rem, 11vw, 3.3rem); line-height: 1.04; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; text-shadow: 0 0 28px rgba(25,182,230,.45); overflow-wrap: anywhere; }
h2 { margin: 0 0 .45em; font-size: clamp(1.35rem, 6.4vw, 1.8rem); line-height: 1.15; font-weight: 800; }

/* ------------------------------------------------------------ the three states */
.only-checking, .only-live, .only-standby { display: none; }
body[data-state=checking] .only-checking { display: block; }
body[data-state=live] .only-live { display: block; }
body[data-state=standby] .only-standby { display: block; }

.panel { margin: 0 0 14px; padding: 22px 18px; border-radius: 20px; background: linear-gradient(180deg, var(--card), #0c0e22); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.panel p:last-child { margin-bottom: 0; }
.big { font-size: 1.15rem; font-weight: 700; margin: .6em 0 .2em; }
.muted { color: var(--muted); }
.fine { margin: 10px 0 0; font-size: .86rem; color: var(--muted); }
.msg { margin: 0 0 12px; color: #dfe3f6; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .78rem; font-weight: 900; letter-spacing: .16em; }
.cyan { color: var(--cyan); } .pink { color: var(--pink); } .green { color: var(--lime); }

.spin { width: 46px; height: 46px; margin: 4px auto; border-radius: 50%; border: 5px solid rgba(255,255,255,.13); border-top-color: var(--cyan); }
@media (prefers-reduced-motion: no-preference) {
  .spin { animation: gbspin 1s linear infinite; }
  .logo { animation: gbglow 3.4s ease-in-out infinite; }
  .btn-join { animation: gbjoin 2.2s ease-in-out infinite; }
  body[data-state=checking] .dot, body[data-state=live] .dot { animation: gbdot 1.6s ease-in-out infinite; }
}
@keyframes gbspin { to { transform: rotate(360deg); } }
@keyframes gbglow { 0%, 100% { filter: drop-shadow(0 6px 22px rgba(25,182,230,.35)); } 50% { filter: drop-shadow(0 6px 30px rgba(230,60,180,.55)); } }
@keyframes gbjoin { 0%, 100% { box-shadow: 0 0 0 0 rgba(214,228,31,.45), 0 12px 34px rgba(106,180,43,.45); } 50% { box-shadow: 0 0 0 12px rgba(214,228,31,0), 0 12px 34px rgba(106,180,43,.45); } }
@keyframes gbdot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ------------------------------------------------------------ live */
.only-live { border-color: rgba(214,228,31,.5); box-shadow: 0 0 0 1px rgba(214,228,31,.25), 0 18px 60px rgba(106,180,43,.25); }
.btn-join { margin: 14px 0 0; width: 100%; min-height: 64px; font-size: 1.3rem; letter-spacing: .06em; color: #0b1200; background: linear-gradient(120deg, var(--lime), var(--green)); border-color: transparent; }

/* ------------------------------------------------------------ standby */
.note { display: none; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: .9rem; background: rgba(255,154,30,.13); border: 1px solid rgba(255,154,30,.4); color: #ffd9a8; }
body[data-why=slow] .note-slow, body[data-why=offline] .note-offline { display: block; }
.retry { margin: 12px 0 0; font-size: .92rem; color: var(--muted); }
.retry b { color: var(--text); font-variant-numeric: tabular-nums; }
.linkbtn { background: none; border: 0; padding: 8px 6px; margin: 0; font: inherit; font-weight: 700; color: var(--cyan); text-decoration: underline; cursor: pointer; min-height: 44px; }

.card { margin: 0 0 14px; padding: 18px; border-radius: 18px; background: var(--card2); border: 1px solid var(--line); text-align: left; }
.card .kicker { margin-bottom: 6px; }
.when { margin: 0; font-size: 1.3rem; font-weight: 800; line-height: 1.25; }
.where { margin: 4px 0 0; color: #dfe3f6; }
.card-next { border-color: rgba(25,182,230,.5); box-shadow: 0 0 0 1px rgba(25,182,230,.18), 0 14px 40px rgba(25,182,230,.14); }
.card-promo { border-color: rgba(230,60,180,.45); box-shadow: 0 0 0 1px rgba(230,60,180,.16), 0 14px 40px rgba(230,60,180,.12); }
.promo { margin: 0 0 14px; color: #e6e9f8; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.row .btn { flex: 1 1 200px; }
.links { margin-top: 4px; justify-content: center; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 900; font-size: .98rem; letter-spacing: .06em; line-height: 1.1;
  color: #fff; text-decoration: none; cursor: pointer; -webkit-appearance: none; appearance: none; touch-action: manipulation;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); }
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; }
.kicker .ic { width: 15px; height: 15px; }
.btn-sub { background: linear-gradient(120deg, #ff2a44, #c4122a); box-shadow: 0 10px 28px rgba(232,40,58,.4); }
.btn-like { background: linear-gradient(120deg, var(--cyan), #1b6fe6); box-shadow: 0 10px 28px rgba(25,182,230,.35); }
.btn-watch { background: linear-gradient(120deg, #ff9a1e, #e8533a); box-shadow: 0 10px 28px rgba(255,154,30,.3); }
.btn-share { background: linear-gradient(120deg, var(--pink), #8a3cf0); box-shadow: 0 10px 28px rgba(230,60,180,.32); }
.btn-ghost { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.35); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 0; }
.actions .btn { width: 100%; padding-inline: 12px; }
.actions .btn:only-child, .actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }

.foot { margin-top: 26px; font-size: .82rem; color: var(--muted); }
.foot p { margin: 0 0 8px; }
.foot a { color: #9fdcf0; }
.noscript { text-align: left; }

.toast {
  position: fixed; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translate(-50%, 24px); max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 14px;
  background: #f4f6ff; color: #0b0d1c; font-weight: 700; font-size: .95rem; box-shadow: 0 12px 36px rgba(0,0,0,.6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

@media (min-width: 700px) {
  body { font-size: 18px; }
  .play { padding-top: 34px; }
  .logo { width: 180px; }
  .panel { padding: 26px 26px; }
}
