/* ============================================================
   BEYBLADE X ARENA — loud neon stadium UI
   ============================================================ */
:root {
  --bx-void: #04020c;
  --bx-deep: #0a0618;
  --bx-red: #e50914;
  --bx-neon: #ff2d55;
  --bx-cyan: #3de7ff;
  --bx-violet: #a855f7;
  --bx-gold: #fbbf24;
  --bx-lime: #a3ff12;
  --glass: rgba(18, 10, 36, 0.72);
  --border: rgba(255, 255, 255, 0.1);
  --glow-red: 0 0 28px rgba(229, 9, 20, 0.55);
  --glow-cyan: 0 0 28px rgba(61, 231, 255, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #fff;
  font-family: var(--font);
  background: var(--bx-void);
  min-height: 100vh;
  overflow-x: hidden;
}
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #04020c; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7c3aed, #e50914);
  border-radius: 8px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ===== STAGE / ENERGY ===== */
.site-stage { position: relative; isolation: isolate; min-height: 100vh; }
.site-stage::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(ellipse 100% 70% at 50% -12%, rgba(229,9,20,0.28) 0%, transparent 50%),
    radial-gradient(ellipse 50% 45% at 100% 20%, rgba(124,58,237,0.22) 0%, transparent 50%),
    radial-gradient(ellipse 45% 40% at 0% 80%, rgba(61,231,255,0.1) 0%, transparent 48%),
    linear-gradient(168deg, #060314 0%, #12082a 28%, #0a1530 55%, #160818 78%, #04020c 100%);
  background-attachment: fixed;
}
.energy-layer, .particles, #confetti-layer, #shockwave-layer {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden;
}
.energy-layer { z-index: -2; }
.particles { z-index: -1; }
#confetti-layer { z-index: 9998; }
#shockwave-layer { z-index: 9997; }

.orb {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.4;
  animation: orbFloat 16s ease-in-out infinite alternate;
}
.orb-a { width: 360px; height: 360px; background: rgba(229,9,20,0.4); top: 8%; right: 6%; }
.orb-b { width: 280px; height: 280px; background: rgba(109,40,217,0.4); bottom: 12%; left: 4%; animation-delay: -5s; }
.orb-c { width: 200px; height: 200px; background: rgba(61,231,255,0.25); top: 50%; left: 40%; animation-delay: -9s; }

.streak {
  position: absolute; left: -20%; width: 140%; height: 2px; opacity: 0.28;
  background: linear-gradient(90deg, transparent, rgba(255,45,85,0.35), rgba(61,231,255,0.2), transparent);
  animation: streakDrift 20s linear infinite;
}
.streak:nth-child(3) { top: 22%; animation-duration: 24s; }
.streak:nth-child(4) { top: 48%; animation-duration: 17s; animation-delay: -4s; }
.streak:nth-child(5) { top: 74%; animation-duration: 26s; animation-delay: -9s; opacity: 0.18; }

.particle {
  position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%;
  background: rgba(255,255,255,0.7); box-shadow: 0 0 6px rgba(255,45,85,0.7);
  animation: particleRise linear infinite; opacity: 0;
}

/* Spinning stadium rings in background */
.stadium-ring {
  position: fixed;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: rgba(255,45,85,0.25);
  border-right-color: rgba(61,231,255,0.15);
  pointer-events: none;
  z-index: -1;
  animation: spinRing linear infinite;
}
.stadium-ring.r1 { width: 80vmax; height: 80vmax; top: 50%; left: 50%; margin: -40vmax; animation-duration: 40s; opacity: 0.35; }
.stadium-ring.r2 { width: 55vmax; height: 55vmax; top: 50%; left: 50%; margin: -27.5vmax; animation-duration: 28s; animation-direction: reverse; opacity: 0.4; }
.stadium-ring.r3 { width: 30vmax; height: 30vmax; top: 50%; left: 50%; margin: -15vmax; animation-duration: 18s; opacity: 0.5; border-top-color: rgba(251,191,36,0.3); }

@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes orbFloat {
  from { transform: translate(0,0) scale(1); }
  to { transform: translate(-30px,40px) scale(1.12); }
}
@keyframes streakDrift {
  from { transform: translateX(-5%); }
  to { transform: translateX(5%); }
}
@keyframes particleRise {
  0% { transform: translateY(100vh); opacity: 0; }
  15% { opacity: 0.65; }
  100% { transform: translateY(-5vh); opacity: 0; }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes floatSoftAlt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
@keyframes breatheGlow {
  0%, 100% {
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.55)) drop-shadow(0 0 16px rgba(229,9,20,0.22));
    transform: translateY(0) scale(1);
  }
  50% {
    filter: drop-shadow(0 16px 36px rgba(0,0,0,0.5)) drop-shadow(0 0 28px rgba(255,45,85,0.38));
    transform: translateY(-8px) scale(1.02);
  }
}
@keyframes breatheGlowAlt {
  0%, 100% {
    filter: drop-shadow(0 12px 28px rgba(0,0,0,0.55)) drop-shadow(0 0 16px rgba(61,231,255,0.22));
    transform: translateY(0) scale(1);
  }
  50% {
    filter: drop-shadow(0 16px 36px rgba(0,0,0,0.5)) drop-shadow(0 0 28px rgba(168,85,247,0.4));
    transform: translateY(8px) scale(1.02);
  }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes badgePop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes borderShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pulseTab {
  0%, 100% { box-shadow: -6px 0 20px rgba(229,9,20,0.3); }
  50% { box-shadow: -10px 0 32px rgba(255,45,85,0.55); }
}
@keyframes pulseLaunch {
  0%, 100% { box-shadow: 0 0 30px rgba(229,9,20,0.5), 0 0 60px rgba(255,45,85,0.25), inset 0 1px 0 rgba(255,255,255,0.3); transform: scale(1); }
  50% { box-shadow: 0 0 50px rgba(255,45,85,0.85), 0 0 90px rgba(251,191,36,0.4), inset 0 1px 0 rgba(255,255,255,0.4); transform: scale(1.04); }
}
@keyframes spinBey {
  to { transform: rotate(360deg); }
}
@keyframes spinBeyFast {
  to { transform: rotate(360deg); }
}
@keyframes shakeArena {
  0%, 100% { transform: translate(0,0); }
  20% { transform: translate(-6px, 3px); }
  40% { transform: translate(5px, -4px); }
  60% { transform: translate(-4px, -2px); }
  80% { transform: translate(4px, 3px); }
}
@keyframes boomText {
  0% { opacity: 0; transform: scale(0.3) rotate(-8deg); }
  40% { opacity: 1; transform: scale(1.15) rotate(2deg); }
  70% { transform: scale(0.95) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes energyBurst {
  0% { transform: scale(0.2); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== HEADER ===== */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  background: rgba(4, 2, 12, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
#site-header.is-solid {
  background: rgba(4,2,12,0.92) !important;
  border-bottom-color: rgba(168,85,247,0.22);
  box-shadow: 0 10px 36px rgba(0,0,0,0.45);
}
.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.brand-logo {
  height: 28px;
  width: auto;
  max-width: min(42vw, 200px);
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255,45,85,0.35));
}
@media (min-width: 640px) {
  .brand-logo { height: 34px; max-width: 240px; }
}
.brand-tag {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.brand-tag span {
  color: var(--bx-neon);
  text-shadow: 0 0 12px rgba(255,45,85,0.6);
}
.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: rgba(255,255,255,0.65);
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: #fff;
  background: rgba(255,45,85,0.15);
  border-color: rgba(255,45,85,0.35);
  box-shadow: 0 0 16px rgba(229,9,20,0.25);
}
.search-wrap { flex: 1 1 180px; max-width: 280px; min-width: 140px; }
.search-input {
  width: 100%;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.35); }
.search-input:focus {
  outline: none;
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,45,85,0.5);
  box-shadow: 0 0 0 3px rgba(229,9,20,0.2), 0 0 24px rgba(168,85,247,0.15);
}

/* ===== HERO ===== */
.hero-banner {
  position: relative;
  width: 100%;
  isolation: isolate;
  background: #04020c;
  min-height: clamp(420px, 72vh, 900px);
}
.hero-art-wrap {
  position: relative;
  width: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(88,28,135,0.25) 0%, transparent 70%),
    #04020c;
  line-height: 0;
}
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center top;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(4,2,12,0.97) 0%, rgba(4,2,12,0.55) 28%, rgba(4,2,12,0.15) 55%, transparent 72%),
    linear-gradient(to right, rgba(4,2,12,0.72) 0%, rgba(4,2,12,0.25) 28%, transparent 50%);
}
.hero-inner {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.25rem;
}
@media (min-width: 640px) {
  .hero-inner { padding: 2rem 1.5rem 2.75rem; }
}
.hero-logo {
  display: block;
  width: min(92%, 500px);
  height: auto;
  filter:
    drop-shadow(0 4px 24px rgba(0,0,0,0.9))
    drop-shadow(0 0 36px rgba(229,9,20,0.5))
    drop-shadow(0 0 70px rgba(168,85,247,0.28));
}
.hero-tag {
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 0.75rem;
}
.hero-sub {
  margin-top: 1rem;
  max-width: 32rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.88);
  text-shadow: 0 2px 16px rgba(0,0,0,0.8);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
  align-items: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(8,6,22,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.75);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border-radius: 14px;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: linear-gradient(135deg, #ff3d62, #e50914 45%, #9f1239);
  box-shadow: 0 0 28px rgba(229,9,20,0.5), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(255,45,85,0.6), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-launch {
  font-size: 1.05rem;
  padding: 1rem 1.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: pulseLaunch 1.8s ease-in-out infinite;
  background: linear-gradient(135deg, #ffd54a, #ff2d55 40%, #a855f7 85%);
  position: relative;
  overflow: hidden;
}
.btn-launch::after {
  content: '⚡';
  margin-left: 0.25rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border-radius: 14px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(168,85,247,0.5);
  box-shadow: 0 0 22px rgba(168,85,247,0.25);
  transform: translateY(-1px);
}

/* ===== NEWS TICKER ===== */
.ticker-wrap {
  overflow: hidden;
  background: linear-gradient(90deg, rgba(229,9,20,0.35), rgba(124,58,237,0.35), rgba(61,231,255,0.2));
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0.55rem 0;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ticker-track span { padding: 0 1.5rem; }
.ticker-track .hot { color: var(--bx-gold); text-shadow: 0 0 10px rgba(251,191,36,0.5); }
.ticker-track .neon { color: var(--bx-cyan); }

/* ===== SECTIONS ===== */
.section {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-title {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fff, #e9d5ff 50%, #3de7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-sub {
  margin: 0.4rem 0 0;
  color: rgba(255,255,255,0.4);
  font-size: 0.9rem;
}

/* ===== BATTLE ARENA ===== */
.battle-section {
  position: relative;
}
.arena-shell {
  position: relative;
  border-radius: 24px;
  padding: 3px;
  background: linear-gradient(120deg, #a855f7, #3de7ff, #ff2d55, #fbbf24, #a855f7);
  background-size: 300% 300%;
  animation: borderShift 5s ease infinite;
  box-shadow: 0 0 40px rgba(229,9,20,0.25), 0 20px 60px rgba(0,0,0,0.5);
}
.arena-shell.battling { animation: shakeArena 0.35s ease-in-out infinite, borderShift 2s ease infinite; }
.arena-inner {
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 55%, rgba(229,9,20,0.18) 0%, transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(61,231,255,0.08), transparent 60%),
    linear-gradient(165deg, rgba(20,10,40,0.98), rgba(4,2,12,0.99));
  padding: 1.5rem 1.25rem 1.75rem;
  overflow: hidden;
}
@media (min-width: 768px) {
  .arena-inner { padding: 2rem 2rem 2.25rem; }
}

.arena-floor {
  position: relative;
  min-height: 320px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 1.25rem 0;
}
@media (max-width: 700px) {
  .arena-floor {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    min-height: auto;
  }
  .vs-badge { order: 0; margin: 0.5rem auto; }
}

.blader-slot {
  text-align: center;
  position: relative;
}
.blader-slot img.cutout {
  width: min(100%, 180px);
  height: auto;
  max-height: 220px;
  object-fit: contain;
  margin: 0 auto;
  display: block;
  animation: floatSoft 5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255,45,85,0.4));
}
.blader-slot.right img.cutout {
  animation-name: floatSoftAlt;
  filter: drop-shadow(0 0 20px rgba(61,231,255,0.4));
}
.blader-name {
  margin-top: 0.5rem;
  font-weight: 900;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.blader-stats {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.stat-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
}
.stat-pill.atk { border-color: rgba(255,45,85,0.5); color: #ff8a9a; }
.stat-pill.def { border-color: rgba(61,231,255,0.5); color: #9cf0ff; }
.stat-pill.spd { border-color: rgba(251,191,36,0.5); color: #fde68a; }

/* Spinning bey disks */
.bey-disk {
  width: 110px;
  height: 110px;
  margin: 0.75rem auto 0;
  border-radius: 50%;
  position: relative;
  background:
    conic-gradient(from 0deg, #ff2d55, #fbbf24, #3de7ff, #a855f7, #ff2d55);
  box-shadow: 0 0 30px rgba(255,45,85,0.5), inset 0 0 20px rgba(0,0,0,0.4);
  animation: spinBey 1.2s linear infinite;
}
.blader-slot.right .bey-disk {
  animation-direction: reverse;
  background: conic-gradient(from 0deg, #3de7ff, #a855f7, #ff2d55, #fbbf24, #3de7ff);
  box-shadow: 0 0 30px rgba(61,231,255,0.5), inset 0 0 20px rgba(0,0,0,0.4);
}
.bey-disk::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, #1a0a2e 30%, #04020c 100%);
  border: 3px solid rgba(255,255,255,0.25);
}
.bey-disk::after {
  content: 'X';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,45,85,0.8);
  z-index: 1;
}
.arena-shell.battling .bey-disk {
  animation-duration: 0.12s;
  box-shadow: 0 0 50px rgba(255,45,85,0.9), 0 0 80px rgba(251,191,36,0.5);
}
.arena-shell.battling .blader-slot.right .bey-disk {
  animation-duration: 0.1s;
}

.vs-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  background: linear-gradient(145deg, #ff2d55, #7c3aed);
  box-shadow: 0 0 30px rgba(229,9,20,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
  border: 2px solid rgba(255,255,255,0.25);
  z-index: 2;
}
.vs-badge.boom {
  animation: boomText 0.55s cubic-bezier(0.22,1,0.36,1);
  background: linear-gradient(145deg, #fbbf24, #ff2d55);
  width: 90px;
  height: 90px;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.15;
  padding: 0.4rem;
}

.energy-bar-wrap {
  margin-top: 0.35rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  max-width: 180px;
  margin-left: auto;
  margin-right: auto;
}
.energy-bar {
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #3de7ff, #ff2d55);
  background-size: 200% 100%;
  animation: borderShift 2s linear infinite;
  transition: width 0.3s;
  box-shadow: 0 0 12px rgba(255,45,85,0.5);
}

.battle-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.5rem;
}
.battle-log {
  margin-top: 1.25rem;
  min-height: 3.2rem;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 0 18px rgba(255,45,85,0.45);
}
.battle-log .sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-shadow: none;
}
.scoreboard {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.score-chip {
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
}
.score-chip span { color: var(--bx-gold); margin-left: 0.35rem; }

/* ===== EPISODE GRID ===== */
#episodes { position: relative; }
.episode-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) { .episode-grid { grid-template-columns: repeat(2, 1fr); gap: 1.15rem; } }
@media (min-width: 768px) { .episode-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .episode-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .episode-grid { grid-template-columns: repeat(5, 1fr); } }

.episode-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(165deg, rgba(32,18,54,0.8) 0%, rgba(10,8,24,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 12px 40px rgba(0,0,0,0.48), inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s, border-color 0.25s;
}
.episode-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(255,45,85,0.4), transparent 45%, rgba(61,231,255,0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity 0.25s;
}
.episode-card:hover, .episode-card:focus-within {
  transform: scale(1.05) translateY(-6px);
  border-color: rgba(255,45,85,0.5);
  box-shadow: 0 24px 50px rgba(0,0,0,0.55), 0 0 40px rgba(229,9,20,0.25);
  z-index: 10;
}
.episode-card:hover::before, .episode-card:focus-within::before { opacity: 1; }
.episode-card:focus-visible { outline: 2px solid #ff2d55; outline-offset: 3px; }

.cover-art {
  aspect-ratio: 16/10;
  background-size: cover;
  background-position: center;
  background-color: #12082a;
  transition: transform 0.45s ease, filter 0.35s ease, opacity 0.3s;
}
.episode-card:hover .cover-art { transform: scale(1.07); filter: saturate(1.12) brightness(1.05); }
.card-body { padding: 0.75rem 0.85rem 0.95rem; }
.card-ep {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bx-neon);
  text-shadow: 0 0 10px rgba(255,45,85,0.4);
}
.card-title {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
}
.stars { display: flex; gap: 0.15rem; }
.star-btn {
  background: none; border: none; color: rgba(255,255,255,0.25);
  cursor: pointer; font-size: 1rem; padding: 0; transition: color 0.15s, transform 0.15s;
}
.star-btn:hover, .star-btn:focus-visible { transform: scale(1.2); color: #ffd700; }
.star-btn.active { color: #ffd700; text-shadow: 0 0 10px rgba(255,215,0,0.45); }

.watched-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(135deg, #e50914, #7c3aed);
  animation: badgePop 0.35s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 0 12px rgba(229,9,20,0.55);
}
.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1;
}
.episode-card:hover .play-overlay { opacity: 1; }
.play-overlay span {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #ff4d6d, #e50914);
  box-shadow: 0 0 24px rgba(229,9,20,0.6);
  font-size: 1.2rem;
}
.thumb-refresh {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; cursor: pointer; color: #fff;
  background: rgba(0,0,0,0.55);
  opacity: 0; transition: opacity 0.2s, background 0.15s;
}
.episode-card:hover .thumb-refresh, .episode-card:focus-within .thumb-refresh { opacity: 1; }
.thumb-refresh:hover { background: rgba(229,9,20,0.9) !important; }

/* ===== EDGE CAST ===== */
.edge-cast {
  position: fixed;
  top: auto;
  bottom: max(1.5rem, 6vh);
  z-index: 12;
  width: min(18vw, 260px);
  max-height: min(62vh, 640px);
  pointer-events: none;
  user-select: none;
}
.edge-cast.left {
  left: 0.25rem;
  -webkit-mask-image: linear-gradient(to right, black 50%, transparent 100%);
  mask-image: linear-gradient(to right, black 50%, transparent 100%);
}
.edge-cast.right {
  right: 0.25rem;
  -webkit-mask-image: linear-gradient(to left, black 50%, transparent 100%);
  mask-image: linear-gradient(to left, black 50%, transparent 100%);
}
.edge-cast img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(58vh, 620px);
  object-fit: contain;
  object-position: bottom center;
  animation: floatSoft 7s ease-in-out infinite;
  filter:
    drop-shadow(0 16px 32px rgba(0,0,0,0.55))
    drop-shadow(0 0 28px rgba(229,9,20,0.35));
}
.edge-cast.right img {
  animation-name: floatSoftAlt;
  filter:
    drop-shadow(0 16px 32px rgba(0,0,0,0.55))
    drop-shadow(0 0 28px rgba(61,231,255,0.32));
}
@media (min-width: 1400px) {
  main#episodes, #gallery, #battle { padding-left: max(1.5rem, 9vw); padding-right: max(1.5rem, 9vw); }
}
@media (max-width: 1279px) { .edge-cast { display: none; } }

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }
.gallery-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(32,18,54,0.75), rgba(8,6,18,0.9));
  border: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 1rem 0.75rem 1.1rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
}
.gallery-card:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(168,85,247,0.45);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 30px rgba(168,85,247,0.2);
}
.gallery-card img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(255,45,85,0.25));
  transition: filter 0.25s, transform 0.25s;
}
.gallery-card:hover img {
  filter: drop-shadow(0 0 28px rgba(61,231,255,0.45));
  transform: scale(1.04);
}
.gallery-card h3 {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ===== MODALS / PLAYER ===== */
.modal-backdrop {
  animation: fadeIn 0.22s ease;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, rgba(20,8,40,0.45) 0%, rgba(2,1,8,0.94) 100%);
  backdrop-filter: blur(14px);
}
.modal-glass {
  background: linear-gradient(165deg, rgba(28,16,50,0.96) 0%, rgba(8,6,18,0.98) 100%);
  border: 1px solid rgba(168,85,247,0.3);
  box-shadow: 0 36px 90px rgba(0,0,0,0.75), 0 0 60px rgba(229,9,20,0.12), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: modalIn 0.32s cubic-bezier(0.22,1,0.36,1);
}
.cinema {
  width: min(98vw, 1580px);
  animation: modalIn 0.32s cubic-bezier(0.22,1,0.36,1);
  position: relative;
}
.cinema-watchers {
  position: absolute; bottom: 0; width: min(18vw, 260px);
  max-height: min(72vh, 600px); z-index: 4; pointer-events: none;
}
.cinema-watchers.left { left: 0; }
.cinema-watchers.right { right: 0; }
.cinema-watchers img {
  width: 100%; height: auto; max-height: min(72vh, 600px);
  object-fit: contain; object-position: bottom center;
}
.cinema-watchers.left img { animation: breatheGlow 5.5s ease-in-out infinite; }
.cinema-watchers.right img { animation: breatheGlowAlt 6s ease-in-out infinite; }
@media (max-width: 1100px) { .cinema-watchers { display: none; } }

.player-shell { width: 100%; max-width: min(90vw, 1040px); margin: 0 auto; }
.neon-frame {
  position: relative;
  border-radius: 16px;
  padding: 3px;
  background: linear-gradient(120deg, #a855f7, #3de7ff, #ff2d55, #e50914, #a855f7);
  background-size: 300% 300%;
  animation: borderShift 6s ease infinite;
  box-shadow: 0 0 30px rgba(168,85,247,0.35), 0 0 50px rgba(229,9,20,0.2), 0 20px 50px rgba(0,0,0,0.55);
}
.neon-frame-inner {
  border-radius: 13px;
  overflow: hidden;
  background: #000;
  position: relative;
}
.neon-frame-inner video { width: 100%; display: block; max-height: 70vh; background: #000; }

.ctrl-bar {
  background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.78) 55%, transparent 100%);
  padding: 1.25rem 1rem 0.9rem;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 0.2s;
}
.neon-frame-inner:hover .ctrl-bar,
.neon-frame-inner.show-controls .ctrl-bar { opacity: 1; }

.play-orb {
  width: 3.4rem; height: 3.4rem; border-radius: 999px;
  background: linear-gradient(145deg, #ff4d6d, #e50914 50%, #7c3aed);
  box-shadow: 0 0 28px rgba(229,9,20,0.55), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s, filter 0.15s;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; color: #fff; cursor: pointer; font-size: 1.1rem;
}
.play-orb:hover { transform: scale(1.08); filter: brightness(1.1); }
.skip-pill, .icon-chip {
  min-width: 2.8rem; min-height: 2.8rem; border-radius: 12px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff; font-weight: 800; font-size: 0.72rem;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.15s, transform 0.12s;
}
.skip-pill:hover, .icon-chip:hover {
  background: rgba(255,45,85,0.35);
  transform: scale(1.06);
}
.ctrl-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.progress-track {
  cursor: pointer; touch-action: none; height: 7px; flex: 1;
  background: rgba(255,255,255,0.18); border-radius: 999px; position: relative;
  margin: 0.5rem 0 0.75rem;
}
.progress-fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #3de7ff, #ff2d55);
  background-size: 200% 100%;
  animation: borderShift 4s linear infinite;
  box-shadow: 0 0 12px rgba(255,45,85,0.55);
  width: 0%;
}
.time-readout { font-size: 0.75rem; color: rgba(255,255,255,0.7); font-variant-numeric: tabular-nums; min-width: 5.5rem; }
input[type="range"].volume-slider {
  -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px;
  background: #444; outline: none; width: 5rem;
}
input[type="range"].volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, #ff2d55, #a855f7); cursor: pointer;
}
.toggle-switch {
  position: relative; width: 46px; height: 26px; border-radius: 999px; background: #333;
  transition: background 0.2s; flex-shrink: 0; border: none; cursor: pointer;
}
.toggle-switch.on {
  background: linear-gradient(90deg, #e50914, #a855f7);
  box-shadow: 0 0 12px rgba(229,9,20,0.45);
}
.toggle-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform 0.2s;
}
.toggle-switch.on::after { transform: translateX(20px); }
.download-btn {
  background: linear-gradient(135deg, #fff, #ebe8f8);
  color: #111; font-weight: 700; border: none; border-radius: 10px;
  padding: 0.55rem 1rem; cursor: pointer;
  box-shadow: 0 0 24px rgba(255,255,255,0.12);
}
.nav-pill {
  border-radius: 10px; padding: 0.55rem 1rem; font-weight: 600; font-size: 0.875rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; cursor: pointer;
}
.nav-pill:hover { border-color: rgba(168,85,247,0.5); background: rgba(168,85,247,0.15); }
.big-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35); cursor: pointer; border: none; z-index: 2;
}
.big-play.hidden { display: none; }
.big-play span {
  width: 80px; height: 80px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #ff4d6d, #e50914);
  box-shadow: 0 0 40px rgba(229,9,20,0.7);
  font-size: 2rem; color: #fff;
}

/* Lightbox for gallery */
#lightbox {
  position: fixed; inset: 0; z-index: 80; display: none;
  align-items: center; justify-content: center; padding: 1rem;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: min(92vw, 520px);
  max-height: 85vh;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(255,45,85,0.4));
  animation: modalIn 0.3s ease;
  position: relative; z-index: 2;
}
#lightbox .modal-backdrop { position: absolute; inset: 0; }

/* Flix tab */
.flix-tab {
  position: fixed; right: 0; top: 42%; z-index: 40;
  writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
  padding: 16px 11px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #fff;
  background: linear-gradient(180deg, #ff2d55, #7c3aed);
  border: 1px solid rgba(255,255,255,0.2); border-right: none;
  border-radius: 12px 0 0 12px;
  cursor: pointer; animation: pulseTab 3.5s ease-in-out infinite;
}
@media (max-width: 640px) {
  .flix-tab {
    writing-mode: horizontal-tb; transform: none; top: auto; bottom: 16px; right: 16px;
    border-radius: 999px; border: 1px solid rgba(255,255,255,0.2);
    padding: 11px 14px; font-size: 10px;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 2rem;
  background: rgba(0,0,0,0.25);
}
.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.footer-inner p { margin: 0; color: rgba(255,255,255,0.35); font-size: 0.85rem; }
.footer-inner .brand-logo { height: 28px; }

/* Confetti pieces */
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 14px;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  opacity: 0.95;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0.85; }
}

/* Shockwave rings */
.shockwave {
  position: absolute;
  left: 50%; top: 50%;
  width: 40px; height: 40px;
  margin: -20px;
  border-radius: 50%;
  border: 3px solid rgba(255,45,85,0.8);
  box-shadow: 0 0 20px rgba(255,45,85,0.5), inset 0 0 20px rgba(61,231,255,0.3);
  animation: energyBurst 0.85s ease-out forwards;
}

/* Winner flash */
.winner-flash {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(251,191,36,0.25), transparent 60%);
  animation: fadeIn 0.2s ease;
}
.winner-flash h2 {
  font-size: clamp(2rem, 8vw, 4.5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  background: linear-gradient(90deg, #fbbf24, #fff, #ff2d55);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(251,191,36,0.6));
  animation: boomText 0.6s cubic-bezier(0.22,1,0.36,1);
}

/* Sound toggle */
#sound-toggle {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 45;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(10,6,24,0.85);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(168,85,247,0.3);
  backdrop-filter: blur(8px);
}
#sound-toggle.muted { opacity: 0.55; }

.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(255,255,255,0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; }
}
