:root {
  --board-blue: #060CE9;
  --deep-blue: #03066b;
  --gold: #D69F4C;
  --accent: #FFCC00;
  --text: #fff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--deep-blue); color: var(--text);
  font-family: 'Oswald', Arial, sans-serif; }
.hidden { display: none !important; }
.view { min-height: 100vh; padding: 2vh 2vw; }
.overlay { position: fixed; inset: 0; background: var(--board-blue); display: flex;
  align-items: center; justify-content: center; z-index: 20; }

.logo { font-family: 'Anton', Impact, sans-serif; font-size: clamp(48px, 10vw, 140px);
  color: var(--accent); text-align: center; transform: skewX(-6deg); margin: 4vh 0 0;
  text-shadow: 4px 4px 0 #000, 8px 8px 0 rgba(0,0,0,.4); letter-spacing: 2px; }
.subtitle { text-align: center; color: var(--gold); letter-spacing: 4px;
  font-size: clamp(14px, 2vw, 24px); margin-top: 8px; }
.music-prompt { text-align: center; color: var(--accent); font-weight: 700;
  margin-top: 14px; cursor: pointer; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* Intro gate (title hidden until GO) */
.intro-view { display: flex; align-items: center; justify-content: center; }
.intro-inner { text-align: center; }
.intro-q { font-family: 'Anton', sans-serif; color: var(--accent); font-size: clamp(90px, 26vw, 240px);
  line-height: 1; transform: skewX(-6deg); text-shadow: 5px 6px 0 #000; animation: pulse 1.8s ease-in-out infinite; }
.intro-hint { color: var(--gold); font-size: clamp(15px, 2.4vw, 22px); letter-spacing: 1px; margin: 18px 0 26px; line-height: 1.5; }
.intro-go { font-size: clamp(22px, 4vw, 34px); padding: 14px 56px; }

/* Title reveal after GO */
.view.revealed .logo { animation: logoReveal .7s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes logoReveal { 0% { opacity: 0; transform: skewX(-6deg) scale(.4); }
  100% { opacity: 1; transform: skewX(-6deg) scale(1); } }

.final-intro-sub { color: #fff; font-size: clamp(15px, 2.4vw, 22px); margin: 18px 0 26px; }

/* Setup */
.setup-box { max-width: 520px; margin: 4vh auto; background: var(--board-blue);
  border: 4px solid #000; padding: 24px; border-radius: 6px; }
.setup-box h2 { font-family: 'Anton', sans-serif; color: var(--accent); }
#player-inputs input { display: block; width: 100%; margin: 8px 0; padding: 10px;
  font-size: 18px; font-family: 'Oswald', sans-serif; }
.btn { font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 18px; cursor: pointer;
  background: var(--gold); color: #000; border: 2px solid #000; border-radius: 4px;
  padding: 10px 18px; margin: 8px 6px 0 0; }
.btn:hover { filter: brightness(1.08); }
.btn-go { background: var(--accent); }

/* Board */
.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  position: relative; transform-origin: 0 0; transition: transform .55s ease; }
#board-view.overview-mode { overflow: hidden; height: 100vh; }

/* Category overview: a click-driven zoom/pan across the real board */
.overview-catcher { position: fixed; inset: 0; z-index: 40; cursor: pointer;
  display: flex; align-items: flex-end; justify-content: center; }
.overview-hint { margin-bottom: 34px; pointer-events: none;
  font-family: 'Oswald', sans-serif; font-weight: 700; color: var(--accent);
  font-size: clamp(16px, 2.4vw, 26px); background: rgba(0,0,0,.5);
  padding: 10px 22px; border-radius: 10px; }
.board .cat { background: var(--board-blue); border: 3px solid #000; color: #fff;
  font-family: 'Anton', sans-serif; text-transform: uppercase; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 12vh; padding: 6px; font-size: clamp(12px, 1.4vw, 22px); }
.board .cat-note { font-family: 'Oswald', sans-serif; font-weight: 500;
  text-transform: none; color: var(--gold); font-size: clamp(9px, 0.85vw, 13px);
  margin-top: 4px; line-height: 1.15; }
.board .cell { background: var(--board-blue); border: 3px solid #000;
  color: var(--gold); font-family: 'Anton', sans-serif; font-size: clamp(20px, 3vw, 52px);
  min-height: 11vh; display: flex; align-items: center; justify-content: center; cursor: pointer;
  text-shadow: 2px 2px 0 #000; }
.board .cell:hover { color: var(--accent); }
.board .cell.played { color: transparent; cursor: default; background: var(--deep-blue); }

/* Clue */
.clue-card { width: 90vw; max-width: 1100px; text-align: center; }
.clue-value { font-family: 'Anton', sans-serif; color: var(--accent); font-size: 40px; margin-bottom: 16px; }
.clue-text { font-size: clamp(24px, 4vw, 60px); text-transform: uppercase; line-height: 1.25; }
.clue-response { margin-top: 28px; color: var(--accent); font-size: clamp(20px, 3vw, 44px); text-transform: uppercase; }
.clue-controls { margin-top: 32px; }
.judge-players button { margin: 6px; }

/* Jamie Double */
.jd-splash { text-align: center; }
.jd-title { font-family: 'Anton', sans-serif; font-size: clamp(48px, 12vw, 160px); color: var(--accent);
  transform: skewX(-6deg); text-shadow: 5px 5px 0 #000; }
.jd-wager { margin-top: 24px; font-size: 22px; }
.jd-pick { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 8px 0 16px; }
.jd-wager input { font-size: 24px; padding: 8px; width: 200px; margin: 0 8px; }
.jd-max { color: var(--gold); margin: 8px 0; }

/* Category overview sweep */
.catintro-inner { width: 96vw; text-align: center; }
.cat-overview-row { display: flex; gap: 8px; justify-content: center; align-items: stretch;
  min-height: 42vh; margin-bottom: 30px; }
.cat-tile { flex: 1; background: var(--board-blue); border: 3px solid #000; color: #fff;
  font-family: 'Anton', sans-serif; text-transform: uppercase; text-align: center;
  display: flex; align-items: center; justify-content: center; padding: 8px;
  font-size: clamp(13px, 1.5vw, 24px); opacity: .3; transition: all .35s ease;
  text-shadow: 2px 2px 0 #000; }
.cat-tile.active { opacity: 1; transform: scale(1.06); color: var(--accent);
  border-color: var(--accent); box-shadow: 0 0 34px rgba(255,204,0,.85); }
.cat-tile.seen { opacity: .65; }

/* Podiums */
.podiums { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.podium { background: var(--board-blue); border: 3px solid #000; border-radius: 6px;
  padding: 12px 18px; min-width: 140px; text-align: center; }
.podium .name { font-family: 'Oswald', sans-serif; font-weight: 700; cursor: pointer; }
.podium .score { font-family: 'Anton', sans-serif; font-size: 32px; color: var(--accent); }
.podium .score.negative { color: #ff5252; }

/* Final + winner */
.final-card, .final-scores { max-width: 900px; margin: 6vh auto; text-align: center; }
.final-category { font-family: 'Anton', sans-serif; font-size: clamp(28px,5vw,64px); color: var(--accent); }
.final-clue { font-size: clamp(22px,3.5vw,52px); text-transform: uppercase; margin-top: 24px; }
.final-response { color: var(--accent); font-size: clamp(20px,3vw,44px); margin-top: 20px; text-transform: uppercase; }
.final-wagers label, .final-judging label { display: block; margin: 10px 0 4px; }
.final-wagers input { font-size: 20px; padding: 6px; width: 160px; }
.winner-name { font-family: 'Anton', sans-serif; font-size: clamp(40px,8vw,120px); color: var(--accent); text-align: center; }

.next-round { display: block; margin: 18px auto 0; }
.offline-banner { position: fixed; top: 0; left: 0; right: 0; background: var(--gold); color: #000;
  text-align: center; padding: 6px; font-weight: 700; z-index: 50; }

/* Rotate-to-landscape gate — only blocks small portrait screens (phones). */
.rotate-gate { display: none; }
@media (max-width: 900px) and (orientation: portrait) {
  .rotate-gate { display: flex; position: fixed; inset: 0; z-index: 1000;
    background: var(--board-blue); color: var(--accent); align-items: center; justify-content: center;
    text-align: center; padding: 24px; }
  .rotate-inner { font-family: 'Anton', sans-serif; font-size: clamp(22px, 7vw, 40px); line-height: 1.3; }
  .rotate-icon { font-size: clamp(56px, 18vw, 96px); margin-bottom: 16px; animation: rothint 2s ease-in-out infinite; }
  /* keep everything else from showing through behind the gate */
  body > .view { filter: blur(2px); }
}
@keyframes rothint { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(90deg); } }
