/* ============================================================
   BRAWLHALLA 2v2 CHAMPIONSHIP — 3D glassmorphism design system
   Deep navy → cosmic purple, radiant gold + electric cyan.
   Glass = layered refraction: specular top light, iridescent
   animated edge, mouse-tracked 3D tilt on desktop.
   ============================================================ */

:root {
  --bg-0: #050510;
  --bg-1: #0a0a1e;
  --bg-2: #10102c;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-hi: rgba(255, 255, 255, 0.09);
  --panel-solid: #131432;
  --ink: #f2f3ff;
  --ink-dim: #a4aad0;
  --gold: #ffc24b;
  --gold-deep: #ff9d2e;
  --cyan: #35e6ff;
  --purple: #8b5cf6;
  --magenta: #ff4ecd;
  --danger: #ff5470;
  --ok: #3ef2a3;
  --grad-gold: linear-gradient(120deg, #ffeaa8 0%, #ffc24b 45%, #ff8a2e 100%);
  --grad-cyan: linear-gradient(120deg, #8df6ff 0%, #35e6ff 50%, #3f7bff 100%);
  --grad-fame: linear-gradient(120deg, #ffd66e 0%, #ff9d2e 30%, #ff4ecd 70%, #35e6ff 100%);
  --edge: rgba(255, 255, 255, 0.10);
  --edge-vivid: rgba(139, 92, 246, 0.35);
  --radius: 20px;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --glass-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    inset 1px 0 0 rgba(255, 255, 255, 0.04);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 17px;
  letter-spacing: 0.2px;
}

::selection { background: rgba(255, 194, 75, 0.35); color: #fff; }

/* ---------- ambient background ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 80% 55% at 20% -10%, rgba(139, 92, 246, 0.30), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(53, 230, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 45% at 90% 90%, rgba(255, 78, 205, 0.10), transparent 60%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(255, 157, 46, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 55%, var(--bg-2) 100%);
}
.aurora::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 75%);
}
.aurora::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg at 50% 50%,
    rgba(139, 92, 246, 0.07),
    rgba(53, 230, 255, 0.06),
    rgba(255, 78, 205, 0.05),
    rgba(255, 194, 75, 0.05),
    rgba(139, 92, 246, 0.07)
  );
  animation: auroraSpin 44s linear infinite;
  filter: blur(70px);
}
@keyframes auroraSpin { to { transform: rotate(360deg); } }

#stars { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
#embers { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------- cursor glow trail (desktop) ---------- */
@media (pointer: fine) {
  .cursor-glow {
    position: fixed;
    width: 460px; height: 460px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(139,92,246,0.10) 0%, rgba(53,230,255,0.05) 40%, transparent 68%);
    transform: translate(-50%, -50%);
    transition: opacity 0.4s;
  }
}

/* ---------- nav ---------- */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(20px, 5vw, 64px);
  background: linear-gradient(180deg, rgba(10, 11, 30, 0.85), rgba(10, 11, 30, 0.55));
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--edge);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 2.5px;
  text-decoration: none;
  color: var(--ink);
}
.nav-logo .sigil { width: 36px; height: 36px; filter: drop-shadow(0 0 10px rgba(255,194,75,0.65)); }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.82rem;
  padding: 9px 16px;
  border-radius: 12px;
  position: relative;
  transition: all 0.25s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 18px rgba(53, 230, 255, 0.18);
  text-shadow: 0 0 14px rgba(53, 230, 255, 0.6);
}

/* ---------- buttons: 3D gel ---------- */
.btn {
  --glow: rgba(255, 157, 46, 0.55);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: #241300;
  background: var(--grad-gold);
  border: none;
  border-radius: 16px;
  padding: 15px 32px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, filter 0.25s;
  box-shadow:
    0 6px 0 -1px #b96a10,
    0 12px 30px rgba(255, 157, 46, 0.35),
    inset 0 2px 0 rgba(255,255,255,0.6),
    inset 0 -3px 6px rgba(140, 70, 0, 0.35);
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,0.6) 50%, transparent 75%);
  transform: translateX(-130%);
  transition: transform 0.65s;
}
.btn:hover::before { transform: translateX(130%); }
.btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 9px 0 -1px #b96a10,
    0 18px 46px var(--glow),
    0 0 70px var(--glow),
    inset 0 2px 0 rgba(255,255,255,0.6);
}
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: 0 2px 0 -1px #b96a10, 0 6px 16px var(--glow); }
.btn.ghost {
  color: var(--cyan);
  background: linear-gradient(160deg, rgba(53, 230, 255, 0.10), rgba(53, 230, 255, 0.03));
  border: 1px solid rgba(53, 230, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 8px 24px rgba(0,0,0,0.35);
  --glow: rgba(53, 230, 255, 0.35);
}
.btn.ghost:hover { background: rgba(53, 230, 255, 0.16); box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 34px var(--glow), 0 0 50px var(--glow); }
.btn.danger {
  color: #33040f;
  background: linear-gradient(120deg, #ff9db4, #ff5470 60%, #ff2e55);
  box-shadow: 0 6px 0 -1px #b31d3c, 0 12px 30px rgba(255, 84, 112, 0.35), inset 0 2px 0 rgba(255,255,255,0.5);
  --glow: rgba(255, 84, 112, 0.5);
}
.btn.cyan {
  color: #03222b;
  background: var(--grad-cyan);
  box-shadow: 0 6px 0 -1px #1d7fa8, 0 12px 30px rgba(53, 230, 255, 0.35), inset 0 2px 0 rgba(255,255,255,0.6);
  --glow: rgba(53, 230, 255, 0.5);
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6); }
.btn.small { padding: 9px 18px; font-size: 0.75rem; border-radius: 12px; box-shadow: 0 4px 0 -1px #b96a10, 0 8px 20px rgba(255,157,46,0.3), inset 0 2px 0 rgba(255,255,255,0.5); }

/* ---------- layout primitives ---------- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
.section { padding: clamp(60px, 10vh, 110px) 0; position: relative; z-index: 1; }

/* ===== the 3D glass core ===== */
.glass {
  position: relative;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.075) 0%, rgba(255, 255, 255, 0.02) 32%, rgba(255, 255, 255, 0.045) 100%);
  backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}
/* specular sheen sweeping the top edge */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.09) 46%, rgba(255, 255, 255, 0.02) 54%, transparent 70%);
  pointer-events: none;
}
/* iridescent rim light */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 216, 110, 0.45), rgba(53, 230, 255, 0.28) 35%, rgba(139, 92, 246, 0.2) 60%, rgba(255, 78, 205, 0.25));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.35s;
}
.glass.glow-hover { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s; }
.glass.glow-hover::after { opacity: 0.45; }
.glass.glow-hover:hover {
  border-color: rgba(53, 230, 255, 0.35);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.6),
    0 0 50px rgba(53, 230, 255, 0.14),
    0 0 110px rgba(139, 92, 246, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.glass.glow-hover:hover::after { opacity: 1; }

/* mouse-tracked 3D tilt (JS sets --rx/--ry) */
@media (pointer: fine) {
  .tilt3d { transform: perspective(950px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform 0.18s ease-out; will-change: transform; }
  .tilt3d:hover { --ty: -6px; z-index: 2; }
  /* Chrome bug: backdrop-filter children vanish inside 3D-transformed parents —
     keep tilted cards flat-composited and flatten their glass children */
  .tilt3d { transform-style: flat; }
  .tilt3d .glass { backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
  .tilt3d .tilt-pop { transform: none; }
}

.kicker {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(53, 230, 255, 0.6);
}
.h-display {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 1px;
}
.grad-text {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-cyan {
  background: var(--grad-cyan);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-fame {
  background: var(--grad-fame);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fameShift 6s ease-in-out infinite;
}
@keyframes fameShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.1s; }
.reveal.d2 { transition-delay: 0.2s; }
.reveal.d3 { transition-delay: 0.3s; }

/* ---------- hero ---------- */
.hero {
  min-height: min(calc(100vh - 64px), 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: clamp(36px, 6vh, 70px) 20px;
  perspective: 1000px;
}
.hero .crest {
  width: clamp(96px, 12vw, 180px);
  filter: drop-shadow(0 0 34px rgba(255, 194, 75, 0.4)) drop-shadow(0 20px 30px rgba(0,0,0,0.5));
  animation: crestFloat 6s ease-in-out infinite;
  margin-bottom: 20px;
}
@keyframes crestFloat {
  0%, 100% { transform: translateY(0) rotateX(6deg) rotate(-2deg); }
  50% { transform: translateY(-16px) rotateX(-4deg) rotate(2deg); }
}
.hero .crest .shimmer { animation: shimmer 3.5s ease-in-out infinite; }
@keyframes shimmer { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
.hero h1 {
  font-size: clamp(1.9rem, 5.2vw, 4.2rem);
  text-transform: uppercase;
  transform: rotateX(6deg);
  filter: drop-shadow(0 8px 34px rgba(255, 157, 46, 0.3)) drop-shadow(0 2px 2px rgba(0,0,0,0.6));
}
.hero .subtitle {
  margin-top: 16px;
  font-size: clamp(0.95rem, 1.9vw, 1.3rem);
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: clamp(1px, 0.4vw, 3px);
  text-transform: uppercase;
}
.hero .subtitle b { color: var(--cyan); font-weight: 700; text-shadow: 0 0 16px rgba(53,230,255,0.6); }
.hero-cta { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(62, 242, 163, 0.45);
  background: rgba(62, 242, 163, 0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 26px rgba(62, 242, 163, 0.18);
  backdrop-filter: blur(12px);
  color: var(--ok);
  margin-bottom: 28px;
}
.status-pill .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
  animation: pulse 1.6s ease-in-out infinite;
}
.status-pill.closed { border-color: rgba(255, 84, 112, 0.45); background: rgba(255, 84, 112, 0.08); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 26px rgba(255, 84, 112, 0.18); color: var(--danger); }
.status-pill.closed .dot { background: var(--danger); box-shadow: 0 0 12px var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- countdown ---------- */
.countdown-wrap { margin-top: 26px; }
.countdown-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.countdown {
  display: flex;
  gap: clamp(8px, 2vw, 16px);
  justify-content: center;
  flex-wrap: wrap;
}
.cd-unit {
  min-width: clamp(64px, 9vw, 96px);
  padding: 14px 8px 12px;
  border-radius: 16px;
  text-align: center;
}
.cd-unit .cd-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd-unit .cd-label {
  margin-top: 7px;
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.countdown.done {
  display: block;
  font-family: var(--font-display);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ok);
  text-shadow: 0 0 24px rgba(62, 242, 163, 0.5);
  font-size: clamp(1rem, 2.4vw, 1.4rem);
  padding: 10px;
}
/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  margin-top: 84px;
}
.stat { padding: 32px 24px; text-align: center; }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900;
  filter: drop-shadow(0 4px 18px rgba(255, 157, 46, 0.3));
}
.stat .label {
  margin-top: 8px;
  color: var(--ink-dim);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* ---------- info cards ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}
.card { padding: 36px 30px; position: relative; }
.card .icon {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 16px;
  font-size: 1.6rem;
  background: linear-gradient(145deg, rgba(139,92,246,0.35), rgba(53,230,255,0.16));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.25), 0 10px 26px rgba(0,0,0,0.4), 0 0 24px rgba(139,92,246,0.25);
  margin-bottom: 20px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card p { color: var(--ink-dim); line-height: 1.65; }

.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-transform: uppercase;
}
.section-title .kicker { margin-bottom: 10px; }

/* ---------- rules list ---------- */
.rules { display: grid; gap: 16px; }
.rule {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 12px 32px rgba(0,0,0,0.35);
  backdrop-filter: blur(14px);
}
.rule .n {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--gold);
  font-size: 1rem;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 194, 75, 0.25), rgba(255, 157, 46, 0.08));
  border: 1px solid rgba(255, 194, 75, 0.35);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(255,157,46,0.2);
  text-shadow: 0 0 14px rgba(255,194,75,0.7);
}
.rule p { color: var(--ink-dim); line-height: 1.55; padding-top: 5px; }
.rule p b { color: var(--ink); }

/* ---------- forms (register + admin) ---------- */
.form-shell { max-width: 1040px; margin: 0 auto; perspective: 1400px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .form-grid { grid-template-columns: 1fr; } }
.player-card {
  padding: 32px 28px;
  position: relative;
  /* Chrome compositing fix: solid panel, no backdrop-filter inside 3D contexts.
     Glass look is preserved with the gradient + border + shadow. */
  background: linear-gradient(155deg, rgba(38, 38, 72, 0.95), rgba(18, 18, 38, 0.97));
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* never 3D-tilt form cards: tilted glass inputs go blank in some Chrome builds */
.player-card.tilt3d { transform: none !important; will-change: auto; }
.player-card::before {
  content: attr(data-tag);
  position: absolute;
  top: 0; right: 0;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 3px;
  padding: 9px 20px;
  border-bottom-left-radius: 16px;
  color: #241300;
  background: var(--grad-gold);
  font-weight: 800;
  box-shadow: -4px 4px 16px rgba(255,157,46,0.3);
}
.player-card.p2::before { background: var(--grad-cyan); color: #03222b; box-shadow: -4px 4px 16px rgba(53,230,255,0.3); }
.field { margin-top: 18px; position: relative; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  /* solid fill — inputs must never rely on backdrop-filter to be visible */
  background: #0c0c1d;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 -1px 0 rgba(255,255,255,0.06);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 230, 255, 0.16), 0 0 30px rgba(53, 230, 255, 0.18), inset 0 2px 8px rgba(0,0,0,0.4);
}
.field input::placeholder { color: rgba(164, 170, 208, 0.4); }
.field .hint { font-size: 0.78rem; color: var(--ink-dim); margin-top: 6px; }
.form-banner {
  margin-top: 28px;
  padding: 16px 22px;
  border-radius: 16px;
  font-weight: 600;
  display: none;
  backdrop-filter: blur(14px);
}
.form-banner.error {
  display: block;
  background: rgba(255, 84, 112, 0.1);
  border: 1px solid rgba(255, 84, 112, 0.4);
  box-shadow: 0 0 30px rgba(255, 84, 112, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  color: #ffb3c1;
}
.form-banner.success {
  display: block;
  background: rgba(62, 242, 163, 0.08);
  border: 1px solid rgba(62, 242, 163, 0.4);
  box-shadow: 0 0 30px rgba(62, 242, 163, 0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  color: var(--ok);
}
.form-actions { margin-top: 32px; text-align: center; }
/* Cloudflare Turnstile widget — centred above the submit button */
.turnstile-row { display: flex; justify-content: center; margin-top: 26px; min-height: 65px; }
.turnstile-row .cf-turnstile { max-width: 100%; }

/* ---------- bracket ---------- */
.bracket-cols {
  display: flex;
  gap: 46px;
  overflow-x: auto;
  padding: 30px 6px 50px;
  perspective: 1600px;
}
.bracket-col {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  min-width: 250px;
}
.bracket-col h4 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
}
.match {
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02));
  border: 1px solid var(--edge);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 14px 36px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
  min-width: 230px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.match:hover { transform: translateY(-3px); }
.match.ready {
  border-color: rgba(255, 194, 75, 0.55);
  box-shadow: 0 0 30px rgba(255, 194, 75, 0.16), 0 14px 36px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
}
.match.done { border-color: rgba(62, 242, 163, 0.4); }
.match .tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(160deg, rgba(5, 5, 16, 0.7), rgba(5, 5, 16, 0.4));
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
  margin-top: 6px;
  color: var(--ink-dim);
}
.slot.win {
  color: var(--gold);
  background: linear-gradient(120deg, rgba(255, 194, 75, 0.16), rgba(255, 157, 46, 0.06));
  box-shadow: inset 0 0 20px rgba(255,194,75,0.1), inset 0 1px 0 rgba(255,255,255,0.12), 0 0 16px rgba(255,194,75,0.12);
}
.slot.lose { opacity: 0.45; text-decoration: line-through; }
.slot .seed { font-size: 0.72rem; color: var(--ink-dim); font-family: var(--font-display); }
.slot .report {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(53, 230, 255, 0.45);
  color: var(--cyan);
  background: rgba(53, 230, 255, 0.06);
  cursor: pointer;
  font-family: var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.2s, box-shadow 0.2s;
}
.slot .report:hover { background: rgba(53, 230, 255, 0.16); box-shadow: 0 0 16px rgba(53,230,255,0.3); }
.slot .score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 2px 8px;
  border-radius: 8px;
}
.slot .score.sw { color: var(--gold); text-shadow: 0 0 12px rgba(255,194,75,0.5); }
.slot .score.sl { color: var(--ink-dim); }
.score-input { display: inline-flex; gap: 4px; align-items: center; }
.score-input input {
  width: 44px;
  padding: 3px 5px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #0c0c1d;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-align: center;
}
.match .bo {
  font-size: 0.6rem;
  color: var(--magenta);
  font-family: var(--font-display);
  letter-spacing: 1px;
  margin-left: 6px;
}
.bye-note { font-size: 0.75rem; color: var(--ink-dim); text-align: center; padding: 4px; }
.gf-banner {
  margin: 26px auto 0;
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 0 34px rgba(255, 194, 75, 0.55);
}

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.admin-card { padding: 32px 28px; }
.admin-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle-row { display: flex; align-items: center; gap: 14px; }
.switch {
  position: relative;
  width: 58px; height: 30px;
  border-radius: 999px;
  background: rgba(255, 84, 112, 0.25);
  border: 1px solid rgba(255, 84, 112, 0.4);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  flex-shrink: 0;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.4);
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}
.switch.on { background: rgba(62, 242, 163, 0.2); border-color: rgba(62, 242, 163, 0.5); }
.switch.on::after { transform: translateX(26px); background: var(--ok); box-shadow: 0 0 14px var(--ok); }
.switch-label { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: 0.85rem; }

.teams-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.teams-table th {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge);
}
.teams-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.teams-table tr:hover td { background: rgba(139, 92, 246, 0.07); }
.team-pair b { color: var(--ink); }
.team-pair span { color: var(--ink-dim); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--edge);
  padding: 44px 0 60px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 0.85rem;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}
footer .sigil { width: 30px; opacity: 0.75; margin-bottom: 12px; }

/* ---------- page header (inner pages) ---------- */
.page-head { text-align: center; padding: 70px 0 30px; position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(1.8rem, 5vw, 3rem); text-transform: uppercase; }

/* ---------- toast ---------- */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(19, 20, 50, 0.85);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(62, 242, 163, 0.45);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255,255,255,0.12);
  color: var(--ink);
  padding: 14px 28px;
  border-radius: 16px;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.error { border-color: rgba(255, 84, 112, 0.55); color: #ffc4cf; }

/* ============================================================
   RESPONSIVE — fit every device
   ============================================================ */

/* small laptops / large tablets */
@media (max-width: 1024px) {
  .bracket-cols { gap: 28px; }
  .stats { margin-top: 60px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 4rem); }
}

/* tablets & phones landscape */
@media (max-width: 768px) {
  body { font-size: 16px; }

  /* nav: allow wrapping, keep all links usable */
  nav { flex-wrap: wrap; gap: 10px; padding: 12px 16px; justify-content: center; }
  .nav-logo { font-size: 0.92rem; letter-spacing: 1.5px; }
  .nav-logo .sigil { width: 28px; height: 28px; }
  .nav-links { flex-wrap: wrap; justify-content: center; width: 100%; }
  .nav-links a:not(.btn) { display: inline-block; padding: 7px 12px; font-size: 0.78rem; }

  .hero { min-height: auto; padding: 48px 16px 40px; }
  .hero .crest { width: clamp(96px, 26vw, 130px); }
  .hero h1 { font-size: clamp(1.7rem, 9.5vw, 3rem); }
  .hero .subtitle { font-size: clamp(0.9rem, 3.4vw, 1.1rem); letter-spacing: 2px; }
  .hero-cta { margin-top: 30px; gap: 12px; }
  .hero-cta .btn { padding: 13px 22px; font-size: 0.85rem; }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 44px; }
  .stat { padding: 22px 14px; }
  .stat .num { font-size: 1.7rem; }
  .stat .label { font-size: 0.66rem; letter-spacing: 1.5px; }

  .cards-3 { grid-template-columns: 1fr; gap: 18px; }
  .card { padding: 26px 22px; }

  .section { padding: 48px 0; }
  .section-title { margin-bottom: 36px; }
  .rules { gap: 12px; }
  .rule { padding: 14px 16px; gap: 12px; border-radius: 14px; }
  .rule .n { min-width: 32px; height: 32px; font-size: 0.85rem; border-radius: 9px; }
  .rule p { font-size: 0.92rem; }

  /* forms: single column */
  .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .player-card { padding: 24px 18px; }
  .player-card::before { padding: 7px 14px; font-size: 0.58rem; }
  .field input { padding: 12px 14px; font-size: 0.98rem; }
  .form-actions .btn { width: 100%; }
  .form-banner { margin-top: 18px; padding: 14px 16px; font-size: 0.9rem; }

  /* bracket: tighter cards, natural swipe scroll */
  .bracket-cols { gap: 18px; padding: 20px 4px 34px; -webkit-overflow-scrolling: touch; }
  .bracket-col { min-width: 210px; }
  .match { min-width: 200px; padding: 10px; }
  .slot { padding: 8px 10px; font-size: 0.88rem; }

  .admin-grid { grid-template-columns: 1fr; gap: 18px; }
  .admin-card { padding: 24px 18px; }
  .teams-table { font-size: 0.82rem; }
  .teams-table th, .teams-table td { padding: 8px 8px; }

  .page-head { padding: 44px 0 22px; }
  .page-head h1 { font-size: clamp(1.5rem, 7.5vw, 2.2rem); }
  footer { padding: 30px 16px 44px; font-size: 0.78rem; }
  #toast { width: 92vw; bottom: 18px; font-size: 0.88rem; }
}

/* disable 3D tilt on touch / narrow screens — transform caused overflow */
@media (max-width: 768px), (pointer: coarse) {
  .tilt3d { transform: none !important; }
}

/* small phones */
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px 8px; }
  .hero h1 { font-size: clamp(1.5rem, 10.5vw, 2.2rem); }
  .hero-cta .btn { width: 100%; }
  .nav-links a:not(.btn) { padding: 6px 9px; font-size: 0.72rem; }
  .bracket-col { min-width: 190px; }
  .match { min-width: 184px; }
}

/* very wide screens: breathe more */
@media (min-width: 1600px) {
  .wrap { max-width: 1360px; }
}

/* ============ v6 additions: champion, eliminations, profiles, my-match ============ */

/* --- champion crowning banner --- */
.champion-banner {
  font-size: clamp(1.2rem, 3.4vw, 2rem);
  padding: 26px 34px;
  border: 2px solid rgba(255, 194, 75, 0.55);
  background: linear-gradient(135deg, rgba(255,194,75,0.12), rgba(53,230,255,0.07));
  box-shadow: 0 0 50px rgba(255,194,75,0.35), inset 0 0 30px rgba(255,194,75,0.08);
  animation: champPulse 2.2s ease-in-out infinite;
}
.champion-banner .champ-word {
  background: linear-gradient(90deg, #ffc24b, #fff6d8, #ffc24b);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: champShimmer 2.6s linear infinite;
  letter-spacing: 4px;
}
@keyframes champPulse {
  0%, 100% { box-shadow: 0 0 34px rgba(255,194,75,0.28), inset 0 0 22px rgba(255,194,75,0.06); }
  50% { box-shadow: 0 0 70px rgba(255,194,75,0.5), inset 0 0 34px rgba(255,194,75,0.12); }
}
@keyframes champShimmer { to { background-position: 200% center; } }

/* --- confetti --- */
#confettiRoot { position: fixed; inset: 0; pointer-events: none; z-index: 120; overflow: hidden; }
.confetti {
  position: absolute;
  top: -24px;
  border-radius: 2px;
  opacity: 0.92;
  animation-name: confettiFall;
  animation-timing-function: cubic-bezier(0.25, 0.6, 0.5, 1);
  animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(-30px) rotate(0deg) rotateY(0deg); opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateY(105vh) rotate(640deg) rotateY(540deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti { display: none; }
  .champion-banner, .champion-banner .champ-word { animation: none; }
}

/* --- eliminated stamp --- */
.elim-stamp {
  font-family: var(--font-display);
  font-size: 0.56rem;
  letter-spacing: 1.5px;
  color: #ff4d6d;
  border: 1px solid rgba(255, 77, 109, 0.5);
  border-radius: 5px;
  padding: 1px 5px;
  transform: rotate(-6deg);
  opacity: 0.85;
  white-space: nowrap;
}
.slot.is-elim { opacity: 0.62; }
.slot.is-elim .team-link { text-decoration: line-through; text-decoration-color: rgba(255,77,109,0.6); }

/* --- clickable team links --- */
.team-link { cursor: pointer; transition: color 0.15s, text-shadow 0.15s; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-link:hover { color: var(--cyan); text-shadow: 0 0 12px rgba(53,230,255,0.55); }

/* --- undo button --- */
.undo-btn {
  background: none;
  border: 1px solid rgba(255, 77, 109, 0.45);
  color: #ff8fa5;
  border-radius: 6px;
  font-size: 0.72rem;
  padding: 1px 7px;
  margin-right: 7px;
  cursor: pointer;
  font-family: var(--font-display);
  transition: background 0.15s, box-shadow 0.15s;
}
.undo-btn:hover { background: rgba(255,77,109,0.14); box-shadow: 0 0 12px rgba(255,77,109,0.35); }

/* --- my-match bar --- */
.mm-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.mm-bar input {
  background: #0c0c1d;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 9px;
  color: var(--ink);
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.mm-next { color: var(--ink-dim); }
.mm-next b { color: var(--cyan); }
.mm-elim { color: #ff4d6d; font-family: var(--font-display); letter-spacing: 2px; font-size: 0.8rem; }
.mm-champ { color: var(--gold); font-family: var(--font-display); letter-spacing: 2px; font-size: 0.8rem; }

/* --- team profile modal --- */
.tp-player { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.tp-elo { color: var(--cyan); font-size: 0.85rem; }
.tp-won { color: var(--gold); font-family: var(--font-display); }
.tp-lost { color: #ff8fa5; font-family: var(--font-display); }
.tp-next { margin-top: 10px; padding: 12px 16px; border: 1px solid rgba(53,230,255,0.3); border-radius: 12px; background: rgba(53,230,255,0.05); color: var(--ink-dim); }
.tp-next b { color: var(--cyan); }
.tp-champ, .tp-elim-badge {
  display: inline-block;
  font-family: var(--font-display);
  letter-spacing: 3px;
  font-size: 0.78rem;
  border-radius: 8px;
  padding: 5px 14px;
  margin-top: 8px;
}
.tp-champ { color: var(--gold); border: 1px solid rgba(255,194,75,0.5); background: rgba(255,194,75,0.08); }
.tp-elim-badge { color: #ff4d6d; border: 1px solid rgba(255,77,109,0.5); background: rgba(255,77,109,0.08); }

/* ============ v8: flat register form (no 3D, no backdrop-filter) ============ */
.simple-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.simple-card {
  background: #131328;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.simple-card.p1 { border-top: 3px solid var(--gold); }
.simple-card.p2 { border-top: 3px solid var(--cyan); }
/* team-name card sits above the two player cards, aligned with their grid */
.simple-card.team-name-card {
  max-width: 900px;
  margin: 0 auto 20px;
  border-top: 3px solid var(--magenta);
}
.simple-card.team-name-card legend { color: var(--magenta); }
.simple-card.team-name-card input { text-align: center; font-weight: 700; }
.simple-card legend, .simple-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  padding: 0 8px;
}
.simple-card.p1 legend { color: var(--gold); }
.simple-card.p2 legend { color: var(--cyan); }
.simple-card .field { margin-top: 14px; }
.simple-card .field:first-of-type { margin-top: 4px; }
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
@media (max-width: 760px) {
  .simple-grid { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; gap: 0; }
}

/* v9: crest animations */
.crest-spin { transform-origin: 50px 50px; animation: crestSpin 14s linear infinite; }
svg .crest-spin { transform-box: view-box; transform-origin: center; }
@keyframes crestSpin { to { transform: rotate(360deg); } }
.crest-pulse { transform-box: view-box; transform-origin: center; animation: crestPulse 3.2s ease-in-out infinite; }
@keyframes crestPulse {
  0%, 100% { opacity: 0.75; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .crest-spin, .crest-pulse { animation: none; }
}

/* ================= v10: design upgrades ================= */

/* ---- #13 custom scrollbar + selection ---- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0a1e; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold), var(--cyan));
  border-radius: 8px;
  border: 2px solid #0a0a1e;
}
::selection { background: rgba(255,194,75,0.35); color: #fffbe8; }
html { scrollbar-color: var(--gold) #0a0a1e; scrollbar-width: thin; }

/* ---- #2 VS matchup splash ---- */
.vs-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,4,14,0.86);
  backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.vs-overlay.show { opacity: 1; pointer-events: auto; }
.vs-stage { display: flex; align-items: center; gap: clamp(16px, 5vw, 60px); width: 100%; justify-content: center; padding: 20px; }
.vs-side {
  flex: 1; max-width: 420px; text-align: center;
  opacity: 0; transform: translateX(-70px);
  transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1.2), opacity 0.45s;
}
.vs-side.right { transform: translateX(70px); }
.vs-overlay.show .vs-side { opacity: 1; transform: translateX(0); }
.vs-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.1rem, 3.2vw, 2rem); line-height: 1.25;
  margin-top: 16px;
}
.vs-banner { width: 100%; height: 7px; border-radius: 6px; margin-top: 14px; box-shadow: 0 0 24px rgba(0,0,0,0.4); }
.vs-meta { margin-top: 10px; color: var(--ink-dim); font-family: var(--font-display); letter-spacing: 2px; font-size: 0.75rem; text-transform: uppercase; }
.vs-mid {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.2rem, 9vw, 5rem);
  background: linear-gradient(90deg, var(--gold), var(--magenta), var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  opacity: 0; transform: scale(2.4);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.35s;
}
.vs-overlay.show .vs-mid { opacity: 1; transform: scale(1); }
.vs-hint { position: absolute; bottom: 34px; left: 0; right: 0; text-align: center; color: var(--ink-dim); font-size: 0.8rem; letter-spacing: 2px; font-family: var(--font-display); text-transform: uppercase; }
.vs-flash { position: fixed; inset: 0; z-index: 119; background: #fff; opacity: 0; pointer-events: none; }
.vs-flash.go { animation: vsFlash 0.5s ease-out; }
@keyframes vsFlash { 0% { opacity: 0.85; } 100% { opacity: 0; } }

/* ---- #7 team banner flair ---- */
.team-banner {
  display: inline-block; width: 4px; height: 18px;
  border-radius: 3px; margin-right: 9px;
  vertical-align: middle; flex: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.5);
}
.slot { align-items: center; }
.slot .team-link { display: inline-flex; align-items: center; min-width: 0; }

/* ---- #8 CRT broadcast mode ---- */
#crtToggle {
  position: fixed; bottom: 18px; right: 18px; z-index: 110;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(10,10,30,0.85); color: var(--ink);
  border: 1px solid var(--edge); cursor: pointer; font-size: 1.1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transition: box-shadow 0.2s, border-color 0.2s;
}
#crtToggle:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(53,230,255,0.35); }
body.crt::after {
  content: ''; position: fixed; inset: 0; z-index: 105; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.22) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.5) 100%);
  mix-blend-mode: multiply;
}
body.crt { animation: crtFlicker 4s infinite steps(1); }
@keyframes crtFlicker {
  0%, 100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: 0.97; }
  94% { opacity: 1; } 97% { opacity: 0.98; } 98% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { body.crt { animation: none; } }

/* ---- #10 odometer counters ---- */
.odo-col {
  display: inline-block; height: 1.15em; overflow: hidden;
  vertical-align: baseline; width: 0.68em; position: relative;
}
.odo-digit { display: block; height: 1.15em; line-height: 1.15; }
.odo-strip { display: block; transform: translateY(0); }
.odo-run .odo-strip { animation: odoRoll 1s cubic-bezier(0.25, 0.9, 0.3, 1) forwards; }
@keyframes odoRoll {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--steps) * 1.15em)); }
}

/* ---- #11 nav progress ring ---- */
.nav-logo { position: relative; }
#navCrest { position: relative; display: inline-flex; }
.nav-ring {
  position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px);
  pointer-events: none; opacity: 0.9;
}

/* ---- #3 flip-clock countdown ----
   .cd-flip is added to the .cd-num element itself, so this rule must not set
   width/height/position — it would fight .cd-num and stretch the digit box
   over the whole unit (which overlapped the label). Animate only. */
.countdown { perspective: 900px; }
.cd-unit { position: relative; padding: 16px 10px 12px; }
.cd-num {
  position: relative;
  height: 1.3em;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  backface-visibility: hidden;
}
.cd-num.cd-flip { animation: cdFlip 0.55s cubic-bezier(0.3, 0, 0.2, 1); }
@keyframes cdFlip {
  0% { transform: rotateX(-92deg); opacity: 0; }
  55% { transform: rotateX(14deg); opacity: 1; }
  100% { transform: rotateX(0); opacity: 1; }
}
.cd-num::after {
  content: ''; position: absolute; left: 10%; right: 10%; top: 50%; height: 1px;
  background: rgba(0,0,0,0.45); pointer-events: none;
}
.cd-unit::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 50%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(rgba(255,255,255,0.07), transparent);
  pointer-events: none;
}
.cd-unit .cd-label { margin-top: 6px; }

/* ---- #12 match spotlight ---- */
.spotlight { margin: 0 auto 34px; max-width: 860px; }
.spotlight-card {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 18px 22px; padding: 26px 30px;
  cursor: pointer; transition: transform 0.3s, box-shadow 0.3s;
}
.spotlight-card:hover { transform: translateY(-3px); box-shadow: 0 0 40px rgba(255,194,75,0.18), 0 18px 40px rgba(0,0,0,0.45); }
.spot-side { flex: 1 1 0; min-width: 170px; text-align: center; }
.spot-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  line-height: 1.35; overflow-wrap: anywhere;
}
.spot-elo { color: var(--ink-dim); font-size: 0.8rem; margin-top: 6px; }
.spot-vs {
  font-family: var(--font-display); font-weight: 900; font-size: 1.6rem;
  color: var(--magenta); text-shadow: 0 0 18px rgba(255,78,205,0.5);
  flex: none; align-self: center;
}
.spot-meta {
  flex: 0 0 100%; width: 100%; text-align: center;
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--edge);
  color: var(--ink-dim); font-family: var(--font-display);
  letter-spacing: 2px; font-size: 0.72rem; text-transform: uppercase;
}
.spot-kicker {
  font-family: var(--font-display); letter-spacing: 3px; text-transform: uppercase;
  font-size: 0.7rem; color: var(--gold); text-align: center; margin-bottom: 10px;
}
@media (max-width: 640px) {
  .spotlight-card { padding: 22px 18px; gap: 14px 12px; }
  .spot-side { flex: 1 1 40%; min-width: 0; }
  .spot-name { font-size: 0.92rem; }
  .spot-vs { font-size: 1.25rem; }
}
