:root {
  --bg1: #2a0f4a; --bg2: #0f1a4a;
  --ink: #fff7ea; --dim: #c9bde6;
  --a: #ff5d8f; --b: #ffc93c; --c: #3cd6ff; --d: #7dff8a;
  --card: rgba(255, 255, 255, .08);
  --font: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); color: var(--ink); background: radial-gradient(circle at 20% 0%, #5b1f8f, transparent 50%), radial-gradient(circle at 100% 100%, #1f5b8f, transparent 50%), linear-gradient(160deg, var(--bg1), var(--bg2)); background-attachment: fixed; }
.app { max-width: 520px; margin: 0 auto; padding: 24px 16px 40px; }
.top { text-align: center; margin-bottom: 18px; }
h1 { margin: 0; font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1; font-weight: 900; letter-spacing: -.02em; background: linear-gradient(90deg, var(--a), var(--b), var(--c)); -webkit-background-clip: text; background-clip: text; color: transparent; transform: rotate(-2deg); }
.tag { color: var(--dim); margin: 10px 0 0; }
.card { background: var(--card); border: 1px solid rgba(255, 255, 255, .14); border-radius: 22px; padding: 22px 18px; backdrop-filter: blur(8px); box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.card[hidden] { display: none; }
label, .label { display: block; color: var(--dim); font-size: .9rem; margin: 0 0 6px; }
input { width: 100%; font: inherit; font-size: 1.15rem; padding: 13px 14px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .25); color: var(--ink); outline: none; }
input:focus { border-color: var(--b); }
#code { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; }
button { font: inherit; font-weight: 800; font-size: 1.05rem; padding: 13px 18px; border: 0; border-radius: 14px; cursor: pointer; color: #2a0f4a; background: var(--b); box-shadow: 0 5px 0 #c98f00; transition: transform .06s; }
button:active { transform: translateY(3px); box-shadow: 0 2px 0 #c98f00; }
button:disabled { opacity: .55; cursor: default; }
button.big { width: 100%; margin-top: 14px; font-size: 1.25rem; padding: 16px; background: var(--a); color: #fff; box-shadow: 0 5px 0 #b0305a; }
button.ghost { width: 100%; margin-top: 10px; background: transparent; color: var(--dim); box-shadow: none; border: 2px solid rgba(255, 255, 255, .18); }
.row { display: flex; gap: 10px; }
.row input { flex: 1; }
.or { text-align: center; margin: 18px 0 12px; color: var(--dim); font-size: .85rem; position: relative; }
.or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid rgba(255, 255, 255, .15); }
.or span { position: relative; background: #2a1956; padding: 0 10px; border-radius: 8px; }
.status { min-height: 1.3em; color: var(--b); margin: 12px 0 0; text-align: center; }
.code { font-size: clamp(3rem, 16vw, 4.6rem); font-weight: 900; letter-spacing: .18em; text-align: center; margin: 0; color: var(--b); text-shadow: 0 4px 0 rgba(0, 0, 0, .25); }
.hint { text-align: center; color: var(--dim); font-size: .9rem; }
.players { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.players li { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-weight: 700; animation: pop .3s; }
.players li.host::after { content: " ★"; color: var(--b); }
.players li.away { opacity: .45; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.qhead { display: flex; justify-content: space-between; align-items: center; color: var(--dim); font-weight: 700; }
.timer { font-size: 1.6rem; color: var(--b); font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: rgba(255, 255, 255, .12); border-radius: 99px; overflow: hidden; margin: 10px 0 16px; }
.bar div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--d), var(--b), var(--a)); transition: width .25s linear; }
h2 { margin: 0 0 16px; font-size: 1.45rem; line-height: 1.25; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answers button { min-height: 84px; font-size: 1.05rem; line-height: 1.2; color: #1b0b33; box-shadow: none; border: 3px solid transparent; }
.answers button:nth-child(1) { background: var(--a); color: #fff; }
.answers button:nth-child(2) { background: var(--b); }
.answers button:nth-child(3) { background: var(--c); }
.answers button:nth-child(4) { background: var(--d); }
.answers button.picked { border-color: #fff; transform: scale(.97); }
.answers.locked button:not(.picked) { opacity: .45; }
.right { font-size: 1.4rem; font-weight: 800; color: var(--d); text-align: center; margin: 0 0 14px; }
.board { margin: 0; padding: 0 0 0 26px; font-size: 1.1rem; }
.board li { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.board li span { float: right; font-weight: 800; color: var(--b); }
.board li .gain { color: var(--d); font-size: .85rem; margin-left: 6px; float: none; }
.podium li:first-child { font-size: 1.5rem; color: var(--b); }
.foot { text-align: center; color: var(--dim); font-size: .78rem; margin-top: 18px; }
