/* BrainBowl: stadium-at-night theme */
:root {
  --bg: #0a0f1f;
  --panel: #131a30;
  --panel-2: #1a2342;
  --line: #26305a;
  --text: #eef2ff;
  --muted: #8f9bc4;
  --gold: #ffc531;
  --gold-dark: #d99b00;
  --red: #ff4d6d;
  --blue: #3fa9f5;
  --green: #2ecc71;
  --a: #e6455a; --b: #3f8cf5; --c: #f0a020; --d: #22b07d;
  --radius: 16px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(255, 197, 49, .12), transparent 70%),
    radial-gradient(800px 400px at 100% 100%, rgba(63, 169, 245, .08), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--gold); }
h1, h2, h3 { margin: 0 0 .5em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
code { background: var(--panel-2); padding: 2px 6px; border-radius: 6px; }

.page { max-width: 1100px; margin: 0 auto; padding: 20px 20px 60px; }
.page.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 90vh; gap: 12px; }

/* brand */
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 900; font-size: 24px; font-style: italic; letter-spacing: -.02em; }
.brand .logo { font-style: normal; }
.brand b { color: var(--gold); }

.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.topbar > :first-child { margin-right: auto; }
.pill { background: var(--panel); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; color: var(--muted); }
.pill b { color: var(--text); }

/* buttons + inputs */
.btn { border: 0; border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 800; cursor: pointer; color: var(--text); background: var(--panel-2); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: transform .08s, filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.big { padding: 14px 26px; font-size: 18px; }
.btn.gold { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: #1b1300; box-shadow: 0 4px 0 #9c6f00; }
.btn.primary { background: linear-gradient(180deg, #4fb0ff, #2a74d6); box-shadow: 0 4px 0 #1b4f99; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.link { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.link.danger { color: var(--red); }
input, select, textarea { font: inherit; color: var(--text); background: #0d1328; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 12px; }

/* landing */
.landing { text-align: center; padding-top: 40px; }
.landing > .brand { font-size: 30px; }
.hero { font-size: clamp(36px, 6vw, 64px); font-weight: 900; font-style: italic; line-height: 1.02; margin: 26px 0 18px; text-transform: uppercase; }
.hero span { color: var(--gold); }
.sports-strip { font-size: 34px; display: flex; gap: 14px; justify-content: center; margin-bottom: 30px; }
.sports-strip span { filter: grayscale(1); opacity: .35; }
.sports-strip span.on { filter: none; opacity: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; text-align: left; max-width: 760px; margin: 0 auto; }
.cards #code { font-size: 22px; text-align: center; letter-spacing: .2em; font-weight: 800; }
.mode-note { margin-top: 26px; color: var(--muted); font-size: 14px; }

/* home page */
.nav { position: sticky; top: 0; z-index: 5; background: rgba(10, 15, 31, .85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-link { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 800; padding: 8px 14px; border-radius: 10px; cursor: pointer; }
.nav-link:hover { color: var(--text); background: var(--panel); }
.home { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }
.hero-sec { text-align: center; padding: 56px 0 30px; scroll-margin-top: 80px; }
.code-join { display: flex; gap: 10px; max-width: 520px; margin: 30px auto 10px; }
.code-join input { font-size: 26px; font-weight: 900; text-align: center; letter-spacing: .18em; padding: 16px; border: 2px solid var(--gold); }
.code-join input::placeholder { letter-spacing: .02em; font-weight: 700; font-size: 20px; }
.code-join .btn { padding: 0 34px; font-size: 22px; }
.under-join { color: var(--muted); }
.under-join .link { font-size: inherit; font-weight: 800; }
.sports-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.sport-pill { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 800; }
.sport-pill span { font-size: 22px; }
.sport-pill.soon { opacity: .45; }
.sport-pill small { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.profile-teaser { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 10px 0 34px; }
.profile-teaser > div:nth-child(2) { flex: 1; }
.profile-teaser p { margin: 4px 0 0; }
.avatar-blank { width: 64px; height: 64px; border-radius: 50%; background: var(--panel-2); display: flex; align-items: center; justify-content: center; font-size: 32px; flex: none; }
.home-sec { margin: 0 0 44px; scroll-margin-top: 80px; }
.sec-head { display: flex; align-items: center; gap: 12px; }
.sec-head h2 { margin: 0; }
.tag { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; background: rgba(255, 197, 49, .15); color: var(--gold); padding: 4px 10px; border-radius: 999px; vertical-align: middle; }
.shop-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 10px; }
.shop-card { --r: var(--line); position: relative; background: var(--panel); border: 2px solid var(--r); border-radius: var(--radius); padding: 18px 12px; text-align: center; filter: saturate(.55); opacity: .8; }
.shop-card.rare { --r: #3fa9f5; } .shop-card.epic { --r: #a855f7; } .shop-card.legendary { --r: var(--gold); }
.shop-icon { font-size: 40px; }
.shop-name { font-weight: 900; margin-top: 6px; }
.shop-type { color: var(--muted); font-size: 12px; }
.shop-price { margin-top: 8px; font-weight: 800; color: var(--gold); font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.step-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step-card .num { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #1b1300; font-weight: 900; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.step-card p { margin: 6px 0 0; font-size: 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; }
.plan.plus { border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(255, 197, 49, .08); }
.plan-name { font-weight: 900; font-size: 20px; display: flex; align-items: center; gap: 10px; }
.plan-price { font-size: 44px; font-weight: 900; margin: 6px 0; }
.plan-price small { font-size: 16px; color: var(--muted); }
.plan ul { padding-left: 20px; margin: 6px 0 20px; flex: 1; }
.plan li { margin: 6px 0; }
.footer { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 22px; }
.footer .mode-note { margin: 0 0 0 auto; }
@media (max-width: 640px) { .nav-links { display: none; } .nav-inner > .btn { margin-left: auto; } .code-join { flex-direction: column; } .code-join .btn { padding: 14px; } }

/* log in pop-up */
.modal-back { position: fixed; inset: 0; z-index: 20; background: rgba(3, 6, 15, .72); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadein .15s; }
.modal { position: relative; width: min(420px, 100%); max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 10px; animation: popin .2s; }
.modal h2 { margin: 6px 0 0; }
.modal-x { position: absolute; top: 12px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
.role-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #0d1328; padding: 5px; border-radius: 14px; margin-right: 26px; }
.role-tab { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 800; padding: 10px; border-radius: 10px; cursor: pointer; }
.role-tab.active { background: var(--panel-2); color: var(--text); }
.soon-banner { background: rgba(255, 197, 49, .1); border: 1px solid rgba(255, 197, 49, .3); color: var(--gold); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.btn.google { background: #fff; color: #1f1f1f; gap: 10px; padding: 12px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.modal .switch { text-align: center; margin: 0; }
.modal-alt { background: #0d1328; border-radius: 12px; padding: 12px; font-size: 14px; text-align: center; }
.modal .link { font-size: inherit; font-weight: 800; }
.modal .hint { margin: -4px 0 0; }
.lg-err { margin: 0; background: rgba(255, 92, 92, .12); border: 1px solid rgba(255, 92, 92, .4); color: #ff9b9b; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 700; }
.lg-err[hidden] { display: none; }
#lg-go:disabled { opacity: .7; cursor: wait; }

/* account chip in the nav */
.acct { position: relative; }
.acct-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font: inherit; font-weight: 800; border-radius: 999px; padding: 4px 12px 4px 4px; cursor: pointer; }
.acct-chip:hover { border-color: var(--gold); }
.acct-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: flex; flex: none; }
.acct-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chip .caret { color: var(--muted); font-size: 12px; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); display: flex; flex-direction: column; z-index: 10; }
.acct-menu[hidden] { display: none; }
.acct-menu a, .acct-menu button { background: none; border: 0; color: var(--text); font: inherit; font-weight: 700; text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; text-decoration: none; }
.acct-menu a:hover, .acct-menu button:hover { background: var(--panel-2); }
.acct-role { padding: 6px 12px 4px; }
.sync-ok { color: #6ee7a8; font-weight: 700; margin: 4px 0 0; }
.topbar .sync-ok, .topbar #shop-login { margin: 0 0 0 auto; }
@media (max-width: 640px) { #nav-acct { margin-left: auto; } .acct-name { display: none; } }
@keyframes fadein { from { opacity: 0; } }

/* setup */
.section-title { font-size: 18px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 12px; }
.set-grid, .sport-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.set-card, .sport-card, .mode-card { position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.set-card input, .sport-card input, .mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.selected { border-color: var(--gold) !important; box-shadow: 0 0 0 4px rgba(255, 197, 49, .15); }
.set-title { font-weight: 800; }
.set-meta { color: var(--muted); font-size: 13px; }
.set-actions { display: flex; gap: 12px; margin-top: 6px; }
.new-card { justify-content: center; gap: 8px; cursor: default; border-style: dashed; }
.sport-icon { font-size: 40px; }
.sport-name { font-weight: 900; font-size: 18px; }
.sport-name span { color: var(--gold); font-weight: 700; font-size: 14px; display: block; }
.sport-blurb { color: var(--muted); font-size: 13px; }
.soon { opacity: .45; cursor: default; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-top: 6px; width: fit-content; }
.mode-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.mode-card span { color: var(--muted); font-size: 13px; }
.launch { display: flex; align-items: end; justify-content: flex-end; gap: 16px; margin-top: 30px; flex-wrap: wrap; }
.launch label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }
.launch select { width: 170px; }

/* editor */
.title-input { font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.q-edit { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; align-items: flex-start; }
.q-num { font-weight: 900; color: var(--gold); width: 24px; padding-top: 12px; }
.q-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.q-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.ans.correct { border-color: var(--green); }
.del-q { padding-top: 12px; font-size: 16px; }
.editor-actions { display: flex; justify-content: space-between; margin-top: 16px; gap: 12px; }
.editor textarea { margin-top: 12px; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }

/* lobby */
.code-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 28px; text-align: center; }
.join-how { color: var(--muted); font-size: 20px; }
.big-code { font-size: clamp(64px, 12vw, 128px); font-weight: 900; letter-spacing: .06em; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.join-link { display: flex; gap: 8px; max-width: 560px; margin: 10px auto 0; }
.join-link input { font-size: 13px; color: var(--muted); }
.local-note { margin-top: 10px; color: var(--gold); font-size: 14px; }
.lobby-bar { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.lobby-bar #count { font-size: 22px; font-weight: 900; }
.lobby-bar .muted { margin-right: auto; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { --c: var(--gold); background: var(--panel-2); color: var(--text); border: 2px solid var(--c); border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 800; font-size: 18px; cursor: pointer; animation: popin .3s ease-out; }
.chips.classic .chip { --c: var(--line); }
.chip:hover { text-decoration: line-through; border-color: var(--red); }
.waiting { font-size: 18px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.team-col { background: var(--panel); border-radius: var(--radius); padding: 16px; border-top: 6px solid; }
.team-col.red { border-color: var(--red); } .team-col.red h3 { color: var(--red); }
.team-col.blue { border-color: var(--blue); } .team-col.blue h3 { color: var(--blue); }
.lobby-foot { margin-top: 30px; }

/* live host */
.clock { font-size: 34px; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 100px; text-align: center; }
.clock.urgent, .hud-clock.urgent { color: var(--red); animation: pulse 1s infinite; }
.live-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
@media (max-width: 860px) { .live-grid { grid-template-columns: 1fr; } }
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 40px 1.2fr 1.2fr 1.5fr 60px; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 18px; transition: all .3s; }
.row.offline { opacity: .45; }
.row .rank { font-weight: 900; color: var(--gold); }
.row .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .hud { color: var(--muted); font-size: 14px; }
.row .bar { height: 10px; background: #0d1328; border-radius: 99px; overflow: hidden; }
.row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); border-radius: 99px; transition: width .5s; }
.row .score { font-weight: 900; font-size: 22px; text-align: right; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.feed { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; }
.feed h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.feed-item { padding: 10px 0; border-bottom: 1px solid var(--line); animation: popin .3s; }
.feed-item b { color: var(--gold); }
.scoreboard { display: flex; align-items: center; justify-content: center; gap: 20px; background: #05070f; border: 3px solid #222b4d; border-radius: 20px; padding: 18px; margin-bottom: 10px; }
.scoreboard .team { display: flex; align-items: center; gap: 18px; font-weight: 900; font-size: 22px; }
.scoreboard .team b { font-size: 72px; font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.scoreboard .red { color: var(--red); } .scoreboard .blue { color: var(--blue); }
.scoreboard .vs { font-size: 40px; }
.tug { height: 14px; background: var(--blue); border-radius: 99px; overflow: hidden; margin-bottom: 16px; }
.tug i { display: block; height: 100%; background: var(--red); transition: width .6s; }

/* results */
.winner-banner { text-align: center; font-size: 28px; font-weight: 900; padding: 16px; border-radius: var(--radius); margin-bottom: 20px; }
.winner-banner.red { background: rgba(255, 77, 109, .18); color: var(--red); }
.winner-banner.blue { background: rgba(63, 169, 245, .18); color: var(--blue); }
.winner-banner.tie { background: var(--panel); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 20px 0 30px; }
.step { width: 180px; text-align: center; animation: rise .6s ease-out both; }
.step .p-name { font-weight: 900; font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step .p-score { color: var(--muted); margin-bottom: 8px; }
.step .block { border-radius: 12px 12px 0 0; font-size: 44px; font-weight: 900; display: flex; align-items: center; justify-content: center; color: #1b1300; }
.s1 .block { height: 170px; background: linear-gradient(var(--gold), var(--gold-dark)); }
.s2 .block { height: 120px; background: linear-gradient(#e3e8f5, #9aa6c6); animation-delay: .2s; }
.s3 .block { height: 90px; background: linear-gradient(#e7a565, #b06d2c); animation-delay: .35s; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 800; padding: 10px 16px; border-radius: 10px; cursor: pointer; }
.tab.active { background: var(--panel-2); color: var(--text); }
table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.low { color: var(--red); font-weight: 800; }
.results-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }

/* player */
.join .form-card { width: min(380px, 92vw); }
.join #code { font-size: 26px; text-align: center; letter-spacing: .2em; font-weight: 900; }
.field-label { font-size: 13px; font-weight: 700; text-align: left; margin-bottom: -6px; }
.error {background: rgba(255, 77, 109, .15); color: var(--red); border-radius: 10px; padding: 10px; font-size: 14px; }
.you-are { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.my-name { font-size: 48px; font-weight: 900; }
.sport-big { font-size: 90px; animation: bounce 1.4s infinite; }
.team-tag { font-size: 13px; font-weight: 900; padding: 4px 10px; border-radius: 999px; vertical-align: middle; }
.team-tag.red { background: var(--red); } .team-tag.blue { background: var(--blue); }
.pulse { animation: pulse 1.6s infinite; color: var(--muted); }

.play { max-width: 820px; }
.hud-bar { display: flex; align-items: center; gap: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.hud-name { font-weight: 900; margin-right: auto; }
.hud-stat { color: var(--muted); } .hud-stat b { color: var(--text); font-size: 20px; }
.hud-clock { font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; }
.status-line { text-align: center; color: var(--gold); font-weight: 800; min-height: 26px; margin: 10px 0; }
.question-card { background: #fff; color: #10172e; border-radius: 20px; padding: 32px 24px; text-align: center; box-shadow: 0 8px 0 rgba(0, 0, 0, .25); margin-bottom: 18px; animation: popin .25s; }
.question-card .q { font-size: clamp(22px, 3.4vw, 32px); font-weight: 900; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer { border: 0; border-radius: 16px; min-height: 92px; padding: 16px; font: inherit; font-size: 20px; font-weight: 800; color: #fff; cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left; box-shadow: 0 5px 0 rgba(0, 0, 0, .3); transition: transform .08s, opacity .2s; }
.answer:hover:not(:disabled) { transform: translateY(-2px); }
.answer:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.answer .key { background: rgba(0, 0, 0, .22); border-radius: 8px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 15px; }
.answer.a { background: var(--a); } .answer.b { background: var(--b); } .answer.c { background: var(--c); } .answer.d { background: var(--d); }
.answer.dim { opacity: .25; }
.answer.picked:not(.right):not(.wrong):not(.dim) { outline: 4px dashed rgba(255, 255, 255, .7); animation: pulse 1s infinite; } /* waiting for the host to check */
.answer.right { outline: 4px solid #fff; animation: popin .3s; }
.answer.wrong { opacity: .6; text-decoration: line-through; }
.verdict { text-align: center; font-size: 22px; font-weight: 900; margin-top: 16px; padding: 14px; border-radius: 14px; animation: popin .25s; }
.verdict.good { background: rgba(46, 204, 113, .18); color: var(--green); }
.verdict.bad { background: rgba(255, 77, 109, .14); color: #ff9db0; }

/* sport mini-games */
.sport-wrap { display: flex; flex-direction: column; gap: 12px; animation: popin .25s; }
.sport-wrap canvas { width: 100%; height: auto; border-radius: 18px; border: 2px solid var(--line); background: #0b1124; }
.sport-msg { text-align: center; font-size: 20px; min-height: 32px; }
.sport-msg b { color: var(--gold); }
.pop { display: inline-block; font-weight: 900; font-size: 30px; animation: popin .35s cubic-bezier(.2, 1.6, .4, 1); }
.pop small { display: block; font-size: 15px; color: var(--muted); font-weight: 700; }
.pop.good { color: var(--green); } .pop.bad { color: #ff9db0; }
.meter-area { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 120px; }
.meter-label { color: var(--muted); font-size: 14px; text-align: center; }
.meter { position: relative; width: 100%; height: 34px; background: #0d1328; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; cursor: pointer; }
.meter .zone { position: absolute; top: 0; bottom: 0; background: rgba(46, 204, 113, .55); }
.meter .sweet { position: absolute; top: 0; bottom: 0; background: #2ecc71; box-shadow: 0 0 14px #2ecc71; }
.meter .marker { position: absolute; top: -2px; bottom: -2px; width: 6px; margin-left: -3px; background: #fff; border-radius: 3px; box-shadow: 0 0 10px #fff; }
.meter.hit { border-color: var(--green); } .meter.miss { border-color: var(--red); }
.meter-btn { min-width: 220px; }
.meter-hint { color: var(--muted); font-size: 12px; }
.choices { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.timeup { padding: 40px 0; }

.canvas-box { position: relative; }
.canvas-box canvas { display: block; touch-action: none; cursor: crosshair; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.overlay .pop { font-size: 54px; color: #fff; text-shadow: 0 4px 18px rgba(0, 0, 0, .6); font-style: italic; }
.shotclock { width: 100%; height: 12px; background: #0d1328; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.shotclock i { display: block; height: 100%; width: 100%; background: var(--green); border-radius: 99px; }
.shotclock i.low { background: var(--red); }
.pocket-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; align-self: flex-start; }
.meter-hint b { color: var(--text); }
.timebar { width: 100%; height: 8px; background: #0d1328; border-radius: 99px; overflow: hidden; margin: 4px 0 12px; }
.timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.choices { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.choice { flex-direction: column; gap: 4px; padding: 16px; min-height: 76px; background: var(--panel-2); border: 2px solid var(--line); font-size: 16px; }
.choice small { color: var(--muted); font-weight: 600; font-size: 12px; }
.choice:hover { border-color: var(--gold); }
.choice.picked { border-color: var(--gold); background: rgba(255, 197, 49, .15); }
.small { font-size: 13px; }

/* duel */
.duel-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; background: #05070f; border: 2px solid #222b4d; border-radius: var(--radius); padding: 10px 16px; }
.d-side { display: flex; align-items: center; gap: 12px; font-size: 18px; min-width: 0; }
.d-side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-side span { font-size: 40px; font-weight: 900; font-family: ui-monospace, Consolas, monospace; }
.d-side.me span { color: var(--gold); }
.d-side.opp { justify-content: flex-end; }
.d-side.opp span { color: var(--red); }
.d-mid { text-align: center; }
.role { font-weight: 900; font-size: 14px; letter-spacing: .08em; padding: 4px 12px; border-radius: 999px; display: inline-block; }
.role.off { background: var(--gold); color: #1b1300; }
.role.def { background: var(--blue); color: #fff; }
.duel-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; animation: popin .25s; }
.duel-card.good { border-color: var(--green); } .duel-card.bad { border-color: var(--red); }
.duel-card h2 { margin: 0; }
.big-emoji { font-size: 64px; }
.call-head { font-size: 20px; margin: 0 0 6px; }
.vs-splash .round-name { color: var(--gold); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.vs-row { display: flex; align-items: center; gap: 22px; font-size: clamp(28px, 5vw, 46px); font-weight: 900; font-style: italic; animation: popin .4s; }
.vs-x { color: var(--muted); font-size: .6em; }
.vs-opp { color: var(--red); }
.mode-explain { max-width: 520px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }

/* bracket board */
.round-label { font-size: 26px; font-weight: 900; color: var(--gold); font-style: italic; }
.bracket { display: flex; gap: 22px; overflow-x: auto; padding-bottom: 10px; align-items: stretch; }
.b-round { display: flex; flex-direction: column; justify-content: space-around; gap: 14px; min-width: 210px; }
.b-round h4 { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; text-align: center; }
.b-match { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.b-match.live { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 197, 49, .12); }
.b-match.tbd { opacity: .35; }
.b-p { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 800; }
.b-p + .b-p { border-top: 1px solid var(--line); }
.b-p span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-p b { font-size: 20px; font-variant-numeric: tabular-nums; }
.b-p.win { background: rgba(255, 197, 49, .14); color: var(--gold); }
.b-p.lose { opacity: .45; text-decoration: line-through; }
.b-p.bye { color: var(--muted); font-style: italic; }
.b-p .ball { font-style: normal; margin-right: 6px; }
.b-status { font-size: 11px; color: var(--muted); padding: 6px 12px; background: #0d1328; text-transform: uppercase; letter-spacing: .06em; }
.champion { background: linear-gradient(180deg, var(--gold), var(--gold-dark)); color: #1b1300; border-radius: 16px; padding: 22px; text-align: center; font-size: 46px; display: flex; flex-direction: column; animation: popin .4s; }
.champion b { font-size: 22px; }
.winner-banner.gold { background: rgba(255, 197, 49, .16); color: var(--gold); }
.team-tag.practice { background: var(--panel-2); border: 1px solid var(--line); margin-left: 6px; }
.team-tag.big { font-size: 34px; padding: 10px 26px; margin: 8px 0; animation: popin .35s; }
.scoreboard .team span { max-width: 220px; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
.scoreboard .team.red span { text-align: right; }

/* team naming (Class Clash) */
.naming { text-align: center; }
.naming-title { font-size: clamp(34px, 6vw, 60px); margin: 24px 0 6px; }
.naming-clock { font-size: 72px; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1; margin: 18px 0; }
.naming-clock.urgent { color: var(--red); animation: pulse 1s infinite; }
.naming-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 20px auto; max-width: 900px; }
.name-card { background: var(--panel); border-radius: var(--radius); border-top: 8px solid; padding: 22px; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 190px; justify-content: center; }
.name-card.red { border-color: var(--red); } .name-card.red h3 { color: var(--red); }
.name-card.blue { border-color: var(--blue); } .name-card.blue h3 { color: var(--blue); }
.name-card h3 { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: 15px; }
.idea-count { font-size: 64px; font-weight: 900; line-height: 1; }
.slot { font-size: clamp(26px, 4vw, 42px); font-weight: 900; min-height: 1.2em; font-family: ui-monospace, Consolas, monospace; letter-spacing: .02em; overflow-wrap: anywhere; }
.slot:not(.rolling) { font-family: inherit; animation: popin .3s; }
.slot.rolling { color: var(--muted); }
.naming-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.naming-player { max-width: 460px; margin: 0 auto; }
.naming-player .naming-clock { font-size: 56px; margin: 4px 0; }
.naming-player .form-card { width: 100%; }
.naming-player #idea { font-size: 22px; font-weight: 800; text-align: center; }
.idea-status { min-height: 1.4em; font-size: 14px; color: var(--muted); }
.idea-status.ok { color: var(--green); }
.idea-status.bad { color: var(--red); font-weight: 700; }
@media (max-width: 600px) { .naming-teams { grid-template-columns: 1fr; } }

/* finished */
.medal { font-size: 96px; animation: bounce 1.4s infinite; }
.final-score { font-size: 64px; font-weight: 900; color: var(--gold); }
.final-score span { font-size: 22px; color: var(--muted); }
.mini-podium { display: flex; flex-direction: column; gap: 6px; background: var(--panel); border-radius: var(--radius); padding: 14px 24px; }

/* banners (shop cosmetics) */
.bn-plain { background: var(--panel-2); }
.bn-sunset { background: linear-gradient(135deg, #ff7e5f, #c2447a); }
.bn-ocean { background: linear-gradient(135deg, #1c6ea4, #2bb3c0); }
.bn-jungle { background: linear-gradient(135deg, #134e5e, #4a9a5c); }
.bn-stadium { background: radial-gradient(circle at 15% -10%, rgba(255, 255, 255, .5), transparent 45%), radial-gradient(circle at 85% -10%, rgba(255, 255, 255, .45), transparent 45%), linear-gradient(#24306b, #0b1124); }
.bn-checker { background: repeating-conic-gradient(#1b1b1b 0 25%, #3a3a3a 0 50%) 0 0 / 18px 18px; }
.bn-galaxy { background: radial-gradient(#fff 1px, transparent 1.6px) 0 0 / 17px 17px, radial-gradient(circle at 30% 40%, #7b2cbf, transparent 60%), radial-gradient(circle at 80% 70%, #2c3e99, transparent 60%), #0b0820; }
.bn-lava { background: linear-gradient(135deg, #5c0000, #d93d00 55%, #ff9f1c); }
.bn-gold { background: linear-gradient(110deg, #8a6200, #d4a017 30%, #fff0a8 45%, #d4a017 60%, #8a6200) 0 0 / 250% 100%; animation: shimmer 3s linear infinite; }
@keyframes shimmer { to { background-position: -250% 0; } }

/* name card: banner + avatar + name */
.nameplate { border-radius: 20px; padding: 16px 26px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid rgba(255, 255, 255, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); min-width: 200px; }
.np-name { font-size: 26px; font-weight: 900; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: block; flex: none; }

/* avatars on the projector */
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 20px 4px 4px; color: #fff; font-size: 21px; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); animation: none; }
.chip.new { animation: chipin .6s cubic-bezier(.3, 1.7, .5, 1); }
@keyframes chipin { 0% { transform: scale(.2) translateY(30px); opacity: 0; } 60% { opacity: 1; } }
.step { width: 200px; }
.p-avatar { box-shadow: 0 8px 24px rgba(0, 0, 0, .4); border: 2px solid rgba(255, 255, 255, .12); }
.step.s1 .p-avatar { animation: bump 1.6s ease-in-out infinite; }
.chip .avatar { border-radius: 50%; background: rgba(0, 0, 0, .25); }
.row .name { display: flex; align-items: center; gap: 8px; }
.row .name .avatar { border-radius: 50%; background: var(--panel-2); }
.b-p span { display: flex; align-items: center; gap: 6px; }
.b-p .avatar { border-radius: 50%; background: var(--panel-2); }
.p-avatar { width: fit-content; margin: 0 auto 6px; border-radius: 18px; padding: 6px 10px 0; overflow: hidden; }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vs-side .avatar { background: var(--panel); border-radius: 50%; border: 3px solid var(--line); }

/* home page: profile + shop row */
.pt-avatar { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; border: 2px solid var(--line); }
.coin-text { color: var(--gold); font-weight: 900; }
.sec-head .sec-btn { margin-left: auto; padding: 8px 14px; font-size: 14px; }
a.shop-card { color: inherit; text-decoration: none; filter: none; opacity: 1; transition: transform .15s; }
a.shop-card:hover { transform: translateY(-3px); }
.shop-thumb { height: 78px; display: flex; align-items: center; justify-content: center; }
.shop-thumb .thumb-icon { font-size: 44px; }

/* shop page */
.coin-pill { background: rgba(255, 197, 49, .14); border: 1px solid rgba(255, 197, 49, .4); color: var(--gold); font-weight: 900; font-size: 18px; padding: 8px 16px; border-radius: 999px; }
.welcome-gift { display: flex; align-items: center; gap: 12px; background: rgba(57, 232, 106, .1); border: 1px solid rgba(57, 232, 106, .35); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; }
.welcome-gift span { flex: 1; }
.shop-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.locker { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.locker .nameplate { min-width: 0; }
.center-text { text-align: center; margin: 0; }
.preview-box { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.preview-box.rare { border-color: #3fa9f5; } .preview-box.epic { border-color: #a855f7; } .preview-box.legendary { border-color: var(--gold); }
.locker-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.locker-row .btn { padding: 8px 12px; font-size: 14px; flex: 1; }
.num-label { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--muted); font-size: 14px; }
.num-label input { width: 64px; padding: 8px; text-align: center; font-weight: 900; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.toggle input { width: auto; }
.earn-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; }
.earn-box ul { margin: 6px 0; padding-left: 18px; }
.earn-box p { margin: 6px 0 0; }
.deals { background: linear-gradient(135deg, rgba(255, 77, 109, .12), rgba(255, 197, 49, .1)); border: 1px solid rgba(255, 197, 49, .25); border-radius: var(--radius); padding: 12px 16px 16px; margin-bottom: 16px; }
.deals h3, .cat-title { margin: 4px 0 10px; }
.cat-title { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 20px; }
.shop-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.shop-tab { background: var(--panel); border: 1px solid var(--line); color: var(--muted); font: inherit; font-weight: 800; padding: 9px 14px; border-radius: 12px; cursor: pointer; }
.shop-tab.active { background: var(--gold); color: #1b1300; border-color: var(--gold); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.item { --r: var(--line); position: relative; background: var(--panel); border: 2px solid var(--r); border-radius: 14px; padding: 10px 8px 8px; color: var(--text); font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .12s; }
.item:hover { transform: translateY(-2px); }
.item.rare { --r: #3fa9f5; } .item.epic { --r: #a855f7; } .item.legendary { --r: var(--gold); box-shadow: 0 0 14px rgba(255, 197, 49, .25); }
.item.equipped { background: #16244a; box-shadow: 0 0 0 3px rgba(57, 232, 106, .55); }
.item.previewing { box-shadow: 0 0 0 3px #fff; }
.item .rar { position: absolute; top: 6px; left: 6px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; color: var(--r); }
.item.common .rar { color: var(--muted); }
.thumb { height: 78px; display: flex; align-items: center; justify-content: center; }
.thumb-icon { font-size: 46px; }
.thumb-banner { width: 112px; height: 62px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 22px; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.thumb-trail { width: 116px; height: 63px; border-radius: 10px; }
.item-name { font-weight: 800; font-size: 14px; text-align: center; }
.item-foot { font-size: 12px; font-weight: 800; }
.item-foot .eq { color: var(--green); } .item-foot .own { color: var(--muted); } .item-foot .cost { color: var(--gold); }
.item-foot s { color: var(--muted); font-weight: 600; }
.tag-new, .tag-sale { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 900; letter-spacing: .05em; padding: 2px 6px; border-radius: 6px; }
.tag-new { background: var(--green); color: #052e12; }
.tag-sale { background: var(--red); color: #fff; }
.item.wiggle { animation: wiggle .45s ease-in-out; }
.np-avatar.bump { animation: bump .4s ease-out; }
@keyframes wiggle { 20% { transform: rotate(-5deg) scale(1.06); } 45% { transform: rotate(4deg) scale(1.06); } 70% { transform: rotate(-2deg); } }
@keyframes bump { 40% { transform: translateY(-10px) scale(1.06); } }
.shop-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 2px; }
.filters { display: flex; gap: 6px; }
.filter { background: none; border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: 13px; font-weight: 800; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.filter.active { background: var(--panel-2); color: var(--text); border-color: var(--muted); }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; }
.sort select { width: auto; padding: 6px 10px; font-size: 13px; }
.top-row { display: grid; grid-template-columns: 200px 1fr; gap: 12px; margin-bottom: 16px; }
.top-row .deals { margin: 0; }
.mystery { background: radial-gradient(circle at 50% 30%, rgba(168, 85, 247, .35), transparent 70%), var(--panel); border: 2px solid #a855f7; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.mbox-icon { font-size: 54px; animation: bounce 2s infinite; }
.odds { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.odd { font-size: 10px; font-weight: 900; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); }
.odd.rare { color: #3fa9f5; } .odd.epic { color: #c084fc; } .odd.legendary { color: var(--gold); } .odd.common { color: var(--muted); }
.mystery .btn { width: 100%; padding: 10px; font-size: 14px; }
.daily-bar { display: flex; align-items: center; gap: 12px; background: linear-gradient(90deg, rgba(255, 197, 49, .16), rgba(255, 77, 109, .1)); border: 1px solid rgba(255, 197, 49, .4); border-radius: var(--radius); padding: 10px 16px; margin-bottom: 18px; }
.daily-bar span:nth-child(2) { flex: 1; }
.daily-gift { font-size: 30px; animation: wiggle 1.2s ease-in-out infinite; }
.outfits { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.outfits-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.outfit-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.outfit { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.of-slot { width: 72px; height: 72px; border-radius: 16px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; color: var(--muted); font-size: 24px; }
.of-slot.empty { background: none; border-style: dashed; }
.of-slot:hover { border-color: var(--gold); }
.thumb-trail.big { width: 280px; height: 152px; }
.float-coins { position: fixed; z-index: 45; transform: translateX(-50%); font-weight: 900; font-size: 26px; color: var(--gold); text-shadow: 0 2px 8px rgba(0, 0, 0, .6); pointer-events: none; animation: floatup 1.3s ease-out forwards; }
@keyframes floatup { to { transform: translate(-50%, -90px); opacity: 0; } }

/* unlock + mystery box moment */
.unlock-back { position: fixed; inset: 0; z-index: 35; background: rgba(3, 6, 15, .82); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadein .2s; }
.unlock { --r: var(--muted); position: relative; overflow: hidden; width: min(380px, 100%); background: var(--panel); border: 3px solid var(--r); border-radius: 24px; padding: 26px 20px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; animation: popin .35s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 60px color-mix(in srgb, var(--r) 45%, transparent); }
.unlock.rare { --r: #3fa9f5; } .unlock.epic { --r: #a855f7; } .unlock.legendary { --r: var(--gold); } .unlock.opening { --r: #a855f7; }
.unlock > * { position: relative; }
.rays { position: absolute !important; inset: -50%; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--r) 22%, transparent) 0 10deg, transparent 10deg 20deg); animation: spin 12s linear infinite; }
.unlock-label { font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--r); }
.unlock-thumb { min-height: 170px; display: flex; align-items: center; justify-content: center; animation: bump .6s .2s ease-out both; }
.unlock-rarity { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--r); }
.unlock-name { font-size: 28px; font-weight: 900; }
.unlock-actions { display: flex; gap: 10px; margin-top: 6px; }
.mbox-big { font-size: 120px; animation: shake .25s ease-in-out infinite; }
@keyframes shake { 25% { transform: rotate(-9deg) scale(1.05); } 75% { transform: rotate(9deg) scale(1.05); } }
@media (max-width: 800px) { .shop-layout { grid-template-columns: 1fr; } .locker { position: static; } .top-row { grid-template-columns: 1fr; } }

/* in-game: sound toggle, coin reward, celebration layer */
.icon-btn { background: none; border: 1px solid var(--line); border-radius: 10px; font-size: 18px; padding: 4px 8px; cursor: pointer; }
.coin-reward { background: rgba(255, 197, 49, .08); border: 1px solid rgba(255, 197, 49, .3); border-radius: var(--radius); padding: 12px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cr-total { font-size: 34px; font-weight: 900; color: var(--gold); animation: popin .4s; }
.cr-lines { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.cr-lines b { color: var(--text); }
canvas.celebrate { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }

/* misc */
.spinner { width: 46px; height: 46px; border: 5px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--panel-2); border: 1px solid var(--line); padding: 12px 20px; border-radius: 12px; font-weight: 700; transition: transform .25s; z-index: 30; }
#toast.show { transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes bounce { 50% { transform: translateY(-14px); } }
@keyframes popin { from { transform: scale(.85); opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

@media (max-width: 600px) {
  .answers { grid-template-columns: 1fr; }
  .answer { min-height: 64px; font-size: 18px; }
  .row { grid-template-columns: 30px 1fr 60px; }
  .row .hud, .row .bar { display: none; }
  .teams { grid-template-columns: 1fr; }
  .scoreboard .team b { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Badges ---------- */
.bdgs { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
.bdgs .bdg { font-size: .9em; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.np-badges { margin: 0; font-size: 22px; gap: 6px; }
.chip .bdgs { margin-left: 0; font-size: 18px; }
.step .bdgs { margin: 2px 0 0; font-size: 22px; justify-content: center; display: flex; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.badge-card .bc-icon { font-size: 44px; line-height: 1.1; }
.badge-card small { color: var(--muted); font-size: 12px; }
.badge-card.earned { border-color: var(--gold); box-shadow: 0 0 18px rgba(255, 197, 49, .18); }
.badge-card.locked { opacity: .55; }
.badge-card.locked .bc-icon { filter: grayscale(1); font-size: 34px; }
.badge-pop { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--panel); border: 3px solid var(--gold); border-radius: 18px; padding: 12px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5), 0 0 40px rgba(255, 197, 49, .3); min-width: 260px; max-width: calc(100vw - 32px); cursor: pointer; animation: badgein .5s cubic-bezier(.3, 1.6, .5, 1); transition: opacity .6s, transform .6s; }
.badge-pop.out { opacity: 0; transform: translate(-50%, -30px); }
.badge-pop .bp-title { font-weight: 900; color: var(--gold); text-align: center; margin-bottom: 6px; letter-spacing: .5px; }
.badge-pop .bp-row, .new-badges .nb { display: flex; align-items: center; gap: 10px; text-align: left; }
.badge-pop .bp-icon, .new-badges .nb-icon { font-size: 34px; }
.badge-pop small, .new-badges small { display: block; color: var(--muted); font-size: 12px; }
@keyframes badgein { from { transform: translate(-50%, -60px) scale(.8); opacity: 0; } }
.new-badges { background: var(--panel); border: 2px solid var(--gold); border-radius: var(--radius); padding: 10px 16px; display: flex; flex-direction: column; gap: 6px; margin: 10px auto; width: fit-content; }
.new-badges .nb-title { font-weight: 900; color: var(--gold); text-align: center; }

/* ---------- Buzzer Beater (projector) ---------- */
.bz-main { min-height: 420px; display: flex; flex-direction: column; justify-content: center; }
.bz-intro, .bz-wait { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 10px; }
.bz-intro h1 { margin: 0; font-size: 46px; }
.bz-intro p { max-width: 560px; font-size: 18px; }
.bz-q { display: flex; flex-direction: column; gap: 14px; }
.bz-q .question-card .q { font-size: clamp(26px, 3.4vw, 44px); }
.bz-clockrow { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 18px; }
.bz-clockrow .clock { font-size: 44px; }
.bz-answers .answer { cursor: default; font-size: clamp(18px, 2.2vw, 28px); }
.bz-fast { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.bz-place { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 6px 14px; font-size: 20px; min-width: min(420px, 100%); }
.bz-place.p1 { border-color: var(--gold); box-shadow: 0 0 20px rgba(255, 197, 49, .25); font-size: 24px; }
.bz-place span { color: var(--muted); margin-left: auto; }
.bz-place em { font-style: normal; font-weight: 900; color: var(--gold); }
.bz-shooter { text-align: center; font-size: 26px; font-weight: 800; color: var(--gold); animation: popin .4s; }
.bz-replay { max-width: 760px; width: 100%; margin: 0 auto; }
.bz-rows .row { grid-template-columns: 28px 1fr auto; }
