@font-face { font-family: Bebas; src: url(fonts/bebas.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Oswald; src: url(fonts/oswald.woff2) format("woff2"); font-display: swap; }

:root {
  --velvet: #5c0a12; --velvet-dk: #2a0508; --gold: #f2c14e; --gold-dk: #b8862b;
  --cream: #fff4dc; --ink: #14080a;
  --a: #e63946; --b: #f4a300; --c: #2a9d8f; --d: #7b4bc4;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Oswald, "Arial Narrow", sans-serif; color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, #8b1520 0%, var(--velvet) 35%, var(--velvet-dk) 100%) fixed;
  overflow-x: hidden;
}
.curtain { position: fixed; top: 0; bottom: 0; width: 22px; z-index: 0;
  background: repeating-linear-gradient(90deg, #3a060b 0 6px, #7a0f19 6px 12px, #4a0810 12px 18px); opacity: .9; }
.curtain.left { left: 0 } .curtain.right { right: 0 }
main { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; padding: 14px 30px 40px; }

.marquee { text-align: center; padding: 14px 10px 10px; margin-bottom: 16px; border-radius: 14px;
  background: linear-gradient(#1b0a0c, #2b1012); border: 3px solid var(--gold-dk);
  box-shadow: 0 0 0 3px #1b0a0c, 0 0 24px rgba(242,193,78,.35); }
.marquee h1 { font-family: Bebas, Impact, sans-serif; font-size: 52px; letter-spacing: 3px; margin: 2px 0 0; line-height: 1;
  color: var(--gold); text-shadow: 0 0 10px rgba(242,193,78,.7), 0 3px 0 #7a4d0e; }
.marquee .tag { margin: 2px 0 4px; letter-spacing: 4px; text-transform: uppercase; font-size: 13px; color: #f7dfa5; }
.bulbs { height: 10px; background: radial-gradient(circle, #fff6c8 0 3px, #f2c14e 3.5px, transparent 4.5px) 0 0/18px 10px repeat-x;
  animation: chase 1s steps(2) infinite; }
@keyframes chase { to { background-position: 18px 0 } }

.hidden { display: none !important; }
.card { background: rgba(20,8,10,.72); border: 2px solid rgba(242,193,78,.45); border-radius: 16px; padding: 22px 18px; }
.center { text-align: center }
h2 { font-family: Bebas, Impact, sans-serif; font-size: 36px; letter-spacing: 1.5px; margin: 6px 0; color: var(--gold); font-weight: 400 }
.muted { color: #e9cfa0; opacity: .85 }
.err { color: #ffb3b3; min-height: 1.2em; margin: 10px 0 0; text-align: center }

.ticket { position: relative; background: var(--cream); color: var(--ink); border-radius: 12px; padding: 18px 20px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px;
  border-radius: 50%; background: var(--velvet); }
.ticket::before { left: -13px } .ticket::after { right: -13px }
.ticket-head { font-family: Bebas, Impact, sans-serif; text-align: center; font-size: 26px; letter-spacing: 8px; color: var(--velvet);
  border-bottom: 2px dashed #c9a96a; padding-bottom: 8px; margin-bottom: 12px; }
.ticket label { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; color: #6b3b2a }
.ticket input { display: block; width: 100%; margin-top: 4px; padding: 12px 14px; font: 500 22px Oswald, sans-serif;
  border: 2px solid #c9a96a; border-radius: 10px; background: #fffaf0; color: var(--ink); outline: none; }
.ticket input:focus { border-color: var(--velvet) }
#in-code { text-transform: uppercase; letter-spacing: 10px; text-align: center; font-family: Bebas, Impact, sans-serif; font-size: 34px }

.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 14px; cursor: pointer;
  font: 400 26px Bebas, Impact, sans-serif; letter-spacing: 2px; }
.btn.gold { background: linear-gradient(#ffd977, var(--gold) 50%, var(--gold-dk)); color: #3b1d05; box-shadow: 0 4px 0 #7a4d0e }
.btn.gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #7a4d0e }
.btn.ghost { background: transparent; color: #e9cfa0; border: 1px solid rgba(233,207,160,.4); margin-top: 18px }
.btn.small { font-size: 18px; padding: 8px }
.btn:disabled { opacity: .5 }

.pill { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(242,193,78,.18); border: 1px solid rgba(242,193,78,.5);
  color: var(--gold); letter-spacing: 1px; font-size: 15px; margin: 8px 0 }
.badge { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; flex: none }
.badge.big { width: 76px; height: 76px; font-size: 40px; box-shadow: 0 0 0 4px rgba(255,255,255,.15) }
.av0 { background: #e63946 } .av1 { background: #f4a300 } .av2 { background: #2a9d8f }
.av3 { background: #7b4bc4 } .av4 { background: #e76f51 } .av5 { background: #3a86ff }

.players { list-style: none; padding: 0; margin: 14px 0 0; text-align: left }
.players li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 20px }
.players li.me { color: var(--gold) }

.countdown { font: 140px/1 Bebas, Impact, sans-serif; color: var(--gold); text-shadow: 0 0 30px rgba(242,193,78,.6); animation: pop .9s ease-out infinite }
@keyframes pop { from { transform: scale(1.25); opacity: .4 } to { transform: scale(1); opacity: 1 } }

.qhead { display: flex; justify-content: space-between; align-items: center }
.timer { font: 40px Bebas, Impact, sans-serif; color: var(--gold) }
.timebar { height: 8px; background: rgba(255,255,255,.12); border-radius: 8px; overflow: hidden; margin: 4px 0 12px }
#q-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--a), var(--gold)); transition: width .25s linear }
.qtext { font-size: 21px; line-height: 1.3; margin: 0 0 16px; min-height: 3.6em }
.choices { display: grid; gap: 12px }
.choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 10px 14px; border: 0; border-radius: 14px;
  color: #fff; font: 500 19px Oswald, sans-serif; text-align: left; cursor: pointer; box-shadow: 0 5px 0 rgba(0,0,0,.35) }
.choice:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,.35) }
.choice .l { font: 34px Bebas, Impact, sans-serif; width: 40px; height: 40px; border-radius: 10px; background: rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center; flex: none }
.c0 { background: var(--a) } .c1 { background: var(--b) } .c2 { background: var(--c) } .c3 { background: var(--d) }

.reel { width: 90px; height: 90px; margin: 6px auto 4px; border-radius: 50%;
  background: radial-gradient(circle, #222 0 9px, #aaa 9px 12px, transparent 12px),
              radial-gradient(circle at 50% 22%, #111 0 10px, transparent 11px), radial-gradient(circle at 50% 78%, #111 0 10px, transparent 11px),
              radial-gradient(circle at 22% 50%, #111 0 10px, transparent 11px), radial-gradient(circle at 78% 50%, #111 0 10px, transparent 11px), #c9c9c9;
  border: 5px solid #8a8a8a }
.spin { animation: spin 1.6s linear infinite } @keyframes spin { to { transform: rotate(360deg) } }

#reveal-card.right { border-color: #4ade80; box-shadow: 0 0 30px rgba(74,222,128,.35) }
#reveal-card.wrong { border-color: #f87171 }
.points { font: 64px Bebas, Impact, sans-serif; color: var(--gold); margin: 6px 0 }

.final { text-align: left; padding-left: 0; list-style: none; counter-reset: r; margin: 12px 0 }
.final li { counter-increment: r; display: flex; align-items: center; gap: 10px; padding: 8px; font-size: 20px; border-bottom: 1px solid rgba(255,255,255,.08) }
.final li::before { content: counter(r); font: 28px Bebas, Impact, sans-serif; color: var(--gold); width: 22px }
.final li .s { margin-left: auto; color: var(--gold) }
.final li.me { background: rgba(242,193,78,.12); border-radius: 8px }

.net { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); background: #000c; padding: 6px 14px; border-radius: 99px; font-size: 14px }
