/* ========================================
   STOCK LIGA - CSS STYLESHEET v4.1
   "Where 0-0 Becomes A Rainbow"
   BRIGHT VIBRANT BLUE EDITION
   ======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES (THEME)
   ======================================== */
:root {
  /* SUPER BRIGHT Vibrant Blue Gradient Palette */
  --bg-gradient-start: #1565c0;
  --bg-gradient-mid: #1e88e5;
  --bg-gradient-end: #42a5f5;
  --bg-accent: #64b5f6;
  
  /* Card Backgrounds - Glassmorphism */
  --card-bg: rgba(21, 101, 192, 0.45);
  --card-bg-hover: rgba(30, 136, 229, 0.55);
  --card-border: rgba(144, 202, 249, 0.35);
  --card-border-hover: rgba(144, 202, 249, 0.6);
  
  /* Text Colors - HIGH CONTRAST for blue backgrounds */
  --text-primary: #ffffff;
  --text-secondary: #e0f2fe;
  --text-muted: #bae6fd;
  
  /* Accent Colors - OPTIMIZED FOR BLUE BACKGROUNDS */
  --accent-primary: #7dd3fc;
  --accent-secondary: #38bdf8;
  --accent-green: #4ade80;
  --accent-green-bright: #86efac;
  --accent-red: #fca5a5;
  --accent-purple: #c084fc;
  --accent-orange: #fbbf24;
  --accent-yellow: #fde047;
  --accent-pink: #f472b6;
  --accent-cyan: #22d3ee;
  --accent-white: #f0f9ff;
  
  /* Chart Colors - WHITE + DARK YELLOW for blue bg */
  --chart-home: #ffffff;
  --chart-away: #fbbf24;
  
  /* Title gradient - pure white to yellow */
  --rainbow: linear-gradient(135deg, #fbbf24 0%, #fbbf24 100%);
  
  /* Glow Effects */
  --glow-blue: 0 0 30px rgba(33, 150, 243, 0.5);
  --glow-green: 0 0 20px rgba(76, 175, 80, 0.5);
  --glow-red: 0 0 20px rgba(244, 67, 54, 0.5);
  
  /* Fonts */
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'Inter Tight', sans-serif;
  
  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  
  /* Border */
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 22px;
  --border-radius-xl: 32px;
  
  /* Shadows */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(144, 202, 249, 0.2);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(33, 150, 243, 0.2);
}


/* ========================================
   RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-display);
  background: linear-gradient(135deg, 
    var(--bg-gradient-start) 0%, 
    var(--bg-gradient-mid) 35%, 
    var(--bg-gradient-end) 65%,
    var(--bg-accent) 100%
  );
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(13, 71, 161, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #42a5f5, #1976d2);
  border-radius: 5px;
  border: 2px solid rgba(13, 71, 161, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #64b5f6, #2196f3);
}


/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(3%, 4%) rotate(2deg) scale(1.02); }
  50% { transform: translate(-2%, 6%) rotate(-1deg) scale(0.98); }
  75% { transform: translate(-4%, 2%) rotate(1deg) scale(1.01); }
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.5),
                0 0 60px rgba(66, 165, 245, 0.3);
  }
  50% { 
    box-shadow: 0 0 40px rgba(33, 150, 243, 0.7),
                0 0 100px rgba(66, 165, 245, 0.5);
  }
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes fade-up {
  from { 
    opacity: 0; 
    transform: translateY(30px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes shine {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes number-cascade {
  0% { 
    opacity: 0; 
    transform: translateY(-50px) scale(0.5);
  }
  50% {
    opacity: 1;
    transform: translateY(0) scale(1.1);
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1);
  }
}

@keyframes breathe {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.08; }
}

@keyframes draw-line {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

@keyframes pop-in {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.animate-fade-up {
  animation: fade-up 0.6s ease-out forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }


/* ========================================
   BACKGROUND EFFECTS
   ======================================== */
.bg-effects {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.bg-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.6) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-duration: 25s;
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(171, 71, 188, 0.5) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-duration: 30s;
  animation-direction: reverse;
}

.bg-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.4) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  animation-duration: 22s;
}

.bg-orb-4 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(233, 30, 99, 0.3) 0%, transparent 70%);
  top: 15%;
  right: 15%;
  animation-duration: 28s;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}


/* ========================================
   CONTAINER & LAYOUT
   ======================================== */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.main-content {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0;
}


/* ========================================
   HEADER / HERO
   ======================================== */
.hero {
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  animation: fade-up 0.6s ease-out forwards;
}

.hero-badge-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 10px var(--accent-green);
}

.hero-title {
  font-size: clamp(56px, 12vw, 120px);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 0.9;
  margin-bottom: var(--space-md);
  background: var(--rainbow);
  -webkit-background-clip: text;
 
  background-clip: text;
  animation: fade-up 0.6s ease-out 0.1s forwards;
  opacity: 0;
  text-shadow: 0 0 80px rgba(33, 150, 243, 0.5);
}

.hero-tagline {
  font-size: clamp(18px, 3vw, 26px);
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: var(--space-2xl);
  animation: fade-up 0.6s ease-out 0.2s forwards;
  opacity: 0;
}


/* ========================================
   STATS BAR
   ======================================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  animation: fade-up 0.6s ease-out 0.3s forwards;
  opacity: 0;
}

.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  text-align: left;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--stat-color, var(--accent-primary));
  box-shadow: 0 0 20px var(--stat-color, var(--accent-primary));
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  border-color: var(--stat-color, var(--accent-primary));
  box-shadow: var(--shadow-elevated);
}

.stat-card:hover::after {
  left: 200%;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.stat-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  font-weight: 500;
}

.stat-positive { color: var(--accent-green); }
.stat-negative { color: var(--accent-red); }


/* ========================================
   LIVE TICKER
   ======================================== */
.ticker-wrapper {
  background: rgba(13, 71, 161, 0.6);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: var(--space-md) 0;
  margin: var(--space-xl) 0;
  overflow: hidden;
  position: relative;
}

.ticker-wrapper::before,
.ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.ticker-wrapper::before {
  left: 0;
  background: linear-gradient(90deg, rgba(13, 71, 161, 0.9), transparent);
}

.ticker-wrapper::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(13, 71, 161, 0.9), transparent);
}

.ticker-track {
  display: flex;
  gap: var(--space-xl);
  animation: ticker-scroll 50s linear infinite;
  width: max-content;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
}

.ticker-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.ticker-item:hover {
  background: rgba(66, 165, 245, 0.3);
  box-shadow: var(--glow-blue), inset 0 0 20px rgba(66, 165, 245, 0.2);
  transform: scale(1.05);
}

.ticker-item:hover::before {
  left: 100%;
}

.ticker-round {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

.ticker-teams {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
  font-size: 13px;
  color: #ffffff;
  text-decoration: none;
}

.ticker-team-name {
  color: #ffffff;
  text-decoration: none;
}

.ticker-item, .ticker-item:hover, .ticker-item:visited {
  text-decoration: none;
}

.ticker-team-logo {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: contain;
}

.ticker-score {
  font-family: var(--font-mono);
  background: rgba(66, 165, 245, 0.25);
  padding: 3px 10px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-cyan);
  border: 1px solid rgba(66, 165, 245, 0.4);
}

.ticker-change {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.ticker-divider {
  width: 1px;
  height: 16px;
  background: var(--card-border);
}


/* ========================================
   NAVIGATION TABS
   ======================================== */
.tabs-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-xl);
}

.tabs {
  display: inline-flex;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xs);
  gap: var(--space-xs);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(66, 165, 245, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 100%);
  color: #1e3a5f;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.tab-btn svg {
  width: 18px;
  height: 18px;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fade-up 0.4s ease-out;
}


/* ========================================
   INSIGHTS GRID
   ======================================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

@media (max-width: 1200px) {
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .insights-grid { grid-template-columns: 1fr; }
}

.insight-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md) var(--space-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.insight-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.insight-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-elevated);
  border-color: var(--card-border-hover);
}

.insight-card:hover::after {
  left: 200%;
}

.insight-icon {
  font-size: 28px;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 0 10px rgba(66, 165, 245, 0.5));
}

.insight-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.insight-value {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 2px;
}

.insight-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
}


/* ========================================
   CHART SECTIONS
   ======================================== */
/* ========================================
   CHART SECTION – HOLOGRAPHIC EDITION
   ======================================== */
.chart-section--holo {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

/* Subtle corner accents */
.chart-section--holo::before,
.chart-section--holo::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  pointer-events: none;
}
.chart-section--holo::before {
  top: 0; left: 0;
  border-top: 2px solid rgba(0, 255, 200, 0.15);
  border-left: 2px solid rgba(0, 255, 200, 0.15);
  border-top-left-radius: var(--border-radius-xl);
}
.chart-section--holo::after {
  bottom: 0; right: 0;
  border-bottom: 2px solid rgba(255, 45, 107, 0.1);
  border-right: 2px solid rgba(255, 45, 107, 0.1);
  border-bottom-right-radius: var(--border-radius-xl);
}

.chart-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.chart-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title-icon {
  color: #00ffc8;
  font-size: 14px;
  text-shadow: 0 0 12px rgba(0, 255, 200, 0.6);
}

.chart-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Transparent chart wrapper — dissolves into the card */
.chart-holo-wrap {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

/* Animated horizontal scanline */
.chart-scanline {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 255, 200, 0.0) 10%,
    rgba(0, 255, 200, 0.2) 40%,
    rgba(0, 255, 200, 0.4) 50%,
    rgba(0, 255, 200, 0.2) 60%,
    rgba(0, 255, 200, 0.0) 90%,
    transparent 100%
  );
  z-index: 3;
  pointer-events: none;
  animation: scanline-sweep 4.5s ease-in-out infinite;
  opacity: 0.6;
  box-shadow: 0 0 16px rgba(0, 255, 200, 0.15);
}

@keyframes scanline-sweep {
  0%   { top: 0%; opacity: 0; }
  5%   { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { top: 100%; opacity: 0; }
}

.chart-container--holo {
  width: 100%;
  overflow-x: auto;
  padding: 8px 0;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
}

.chart-container svg {
  display: block;
}

/* ── Line draw-in animation ── */
.holo-line {
  stroke-dasharray: var(--dash);
  stroke-dashoffset: var(--dash);
  animation: draw-line-in 1.6s cubic-bezier(0.4, 0, 0.15, 1) forwards;
  animation-delay: var(--delay, 0s);
  filter: drop-shadow(0 0 4px var(--color));
}

@keyframes draw-line-in {
  to { stroke-dashoffset: 0; }
}

/* ── Data-point pop-in ── */
.holo-dot, .holo-halo {
  opacity: 0;
  transform-origin: center;
  animation: dot-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: var(--delay, 0.6s);
}

@keyframes dot-pop {
  0%   { opacity: 0; transform: scale(0); }
  60%  { transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Halo pulse ── */
.holo-halo {
  animation: dot-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             halo-breathe 3s ease-in-out infinite;
  animation-delay: var(--delay, 0.6s), calc(var(--delay, 0.6s) + 0.4s);
}

@keyframes halo-breathe {
  0%, 100% { opacity: 0.25; r: 14; }
  50%      { opacity: 0.45; r: 18; }
}

/* ── Inline legend (header row) ── */
.chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.holo-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.holo-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

/* Chart Legend (fallback / divergence) */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--card-border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}


/* ========================================
   DIVERGENCE CHART
   ======================================== */
.divergence-bar {
  display: flex;
  align-items: center;
  margin-bottom: var(--space-xs);
  height: 40px;
}

.divergence-label {
  width: 140px;
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  padding-right: var(--space-lg);
  color: var(--text-primary);
  white-space: nowrap;
}

.divergence-track {
  flex: 1;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.divergence-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-border);
}

.divergence-fill {
  height: 28px;
  border-radius: var(--border-radius-sm);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
}

.divergence-fill.positive {
  background: linear-gradient(90deg, rgba(134, 239, 172, 0.3), rgba(74, 222, 128, 0.7));
  margin-left: 50%;
  justify-content: flex-start;
  box-shadow: 0 0 15px rgba(74, 222, 128, 0.4);
  border: 1px solid rgba(74, 222, 128, 0.5);
}

.divergence-fill.negative {
  background: linear-gradient(270deg, rgba(254, 178, 178, 0.3), rgba(252, 129, 129, 0.7));
  margin-right: 50%;
  justify-content: flex-end;
  margin-left: auto;
  box-shadow: 0 0 15px rgba(252, 129, 129, 0.4);
  border: 1px solid rgba(252, 129, 129, 0.5);
}

.divergence-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}


/* ========================================
   RANKINGS TAB
   ======================================== */
.rankings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 1000px) {
  .rankings-grid { grid-template-columns: 1fr; }
}

.rankings-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
}

.rankings-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid var(--card-border);
}

.rankings-header-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px rgba(66, 165, 245, 0.5));
}

.rankings-header h2 {
  font-size: 20px;
  font-weight: 700;
}

.rankings-header p {
  font-size: 12px;
  color: var(--text-secondary);
}


/* ========================================
   TEAM CARDS (Stock Rankings) - SMALLER LOGOS
   ======================================== */
.team-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--card-border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.team-card:last-child {
  border-bottom: none;
}

.team-card:hover {
  background: rgba(66, 165, 245, 0.15);
}

.team-rank {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  font-weight: 800;
  font-size: 14px;
  font-family: var(--font-mono);
}

.team-rank.gold {
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #1a1a1a;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.team-rank.silver {
  background: linear-gradient(135deg, #e0e0e0, #a0a0a0);
  color: #1a1a1a;
  box-shadow: 0 0 12px rgba(200, 200, 200, 0.4);
}

.team-rank.bronze {
  background: linear-gradient(135deg, #cd7f32, #a0522d);
  color: white;
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.4);
}

.team-rank.normal {
  background: rgba(66, 165, 245, 0.15);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.team-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.team-badge-wrapper {
  position: relative;
}

/* SMALLER LOGO SIZE - STRICTLY CONSTRAINED */
.team-logo {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  max-width: 32px;
  max-height: 32px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px;
}

.team-details {
  display: flex;
  flex-direction: column;
}

.team-full-name {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 1px;
}

.team-name {
  font-weight: 700;
  font-size: 15px;
}

.team-record {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.team-stats {
  text-align: right;
}

.team-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
}

.team-change {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.team-diff {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: var(--space-sm);
  font-family: var(--font-mono);
}

.team-diff.up {
  background: rgba(76, 175, 80, 0.2);
  color: var(--accent-green);
}

.team-diff.down {
  background: rgba(244, 67, 54, 0.2);
  color: var(--accent-red);
}

.team-diff.same {
  background: rgba(66, 165, 245, 0.15);
  color: var(--text-muted);
}


/* ========================================
   LEAGUE TABLE - SMALLER LOGOS
   ======================================== */
.league-table {
  width: 100%;
  border-collapse: collapse;
}

.league-table th {
  padding: var(--space-md);
  text-align: left;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: rgba(13, 71, 161, 0.3);
  border-bottom: 1px solid var(--card-border);
  font-weight: 700;
}

.league-table th:not(:first-child):not(:nth-child(2)) {
  text-align: center;
}

.league-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--card-border);
}

.league-table tr:last-child td {
  border-bottom: none;
}

.league-table tr:hover {
  background: rgba(66, 165, 245, 0.1);
}

.league-table .pos-badge {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  font-family: var(--font-mono);
}

.league-table .ucl {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
  color: white;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.4);
}

.league-table .rel {
  background: linear-gradient(135deg, var(--accent-red), #d32f2f);
  color: white;
  box-shadow: 0 0 10px rgba(244, 67, 54, 0.4);
}

.league-table .normal {
  background: rgba(66, 165, 245, 0.15);
  color: var(--text-secondary);
}

.league-table .team-cell {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* SMALLER LOGO IN TABLE */
.league-table .team-logo-small {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
}

.league-table .team-color {
  width: 3px;
  height: 22px;
  border-radius: 2px;
}

.league-table td:not(:first-child):not(:nth-child(2)) {
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.league-table .pts {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}


/* ========================================
   MATCHES TAB - SMALLER LOGOS
   ======================================== */
.matches-round {
  margin-bottom: var(--space-xl);
}

.round-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.round-badge {
  padding: var(--space-sm) var(--space-lg);
  background: var(--rainbow);
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(33, 150, 243, 0.4);
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.match-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(66, 165, 245, 0.2), transparent);
  transition: left 0.6s ease;
}

.match-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-elevated), var(--glow-blue);
  border-color: var(--accent-primary);
}

.match-card:hover::before {
  left: 100%;
}

.match-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.match-id {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

.match-score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  padding: 4px 14px;
  background: rgba(66, 165, 245, 0.25);
  border-radius: var(--border-radius-sm);
  color: var(--accent-cyan);
  border: 1px solid rgba(66, 165, 245, 0.4);
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-md);
  align-items: center;
}

.match-team {
  text-align: center;
}

/* SMALLER MATCH LOGO */
.match-team-logo {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-sm);
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
}

.match-team-name-full {
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.match-team-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: var(--space-xs);
}

.match-team-points {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

.match-vs {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 4px 8px;
  background: rgba(66, 165, 245, 0.15);
  border-radius: 50%;
}


/* ========================================
   FOOTER
   ======================================== */
.footer {
  text-align: center;
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--card-border);
  margin-top: var(--space-3xl);
}

.footer-tagline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.footer-tagline span {
  font-size: 24px;
}

.footer-version {
  font-size: 12px;
  color: var(--text-muted);
}


/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-green { color: var(--accent-green-bright); }
.text-red { color: var(--accent-red); }
.text-primary { color: var(--accent-primary); }
.text-purple { color: var(--accent-purple); }
.text-orange { color: var(--accent-orange); }
.text-pink { color: var(--accent-pink); }

.mono { font-family: var(--font-mono); }


/* ========================================
   MATCH DETAIL PAGE STYLES
   ======================================== */
.match-detail-page {
  min-height: 100vh;
  padding: var(--space-xl) 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  padding: var(--space-sm) var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-xl);
  transition: all 0.3s ease;
}

.back-link:hover {
  background: rgba(66, 165, 245, 0.2);
  color: var(--text-primary);
}

/* Match Detail Hero */
.match-detail-hero {
  position: relative;
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  overflow: hidden;
  border-radius: var(--border-radius-xl);
  margin-bottom: var(--space-xl);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.match-detail-bg-numbers {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: clamp(150px, 25vw, 300px);
  font-weight: 900;
  color: rgba(66, 165, 245, 0.08);
  animation: breathe 4s ease-in-out infinite;
  pointer-events: none;
  white-space: nowrap;
}

.match-detail-bg-logos {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-2xl);
  opacity: 0.08;
  pointer-events: none;
}

.match-detail-bg-logos img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.match-detail-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-2xl);
  align-items: center;
  position: relative;
  z-index: 2;
}

.match-detail-team {
  text-align: center;
}

.match-detail-team-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-md);
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(66, 165, 245, 0.4));
  animation: pop-in 0.6s ease-out forwards;
}

.match-detail-team-name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.match-detail-team-full {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.match-detail-score-container {
  text-align: center;
}

.match-detail-score {
  font-family: var(--font-mono);
  font-size: clamp(48px, 10vw, 72px);
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  animation: number-cascade 0.8s ease-out forwards;
}

.match-detail-round {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: var(--space-sm);
}

.match-detail-points {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.match-detail-point {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-sm);
}

.match-detail-point.positive {
  background: rgba(76, 175, 80, 0.2);
  color: var(--accent-green);
  box-shadow: var(--glow-green);
}

.match-detail-point.negative {
  background: rgba(244, 67, 54, 0.2);
  color: var(--accent-red);
  box-shadow: var(--glow-red);
}

/* Section Cards */
.detail-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.detail-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.detail-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.detail-section-header .detail-section-title {
  margin-bottom: 0;
}

/* Timeline */
.timeline-chart {
  height: 160px;
  position: relative;
}

.timeline-legend {
  display: flex;
  gap: var(--space-lg);
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* SWAT Analysis */
.swat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 800px) {
  .swat-grid { grid-template-columns: 1fr; }
}

.swat-card {
  background: rgba(66, 165, 245, 0.1);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}

.swat-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  font-weight: 700;
  font-size: 16px;
}

.swat-card-icon {
  font-size: 24px;
}

.swat-metric {
  margin-bottom: var(--space-md);
}

.swat-metric-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
  font-size: 12px;
}

.swat-metric-label {
  color: var(--text-secondary);
}

.swat-metric-values {
  display: flex;
  gap: var(--space-lg);
  font-family: var(--font-mono);
  font-weight: 700;
}

.swat-metric-bars {
  display: flex;
  gap: 4px;
  height: 10px;
}

.swat-bar-home, .swat-bar-away {
  flex: 1;
  height: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.swat-bar-home {
  display: flex;
  justify-content: flex-end;
}

.swat-bar-away {
  display: flex;
  justify-content: flex-start;
}

.swat-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Factor Breakdown */
.breakdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 800px) {
  .breakdown-grid { grid-template-columns: 1fr; }
}

.breakdown-team {
  background: rgba(66, 165, 245, 0.08);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}

.breakdown-team-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--card-border);
}

.breakdown-team-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.breakdown-team-name {
  font-weight: 700;
  font-size: 16px;
}

.breakdown-away-badge {
  font-size: 9px;
  background: rgba(66, 165, 245, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: auto;
}

.breakdown-category {
  margin-bottom: var(--space-md);
}

.breakdown-category-title {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: var(--space-sm);
  font-weight: 700;
}

.breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 13px;
}

.breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-item-label {
  color: var(--text-primary);
}

.breakdown-item-value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.breakdown-total {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: rgba(76, 175, 80, 0.15);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.breakdown-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}


/* ========================================
   TEAM DETAIL PAGE
   ======================================== */
.team-detail-hero {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  position: relative;
  overflow: hidden;
}

.team-detail-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--team-color, var(--accent-primary));
}

.team-detail-hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.team-detail-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.team-detail-logo-fallback {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 900;
  color: white;
}

.team-detail-info {
  flex: 1;
}

.team-detail-name {
  font-size: 42px;
  font-weight: 900;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.team-detail-league {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-lg);
}

.team-detail-stats-row {
  display: flex;
  gap: var(--space-xl);
}

.team-detail-stat {
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
}

.team-detail-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.team-detail-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-detail-value-section {
  text-align: right;
}

.team-detail-value {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 900;
  color: var(--text-primary);
}

.team-detail-change {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
}

.team-detail-rank {
  margin-top: var(--space-sm);
  font-size: 16px;
  color: var(--text-secondary);
}

.team-detail-rank strong {
  font-size: 24px;
  color: var(--accent-yellow);
}

/* Team Stats Grid */
.team-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .team-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.team-stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  text-align: center;
}

.team-stat-card-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.team-stat-card-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Team Timeline Chart */
.team-timeline-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.team-timeline-section--holo {
  position: relative;
  overflow: hidden;
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
}

/* Corner accents for team detail chart */
.team-timeline-section--holo::before,
.team-timeline-section--holo::after {
  content: '';
  position: absolute;
  width: 70px;
  height: 70px;
  pointer-events: none;
}
.team-timeline-section--holo::before {
  top: 0; left: 0;
  border-top: 2px solid rgba(0, 255, 200, 0.15);
  border-left: 2px solid rgba(0, 255, 200, 0.15);
  border-top-left-radius: var(--border-radius-xl);
}
.team-timeline-section--holo::after {
  bottom: 0; right: 0;
  border-bottom: 2px solid rgba(255, 45, 107, 0.1);
  border-right: 2px solid rgba(255, 45, 107, 0.1);
  border-bottom-right-radius: var(--border-radius-xl);
}

.team-timeline-chart {
  height: 250px;
  position: relative;
}

.team-timeline-chart--holo {
  height: auto;
  width: 100%;
  overflow-x: auto;
  padding: 8px 0;
}

/* Match History */
.team-matches-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.team-match-item {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  margin-bottom: var(--space-sm);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.team-match-item:nth-child(odd) {
  background: rgba(255, 255, 255, 0.03);
}

.team-match-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.team-match-round {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  width: 50px;
}

.team-match-opponent {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
}

.team-match-opponent-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.team-match-opponent-name {
  font-weight: 600;
  color: var(--text-primary);
}

.team-match-venue {
  font-size: 11px;
  color: var(--text-muted);
  width: 50px;
}

.team-match-score {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--border-radius-sm);
  min-width: 60px;
  text-align: center;
}

.team-match-score.win {
  background: rgba(74, 222, 128, 0.2);
  color: var(--accent-green);
}

.team-match-score.draw {
  background: rgba(251, 191, 36, 0.2);
  color: var(--accent-yellow);
}

.team-match-score.loss {
  background: rgba(252, 165, 165, 0.2);
  color: var(--accent-red);
}

.team-match-points {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  width: 80px;
  text-align: right;
}

/* Ranking History */
.team-ranking-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.team-ranking-grid {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.team-ranking-item {
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  min-width: 80px;
}

.team-ranking-item-round {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.team-ranking-item-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
}

/* Factor Categories */
.team-factors-section {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.team-factors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}

@media (max-width: 800px) {
  .team-factors-grid { grid-template-columns: 1fr; }
}

.team-factor-category {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
}

.team-factor-category-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.team-factor-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-factor-row:last-child {
  border-bottom: none;
}

.team-factor-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.team-factor-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}

.team-factor-total {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 2px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}


/* ========================================
   SITE HEADER / NAVIGATION
   Global navigation across all pages
   ======================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(21, 101, 192, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(21, 101, 192, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: var(--space-lg);
}

/* Brand */
.site-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav-brand-icon {
  font-size: 24px;
  line-height: 1;
}

.site-nav-brand-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.5px;
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Links */
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.site-nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.site-nav-link.active {
  color: var(--accent-yellow);
  background: rgba(253, 224, 71, 0.12);
}

.site-nav-link svg {
  opacity: 0.7;
  flex-shrink: 0;
}

.site-nav-link.active svg {
  opacity: 1;
}

/* Hamburger Toggle (hidden on desktop) */
.site-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.site-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.site-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.site-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(13, 71, 161, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  transform: translateX(0);
}

.mobile-nav-drawer-inner {
  padding: 100px var(--space-xl) var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 16px;
  transition: all 0.25s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent-yellow);
  background: rgba(253, 224, 71, 0.1);
}

.mobile-nav-link svg {
  opacity: 0.6;
  flex-shrink: 0;
}

.mobile-nav-link.active svg {
  opacity: 1;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--card-border);
  margin: var(--space-lg) 0;
}

.mobile-nav-tagline {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-md);
}


/* ========================================
   SITE FOOTER
   ======================================== */

.site-footer {
  border-top: 1px solid var(--card-border);
  margin-top: var(--space-3xl);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.site-footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

/* Footer Brand */
.site-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: var(--space-md);
}

.site-footer-logo-icon {
  font-size: 22px;
}

.site-footer-logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  max-width: 320px;
}

.site-footer-tagline-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Footer Columns */
.site-footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-col-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.site-footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.2s ease;
}

a.site-footer-link:hover {
  color: var(--accent-yellow);
}

.site-footer-link.muted {
  color: var(--text-muted);
  opacity: 0.7;
}

.site-footer-link-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.site-footer-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 100px;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-yellow);
  margin-left: 4px;
}

/* Footer Bottom */
.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--card-border);
}

.site-footer-copy {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}


/* ========================================
   LEAGUES PAGE
   ======================================== */

.leagues-hero {
  text-align: center;
  padding: var(--space-3xl) 0 var(--space-xl);
}

.leagues-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.leagues-hero-badge svg {
  opacity: 0.7;
}

.leagues-hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  letter-spacing: -2px;
  background: var(--rainbow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
}

.leagues-hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* Section Labels */
.leagues-section {
  margin-bottom: var(--space-3xl);
}

.leagues-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.leagues-section-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.leagues-section-dot.active {
  background: var(--accent-green);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

.leagues-section-dot.upcoming {
  background: var(--accent-yellow);
  opacity: 0.7;
}

/* League Cards */
.league-card {
  position: relative;
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  border: 1px solid var(--card-border);
  transition: all 0.35s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.league-card-active {
  background: var(--card-bg);
  cursor: pointer;
}

.league-card-active:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.league-card-upcoming {
  background: rgba(21, 101, 192, 0.25);
  opacity: 0.8;
}

.league-card-accent {
  height: 5px;
  width: 100%;
}

.league-card-body {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
}

.league-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.league-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.league-card-info {
  flex: 1;
}

.league-card-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.league-card-country {
  font-size: 14px;
  color: var(--text-muted);
}

/* Status badges */
.league-card-status {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.league-card-status.live {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(74, 222, 128, 0.15);
  color: var(--accent-green);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.league-card-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s ease-in-out infinite;
}

.league-card-status.upcoming {
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent-yellow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Stats row */
.league-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.15);
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-lg);
}

.league-card-stat {
  text-align: center;
}

.league-card-stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
}

.league-card-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* CTA arrow */
.league-card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--border-radius-md);
  background: rgba(253, 224, 71, 0.1);
  border: 1px solid rgba(253, 224, 71, 0.2);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-yellow);
  transition: all 0.25s ease;
}

.league-card-active:hover .league-card-cta {
  background: rgba(253, 224, 71, 0.18);
}

.league-card-cta svg {
  transition: transform 0.25s ease;
}

.league-card-active:hover .league-card-cta svg {
  transform: translateX(4px);
}

/* Description for upcoming cards */
.league-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

/* Team pills preview */
.league-card-teams-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.league-card-team-pill {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--pill-color, #555);
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.league-card-team-more {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Upcoming grid */
.leagues-grid-upcoming {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* Roadmap hint */
.leagues-roadmap {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-xl);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--card-border);
  border-radius: var(--border-radius-xl);
}

.leagues-roadmap-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.leagues-roadmap-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.leagues-roadmap-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}


/* ========================================
   RESPONSIVE - HEADER & FOOTER & LEAGUES
   ======================================== */

@media (max-width: 768px) {
  /* Header mobile */
  .site-nav-links {
    display: none;
  }
  .site-nav-toggle {
    display: flex;
  }

  /* Footer mobile */
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .site-footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  /* Leagues mobile */
  .leagues-grid-upcoming {
    grid-template-columns: 1fr;
  }
  .league-card-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .league-card-name {
    font-size: 22px;
  }
  .league-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }
  .league-card-logo span {
    font-size: 24px !important;
  }

  /* Leagues roadmap mobile */
  .leagues-roadmap {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Pad main content below sticky header */
.site-header + .main-content {
  padding-top: var(--space-md);
}

/* When header is present, push how-it-works doc-nav down */
.site-header ~ .doc-nav {
  top: 60px;
}
