:root {
  --bg0: #01020a;
  --bg1: #050a2e;
  --navy: #0a1458;
  --panel: rgba(6, 12, 52, 0.78);
  --line: rgba(140, 160, 255, 0.18);
  --edge: #8fa3ff;
  --gold: #f5b400;
  --gold2: #ffe08a;
  --text: #f3f5ff;
  --muted: #95a0d8;
  --sel: #ff9800;
  --ok: #18b85a;
  --bad: #d93636;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Montserrat", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }

/* ---------- studio backdrop: spotlights, haze, floor glow ---------- */
.fx { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, #0f1f8a 0%, #071057 35%, transparent 75%),
    radial-gradient(ellipse 120% 60% at 50% 120%, #1a0b4d 0%, transparent 60%),
    linear-gradient(180deg, #02030f, var(--bg0)); }
.fx .beam { position: absolute; top: -20%; width: 60vmax; height: 140vmax; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(160, 190, 255, .22), rgba(120, 150, 255, .05) 55%, transparent 80%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(6px); mix-blend-mode: screen; }
.fx .beam.l { left: -10%; animation: sweepL 9s ease-in-out infinite alternate; }
.fx .beam.r { right: -10%; animation: sweepR 11s ease-in-out infinite alternate; }
.fx .beam.c { left: 50%; margin-left: -30vmax; opacity: .55; animation: sweepC 13s ease-in-out infinite alternate; }
@keyframes sweepL { from { transform: rotate(-38deg); } to { transform: rotate(-8deg); } }
@keyframes sweepR { from { transform: rotate(38deg); } to { transform: rotate(8deg); } }
@keyframes sweepC { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.fx .floor { position: absolute; left: 50%; bottom: -35vmax; width: 110vmax; height: 60vmax; margin-left: -55vmax; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(70, 110, 255, .35), rgba(40, 60, 200, .12) 40%, transparent 70%); }
.fx .ring { position: absolute; left: 50%; top: 50%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(120, 150, 255, .05) 0 6deg, transparent 6deg 15deg);
  animation: spin 120s linear infinite; mask: radial-gradient(circle, transparent 20%, #000 45%, transparent 70%); -webkit-mask: radial-gradient(circle, transparent 20%, #000 45%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.fx.hot .beam { background: linear-gradient(180deg, rgba(255, 200, 90, .28), rgba(255, 160, 40, .06) 55%, transparent 80%); }
.fx.win .beam { background: linear-gradient(180deg, rgba(90, 255, 160, .25), rgba(40, 200, 120, .06) 55%, transparent 80%); }

/* ---------- brand wordmark ---------- */
.brand { text-align: center; }
.brand .title {
  font-weight: 900; font-style: italic; letter-spacing: 0.04em; line-height: 1;
  background: linear-gradient(180deg, #fffbe8 0%, var(--gold2) 30%, var(--gold) 55%, #9a6400 80%, #e6b030 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #5a3a00) drop-shadow(0 6px 18px rgba(245, 180, 0, .45));
}
.brand .title span { background: linear-gradient(180deg, #ffffff, #cfd8ff 60%, #8090d0); -webkit-background-clip: text; background-clip: text; }
.brand .sub { font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; color: #cdd5ff; }
.brand .tag { display: inline-block; margin-top: .5em; padding: .3em 1.1em; border-radius: 99px; font-weight: 900; letter-spacing: .25em;
  font-size: .8em; color: #241800; background: linear-gradient(180deg, var(--gold2), var(--gold)); box-shadow: 0 0 20px rgba(245, 180, 0, .4); }

.sponsors { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 28px; }
.sponsors img { height: 28px; width: auto; max-width: 140px; object-fit: contain; opacity: 0.95; }
.sponsors img.tall { height: 46px; }
.sponsors img.tile { background: #fff; border-radius: 6px; padding: 2px 4px; box-shadow: 0 2px 10px rgba(0,0,0,.35); }

/* ---------- buttons / inputs ---------- */
.btn {
  border: 0; border-radius: 999px; padding: 14px 26px; font-weight: 800; cursor: pointer;
  background: linear-gradient(180deg, var(--gold2), var(--gold) 55%, #c98a00); color: #241800;
  box-shadow: 0 0 0 2px rgba(255, 224, 138, .35), 0 8px 26px rgba(245, 180, 0, 0.35); transition: transform .1s, filter .2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--bad); color: #fff; box-shadow: none; }
.btn.big { font-size: 1.15rem; padding: 18px 34px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  background: rgba(0, 0, 0, .4); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 180, 0, .2); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .4); }

/* ---------- quiz-show lozenges ---------- */
/* .lz = cell with a thin rail running through it; .lz-b = clipped border; .lz-i = clipped face */
.lz { position: relative; display: flex; }
.lz::before { content: ""; position: absolute; left: -100vw; right: -100vw; top: 50%; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, transparent, var(--edge) 20%, var(--edge) 80%, transparent); opacity: .55; z-index: 0; }
.lz.norail::before { display: none; }
.lz-b { --cut: 18px; position: relative; z-index: 1; flex: 1; display: flex; padding: 2px;
  background: linear-gradient(180deg, #d6deff, var(--edge) 50%, #5a6bd8);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%); }
.lz-i { flex: 1; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px calc(var(--cut) + 12px); min-height: 60px; border: 0; font-weight: 600;
  background: radial-gradient(ellipse 80% 120% at 50% 0%, #1c2d9e 0%, #0a1258 55%, #040830 100%);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% 50%, calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 50%);
  transition: background .25s, transform .1s; }
button.lz-i { cursor: pointer; }
button.lz-i:active { transform: scale(.985); }
.lz-i .l { color: var(--gold); font-weight: 900; min-width: 1.4em; }
.qbox .lz-i { justify-content: center; text-align: center; font-weight: 800; }

.options { display: grid; gap: 12px; }
.lz.sel .lz-b { background: linear-gradient(180deg, #fff1c4, var(--gold)); }
.lz.sel .lz-i { background: radial-gradient(ellipse 80% 120% at 50% 0%, #ffc04d, #ff9800 55%, #c76400); color: #1d1200; }
.lz.sel .lz-i .l { color: #fff; }
.lz.ok .lz-b { background: linear-gradient(180deg, #d8ffe6, #4ee08d); }
.lz.ok .lz-i { background: radial-gradient(ellipse 80% 120% at 50% 0%, #4af08f, #18b85a 55%, #0b7a39); color: #fff; }
.lz.ok .lz-i .l { color: #fff; }
.lz.bad .lz-b { background: linear-gradient(180deg, #ffd4d4, #ff6b6b); }
.lz.bad .lz-i { background: radial-gradient(ellipse 80% 120% at 50% 0%, #ff6a6a, #d93636 55%, #8a1515); color: #fff; }
.lz.bad .lz-i .l { color: #fff; }
.lz.dim { opacity: .4; }
button.lz-i:disabled { cursor: default; }
@keyframes blink { 0%, 100% { filter: none; } 50% { filter: brightness(1.7) saturate(1.3); } }
.lz.ok.flash .lz-b { animation: blink .4s 5; }
.lz.sel.pulse .lz-b { animation: blink 1s infinite; }

/* ---------- timer ---------- */
.timerbar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.timerbar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold2)); border-radius: 99px;
  box-shadow: 0 0 12px var(--gold); transition: background .3s; }
.timerbar.low > i { background: linear-gradient(90deg, #ff5252, #ff8a65); box-shadow: 0 0 12px #ff5252; }

/* ---------- misc ---------- */
.confetti { position: fixed; top: -20px; width: 10px; height: 16px; z-index: 50; border-radius: 2px;
  animation: fall linear infinite; pointer-events: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideIn { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes zoomIn { from { transform: scale(1.4); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes glowPulse { 0%, 100% { filter: drop-shadow(0 0 10px rgba(245, 180, 0, .4)); } 50% { filter: drop-shadow(0 0 30px rgba(245, 180, 0, .9)); } }
.badge-img { display: block; margin: 0 auto; max-width: 100%; height: auto; animation: zoomIn .7s ease both, glowPulse 2.5s 0.7s infinite; }

.demo-badge { position: fixed; top: 8px; right: 8px; z-index: 99; background: #e91e63; color: #fff; font-size: .7rem;
  font-weight: 800; padding: 4px 10px; border-radius: 99px; letter-spacing: .08em; }
@media (prefers-reduced-motion: reduce) { .fx .beam, .fx .ring { animation: none; } }
