/* 
 * FIGHTSKILL — Premium Esports UI
 * Dark futuristic · Neon green accent · Grainient background
 * Professional, sophisticated gaming aesthetic
 */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
  /* Core palette — Premium dark esports interface */
  --bg: #100D16;
  --bg2: #16121F;
  --surface: #1A1524;
  --surface-glass: rgba(26, 21, 36, 0.65);
  --surface2: rgba(22, 18, 31, 0.55);
  --surface-solid: #1A1524;
  --border: rgba(255, 255, 255, 0.04);
  --border-bright: rgba(255, 255, 255, 0.08);
  --text: #FFFFFF;
  --text-dim: #8B929A;
  --text-muted: #62676E;
  --gray: #6E6488;

  /* Neon green — accent color only */
  --neon: #A678E8;
  --neon-dim: #8F5FD6;
  --neon-glow: rgba(166, 120, 232, 0.25);
  --neon-soft: rgba(166, 120, 232, 0.06);

  /* Secondary accents */
  --amber: #FFB454;
  --amber-glow: rgba(255, 180, 84, 0.25);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.25);
  --blue: #4E9EFF;
  --blue-glow: rgba(78, 158, 255, 0.25);
  --pink: #ec4899;
  --orange: #f97316;

  /* UI Metrics */
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-sm: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  --t-sm: all 0.15s var(--ease);
  --t-lg: all 0.3s var(--ease);
}

/* Light theme — tuned esports identity */
[data-theme="light"] {
  --bg: #EAE3DA;
  --bg2: #DFD6CB;
  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.75);
  --surface2: rgba(214, 203, 190, 0.6);
  --border: rgba(0, 0, 0, 0.08);
  --border-bright: rgba(0, 0, 0, 0.12);
  --text: #2A2433;
  --text-dim: #5D5568;
  --text-muted: #8B8496;
  --neon: #7B52D6;
  --neon-dim: #6A41C2;
  --neon-glow: rgba(123, 82, 214, 0.25);
  --amber: #e68a00;
  --amber-glow: rgba(230, 138, 0, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  /* Task 14 fix: overflow-x `clip` (not `hidden`) — `hidden` on html/body turns
     them into scroll containers and SILENTLY BREAKS position:sticky (navbar +
     sticky register bar never stuck). `clip` clips the same way but keeps the
     viewport as the scroll container, so sticky works. */
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── FULL-SCREEN GAMING BACKGROUND ── */
#grainient-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  /* CSS fallback animation when WebGL/Grainient canvas cannot init */
  background: radial-gradient(circle at 16% 28%, rgba(166,120,232,0.08), transparent 30%),
              radial-gradient(circle at 84% 66%, rgba(166,120,232,0.07), transparent 30%),
              linear-gradient(125deg, #100D16 25%, #16121F 55%, #100D16 75%);
  background-size: 200% 200%;
  animation: fightskillBgDrift 40s ease-in-out infinite;
  will-change: background-position;
}

@keyframes fightskillBgDrift {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 50%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

/* When Grainient WebGL is active, it takes over — hide CSS animation */
#grainient-bg.grainient-active {
  animation: none;
}

/* ── PARTICLE-NET OVERLAY (must stay out of document flow on every page) ──
   Without this rule the host div renders as a static block ~100vh tall and
   pushes the whole page (e.g. the login card) below the viewport. */
#particle-net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.85;
}

/* Dark-mode overlay: darkens the Grainient so UI contrast pops */
#grainient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

/* Light mode: lighter overlay */
[data-theme="light"] #grainient-bg::after {
  background: rgba(240, 242, 245, 0.82);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(166,120,232,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166,120,232,0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
}

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

.orb {
  position: absolute;
  border-radius: 50%;
  /* PERF: soft radial-gradient instead of filter:blur(80px) — a blurred
     element animating forces full re-rasterization every frame; a
     gradient paints once and only transforms afterwards. */
  background: radial-gradient(circle at 50% 50%, var(--neon-soft) 0%, transparent 68%);
  animation: orbFloat 120s ease-in-out infinite;
  opacity: 0.35;
  will-change: transform;
}
.orb-1 { width: 520px; height: 520px; top: -12%; left: -12%; animation-delay: 0s; }
.orb-2 { width: 420px; height: 420px; background: radial-gradient(circle at 50% 50%, var(--purple-glow) 0%, transparent 68%); bottom: -10%; right: -10%; animation-delay: -7s; }
.orb-3 { width: 340px; height: 340px; top: 42%; left: 62%; animation-delay: -14s; }
.orb-4 { width: 280px; height: 280px; background: radial-gradient(circle at 50% 50%, var(--blue-glow) 0%, transparent 68%); bottom: 20%; left: 10%; animation-delay: -21s; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  33% { transform: translate(12px, -10px) scale(1.04); opacity: 0.4; }
  66% { transform: translate(-8px, 8px) scale(0.97); opacity: 0.32; }
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255,255,255,0.002) 50%,
    rgba(0,0,0,0.01) 100%
  );
  opacity: 0.3;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: 'Orbitron', sans-serif; font-weight: 800; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 4vw, 2.75rem); line-height: 1.15; }
h3 { font-size: clamp(1.1rem, 3vw, 1.75rem); line-height: 1.2; }
h4 { font-size: clamp(0.95rem, 2.5vw, 1.25rem); line-height: 1.25; }

.subheading { font-family: 'Rajdhani', sans-serif; font-weight: 600; }
.body-text { font-family: 'Inter', system-ui, sans-serif; }

/* Gradient text for headings */
.gradient-text {
  background: linear-gradient(90deg, var(--text) 0%, var(--neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(90deg, var(--neon) 0%, var(--neon-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── RTL / Persian Typography ── */
[dir="rtl"] body,
html[dir="rtl"] body,
html[lang="fa"] body,
html[lang="ar"] body {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif !important;
  letter-spacing: 0;
  line-height: 1.9;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3, html[dir="rtl"] h4,
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3, html[lang="fa"] h4,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  letter-spacing: 0;
  line-height: 1.7;
}
html[dir="rtl"] .btn, html[dir="rtl"] .input,
html[lang="fa"] .btn, html[lang="fa"] .input,
html[lang="ar"] .btn, html[lang="ar"] .input {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  letter-spacing: 0;
}
html[dir="rtl"] .logo, html[lang="fa"] .logo, html[lang="ar"] .logo {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
}

/* ── Buttons — Premium Animation ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--r);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Smooth click animation — Premium, NOT bouncy */
.btn {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: scale(0.96);
  transition: transform 0.08s ease, filter 0.1s ease;
}

/* Material-Style Ripple starting at exact click point */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transform: scale(0);
  animation: btnRipple 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
  z-index: 10;
}

.btn-primary .ripple { background: rgba(0, 0, 0, 0.3); }
.btn-outline .ripple,
.btn-ghost .ripple { background: rgba(166, 120, 232, 0.3); }
.lang-btn .ripple { background: rgba(166, 120, 232, 0.35); }
button .ripple { background: rgba(255, 255, 255, 0.4); }

@keyframes btnRipple {
  from { transform: scale(0); opacity: 0.7; }
  to { transform: scale(2.6); opacity: 0; }
}

/* Primary Buttons — Green gradient background */
.btn-primary {
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-dim) 100%);
  color: #000;
  box-shadow: 0 0 20px var(--neon-glow);
  border: 1px solid transparent;
}
.btn-primary:hover {
  box-shadow: 0 0 35px var(--neon-glow), 0 0 60px rgba(166, 120, 232, 0.2);
  filter: brightness(1.05);
}
.btn-primary:active {
  filter: brightness(0.95);
}

/* Secondary Buttons — Dark transparent with border */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--neon);
  color: var(--text);
  background: rgba(166, 120, 232, 0.04);
  box-shadow: 0 0 15px rgba(166, 120, 232, 0.12);
}

/* Ghost Buttons — Ultra-subtle */
.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover {
  border-color: var(--border-bright);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Button sizes */
.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }
.btn-xs { padding: 0.35rem 0.75rem; font-size: 0.72rem; }

/* Arrow animation for CTAs */
.btn-primary .arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.btn-primary:hover .arrow {
  transform: translateX(4px);
}

/* ── Cards — Premium Hover Animation ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.card.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, rgba(255, 255, 255, 0.1) 50%, transparent 90%);
  transition: transform 0.25s ease, height 0.2s ease, opacity 0.25s ease, height 0.2s ease, background-color 0.25s ease, height 0.2s ease, background 0.25s ease, height 0.2s ease, border-color 0.25s ease, height 0.2s ease, color 0.25s ease, height 0.2s ease, box-shadow 0.25s ease, height 0.2s ease, filter 0.25s ease, height 0.2s ease;
}

.card:hover {
  border-color: rgba(166, 120, 232, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px rgba(166, 120, 232, 0.06);
}

.card:hover::before {
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(166, 120, 232, 0.4) 50%, transparent 95%);
  box-shadow: 0 0 12px rgba(166, 120, 232, 0.25);
}

/* Card image hover zoom */
.card-img img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card:hover .card-img img {
  transform: scale(1.05);
}

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(166, 120, 232, 0.15);
  background: rgba(26, 21, 36, 0.9);
}
.input::placeholder { color: var(--text-muted); }

/* ── Container ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 1rem; }

/* ── Scroll Animations (Subtle) ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--neon-glow); }
  50% { box-shadow: 0 0 24px var(--neon-glow), 0 0 48px rgba(166, 120, 232, 0.15); }
}

/* Scroll reveal — staggered cards */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }

/* Live indicator pulse */
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float { animation: float 4s ease-in-out infinite; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }

/* ── Typography ── */
h1, h2, h3 { font-family: 'Rajdhani', sans-serif; font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); }

/* ── RTL / Persian Typography ── */
[dir="rtl"] body,
html[dir="rtl"] body,
html[lang="fa"] body,
html[lang="ar"] body {
  font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif !important;
  letter-spacing: 0;
  line-height: 1.9;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[lang="fa"] h1, html[lang="fa"] h2, html[lang="fa"] h3,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  letter-spacing: 0;
  line-height: 1.7;
}
html[dir="rtl"] .btn, html[dir="rtl"] .input,
html[lang="fa"] .btn, html[lang="fa"] .input,
html[lang="ar"] .btn, html[lang="ar"] .input {
  font-family: 'Vazirmatn', 'Tahoma', sans-serif;
  letter-spacing: 0;
}
html[dir="rtl"] .logo, html[dir="rtl"] .logo,
html[lang="fa"] .logo, html[lang="ar"] .logo {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.08em;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: var(--r);
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  border: none; transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease; text-decoration: none;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 0.04em;
  position: relative; overflow: hidden;
}

/* Round icon buttons get press feedback too */
.slot-btn:active, .car-btn:active, .mc-btn:active, .notif-bell:active, .theme-toggle:active, .car-btn:active {
  transform: scale(0.88);
  transition: transform 0.08s ease;
}
.car-btn, .mc-btn, .notif-bell, .theme-toggle { will-change: transform; }

.btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 60%);
  opacity: 0; transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }
/* ── Smooth click animation ── */
.btn {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:active {
  transform: scale(0.93);
  filter: brightness(1.15);
  transition: transform 0.08s ease, filter 0.1s ease;
}
/* Material-Style Ripple Effect (exact click point origin) */
.ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  animation: btnRipple 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none; z-index: 10;
}
.btn-primary .ripple { background: rgba(0,0,0,0.3); }
.btn-outline .ripple, .btn-ghost .ripple { background: rgba(166,120,232,0.3); }
.lang-btn .ripple { background: rgba(166,120,232,0.35); }
.notif-bell .ripple, .theme-toggle .ripple { background: rgba(166,120,232,0.25); }
button .ripple { background: rgba(255,255,255,0.4); }

@keyframes btnRipple {
  from { transform: scale(0); opacity: 0.7; }
  to { transform: scale(2.6); opacity: 0; }
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-dim) 100%);
  color: #000; box-shadow: 0 0 20px var(--neon-glow);
}
.btn-primary:hover { box-shadow: 0 0 35px var(--neon-glow); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--neon); color: var(--neon); background: rgba(166,120,232,0.05); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.btn-ghost:hover { border-color: var(--border-bright); color: var(--text); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent 10%, rgba(255,255,255,0.12) 50%, transparent 90%);
  transition: background 0.25s ease, height 0.2s ease;
}

.card:hover {
  border-color: rgba(166,120,232,0.2);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 20px rgba(166,120,232,0.08);
}
/* Keep + enhance the top glow line on hover (never disappears) */
.card:hover::before {
  height: 2px;
  background: linear-gradient(90deg, transparent 5%, rgba(166,120,232,0.55) 50%, transparent 95%);
  box-shadow: 0 0 12px rgba(166,120,232,0.35);
}

/* ── Inputs ── */
.input {
  width: 100%; padding: 0.75rem 1rem;
  border-radius: var(--r); border: 1px solid var(--border);
  background: var(--surface2); color: var(--text);
  font-size: 0.95rem; font-family: inherit; transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease, background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}
.input:focus {
  outline: none; border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(166,120,232,0.15);
}
.input::placeholder { color: var(--text-muted); }

/* ── Container ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 480px; margin: 0 auto; padding: 0 1rem; }

/* ── Animations ── */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse-glow { 0%,100%{box-shadow:0 0 8px var(--neon-glow)} 50%{box-shadow:0 0 24px var(--neon-glow),0 0 48px rgba(166,120,232,0.15)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes shimmer { 0%{background-position:-200% center} 100%{background-position:200% center} }

.animate-fadeInUp { animation: fadeInUp 0.6s var(--ease) forwards; }
.animate-fadeIn { animation: fadeIn 0.5s var(--ease) forwards; }
.animate-slideInRight { animation: slideInRight 0.5s var(--ease) forwards; }
.float { animation: float 4s ease-in-out infinite; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.25rem 0.75rem; border-radius: 50px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-neon { background: rgba(166,120,232,0.1); color: var(--neon); border: 1px solid rgba(166,120,232,0.2); }
.badge-purple { background: rgba(168,85,247,0.1); color: var(--purple); border: 1px solid rgba(168,85,247,0.2); }
.badge-blue { background: rgba(59,130,246,0.1); color: var(--blue); border: 1px solid rgba(59,130,246,0.2); }
.badge-pink { background: rgba(236,72,153,0.1); color: var(--pink); border: 1px solid rgba(236,72,153,0.2); }
.badge-orange { background: rgba(249,115,22,0.1); color: var(--orange); border: 1px solid rgba(249,115,22,0.2); }

/* ── Helpers ── */
.flex { display: flex; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.w-full { width: 100%; }

/* ── Match Overlay ── */
.match-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(4,6,12,0.98);
  backdrop-filter: blur(30px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 2rem;
}
.match-overlay.show { display: flex; }
.overlay-badge {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid var(--pink);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  animation: pulse-glow 2s infinite;
}
.match-overlay h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 40px var(--neon-glow);
  margin-bottom: 0.5rem;
  text-align: center;
}
.overlay-game {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 2rem;
  font-family: 'Inter', sans-serif;
}
.creds-box {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(166,120,232,0.3);
  border-radius: var(--r-lg);
  padding: 1.5rem 2.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px var(--neon-glow);
  min-width: 280px;
}
.creds-box .label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.creds-box .value {
  font-family: 'Orbitron', monospace;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.1em;
}
.creds-box .value.code { color: var(--neon); text-shadow: 0 0 20px var(--neon-glow); }
.creds-box .value.pw { color: var(--blue); text-shadow: 0 0 20px rgba(59,130,246,0.5); }
.match-overlay .reminder {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  text-align: center;
  max-width: 400px;
}
.match-overlay .close-btn {
  background: linear-gradient(135deg, var(--neon), var(--neon-dim));
  color: #000;
  border: none;
  padding: 0.875rem 2.5rem;
  border-radius: var(--r);
  font-size: 1rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--glow-green);
  transition: transform 0.2s, opacity 0.2s, background-color 0.2s, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, filter 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.match-overlay .close-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 50px var(--neon-glow);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN — Full Device Support
   ══════════════════════════════════════════════════════════════════ */

/* Large desktops (1200px+) — default, no changes needed */

/* Medium desktops & tablets landscape (992px - 1199px) */
@media (max-width: 1199px) {
  .container { padding: 0 1.25rem; }
  h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
  h2 { font-size: clamp(1.3rem, 3.5vw, 2.2rem); }
}

/* Tablets portrait & small laptops (768px - 991px) */
@media (max-width: 991px) {
  .container { max-width: 100%; padding: 0 1rem; }
  body { font-size: 0.95rem; }
  .btn { padding: 0.65rem 1.5rem; font-size: 0.9rem; }
  .btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
  .card { padding: 1.25rem; }
  .stat-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* Mobile landscape & large phones (640px - 767px) */
@media (max-width: 767px) {
  body { font-size: 0.92rem; line-height: 1.65; }
  .container { padding: 0 0.85rem; }
  .card { padding: 1rem; border-radius: var(--r); }
  .btn { padding: 0.6rem 1.25rem; font-size: 0.88rem; }
  .btn-sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
  .btn-lg { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
  h1 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
  h2 { font-size: clamp(1.2rem, 4vw, 1.8rem); }
  h3 { font-size: clamp(1rem, 3vw, 1.3rem); }
  .stat-cards { grid-template-columns: 1fr; gap: 0.85rem; }
  .input { font-size: 16px; } /* Prevents iOS zoom on focus */
  .badge { font-size: 0.68rem; padding: 0.2rem 0.6rem; }
}

/* Mobile portrait (480px - 639px) */
@media (max-width: 639px) {
  .container { padding: 0 0.75rem; }
  .card { padding: 0.85rem; }
  .btn { width: 100%; justify-content: center; } /* Full-width buttons on mobile */
  .btn-sm, .btn-xs { width: auto; } /* Except small buttons */
  .flex { flex-wrap: wrap; }
  .gap-1 { gap: 0.4rem; }
  .gap-2 { gap: 0.75rem; }
  .gap-3 { gap: 1rem; }
}

/* Small phones (360px - 479px) */
@media (max-width: 479px) {
  body { font-size: 0.9rem; }
  .container { padding: 0 0.65rem; }
  .card { padding: 0.75rem; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 0.95rem; }
  .btn { font-size: 0.85rem; padding: 0.55rem 1rem; }
  .badge { font-size: 0.65rem; }
}

/* Very small phones (<360px) */
@media (max-width: 359px) {
  body { font-size: 0.88rem; }
  .container { padding: 0 0.5rem; }
  .card { padding: 0.65rem; }
  .btn { font-size: 0.82rem; padding: 0.5rem 0.85rem; }
}

/* Horizontal scroll prevention — `clip` keeps position:sticky working
   (see note on body above). hidden here disabled the sticky navbar. */
html { overflow-x: clip; max-width: 100vw; }
body { overflow-x: clip; max-width: 100vw; }
* { max-width: 100%; } /* Override if needed per component */
img { max-width: 100%; height: auto; }

/* Touch-friendly tap targets (min 44x44 iOS, 48x48 Android) */
@media (pointer: coarse) {
  .btn, button, a, input, select, textarea { min-height: 44px; }
  .btn-sm { min-height: 38px; }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Pill Indicator ── */
.pill {
  position: absolute;
  transition: left 0.4s cubic-bezier(0.65, 0, 0.35, 1),
              width 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  background: var(--neon);
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}
/* JS sets pill.style.left/width to the active button's offsetLeft/offsetWidth on click */

/* ── Bento Grid ── */
.bento {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 7px;
}

.bento span {
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s cubic-bezier(0.65, 0, 0.35, 1), background-color 0.3s cubic-bezier(0.65, 0, 0.35, 1), background 0.3s cubic-bezier(0.65, 0, 0.35, 1), border-color 0.3s cubic-bezier(0.65, 0, 0.35, 1), color 0.3s cubic-bezier(0.65, 0, 0.35, 1), box-shadow 0.3s cubic-bezier(0.65, 0, 0.35, 1), filter 0.3s cubic-bezier(0.65, 0, 0.35, 1);
  cursor: pointer;
}

.bento span:hover {
  background: var(--amber);
  transform: scale(1.04);
}

.bento:has(span:hover) span:not(:hover) {
  opacity: .45;
  transform: scale(.96);
}

/* ══════════════════════════════════════════════════════════════════
   PREMIUM ESPORTS UI — Tournament Platform Styles
   ══════════════════════════════════════════════════════════════════ */

/* ── Tournament Teams / Slots (Mobile-First Esports Layout) ── */
.tournament-lobby {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Registration stats bar with progress bar */
.lobby-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.lobby-stats-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lobby-stats-head .stat-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lobby-stats-head .stat-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}
.lobby-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.lobby-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--neon-dim));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px var(--neon-glow);
}
.lobby-progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

/* Team section */
.tournament-team {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.tournament-team:hover {
  border-color: rgba(166, 120, 232, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(166, 120, 232, 0.08);
  transform: translateY(-2px);
}

/* Team header bar — colored per team */
.team-header-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.team-header-bar.team-1 { background: linear-gradient(135deg, var(--neon), var(--neon-dim)); color: #000; box-shadow: 0 0 20px var(--neon-glow); }
.team-header-bar.team-2 { background: linear-gradient(135deg, var(--blue), rgba(78,158,255,0.5)); color: #000; box-shadow: 0 0 20px var(--blue-glow); }
.team-header-bar.team-3 { background: linear-gradient(135deg, var(--purple), rgba(168,85,247,0.5)); color: #fff; box-shadow: 0 0 20px var(--purple-glow); }
.team-header-bar.team-4 { background: linear-gradient(135deg, var(--amber), rgba(255,180,84,0.5)); color: #000; box-shadow: 0 0 20px var(--amber-glow); }
.team-header-bar.team-5 { background: linear-gradient(135deg, var(--pink), rgba(236,72,153,0.5)); color: #fff; box-shadow: 0 0 20px var(--pink); }
.team-header-bar.team-6 { background: linear-gradient(135deg, var(--orange), rgba(249,115,22,0.5)); color: #fff; box-shadow: 0 0 20px var(--orange); }
.team-header-bar.team-7 { background: linear-gradient(135deg, #06b6d4, rgba(6,178,214,0.5)); color: #000; box-shadow: 0 0 20px rgba(6,178,214,0.3); }
.team-header-bar.team-8 { background: linear-gradient(135deg, #a855f7, rgba(168,85,247,0.5)); color: #fff; box-shadow: 0 0 20px var(--purple-glow); }

.team-header-bar .team-number {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.85rem;
}
.team-header-bar .team-name {
  flex: 1;
  font-size: 1.05rem;
}
.team-header-bar .team-count {
  font-size: 0.8rem;
  opacity: 0.8;
  font-weight: 400;
}

/* Player slots — horizontal scroll on mobile */
.team-slots {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--neon-glow) transparent;
}
.team-slots::-webkit-scrollbar { height: 4px; }
.team-slots::-webkit-scrollbar-thumb { background: var(--neon-glow); border-radius: 2px; }

/* Desktop — wrap into grid if enough width */
@media (min-width: 768px) {
  .team-slots {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* Player slot card with 3D tilt */
.player-slot {
  position: relative;
  flex-shrink: 0;
  width: 110px;
  height: 140px;
  perspective: 1000px;
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
}

/* 3D tilt inner wrapper */
.player-slot-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--r-lg);
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
  transition:
    transform 0.12s ease-out,
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.6rem;
  gap: 0.35rem;
  cursor: pointer;
}
.player-slot:hover .player-slot-inner,
.player-slot-inner:hover {
  border-color: rgba(166, 120, 232, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(166, 120, 232, 0.1);
  filter: brightness(1.05);
}

/* Glow element that follows cursor */
.player-slot-inner .slot-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(166, 120, 232, 0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 1;
}
.player-slot:hover .player-slot-inner .slot-glow {
  opacity: 1;
}

/* Player avatar */
.player-slot .player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--neon-glow);
  background: linear-gradient(135deg, var(--neon), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  z-index: 2;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.player-slot:hover .player-slot .player-avatar {
  border-color: var(--neon);
  box-shadow: 0 0 20px var(--neon-glow);
  transform: scale(1.08);
}
.player-slot .player-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.player-slot .player-avatar .fallback {
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
}

/* Player info */
.player-slot .player-info {
  text-align: center;
  z-index: 2;
}
.player-slot .player-username {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-slot .player-displayname {
  font-size: 0.65rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-slot .player-status {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.player-slot .player-position {
  position: absolute;
  top: 4px;
  right: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.6rem;
  color: var(--text-muted);
  z-index: 3;
}

/* Empty slot */
.player-slot-empty {
  position: relative;
  flex-shrink: 0;
  width: 110px;
  height: 140px;
  perspective: 1000px;
}
.player-slot-empty-inner {
  width: 100%;
  height: 100%;
  border: 2px dashed var(--border);
  border-radius: var(--r-lg);
  background: rgba(166, 120, 232, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.4rem;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.player-slot-empty:hover .player-slot-empty-inner {
  border-color: var(--neon);
  background: rgba(166, 120, 232, 0.06);
  box-shadow: 0 0 24px rgba(166, 120, 232, 0.12);
  transform: scale(1.04);
}

/* Light beam border animation (pure CSS) for empty slot */
.player-slot-empty-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  z-index: 1;
  pointer-events: none;
  background: 
    conic-gradient(
      from 0deg at 50% 50%,
      rgba(166, 120, 232, 0) 0deg,
      rgba(166, 120, 232, 0.4) 30deg,
      rgba(166, 120, 232, 0) 60deg,
      rgba(166, 120, 232, 0) 360deg
    );
  animation: lp-spin-beam 3s linear infinite;
  mask: 
    linear-gradient(#000 0% 0% 65% 100%) padding-box, 
    linear-gradient(#000 0% 0% 70% 100%) border-box;
  -webkit-mask: 
    linear-gradient(#fff 0% 0% 65% 100%) padding-box, 
    linear-gradient(#fff 0% 0% 70% 100%) border-box;
}

@keyframes lp-spin-beam {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Empty slot content */
.player-slot-empty .empty-slot-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  padding: 0.75rem;
}
.player-slot-empty .empty-slot-icon {
  font-size: 2rem;
  color: var(--neon);
  opacity: 0.5;
  animation: pulse-glow 2s infinite;
}
.player-slot-empty .empty-slot-text {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
}

/* ═══════════════ LIGHT BEAM BORDER COMPONENT ═══════════════ */
.lb-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.lb-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(166, 120, 232, 0.1);
  border-color: rgba(166, 120, 232, 0.2);
}
.lb-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  z-index: 1;
  pointer-events: none;
  background: 
    conic-gradient(
      from 0deg at 50% 50%,
      rgba(166, 120, 232, 0) 0deg,
      rgba(166, 120, 232, 0.3) 30deg,
      rgba(166, 120, 232, 0) 60deg,
      rgba(166, 120, 232, 0) 360deg
    );
  animation: lb-spin 3s linear infinite;
  mask: 
    linear-gradient(#000 0% 0% 68% 100%) padding-box, 
    linear-gradient(#000 0% 0% 72% 100%) border-box;
  -webkit-mask: 
    linear-gradient(#fff 0% 0% 68% 100%) padding-box, 
    linear-gradient(#fff 0% 0% 72% 100%) border-box;
}
.lb-card .lb-content {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
}
@keyframes lb-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ═══════════════ 3D TILT CARD COMPONENT ═══════════════ */
.tilt-card {
  perspective: 1000px;
  border-radius: var(--r-xl);
  cursor: pointer;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
}
.tilt-card:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(166, 120, 232, 0.12);
}
.tilt-card-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
  transition:
    transform 0.12s ease-out,
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.tilt-card:hover .tilt-card-inner {
  border-color: rgba(166, 120, 232, 0.25);
}

/* Glow that follows the cursor */
.tilt-card-glow {
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(166, 120, 232, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  z-index: 1;
}
.tilt-card:hover .tilt-card-glow {
  opacity: 1;
}
.tilt-card-content {
  position: relative;
  z-index: 2;
  padding: 1.25rem;
}

/* ═══════════════ FULL-SCREEN GAMING BACKGROUND ── */

#grainient-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
}

/* ── Section Wrappers ── */
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-tight { padding: 1.5rem 0; }

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header h2 {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--text-dim), var(--neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-header .view-all {
  font-size: 0.82rem;
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.section-header .view-all:hover {
  transform: translateX(3px);
  color: var(--neon-dim);
}

/* ── NAVBAR ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.85rem 1.5rem;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-bottom: 1px solid var(--border);
}
.navbar.scrolled {
  background: rgba(10, 8, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}
.navbar .inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo */
.brand-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--neon);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-shadow: 0 0 30px var(--neon-glow);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), background-color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}
.brand-logo:hover {
  text-shadow: 0 0 40px var(--neon-glow), 0 0 60px rgba(166, 120, 232, 0.2);
}

/* Desktop Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.55rem 1rem;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  position: relative;
}
.nav-link:hover {
  color: var(--text);
}
.nav-link.active,
.nav-link:hover.active {
  color: var(--neon);
}
.nav-link.active::after,
.nav-link:hover::after {
  content: '';
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: underlineSlide 0.3s ease-out;
}

@keyframes underlineSlide {
  0% { width: 0; opacity: 0; }
  50% { width: 60%; opacity: 1; }
  100% { width: 60%; opacity: 1; }
}

/* Nav icons */
.nav-link .nav-icon {
  display: inline-block;
  width: 1.2em;
  text-align: center;
  margin-right: 0.3em;
}

/* Navbar extras */
.nav-cta {
  background: linear-gradient(135deg, var(--neon), var(--neon-dim));
  color: #000;
  font-weight: 700;
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border-radius: var(--r);
  box-shadow: 0 0 20px var(--neon-glow);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease), background-color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  border: 1px solid transparent;
}
.nav-cta:hover {
  box-shadow: 0 0 35px var(--neon-glow), 0 0 60px rgba(166, 120, 232, 0.25);
  transform: translateY(-2px);
}

/* Search in navbar */
.nav-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-box input {
  width: 220px;
  padding: 0.4rem 2.5rem 0.4rem 0.85rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 0.82rem;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.nav-search-box input:focus {
  width: 280px;
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(166, 120, 232, 0.12);
}
.nav-search-box .search-icon {
  position: absolute;
  right: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Notification & Profile icons */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  position: relative;
}
.nav-icon-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: 0 0 15px rgba(166, 120, 232, 0.15);
}

/* ── HERO SECTION ── */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  margin-bottom: 3rem;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 30%, rgba(166, 120, 232, 0.06) 0%, transparent 55%);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.hero-headline {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero-headline .line {
  display: block;
  position: relative;
}
.hero-headline .line.neon-text {
  color: var(--neon);
  text-shadow: 0 0 40px var(--neon-glow), 0 0 80px rgba(166, 120, 232, 0.2);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.hero-stat .stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero-stat .stat-label {
  color: var(--text-dim);
}
.hero-stat--green .stat-num { color: var(--neon); text-shadow: 0 0 15px var(--neon-glow); }
.hero-stat--blue .stat-num { color: var(--blue); text-shadow: 0 0 15px var(--blue-glow); }

/* ── LIVE indicators ── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.live-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-neon { background: rgba(166, 120, 232, 0.1); color: var(--neon); border: 1px solid rgba(166, 120, 232, 0.2); }
.badge-purple { background: rgba(168, 85, 247, 0.1); color: var(--purple); border: 1px solid rgba(168, 85, 247, 0.2); }
.badge-blue { background: rgba(78, 158, 255, 0.1); color: var(--blue); border: 1px solid rgba(78, 158, 255, 0.2); }
.badge-pink { background: rgba(236, 72, 153, 0.1); color: var(--pink); border: 1px solid rgba(236, 72, 153, 0.2); }
.badge-orange { background: rgba(249, 115, 22, 0.1); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.2); }
.badge-amber { background: rgba(245, 152, 66, 0.1); color: var(--amber); border: 1px solid rgba(245, 152, 66, 0.25); }
.badge-green { background: rgba(166, 120, 232, 0.12); color: var(--neon); border: 1px solid rgba(166, 120, 232, 0.25); }
.badge-red { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-cyan { background: rgba(100, 220, 255, 0.1); color: var(--blue); border: 1px solid rgba(100, 220, 255, 0.2); }

/* ── Game Cards ── */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(166, 120, 232, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(166, 120, 232, 0.12);
}
.game-card .game-art {
  height: 180px;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--bg2), var(--surface2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-card .game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.game-card:hover .game-art img {
  transform: scale(1.08);
}
.game-card .game-content {
  padding: 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-card .game-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.game-card .game-meta {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.game-card .play-btn {
  margin-top: auto;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  opacity: 0;
  transform: translateY(10px);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.game-card:hover .play-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ── Tournament Cards ── */
.tournament-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.tournament-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tournament-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 120, 232, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(166, 120, 232, 0.08);
}
.tournament-banner {
  height: 180px;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, var(--bg2), var(--surface2));
}
.tournament-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tournament-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 8, 16, 0.9) 0%, transparent 45%);
}
.tournament-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tournament-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.tournament-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.tournament-stats {
  display: flex;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.tournament-stat {
  text-align: center;
  flex: 1;
}
.tournament-stat .stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--neon);
}
.tournament-stat .stat-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}
.countdown-timer {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.05em;
  display: inline-flex;
  gap: 0.3rem;
}

/* ── Tournament Detail Page ── */
.tournament-hero {
  position: relative;
  height: 380px;
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 2rem;
}
.tournament-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tournament-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 8, 16, 0.95) 0%, rgba(10, 8, 16, 0.95) 100%);
  z-index: 1;
}
.tournament-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 2rem;
}

/* ── Bracket UI ── */
.bracket {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  padding: 1.5rem 0;
  scroll-behavior: smooth;
}
.bracket::-webkit-scrollbar { height: 6px; }
.bracket::-webkit-scrollbar-thumb { background: var(--neon-glow); border-radius: 3px; }
.bracket-round {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-width: 180px;
  flex-shrink: 0;
}
.bracket-round-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: center;
  margin-bottom: 1rem;
}
.bracket-match {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}
.bracket-match::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: -1rem;
  left: 50%;
  width: 2px;
  background: var(--border);
  transform: translateX(-50%);
}
.bracket-match:last-child::before { height: calc(100% + 1rem); }
.bracket-player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.bracket-player:hover {
  background: var(--surface2);
  border-color: rgba(166, 120, 232, 0.15);
}
.bracket-player.winner {
  border-color: var(--neon);
  background: rgba(166, 120, 232, 0.05);
}

/* ── Leaderboard ── */
.leaderboard-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.leaderboard-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.leaderboard-tab {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  border-bottom: 2px solid transparent;
}
.leaderboard-tab:hover { color: var(--text); }
.leaderboard-tab.active {
  color: var(--neon);
  border-bottom-color: var(--neon);
}
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
.leaderboard-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.leaderboard-row {
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.leaderboard-row:hover {
  background: rgba(166, 120, 232, 0.03);
}
.leaderboard-row.top3 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.06) 0%, transparent 100%);
}
.leaderboard-row .rank {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}
.rank-1 { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.rank-2 { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.3); }
.rank-3 { color: #cd7f00; text-shadow: 0 0 10px rgba(205, 127, 0, 0.3); }
.rank-neon { color: var(--neon); text-shadow: 0 0 10px var(--neon-glow); }

/* ── Leaderboard time-window panels (global / weekly / monthly) ── */
.leaderboard-tab {
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: 'Rajdhani', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.lb-panel { display: none; }
.lb-panel.active { display: block; animation: lbPanelIn 160ms var(--ease); }
@keyframes lbPanelIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.lb-window-chip {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.12rem 0.34rem;
  border-radius: 999px;
  color: var(--neon);
  border: 1px solid var(--neon);
  background: rgba(166, 120, 232, 0.08);
  line-height: 1;
}
.lb-hint {
  padding: 0.55rem 1rem;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(166, 120, 232, 0.02);
  letter-spacing: 0.02em;
}
.lb-you-badge {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  color: #0c1210;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow);
}
.leaderboard-row.me {
  background: linear-gradient(90deg, rgba(166, 120, 232, 0.10) 0%, rgba(166, 120, 232, 0.02) 100%);
  box-shadow: inset 3px 0 0 var(--neon);
}
[dir="rtl"] .leaderboard-row.me { box-shadow: inset -3px 0 0 var(--neon); }
.lb-rule-chip {
  font-size: 0.74rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: var(--surface2);
}
@media (prefers-reduced-motion: reduce) {
  .lb-panel.active { animation: none; }
}

/* ── Player Profile ── */
.profile-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.profile-card:hover {
  border-color: rgba(166, 120, 232, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, var(--neon), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 800;
  color: #000;
  border: 3px solid var(--neon-glow);
}
.profile-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.profile-level {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.72rem;
  color: var(--amber);
  background: rgba(255, 180, 84, 0.1);
  border: 1px solid rgba(255, 180, 84, 0.2);
  margin-bottom: 1rem;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.profile-stat {
  text-align: center;
  padding: 0.75rem;
  background: var(--surface2);
  border-radius: var(--r);
  border: 1px solid var(--border);
}
.profile-stat .stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.profile-stat .stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}
.stat-green .stat-num { color: var(--neon); }
.stat-purple .stat-num { color: var(--purple); }
.stat-blue .stat-num { color: var(--blue); }

/* Achievements */
.achievements {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}
.achievement {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
.achievement:hover {
  background: var(--surface);
  border-color: rgba(166, 120, 232, 0.1);
  transform: translateY(-1px);
}
.achievement.unlocked { color: var(--text); }
.achievement.locked { color: var(--text-muted); opacity: 0.5; }

/* ── Dashboard ── */
.dashboard-welcome {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text);
}
.dashboard-welcome .greeting {
  background: linear-gradient(90deg, var(--text) 0%, var(--neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dashboard-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.dashboard-stat-card:hover {
  border-color: rgba(166, 120, 232, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}
.dashboard-stat-card .stat-num {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 20px var(--neon-glow);
}
.dashboard-stat-card .stat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

/* ── Rewards / XP ── */
.reward-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.reward-card:hover {
  border-color: rgba(166, 120, 232, 0.15);
  transform: translateY(-4px);
}
.reward-level {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.reward-level .level-num { color: var(--neon); }

/* XP Progress Bar */
.xp-bar {
  width: 100%;
  height: 12px;
  background: var(--surface2);
  border-radius: 50px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.xp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--neon-dim));
  border-radius: 50px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}
.xp-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

/* ── Prize Pool Stats ── */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.prize-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background-color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
}
.prize-card:hover {
  border-color: rgba(166, 120, 232, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}
.prize-card .prize-amount {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 20px var(--neon-glow);
}
.prize-card .prize-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}
.prize-total .prize-amount {
  font-size: clamp(2rem, 4vw, 2.75rem);
  color: var(--amber);
  text-shadow: 0 0 30px var(--amber-glow);
}

/* ── Stats Number Animation ── */
.stat-num-animated {
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  transition: transform 0.5s ease, opacity 0.5s ease, background-color 0.5s ease, background 0.5s ease, border-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease;
}

/* ── How It Works ── */
.how-it-works {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.how-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.how-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon-dim));
  color: #000;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--neon-glow);
}
.how-step-content {
  flex: 1;
}
.how-step-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.how-step-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Process Steps (Horizontal) ── */
.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}
.process-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 120px;
  position: relative;
}
.process-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  top: 14px;
  right: -50%;
  color: var(--text-dim);
  font-size: 1.2rem;
}
.process-step .step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon), var(--neon-dim));
  color: #000;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  box-shadow: 0 0 15px var(--neon-glow);
}
.process-step .step-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

/* ── Empty States ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-dim);
}
.empty-state .empty-icon {
  font-size: 3.5rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}
.empty-state .empty-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.empty-state .empty-desc {
  font-size: 0.85rem;
  margin-bottom: 1rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Error States ── */
.error-state {
  text-align: center;
  padding: 3rem 1.5rem;
}
.error-state .error-code {
  font-family: 'Orbitron', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--pink);
  margin-bottom: 0.5rem;
}
.error-state .error-title {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.error-state .error-desc {
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* ── Stats Counter ── */
.stats-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ── Match Card ── */
.match-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.match-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 120, 232, 0.15);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem;
  gap: 0.5rem;
}
.match-team {
  flex: 1;
  text-align: center;
}
.match-team-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}
.match-team-score {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--neon);
  font-family: 'Orbitron', sans-serif;
}
.match-vs {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ── Game Logos for Footer ── */
.game-logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.game-logo-strip .glogo {
  opacity: 0.45;
  filter: grayscale(60%);
  transition: opacity 0.2s var(--ease), filter 0.2s var(--ease);
}
.game-logo-strip .glogo:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE FIXES
   ══════════════════════════════════════════════════════════════════ */

/* Medium desktops & tablets landscape (992px - 1199px) */
@media (max-width: 1199px) {
  .container { padding: 0 1.25rem; }
  h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
  h2 { font-size: clamp(1.4rem, 3.8vw, 2.5rem); }
  .tournament-grid,
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
}

/* Tablets portrait & small laptops (768px - 991px) */
@media (max-width: 991px) {
  .container { max-width: 100%; padding: 0 1rem; }
  body { font-size: 0.95rem; }
  .btn { padding: 0.65rem 1.5rem; font-size: 0.9rem; }
  .btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
  .card { padding: 1.25rem; }
  .stat-cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .section { padding: 3rem 0; }
  .navbar { padding: 0.7rem 1rem; }
  /* Collapse some nav links on tablet */
  .nav-links .nav-link { font-size: 0.82rem; padding: 0.45rem 0.8rem; }
}

/* Mobile landscape & large phones (640px - 767px) */
@media (max-width: 767px) {
  .section { padding: 2rem 0; }
  h1 { font-size: clamp(1.6rem, 6vw, 2.5rem); }
  h2 { font-size: clamp(1.2rem, 5vw, 1.8rem); }
  h3 { font-size: clamp(1rem, 4vw, 1.3rem); }
  .hero { min-height: 70vh; padding: 3rem 1rem; }
  .hero-ctas { flex-direction: column; gap: 0.75rem; }
  .hero-ctas .btn { width: 100%; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; justify-content: center; }
  .tournament-grid,
  .game-grid,
  .dashboard-stats,
  .prize-grid { grid-template-columns: 1fr; gap: 1rem; }
  .bracket { gap: 1rem; }
  .bracket-round { min-width: 140px; }
  .process-steps { gap: 0.5rem; }
  .process-step .step-num { width: 36px; height: 36px; font-size: 0.9rem; }
  .leaderboard-table { font-size: 0.8rem; }
  .leaderboard-table td,
  .leaderboard-table th { padding: 0.4rem 0.5rem; }
}

/* Mobile portrait (480px - 639px) */
@media (max-width: 639px) {
  .container { padding: 0 0.85rem; }
  .card, .profile-card, .dashboard-stat-card, .prize-card { padding: 1rem; }
  .btn { padding: 0.6rem 1.25rem; font-size: 0.88rem; }
  .btn-sm { padding: 0.45rem 0.85rem; font-size: 0.78rem; }
  .btn-lg { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1rem; }
  .stat-cards { grid-template-columns: 1fr; gap: 0.85rem; }
  .badge { font-size: 0.65rem; padding: 0.2rem 0.6rem; }
  .nav-logo { font-size: 1.1rem; }
  /* Mobile navbar */
  .nav-links { display: none; }
  .mobile-menu-btn { display: flex !important; }
}

/* Very small screens (360px - 479px) */
@media (max-width: 479px) {
  body { font-size: 0.9rem; }
  .container { padding: 0 0.65rem; }
  .card, .profile-card { padding: 0.85rem; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.15rem; }
  h3 { font-size: 0.95rem; }
  .btn { font-size: 0.82rem; padding: 0.55rem 1rem; }
  .badge { font-size: 0.62rem; }
}

/* Small phones (<360px) */
@media (max-width: 359px) {
  body { font-size: 0.88rem; }
  .container { padding: 0 0.5rem; }
  .card, .profile-card { padding: 0.7rem; }
  h1 { font-size: 1.2rem; }
  h2 { font-size: 1.05rem; }
  h3 { font-size: 0.9rem; }
  .btn { font-size: 0.78rem; padding: 0.45rem 0.8rem; }
}

/* Horizontal scroll prevention (duplicate block, same fix — `clip` keeps
   position:sticky working; `hidden` disabled the sticky navbar) */
html, body { overflow-x: clip; max-width: 100vw; }
* { max-width: 100%; }
img { max-width: 100%; height: auto; }

/* Touch-friendly tap targets */
@media (pointer: coarse) {
  .btn, button, a, input, select, textarea { min-height: 44px; }
  .btn-sm { min-height: 38px; }
}

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

/* ══════════════════════════════════════════════════════════════════
   MOBILE NAVBAR — Hamburger + Slide Menu
   ══════════════════════════════════════════════════════════════════ */

.mobile-menu-btn {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 1.4rem;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
  align-items: center;
  justify-content: center;
}
.mobile-menu-btn:hover {
  border-color: var(--neon);
  color: var(--neon);
  transform: scale(1.05);
}

/* Mobile slide menu */
.mobile-nav {
  display: none;
}
.mobile-nav.open {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(10, 8, 16, 0.98);
  backdrop-filter: blur(20px);
  padding: 1.5rem;
  overflow-y: auto;
}

/* Mobile nav overlay backdrop */
.mobile-nav-backdrop {
  display: none;
}
.mobile-nav-backdrop.show {
  display: block;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  backdrop-filter: blur(4px);
}
/* ════════════════════════════════════════════════════════════════
   Task 11 — Winner announcement podium + leaderboard player stats
   ════════════════════════════════════════════════════════════════ */

/* — Leaderboard: matches · wins subtitle under player name — */
.lb-player-sub {
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leaderboard-row.me .lb-player-sub { color: var(--neon); opacity: 0.85; }
[dir="rtl"] .lb-player-sub { direction: rtl; }

/* — Winners announcement card (tournament detail) — */
.winners-announce {
  position: relative;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: var(--r-md, 14px);
  background:
    radial-gradient(1200px 300px at 50% -80px, rgba(249, 115, 22, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(249, 115, 22, 0.05), rgba(11, 14, 20, 0.6));
  padding: 1.5rem;
  overflow: hidden;
}
.winners-announce::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(249, 115, 22, 0.55), rgba(166, 120, 232, 0.25), rgba(249, 115, 22, 0.55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.wa-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber, #f59e0b);
  margin-bottom: 1.25rem;
  text-shadow: 0 0 24px rgba(249, 115, 22, 0.45);
}
.wa-trophy { font-size: 1.5rem; filter: drop-shadow(0 0 12px rgba(249, 115, 22, 0.6)); }
.wa-conf { font-size: 0.9rem; animation: wa-pop 1.6s ease-in-out infinite; }
@keyframes wa-pop {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; }
}
.wa-podium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.wa-winner {
  position: relative;
  text-align: center;
  padding: 1.25rem 0.75rem 1rem;
  border-radius: var(--r-sm, 10px);
  background: var(--surface2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.wa-winner:hover { transform: translateY(-3px); }
.wa-gold   { border-color: rgba(249, 115, 22, 0.5);  box-shadow: 0 0 26px rgba(249, 115, 22, 0.16); }
.wa-silver { border-color: rgba(203, 213, 225, 0.4); box-shadow: 0 0 18px rgba(203, 213, 225, 0.10); }
.wa-bronze { border-color: rgba(180, 121, 66, 0.45); box-shadow: 0 0 18px rgba(180, 121, 66, 0.12); }
.wa-medal { font-size: 1.6rem; margin-bottom: 0.4rem; }
.wa-avatar {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon, #A678E8), var(--purple, #8b5cf6));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  color: #000;
}
.wa-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-id { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.1rem; }
.wa-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
}
.wa-prize { color: var(--amber, #f59e0b); font-weight: 700; font-family: 'Orbitron', sans-serif; }
.wa-pts { color: var(--neon, #A678E8); font-weight: 600; }
.wa-title {
  margin-top: 0.6rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber, #f59e0b);
}
@media (prefers-reduced-motion: reduce) {
  .wa-conf { animation: none; }
  .wa-winner, .wa-winner:hover { transform: none; transition: none; }
}

/* — Results cards on tournaments list (winners announced) — */
.results-winners {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0 0.75rem;
}
.result-winner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.rw-medal { font-size: 0.95rem; flex: none; }
.rw-avatar {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon, #A678E8), var(--purple, #8b5cf6));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #000;
}
.rw-name {
  font-weight: 600;
  color: var(--amber, #f59e0b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tournament-finished .tournament-banner img { filter: grayscale(0.35) brightness(0.8); }

/* ════════════════════════════════════════════════════════════════
   Task 12 — Results history + player profile + responsive layouts
   ════════════════════════════════════════════════════════════════ */
.rw-prize {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  color: var(--amber, #f59e0b);
  font-weight: 700;
}
.result-winner .rw-name:hover { color: var(--neon, #A678E8); }

@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr !important; }
  .results-layout > div:last-child { order: -1; }
  .profile-layout { grid-template-columns: 1fr !important; }
}
@media (max-width: 560px) {
  .result-row { padding: 0.9rem !important; }
  .profile-layout { gap: 1.25rem !important; }
}

/* ══════════════════════════════════════════════════════════════════
   Task 14 — Sticky register bar + rules-only registration modal
   ══════════════════════════════════════════════════════════════════ */

/* ── Sticky register bar (follows scroll, always in view) ─────────── */
.tdx-stickybar {
  position: sticky;
  top: 64px; /* JS syncs this to the real navbar height */
  z-index: 90;
  margin: 0 0 1.25rem;
  background: rgba(10, 13, 17, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(166, 120, 232, 0.25);
  border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.tdx-sticky-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tdx-sticky-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  flex: 1;
}
.tdx-sticky-game {
  font-size: 0.75rem;
  color: var(--text-muted, var(--text-dim));
  white-space: nowrap;
  flex-shrink: 0;
}
.tdx-sticky-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.tdx-sticky-fee { flex-shrink: 0; }
.tdx-sticky-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.tdx-sticky-join {
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(166, 120, 232, 0.35);
}

/* ── Rules-only modal ─────────────────────────────────────────────── */
.tdx-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(4, 6, 9, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: tdxFadeIn 0.18s ease-out;
}
.tdx-modal-overlay[hidden] { display: none; }
.tdx-modal {
  width: 100%;
  max-width: 560px;
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--bg2, #0c0f14);
  border: 1px solid rgba(255, 180, 84, 0.35);
  border-radius: var(--r);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 180, 84, 0.08);
  overflow: hidden;
  animation: tdxPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tdx-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--amber);
  flex-shrink: 0;
}
.tdx-modal-close {
  background: none;
  border: none;
  color: var(--text-muted, var(--text-dim));
  font-size: 1.05rem;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  line-height: 1;
}
.tdx-modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.tdx-modal-body {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.tdx-modal-foot {
  padding: 0.9rem 1.15rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-shrink: 0;
  background: rgba(255, 180, 84, 0.04);
}
.tdx-rule-line {
  font-size: 0.86rem;
  color: var(--text-dim);
  line-height: 1.85;
  padding: 0.28rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
.tdx-rule-line:last-of-type { border-bottom: none; }
.tdx-rule-note {
  margin-top: 0.75rem;
  font-size: 0.74rem;
  color: var(--text-muted, var(--text-dim));
  font-style: italic;
}
.tdx-agree {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.5;
  user-select: none;
}
.tdx-agree input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.12rem;
  accent-color: var(--neon);
  flex-shrink: 0;
  cursor: pointer;
}
@keyframes tdxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tdxPop {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* RTL mirror */
[dir="rtl"] .tdx-sticky-inner { flex-direction: row; }

/* Responsive */
@media (max-width: 720px) {
  .tdx-sticky-game { display: none; }
  .tdx-sticky-title { font-size: 0.78rem; }
  .tdx-sticky-inner { padding: 0.55rem 0.8rem; }
  .tdx-modal { max-height: 88vh; }
  .tdx-modal-body { padding: 0.85rem 0.95rem; }
}

/* Reduced-motion: no modal animation */
@media (prefers-reduced-motion: reduce) {
  .tdx-modal-overlay,
  .tdx-modal { animation: none; }
  .tdx-stickybar { scroll-behavior: auto; }
  .tdx-fab { animation: none; }
}

/* ── Floating bottom register button (FAB) ─────────────────────────
   "هر دو" — sticky top bar + floating button so a registration path is
   ALWAYS in view. RTL-aware via logical inset, pure CSS, zero JS.      */
.tdx-fab {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-start: 1.25rem; /* RTL-safe: left in LTR, right in RTL */
  z-index: 95;                 /* above navbar(?) and stickybar(90), below modal(1000) */
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(166, 120, 232, 0.45);
  background: linear-gradient(135deg, rgba(166, 120, 232, 0.16), rgba(166, 120, 232, 0.07));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--neon);
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(166, 120, 232, 0.28);
  animation: tdxFadeIn 0.25s ease both;
}
.tdx-fab:hover { filter: brightness(1.12); }
.tdx-fab-icon { font-size: 1rem; line-height: 1; }
.tdx-fab-amber { border-color: rgba(255, 193, 7, 0.5); color: var(--amber); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 22px rgba(255,193,7,.22); }
@media (max-width: 720px) {
  /* Mobile: sit above the bottom-nav (~4.7rem tall) instead of behind it */
  .tdx-fab { bottom: calc(4.9rem + env(safe-area-inset-bottom, 0px)); inset-inline-start: 1rem; padding: 0.72rem 1rem; font-size: 0.74rem; }
}

/* ── PWA install banner ─────────────────────────────────────────────
   Shown by JS when `beforeinstallprompt` fires (Android/desktop Chrome)
   or on iOS as an "Add to Home Screen" guide. Anchored on the opposite
   side of the FAB (logical inset) so the two never collide.            */
.pwa-install {
  position: fixed;
  bottom: 1.25rem;
  inset-inline-end: 1.25rem;   /* opposite side of the FAB (RTL-safe) */
  z-index: 96;                  /* above FAB(95), below modals(1000) */
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(430px, calc(100vw - 2.5rem));
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(166, 120, 232, 0.35);
  background: rgba(10, 15, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 26px rgba(166, 120, 232, 0.14);
  animation: tdxFadeIn 0.3s ease both;
}
.pwa-install[hidden] { display: none; }
.pwa-install-appicon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  box-shadow: 0 0 16px rgba(166, 120, 232, 0.25);
}
.pwa-install-body { flex: 1; min-width: 0; }
.pwa-install-title {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  font-size: 0.82rem; color: var(--neon); letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}
.pwa-install-text { font-size: 0.74rem; color: var(--text-dim); line-height: 1.5; }
.pwa-install-btn {
  flex-shrink: 0;
  padding: 0.55rem 1.05rem; border-radius: 999px;
  border: 1px solid rgba(166, 120, 232, 0.5);
  background: linear-gradient(135deg, rgba(166, 120, 232, 0.22), rgba(166, 120, 232, 0.1));
  color: var(--neon); font-family: 'Orbitron', sans-serif;
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em;
  cursor: pointer; transition: filter 0.15s ease;
}
.pwa-install-btn:hover { filter: brightness(1.15); }
.pwa-install-close {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-size: 0.7rem; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pwa-install-close:hover { color: var(--text); border-color: var(--neon); }
@media (max-width: 720px) {
  .pwa-install {
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    width: auto;
    /* stack ABOVE the raised FAB (4.9rem) + its height (~2.6rem) */
    bottom: calc(7.8rem + env(safe-area-inset-bottom, 0px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .pwa-install { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════
   Game CSS logos — typographic monograms with per-game brand colors
   (user-selected "lightest mode": zero image downloads, instant paint)
   Usage: <span class="glogo glogo-cs2">CS2</span>  sizes: glogo-xs/sm/md/lg/xl/hero
   ══════════════════════════════════════════════════════════════════ */
.glogo {
  --gl-c1: #6b30df; --gl-c2: #3c1a86;   /* fallback brand gradient */
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2%;
  flex-shrink: 0;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,0.16), transparent 55%),
    linear-gradient(135deg, var(--gl-c1), var(--gl-c2));
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 14px rgba(0,0,0,0.38);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  user-select: none;
}
.glogo::after {           /* subtle diagonal sheen */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.10) 50%, transparent 58%);
  pointer-events: none;
}
.glogo-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.42em;
  letter-spacing: 0.14em;
  opacity: 0.85;
  text-transform: uppercase;
  line-height: 1;
}

/* Sizes (square box; font scales with box) */
.glogo-xs { width: 34px;  height: 34px;  font-size: 11px;  border-radius: 8px; }
.glogo-sm { width: 46px;  height: 46px;  font-size: 14px;  border-radius: 10px; }
.glogo-md { width: 64px;  height: 64px;  font-size: 19px;  border-radius: 12px; }
.glogo-lg { width: 92px;  height: 92px;  font-size: 26px;  border-radius: 16px; }
.glogo-xl { width: 132px; height: 132px; font-size: 36px;  border-radius: 20px; }

/* ── Per-game brand colors ───────────────────────────────────────── */
.glogo-cs2       { --gl-c1: #f0a824; --gl-c2: #7a4a08; }  /* Counter-Strike: amber/gold on brown  */
.glogo-valorant  { --gl-c1: #ff4655; --gl-c2: #7a1f2b; }  /* VALORANT: signature red              */
.glogo-codm      { --gl-c1: #5c7c3c; --gl-c2: #22301a; }  /* CoD: military olive                  */
.glogo-pubgm     { --gl-c1: #f2a900; --gl-c2: #6e4a00; }  /* PUBG: golden yellow                  */
.glogo-freefire  { --gl-c1: #ff6a1a; --gl-c2: #8a2500; }  /* Free Fire: blazing orange            */
.glogo-efootball { --gl-c1: #1e5bd6; --gl-c2: #0a1e52; }  /* eFootball: deep pitch blue           */
.glogo-lol       { --gl-c1: #c8aa6e; --gl-c2: #0a1428; }  /* LoL: hextech gold on navy            */
.glogo-dota2     { --gl-c1: #b1442e; --gl-c2: #3d120c; }  /* Dota 2: red on dark                  */

/* Hero banner variant (tournament detail / game page): full-bleed gradient */
.glogo-hero {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 0.6rem;
}
.glogo-hero .glogo-hero-name {
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  letter-spacing: 0.06em;
}
.glogo-hero .glogo-hero-icon { font-size: clamp(2rem, 6vw, 4rem); line-height: 1; }
.glogo-hero::before {        /* large ghost monogram in the corner */
  content: attr(data-mono);
  position: absolute;
  inset-inline-end: -0.06em;
  bottom: -0.28em;
  font-size: clamp(6rem, 18vw, 13rem);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.07);
  line-height: 1;
  pointer-events: none;
  z-index: -1;
}

/* ── Container compat for CSS logos ──────────────────────────────── */
.game-art .game-badge {
  position: absolute;
  top: 0.6rem;
  inset-inline-end: 0.6rem;
  z-index: 2;
  background: rgba(6, 9, 12, 0.72);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tournament-banner {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Badges float at the bottom of the banner; logo owns the center. */
.tournament-banner .banner-overlay { position: absolute; inset: 0; }
.tournament-banner .banner-meta {
  position: absolute;
  bottom: 0.65rem;
  inset-inline-start: 0.65rem;
  z-index: 2;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.featured-banner {
  position: relative;
  min-height: 240px;
  overflow: hidden;
}
.featured-banner .glogo-hero { position: absolute; inset: 0; z-index: 0; }
.featured-banner .featured-overlay { position: relative; z-index: 1; }
.featured-banner .featured-content { position: relative; z-index: 2; }
.tournament-hero .glogo-hero { position: absolute; inset: 0; }
.tournament-hero .hero-content { position: relative; z-index: 2; }
/* The CSS-logo hero is always a dark brand gradient → keep hero text light
   in BOTH themes for contrast (was var(--text), dark in light theme). */
.tournament-hero .hero-content,
.tournament-hero .hero-headline { color: #f4f7fa; }
.tournament-hero .hero-content p { color: rgba(233, 240, 246, 0.82) !important; }
.tournament-hero .stat-label,
.tournament-hero .tournament-stat .stat-num { color: #f4f7fa; }
.tournament-hero .tournament-stat .stat-num[style*="neon"] { color: var(--neon) !important; }
.tournament-hero .tournament-stat .stat-num[style*="amber"] { color: var(--amber) !important; }
/* Overlay was tuned for photo art; CSS gradient logos need it much lighter
   so the brand colors stay visible under the headline. */
.tournament-hero::after {
  background: linear-gradient(to bottom, rgba(10, 8, 16, 0.35) 0%, rgba(10, 8, 16, 0.72) 100%);
}
.hero-headline { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55); }

/* ══════════════════════════════════════════════════════════════════
   Task 17 — FARM GAME re-theme signature layer
   Reference language: dusty speckled paper, plum-charcoal darkness,
   violet→indigo metallic gradient, cinematic diagonal split.
   ══════════════════════════════════════════════════════════════════ */

:root {
  --grad-brand: linear-gradient(135deg, #8C64EB, #5F6FD3);
  --grad-brand-bright: linear-gradient(135deg, #A678E8, #5F6FD3);
  --grain-opacity: 0.05;
}
[data-theme="light"] {
  --grain-opacity: 0.085;
}

/* ── Cinematic speckle/grain — the dusty film of the reference art ──
   Tiled SVG turbulence, fixed, non-interactive, GPU-cheap.            */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
}

/* ── Diagonal split sheen — the banner's two-tone cut ── */
.tournament-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(115deg,
      transparent 44%,
      rgba(166, 120, 232, 0.14) 44.25%,
      rgba(95, 111, 211, 0.20) 72%,
      rgba(19, 16, 25, 0.55) 98%);
}
.featured-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(115deg,
    transparent 58%,
    rgba(166, 120, 232, 0.10) 58.25%,
    rgba(95, 111, 211, 0.14) 100%);
}

/* Brand gradient text helper — the FARM wordmark treatment */
.grad-text {
  background: var(--grad-brand-bright);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .grad-text {
  background: linear-gradient(135deg, #7B52D6, #5468C8);
  -webkit-background-clip: text;
  background-clip: text;
}

@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}
