/* Versed Play — shared styles. Own identity: dark, loud, playful. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0E0D17; --bg2: #16152A; --card: #1E1C33; --card2: #262445; --line: #2E2B4A; --text: #F4F2FF; --muted: #9A97B8; --dim: #5E5B7E;
  --lime: #C6FF3D; --pink: #FF4FA3; --cyan: #3DF2FF; --amber: #FFB020; --violet: #8B7BFF; --green: #3DFF9A; --red: #FF5C5C; --ink: #0E0D17;
  --radius: 18px; --shadow: 0 10px 30px rgba(0,0,0,.35); --pop: 4px 4px 0 var(--pink);
  --ease: cubic-bezier(.16,1,.3,1);
  --display: 'Unbounded', 'Space Grotesk', system-ui, sans-serif;
  --body: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body); background: var(--bg); color: var(--text); min-height: 100dvh; line-height: 1.45;
  -webkit-font-smoothing: antialiased; touch-action: manipulation;
  background-image: radial-gradient(60% 40% at 80% -10%, rgba(139,123,255,.25), transparent 60%), radial-gradient(50% 35% at 0% 100%, rgba(198,255,61,.12), transparent 60%);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--cyan); }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: -.01em; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.4rem; border-radius: 14px; font-weight: 700; transition: transform .12s var(--ease), box-shadow .12s, background .15s; user-select: none; white-space: nowrap; border: 2px solid transparent; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--lime); color: var(--ink); border-color: var(--lime); box-shadow: var(--pop); }
.btn-primary:hover { background: #d6ff6b; }
.btn-dark { background: var(--text); color: var(--ink); border-color: var(--text); box-shadow: var(--pop); }
.btn-coral { background: var(--pink); color: #fff; border-color: var(--pink); box-shadow: 4px 4px 0 var(--lime); }
.btn-coral:hover { background: #ff6cb3; }
.btn-ghost { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--violet); }
.btn-ghost:active { box-shadow: none; }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: 1.05rem 1.8rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

.input { width: 100%; padding: .9rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); outline: none; transition: border-color .15s, box-shadow .15s; color: var(--text); }
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(198,255,61,.15); }
.input-code { text-transform: uppercase; letter-spacing: .35em; font-weight: 800; font-size: 1.8rem; text-align: center; font-family: var(--display); }
label.field { display: block; font-size: .78rem; font-weight: 700; color: var(--muted); margin: .9rem 0 .35rem; text-transform: uppercase; letter-spacing: .08em; }
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.25rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--red); font-weight: 600; font-size: .9rem; min-height: 1.3em; margin-top: .6rem; }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(198,255,61,.15); color: var(--lime); }

.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; text-decoration: none; color: var(--text); font-family: var(--display); font-size: .95rem; letter-spacing: .02em; }
.brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-size: 1rem; box-shadow: 2px 2px 0 var(--pink); }
.brand .teal { color: var(--lime); }

/* promo strip — small, static, bottom of page; entries live in /ads.json */
.ad-slot { position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: var(--bg2); border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 0 .75rem; z-index: 50; padding-bottom: env(safe-area-inset-bottom); }
.ad-slot .ad-label { position: absolute; top: 2px; left: 8px; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.ad-house { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-size: .8rem; max-width: 720px; width: 100%; }
.ad-house img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.ad-house strong { display: block; font-size: .8rem; }
.ad-house span { color: var(--muted); font-size: .72rem; display: block; }
.ad-house .ad-cta { margin-left: auto; flex: none; padding: .35rem .8rem; border-radius: 999px; background: var(--lime); color: var(--ink); font-weight: 700; font-size: .75rem; }
.has-ad { padding-bottom: 70px; }

/* ---------- player page ---------- */
.p-wrap { max-width: 520px; margin: 0 auto; padding: 1rem 1rem 0; min-height: 100dvh; display: flex; flex-direction: column; }
.p-top { display: flex; align-items: center; justify-content: space-between; padding: .25rem 0 1rem; }
.p-top .me { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.p-top .score { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--lime); font-family: var(--display); }
.p-main { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding-bottom: 1rem; }
.p-join h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.05; margin: 1rem 0 .4rem; }
.p-join h1 span { color: var(--lime); }
.p-join p { color: var(--muted); margin-bottom: 1.25rem; }
.p-join .host-link { text-align: center; margin-top: 1.5rem; font-size: .9rem; }
.p-status { text-align: center; }
.p-status h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: .4rem; }
.p-status p { color: var(--muted); }
.p-prompt { text-align: center; font-weight: 700; font-size: 1.2rem; margin-bottom: .25rem; font-family: var(--display); line-height: 1.25; }
.timer { height: 8px; background: var(--card2); border-radius: 4px; overflow: hidden; }
.timer > i { display: block; height: 100%; background: var(--lime); border-radius: 4px; transform-origin: left; }
.timer.warn > i { background: var(--pink); }

.buzz { width: min(78vw, 300px); aspect-ratio: 1; margin: 1rem auto; border-radius: 50%; background: var(--pink); color: #fff; font-size: 2.2rem; font-weight: 800; font-family: var(--display); letter-spacing: .04em; box-shadow: 0 0 0 10px rgba(255,79,163,.18), 0 0 60px rgba(255,79,163,.45), inset 0 -10px 0 rgba(0,0,0,.18); transition: transform .1s; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 10px rgba(255,79,163,.18), 0 0 60px rgba(255,79,163,.45), inset 0 -10px 0 rgba(0,0,0,.18) } 50% { box-shadow: 0 0 0 18px rgba(255,79,163,.08), 0 0 80px rgba(255,79,163,.6), inset 0 -10px 0 rgba(0,0,0,.18) } }
.buzz:active { transform: scale(.94); }
.buzz.done { background: var(--card); box-shadow: 0 0 0 4px var(--lime); font-size: 1rem; animation: none; color: var(--muted); }
.buzz.done b { display: block; font-size: 3.4rem; line-height: 1; color: var(--lime); }

.choices { display: grid; gap: .7rem; grid-template-columns: 1fr 1fr; }
.choices button { min-height: 96px; border-radius: 18px; color: #fff; font-weight: 700; font-size: 1.05rem; padding: .8rem; display: flex; align-items: center; justify-content: center; text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.35); transition: transform .1s, filter .15s; line-height: 1.2; overflow-wrap: anywhere; }
.choices button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.choices button:disabled { opacity: .3; }
.choices button.picked { opacity: 1; outline: 4px solid var(--lime); outline-offset: 2px; }
.c0 { background: #FF4FA3; } .c1 { background: #3D7BFF; } .c2 { background: #FFB020; color: var(--ink) !important; } .c3 { background: #22C55E; } .c4 { background: #8B7BFF; } .c5 { background: #3DF2FF; color: var(--ink) !important; }
.choices.one { grid-template-columns: 1fr; }
.answer-form { display: flex; gap: .5rem; }
.answer-form .input { font-size: 1.1rem; }

.result { text-align: center; padding: 1.5rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); }
.result.ok { background: rgba(61,255,154,.12); border-color: var(--green); } .result.no { background: rgba(255,92,92,.12); border-color: var(--red); }
.result .big { font-size: 2.6rem; line-height: 1; margin-bottom: .5rem; }
.result h2 { font-size: 1.6rem; font-weight: 800; }
.result .pts { font-size: 1.4rem; font-weight: 800; color: var(--lime); margin-top: .35rem; font-family: var(--display); }
.result .ans { margin-top: .75rem; color: var(--muted); font-size: .9rem; }

.board { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.board li { display: flex; align-items: center; gap: .7rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem; }
.board li.me { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(198,255,61,.15); }
.board .rk { width: 1.8rem; font-weight: 800; color: var(--dim); font-family: var(--display); }
.board li:nth-child(1) .rk { color: var(--amber); } .board li:nth-child(2) .rk { color: #C9CCE5; } .board li:nth-child(3) .rk { color: #E0955A; }
.board .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .sc { font-weight: 800; font-variant-numeric: tabular-nums; }
.board .dl { color: var(--lime); font-size: .75rem; font-weight: 700; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: .5rem; height: 200px; margin: 1rem 0; }
.podium div { flex: 1; max-width: 120px; border-radius: 12px 12px 0 0; color: var(--ink); text-align: center; padding: .6rem .3rem; font-weight: 800; display: flex; flex-direction: column; justify-content: flex-start; }
.podium div small { font-weight: 600; opacity: .8; font-size: .75rem; }
.podium .p1 { height: 100%; background: var(--amber); } .podium .p2 { height: 72%; background: #C9CCE5; } .podium .p3 { height: 54%; background: #E0955A; }
.dots span { display: inline-block; width: 8px; height: 8px; margin: 0 3px; border-radius: 50%; background: var(--lime); animation: bounce 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; background: var(--pink); } .dots span:nth-child(3) { animation-delay: .4s; background: var(--cyan); }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5 } 40% { transform: translateY(-8px); opacity: 1 } }
.toast { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--ink); padding: .6rem 1rem; border-radius: 999px; font-size: .85rem; font-weight: 700; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
