:root {
  --bg: #0c0a1a;
  --panel: rgba(16, 13, 34, 0.8);
  --line: rgba(255, 255, 255, 0.12);
  --ink: #f6f3ff;
  --muted: #b9b3d6;
  --dots: #2ff3c4;
  --dots-2: #b6ff3b;
  --muse: #ff4fb8;
  --muse-2: #9b5cff;
  --muse-3: #ff9a3c;
  --gold: #ffd23f;
  --display: "Bungee", "Impact", "Arial Black", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  overflow-x: hidden;
}

a { color: inherit; text-underline-offset: 3px; }

h2 {
  font: 400 clamp(1.5rem, 4vw, 2.1rem)/1.1 var(--display);
  margin: 0 0 1.25rem;
  letter-spacing: 0.02em;
}

/* ---------- Arena background ---------- */

.arena { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.side { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; }

.side-dots {
  left: 0;
  background: radial-gradient(ellipse at 10% 40%, rgba(47, 243, 196, 0.22), transparent 60%),
              linear-gradient(90deg, #06201f, var(--bg));
}

.dot-layer {
  position: absolute;
  inset: -120px;
  -webkit-mask-image: linear-gradient(90deg, #000 30%, transparent 95%);
          mask-image: linear-gradient(90deg, #000 30%, transparent 95%);
}

.dot-layer-a {
  background: radial-gradient(circle, var(--dots) 0 2.5px, transparent 3px) 0 0 / 30px 30px;
  opacity: 0.55;
  animation: drift-a 9s linear infinite;
}

.dot-layer-b {
  background: radial-gradient(circle, var(--dots-2) 0 6px, transparent 6.5px) 0 0 / 120px 120px;
  opacity: 0.35;
  animation: drift-b 16s linear infinite;
}

@keyframes drift-a { to { transform: translate(60px, 60px); } }
@keyframes drift-b { to { transform: translate(-120px, 120px); } }

.side-muse {
  right: 0;
  background: linear-gradient(270deg, #23072a, var(--bg));
}

.blob {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  filter: blur(70px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.blob-1 { background: var(--muse);   top: -20%; right: -30%; animation: lava-1 18s ease-in-out infinite alternate; }
.blob-2 { background: var(--muse-2); bottom: -30%; right: -10%; animation: lava-2 22s ease-in-out infinite alternate; }
.blob-3 { background: var(--muse-3); top: 30%; right: 10%; width: 40vmax; height: 40vmax; opacity: 0.35; animation: lava-3 15s ease-in-out infinite alternate; }

@keyframes lava-1 { to { transform: translate(-25%, 30%) scale(1.2); } }
@keyframes lava-2 { to { transform: translate(-30%, -35%) scale(0.85); } }
@keyframes lava-3 { to { transform: translate(40%, -20%) scale(1.3); } }

.bolt {
  position: absolute;
  left: 50%;
  top: 0;
  width: 40px;
  height: 100%;
  transform: translateX(-50%);
  overflow: visible;
}

.bolt polyline {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px var(--gold)) drop-shadow(0 0 18px rgba(255, 210, 63, 0.6));
  animation: flicker 4s steps(1) infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  47% { opacity: 0.25; }
  49% { opacity: 1; }
  51% { opacity: 0.4; }
  53% { opacity: 1; }
}

.floaties span {
  position: absolute;
  bottom: -60px;
  font-size: var(--size, 28px);
  opacity: 0.55;
  animation: float-up var(--dur, 20s) linear var(--delay, 0s) infinite;
}

@keyframes float-up {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-115vh) rotate(var(--spin, 180deg)); }
}

/* ---------- Ticker ---------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  background: var(--gold);
  color: #1a1300;
  font: 400 0.85rem/1 var(--display);
  letter-spacing: 0.04em;
  padding: 0.6rem 0;
  border-bottom: 3px solid #1a1300;
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 45s linear infinite;
}

.ticker-track span { padding: 0 1.4rem; white-space: nowrap; }
.ticker-track span::after { content: "✦"; margin-left: 2.8rem; }

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Layout ---------- */

main, .footer {
  position: relative;
  z-index: 1;
  width: min(1040px, 100% - 32px);
  margin-inline: auto;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  margin-bottom: 2.5rem;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0 3rem; }

.kicker {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.1em 0.25em;
  font: 400 clamp(3.6rem, 10.5vw, 8rem)/0.95 var(--display);
  text-transform: uppercase;
}

.word { -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Dark polka dots punched into the letters. */
.word-dots {
  background-image: radial-gradient(circle, var(--bg) 0 28%, transparent 31%),
                    linear-gradient(135deg, var(--dots), var(--dots-2));
  background-size: 0.13em 0.13em, 100% 100%;
  filter: drop-shadow(0 0 22px rgba(47, 243, 196, 0.45));
  animation: dots-slide 3s linear infinite;
}

@keyframes dots-slide { to { background-position: 0.13em 0.13em, 0 0; } }

/* Light fill plus a dark outline so it reads on top of the pink half. */
.word-muse {
  background-image: linear-gradient(110deg, #ffe0f3, #ff7ac8, #ffb36b, #ffe0f3);
  background-size: 300% 100%;
  filter: drop-shadow(3px 0 0 var(--bg)) drop-shadow(-3px 0 0 var(--bg)) drop-shadow(0 3px 0 var(--bg))
          drop-shadow(0 -3px 0 var(--bg)) drop-shadow(5px 6px 0 rgba(0, 0, 0, 0.55));
  animation: muse-swirl 6s ease-in-out infinite alternate;
}

@keyframes muse-swirl { to { background-position: 100% 0; } }

.vs {
  display: inline-grid;
  place-items: center;
  width: 1.15em;
  height: 1.15em;
  font-size: 0.42em;
  color: #1a1300;
  background: var(--gold);
  border: 4px solid #1a1300;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--gold), 0 0 40px rgba(255, 210, 63, 0.7);
  transform: rotate(-12deg);
  animation: vs-pulse 1.6s ease-in-out infinite;
}

@keyframes vs-pulse { 50% { transform: rotate(-6deg) scale(1.1); } }

.sub { margin: 1.5rem auto 0.75rem; max-width: 38rem; font-size: clamp(1.05rem, 2.6vw, 1.3rem); }

.since { margin: 0 0 2rem; color: var(--muted); }
.since strong { color: var(--gold); font-family: var(--display); font-weight: 400; }

.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn-gold { background: var(--gold); color: #1a1300; box-shadow: 0 6px 0 #8a6d00; }
.btn-ghost { border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); }

/* ---------- Video ---------- */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 3px solid #000;
  box-shadow: 0 0 0 3px var(--gold), 0 20px 60px rgba(0, 0, 0, 0.6);
  background: #000;
}

.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }

/* Broadcast-style labels over the top corners of the video. */
.rec, .corner-tag {
  position: absolute;
  top: 0.8rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  font: 400 0.75rem/1 var(--display);
  letter-spacing: 0.06em;
  pointer-events: none;
}

.rec { left: 0.8rem; color: #ff4b4b; }
.corner-tag { right: 0.8rem; color: var(--ink); }

.sound-btn {
  position: absolute;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%);
  padding: 0.7rem 1.2rem;
  border: 3px solid #1a1300;
  border-radius: 999px;
  background: var(--gold);
  color: #1a1300;
  font: 400 clamp(0.8rem, 2.4vw, 1rem)/1 var(--display);
  cursor: pointer;
  box-shadow: 0 5px 0 #1a1300;
  animation: sound-pulse 1.6s ease-in-out infinite;
}

@keyframes sound-pulse { 50% { transform: translateX(-50%) scale(1.08); } }

.sound-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.sound-btn[hidden] { display: none; }

.video-note { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.85rem; text-align: center; }

/* ---------- Tale of the tape ---------- */

.tape-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: clamp(0.5rem, 3vw, 2rem);
}

.tape-grid > div { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.tape-grid > div:nth-last-child(-n+3) { border-bottom: 0; }

.tape-dots { text-align: right; }
.tape-muse { text-align: left; }
.tape-grid small { display: block; color: var(--muted); font-size: 0.8rem; }

.tape-head { font: 400 clamp(1.3rem, 4vw, 2rem)/1 var(--display); }
.tape-head.tape-dots { color: var(--dots); }
.tape-head.tape-muse { color: var(--muse); }

.tape-label {
  text-align: center;
  font: 400 clamp(0.6rem, 1.8vw, 0.75rem)/1.2 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  max-width: 9rem;
}

/* ---------- Rounds ---------- */

.section-title { text-align: center; }

.rounds { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 3rem; }

.round {
  position: relative;
  width: min(100%, 640px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.25rem;
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}

.round p { margin: 0 0 0.75rem; }

.corner-dots { align-self: flex-start; border-left: 6px solid var(--dots); }
.corner-muse { align-self: flex-end;   border-right: 6px solid var(--muse); }
.corner-gold { align-self: center;     border: 2px solid var(--gold); text-align: center; }

.round header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.round-no { font-family: var(--display); color: var(--ink); letter-spacing: 0.04em; }

.who { font-weight: 700; }

.chip {
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #06110e;
}

.corner-dots .chip { background: var(--dots); }
.corner-muse .chip { background: var(--muse); }
.corner-gold .chip { background: var(--gold); }

blockquote {
  margin: 0 0 1rem;
  font: 700 clamp(1.2rem, 3.4vw, 1.6rem)/1.3 var(--body);
}

.corner-dots blockquote { color: var(--dots); }
.corner-muse blockquote { color: var(--muse); }

.plan {
  list-style: none;
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  border-radius: 12px;
  background: #f7f5ea;
  color: #1c1a2e;
  font: 700 1.1rem/1.6 "Comic Sans MS", "Chalkboard SE", "Marker Felt", var(--body);
  transform: rotate(-1deg);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35);
}

.plan span { color: #c2185b; }

.call { color: var(--muted); }
.call b { color: var(--gold); font-weight: 700; }

.src { font-size: 0.9rem; font-weight: 700; }

.sticker {
  position: absolute;
  top: -14px;
  right: 18px;
  padding: 0.35rem 0.75rem;
  font: 400 0.8rem/1 var(--display);
  color: #1a1300;
  background: var(--gold);
  border: 2px solid #1a1300;
  border-radius: 6px;
  transform: rotate(4deg);
  box-shadow: 3px 3px 0 #1a1300;
}

.corner-muse .sticker { right: auto; left: 18px; transform: rotate(-4deg); }

.intermission {
  align-self: center;
  width: min(100%, 720px);
  text-align: center;
  padding: 1.5rem;
  border: 2px dashed var(--line);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.45);
}

.intermission p { margin: 0 0 0.75rem; }

.int-title {
  font: 400 0.9rem/1 var(--display);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
}

.sign {
  display: inline-block;
  margin: 0.5rem 0 0 !important;
  padding: 0.9rem 1.2rem;
  background: #fff;
  color: #111;
  font: 400 clamp(0.95rem, 3vw, 1.25rem)/1.25 var(--display);
  border-radius: 4px;
  transform: rotate(-2deg);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.4);
  animation: wave 2.4s ease-in-out infinite;
}

@keyframes wave { 50% { transform: rotate(2deg) translateY(-6px); } }

/* ---------- Scorecard ---------- */

.judges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.judge {
  text-align: center;
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.judge p { margin: 0; }
.judge-name { font-weight: 700; }
.judge-name small { display: block; color: var(--muted); font-weight: 400; }
.judge-pick { margin-top: 0.6rem !important; font: 400 1.8rem/1 var(--display); }
.pick-dots { color: var(--dots); }
.pick-muse { color: var(--muse); }
.pick-gold { color: var(--gold); }

.verdict {
  margin: 1.5rem 0 0;
  text-align: center;
  font: 400 clamp(1rem, 3vw, 1.3rem)/1.3 var(--display);
}

/* ---------- Vote ---------- */

.vote { text-align: center; }

.vote-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.vote-btn {
  font: 400 clamp(1.1rem, 4vw, 1.6rem)/1 var(--display);
  padding: 1rem 1.6rem;
  border: 3px solid #000;
  border-radius: 16px;
  cursor: pointer;
  color: #0c0a1a;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.vote-dots { background: linear-gradient(135deg, var(--dots), var(--dots-2)); box-shadow: 0 8px 0 #0a7a62; }
.vote-muse { background: linear-gradient(135deg, var(--muse), var(--muse-2)); box-shadow: 0 8px 0 #7a1758; }
.vote-btn:hover { transform: translateY(-3px) rotate(-2deg); }
.vote-btn:active { transform: translateY(6px); box-shadow: 0 2px 0 #000; }
.vote-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.vote-or { font-family: var(--display); color: var(--muted); }

.vote-btn:disabled { cursor: progress; opacity: 0.75; }

.vote-quip { min-height: 3.2em; margin: 1.5rem auto 1.5rem; max-width: 34rem; font-size: 1.1rem; }

/* The jumbotron: big live totals and a tug-of-war bar. */
.scoreboard {
  padding: clamp(1.25rem, 4vw, 2rem);
  border-radius: 20px;
  background: radial-gradient(ellipse at 20% 0%, rgba(47, 243, 196, 0.12), transparent 60%),
              radial-gradient(ellipse at 80% 0%, rgba(255, 79, 184, 0.14), transparent 60%),
              #07060f;
  border: 2px solid #000;
  box-shadow: 0 0 0 3px var(--gold), inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.sb-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font: 400 0.8rem/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.sb-light {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4b4b;
  box-shadow: 0 0 10px #ff4b4b;
  animation: blink 1.2s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0.2; } }

.sb-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(0.5rem, 3vw, 2rem);
}

.sb-side { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; min-width: 0; }

.sb-name { font: 400 clamp(1rem, 3vw, 1.4rem)/1 var(--display); letter-spacing: 0.06em; }
.sb-dots .sb-name { color: var(--dots); }
.sb-muse .sb-name { color: var(--muse); }

/* app.js shrinks this further when a long total wouldn't fit its half of the board. */
.sb-num {
  font: 400 clamp(3.6rem, 18vw, 7.5rem)/1 var(--display);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sb-pct { font: 700 clamp(1rem, 3vw, 1.4rem)/1 var(--body); color: var(--muted); }

.sb-side.leading .sb-name::after {
  content: "👑";
  display: inline-block;
  margin-left: 0.4rem;
  animation: crown 1.4s ease-in-out infinite;
}

@keyframes crown { 50% { transform: translateY(-5px) rotate(-8deg); } }

.sb-side.bump .sb-num { animation: bump 0.5s ease-out; }
@keyframes bump { 40% { transform: scale(1.18); } }

.sb-vs { font: 400 clamp(1rem, 3vw, 1.5rem)/1 var(--display); color: var(--gold); }

.tug {
  position: relative;
  height: 22px;
  margin: 1.5rem 0 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--muse), var(--muse-2));
  border: 2px solid #000;
}

.tug-dots {
  width: 50%;
  height: 100%;
  border-radius: 999px 0 0 999px;
  background: radial-gradient(circle, rgba(12, 10, 26, 0.6) 0 2px, transparent 2.5px) 0 0 / 10px 10px,
              linear-gradient(90deg, var(--dots), var(--dots-2));
  transition: width 0.8s cubic-bezier(.2, .8, .2, 1);
}

.tug-knot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid #1a1300;
  box-shadow: 0 0 16px rgba(255, 210, 63, 0.8);
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(.2, .8, .2, 1);
}

.sb-total { margin: 0; color: var(--muted); font-size: 0.95rem; }

.confetti {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ---------- Footer ---------- */

.footer {
  padding: 1rem 0 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer p { margin: 0 auto 0.5rem; max-width: 46rem; }

/* ---------- 404 ---------- */

.lost { min-height: 80vh; display: grid; place-content: center; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  body { font-size: 16px; }
  .title { flex-direction: column; font-size: clamp(3.6rem, 22vw, 6rem); }
  .vs { margin: -0.1em 0; }
  .sub br { display: none; }
  .round { padding: 1.4rem 1.1rem 1.1rem; }
  .corner-dots, .corner-muse { align-self: stretch; }
  .tape-grid { font-size: 0.9rem; }
  .tape-label { max-width: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .floaties { display: none; }
}
