:root {
  --bg: #0b0610;
  --bg-2: #160a14;
  --wine: #6b1c32;
  --wine-2: #8a2742;
  --gold: #e8c56a;
  --gold-2: #f6e3a1;
  --gold-dim: #9a7a32;
  --cream: #fff6e4;
  --muted: #cbb896;
  --correct: #1dbf6e;
  --correct-bg: #0c3d26;
  --wrong: #e23b3b;
  --wrong-bg: #3a1014;
  --option-bg: rgba(22, 10, 20, 0.92);
  --letter-bg: #6b1c32;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: none;
  background: #050308;
  color: var(--cream);
  font-family: "Outfit", "Segoe UI", system-ui, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

body, body * { cursor: none !important; }

#frame {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #050308;
}

#stage {
  width: 1920px;
  height: 1080px;
  position: relative;
  overflow: hidden;
  background-color: #1a0b14;
  background:
    radial-gradient(ellipse 90% 70% at 50% 30%, #2a1020 0%, #12080f 45%, #0b0610 100%);
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -960px;
  margin-top: -540px;
  -webkit-transform-origin: center center;
  transform-origin: center center;
}

.studio-glow {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 40% 20% at 50% 100%, rgba(232, 197, 106, 0.14), transparent 70%),
    radial-gradient(ellipse 30% 25% at 15% 0%, rgba(107, 28, 50, 0.45), transparent 70%),
    radial-gradient(ellipse 30% 25% at 85% 0%, rgba(107, 28, 50, 0.35), transparent 70%);
  pointer-events: none;
}

.studio-spots {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(246, 227, 161, 0.16) 0 3px, transparent 40px),
    radial-gradient(circle at 82% 18%, rgba(246, 227, 161, 0.12) 0 3px, transparent 36px),
    radial-gradient(circle at 70% 86%, rgba(232, 197, 106, 0.1) 0 2px, transparent 44px);
  pointer-events: none;
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  from { opacity: 0.7; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-6px); }
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 56px 0 56px;
  z-index: 3;
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 520px;
}

.logo {
  width: 92px;
  height: 112px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.brand-text .title {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: 0.06em;
  line-height: 0.95;
  color: var(--gold-2);
  text-shadow: 0 2px 0 #8a6420, 0 8px 24px rgba(0, 0, 0, 0.45);
}

.brand-text .subtitle {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--muted);
}

.progress-meta {
  text-align: center;
  flex: 1;
}

.q-count {
  font-family: "Oswald", sans-serif;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-transform: uppercase;
}

.round-label {
  margin-top: 6px;
  font-size: 22px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.timer {
  width: 168px;
  height: 168px;
  position: relative;
  flex-shrink: 0;
}

.timer svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-track {
  fill: none;
  stroke: rgba(232, 197, 106, 0.18);
  stroke-width: 10;
}

.timer-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 8px rgba(232, 197, 106, 0.55));
  transition: stroke 0.3s linear;
}

.timer.urgent .timer-ring { stroke: #ff5a5a; }
.timer-num {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: grid;
  place-items: center;
  font-family: "Oswald", sans-serif;
  font-size: 80px;
  font-weight: 700;
  color: var(--cream);
  text-shadow: 0 0 18px rgba(232, 197, 106, 0.35);
}

.ladder {
  position: absolute;
  left: 28px;
  top: 230px;
  bottom: 48px;
  width: 86px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  z-index: 3;
}

.rung {
  height: 72px;
  border-radius: 14px;
  border: 2px solid rgba(232, 197, 106, 0.28);
  background: rgba(20, 8, 16, 0.7);
  color: var(--muted);
  font-family: "Oswald", sans-serif;
  font-size: 28px;
  font-weight: 600;
  display: grid;
  place-items: center;
  letter-spacing: 0.04em;
  opacity: 0.45;
}

.rung.current {
  opacity: 1;
  color: #1a0c10;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-color: var(--gold-2);
  box-shadow: 0 0 22px rgba(232, 197, 106, 0.45);
}

.rung.done {
  opacity: 0.9;
  color: var(--gold-2);
  border-color: var(--gold-dim);
  background: rgba(107, 28, 50, 0.55);
}

.board {
  position: absolute;
  top: 210px;
  left: 140px;
  right: 56px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.host-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 280px;
}

.host {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}

.host-head { position: relative; width: 120px; height: 150px; }

.host-hair {
  position: absolute;
  top: 0; left: 14px;
  width: 92px; height: 70px;
  background: #1a1210;
  border-radius: 50px 50px 20px 20px;
}

.host-face {
  position: absolute;
  top: 28px; left: 22px;
  width: 76px; height: 86px;
  background: #e8c8a8;
  border-radius: 40px 40px 38px 38px;
  box-shadow: inset 0 -8px 0 rgba(107, 28, 50, 0.08);
}

.eye {
  position: absolute;
  top: 30px;
  width: 10px; height: 12px;
  background: #1a1210;
  border-radius: 50%;
}
.eye.left { left: 18px; }
.eye.right { right: 18px; }

.mustache {
  position: absolute;
  top: 50px; left: 16px;
  width: 44px; height: 10px;
  background: #3a2418;
  border-radius: 0 0 20px 20px;
}

.smile {
  position: absolute;
  top: 62px; left: 26px;
  width: 24px; height: 10px;
  border-bottom: 3px solid #8a2742;
  border-radius: 0 0 12px 12px;
}

.bowtie {
  position: absolute;
  top: 112px; left: 38px;
  width: 44px; height: 22px;
  background: var(--wine-2);
  clip-path: polygon(0 50%, 38% 0, 38% 100%, 0 50%, 100% 50%, 62% 0, 62% 100%, 100% 50%);
  filter: drop-shadow(0 4px 0 #4a1020);
}

.bowtie::after {
  content: "";
}

.bubble {
  flex: 1;
  position: relative;
  background: linear-gradient(180deg, rgba(48, 16, 28, 0.92), rgba(22, 8, 16, 0.94));
  border: 3px solid var(--gold);
  border-radius: 36px;
  box-shadow:
    0 0 0 4px rgba(107, 28, 50, 0.45),
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(246, 227, 161, 0.25);
  display: flex;
  align-items: center;
  padding: 36px 48px 36px 64px;
}

.bubble::before {
  content: "";
  position: absolute;
  left: -26px;
  bottom: 42px;
  width: 40px;
  height: 36px;
  background: #241018;
  border-left: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  clip-path: polygon(100% 0, 100% 100%, 0 80%);
  transform: skewX(-12deg);
}

.question {
  font-size: 58px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  text-wrap: balance;
  color: var(--cream);
  width: 100%;
}

.options {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 22px 24px;
  min-height: 0;
}

.option {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 28px;
  border-radius: 24px;
  background: var(--option-bg);
  border: 3px solid rgba(232, 197, 106, 0.42);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  min-height: 0;
}

.option .letter {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--wine-2), var(--wine));
  border: 2px solid var(--gold);
  color: var(--gold-2);
  font-family: "Oswald", sans-serif;
  font-size: 48px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.option .text {
  font-size: 42px;
  font-weight: 650;
  line-height: 1.15;
  text-wrap: balance;
}

.option.correct {
  background: var(--correct-bg);
  border-color: var(--correct);
  box-shadow: 0 0 0 3px rgba(29, 191, 110, 0.35), 0 0 36px rgba(29, 191, 110, 0.25);
}

.option.correct .letter {
  background: var(--correct);
  border-color: #b7ffd6;
  color: #062414;
}

.option.wrong {
  background: var(--wrong-bg);
  border-color: var(--wrong);
  box-shadow: 0 0 0 3px rgba(226, 59, 59, 0.28);
}

.option.wrong .letter {
  background: var(--wrong);
  border-color: #ffb3b3;
  color: #2a0707;
}

.option.dim {
  opacity: 0.42;
  filter: grayscale(0.3);
}

.overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
  background: rgba(5, 3, 8, 0.62);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.overlay[hidden] { display: none; }

.overlay-card {
  width: 1280px;
  min-height: 360px;
  padding: 64px 80px;
  border-radius: 36px;
  text-align: center;
  background: linear-gradient(180deg, #3a1624, #160a12);
  border: 3px solid var(--gold);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.overlay-card .kicker {
  font-size: 28px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.overlay-card h1 {
  font-family: "Oswald", sans-serif;
  font-size: 96px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold-2);
  line-height: 0.95;
}

.overlay-card p {
  margin-top: 24px;
  font-size: 40px;
  font-weight: 600;
  color: var(--cream);
}

@media (max-aspect-ratio: 16/9) {
  /* scaling is handled in JS; this is a safety net */
}

/* No ladder (Tiago, 18 Nov) */
.ladder { display: none !important; }
.board { left: 56px !important; }
