/* ==========================================================================
   UCL MATCH EDGE — Premium Design System
   UEFA Midnight Navy × Electric Cyan × Gold × Emerald
   Fully Responsive: Desktop sidebar layout + Native iPhone bottom sheet
   ========================================================================== */

:root {
  /* Backgrounds */
  --bg-base: #040810;
  --bg-surface: #0a1020;
  --bg-elevated: #0f1a2e;
  --bg-card: rgba(12, 20, 38, 0.80);
  --bg-card-hover: rgba(18, 30, 55, 0.90);
  --bg-glass: rgba(10, 16, 30, 0.68);
  --bg-glass-heavy: rgba(6, 10, 22, 0.96);

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-bright: rgba(255, 255, 255, 0.17);
  --border-cyan: rgba(0, 229, 255, 0.40);
  --border-gold: rgba(251, 191, 36, 0.35);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;

  /* Accent Colors */
  --cyan: #00e5ff;
  --cyan-dim: rgba(0, 229, 255, 0.12);
  --cyan-glow: rgba(0, 229, 255, 0.22);
  --gold: #f59e0b;
  --gold-dim: rgba(245, 158, 11, 0.12);
  --gold-glow: rgba(245, 158, 11, 0.25);
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.12);
  --emerald-glow: rgba(16, 185, 129, 0.22);
  --rose: #f43f5e;
  --rose-dim: rgba(244, 63, 94, 0.12);
  --indigo: #6366f1;
  --purple: #a855f7;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.50), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-cyan), 0 0 30px -6px var(--cyan-glow);
  --shadow-glow-cyan: 0 0 20px -4px var(--cyan-glow);
  --shadow-glow-gold: 0 0 20px -4px var(--gold-glow);

  /* Layout */
  --header-h: 64px;
  --side-nav-w: 240px;
  --content-max: 1280px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  background: var(--bg-base);
  background-image:
    radial-gradient(ellipse 80% 40% at 15% 0%, rgba(0, 229, 255, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  padding-bottom: 80px;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* ===== APP SHELL ===== */
.app-shell {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  position: sticky;
  top: 12px;
  z-index: 200;
  margin: 12px 0 0 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-h);
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255,255,255,0.06);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-badge,
.ucl-logo-badge {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.20), rgba(16, 185, 129, 0.15));
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.20);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-logo-badge:hover,
.ucl-logo-badge:hover {
  transform: rotate(10deg) scale(1.05);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.40);
}

.brand-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  background: linear-gradient(105deg, #ffffff 25%, #38bdf8 80%, #34d399 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Header Center Multi-Sport & Status Intelligence */
.header-center-intel {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-sports-capsule {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-full);
  padding: 3px 6px;
  backdrop-filter: blur(12px);
}

.header-sport-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-sport-pill .sport-emoji {
  font-size: 0.82rem;
  line-height: 1;
}

.header-sport-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.header-sport-pill.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.header-market-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: 0.70rem;
  font-weight: 700;
  color: #34d399;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.market-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: pulse-anim 2.5s ease-in-out infinite;
}

@keyframes pulse-anim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pro toggle */
.pro-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pro-label { letter-spacing: 0.02em; }

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background 0.25s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}

input:checked + .toggle-track {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

input:checked + .toggle-track::before {
  transform: translateX(16px);
  background: var(--bg-surface);
}

.icon-pill-btn {
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.icon-pill-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-primary);
  border-color: var(--border-bright);
}

/* ==========================================================================
   HERO BANNER — Redesigned Multi-Sport
   ========================================================================== */
.hero-section {
  margin: 20px 0;
}

.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
    rgba(2, 10, 28, 0.98) 0%,
    rgba(5, 18, 48, 0.97) 40%,
    rgba(12, 6, 38, 0.97) 100%);
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: var(--r-xl);
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(0, 229, 255, 0.08),
    inset 0 -1px 0 rgba(99, 102, 241, 0.06);
}

/* --- Animated glow orbs --- */
.hero-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  animation: heroPulse 8s ease-in-out infinite alternate;
}

.hero-glow-1 {
  width: 420px; height: 300px;
  top: -80px; left: -60px;
  background: radial-gradient(ellipse, rgba(0, 229, 255, 0.12) 0%, transparent 70%);
  animation-delay: 0s;
}

.hero-glow-2 {
  width: 380px; height: 280px;
  bottom: -80px; right: 40%;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.13) 0%, transparent 70%);
  animation-delay: -3s;
}

.hero-glow-3 {
  width: 300px; height: 260px;
  top: -40px; right: -40px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.07) 0%, transparent 70%);
  animation-delay: -5.5s;
}

@keyframes heroPulse {
  0%   { opacity: 0.6; transform: scale(1); }
  100% { opacity: 1.0; transform: scale(1.08); }
}

/* --- Grid overlay for depth --- */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
  mask-image: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
}

/* --- Left column --- */
.hero-left {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

/* Eyebrow line */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--cyan);
  margin-bottom: 18px;
  opacity: 0.9;
}

/* Animated live pulse dot */
.hero-live-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.6);
  animation: livePulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

@keyframes livePulse {
  0%  { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
  70% { box-shadow: 0 0 0 7px rgba(0, 229, 255, 0); }
  100%{ box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

/* Main headline */
.hero-headline {
  font-family: var(--font-display);
  font-size: 3.0rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 18px;
}

/* Gradient accent on second line */
.hero-headline-accent {
  background: linear-gradient(90deg, var(--cyan) 0%, #a78bfa 60%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tagline */
.hero-tagline {
  font-size: 0.96rem;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.65;
  max-width: 440px;
  margin-bottom: 24px;
}

/* Sport tags strip */
.hero-sport-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sport-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: var(--r-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.sport-tag-live {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--cyan);
}

.sport-tag-soon {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.10);
  color: var(--text-tertiary);
}

/* --- Right column: Value Proposition cards --- */
.hero-value-props {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  width: 300px;
  position: relative;
  z-index: 1;
}

.hero-vp-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s ease;
}

.hero-vp-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.18);
  transform: translateX(-2px);
}

.hvp-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.hvp-title {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.hvp-desc {
  font-size: 0.74rem;
  color: var(--text-tertiary);
  line-height: 1.5;
  font-weight: 400;
}

/* ==========================================================================
   MAIN LAYOUT — Sidebar + Content
   ========================================================================== */
.main-content {
  display: grid;
  grid-template-columns: var(--side-nav-w) 1fr;
  gap: 20px;
  align-items: start;
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
/* ==========================================================================
   SIDEBAR NAVIGATION — Multi-Sport Tree
   ========================================================================== */
.side-nav {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 10px;
  box-shadow: var(--shadow-card);
  max-height: calc(100vh - var(--header-h) - 56px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 4px; }

/* ---- Primary view nav buttons (Matches / Simulator / Guide) ---- */
.side-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  margin-bottom: 3px;
}

.side-nav-btn .snb-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.side-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.side-nav-btn.active {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(99, 102, 241, 0.20));
  border: 1px solid rgba(0, 229, 255, 0.30);
  color: #fff;
  box-shadow: 0 2px 12px -2px var(--cyan-glow);
}

/* ---- Divider ---- */
.side-nav-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 4px;
}

/* ---- Section label above sport categories ---- */
.side-nav-section-label {
  font-size: 0.60rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-tertiary);
  padding: 4px 14px 6px;
}

/* ---- Sport category (collapsible parent row) ---- */
.sport-category {
  margin-bottom: 2px;
}

.sport-category-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  user-select: none;
}

.sport-category-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.sport-category-btn.open {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.sport-cat-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sport-cat-label {
  flex: 1;
  min-width: 0;
}

.sport-cat-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 1px 6px;
  border-radius: var(--r-full);
  flex-shrink: 0;
}

.sport-cat-arrow {
  font-size: 10px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform 0.22s ease;
  margin-left: 2px;
}

.sport-category-btn.open .sport-cat-arrow {
  transform: rotate(90deg);
}

/* ---- Subcategory list (league list) ---- */
.sport-sub-list {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease;
  padding-left: 10px;
}

.sport-sub-list.open {
  max-height: 400px;
}

.sport-sub-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  border-radius: var(--r-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  position: relative;
  margin-bottom: 1px;
}

.sport-sub-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 0;
  background: var(--cyan);
  border-radius: 2px;
  transition: height 0.18s ease;
}

.sport-sub-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.sport-sub-btn.active {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.07);
  font-weight: 700;
}

.sport-sub-btn.active::before {
  height: 60%;
}

.sport-sub-btn.coming-soon {
  cursor: default;
  opacity: 0.5;
}

.sport-sub-btn.coming-soon:hover {
  background: transparent;
  color: var(--text-muted);
}

.sub-league-icon {
  font-size: 13px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sub-league-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-badge-live {
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bg-base);
  background: var(--cyan);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

.sub-badge-soon {
  font-size: 0.56rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.06);
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ==========================================================================
   CONTENT AREA
   ========================================================================== */
.content-area { min-width: 0; }

/* ==========================================================================
   SEARCH & FILTER BAR
   ========================================================================== */
.search-filter-bar {
  margin-bottom: 20px;
}

.search-wrapper {
  position: relative;
  margin-bottom: 12px;
}

.search-icon-el {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 13px 18px 13px 46px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-lg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  outline: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.search-input::placeholder { color: var(--text-tertiary); }

.search-input:focus {
  border-color: var(--border-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.10), var(--shadow-glow-cyan);
  background: rgba(10, 20, 42, 0.95);
}

/* Search + filter bar — hidden by default, shown only when a league is active */
.search-filter-bar {
  margin-bottom: 20px;
  display: none;
}

.search-filter-bar.filter-bar-visible {
  display: block;
}

/* Two-row filter container */
.filter-bar-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* A single filter row: label + pills side by side */
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.filter-row-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  white-space: nowrap;
  min-width: 56px;
  flex-shrink: 0;
}

/* Pill strip */
.filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

/* Standard type-filter pill */
.filter-pill {
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-default);
}

.filter-pill.active {
  background: var(--cyan);
  color: var(--bg-base);
  border-color: var(--cyan);
  font-weight: 800;
  box-shadow: 0 0 18px -3px var(--cyan-glow);
}

/* Matchday pills — stacked number + date */
.matchday-pills {
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.matchday-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill.md-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--r-md);
  gap: 1px;
  line-height: 1;
  min-width: 76px;
}

.md-number {
  font-size: 0.74rem;
  font-weight: 800;
  color: inherit;
}

.md-date {
  font-size: 0.64rem;
  font-weight: 500;
  opacity: 0.75;
  color: inherit;
}

.filter-pill.md-pill.active .md-date { opacity: 0.9; }

/* Arrow between matchday pills */
.md-arrow {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

/* ==========================================================================
   FIXTURES GRID & CARDS
   ========================================================================== */
.fixtures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.spinner-wrap {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 60px 20px;
}

/* ── Fixture Card ── */
.fixture-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              background 0.28s ease;
}

.fixture-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--cyan) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fixture-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(0, 229, 255, 0.25);
  background: var(--bg-card-hover);
}

.fixture-card:hover::before { opacity: 1; }
.fixture-card:active { transform: scale(0.985); }

/* Top Meta */
.card-top-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stage-badge {
  padding: 3px 9px;
  border-radius: var(--r-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.30);
  color: #a5b4fc;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
}

.card-date-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  padding: 3px 8px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border-subtle);
}

/* Teams Row */
.teams-matchup-row {
  display: grid;
  grid-template-columns: 1fr 90px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.team-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

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

.team-crest {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease;
}

.fixture-card:hover .team-crest { transform: scale(1.08); }

.crest-code {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.country-pill {
  position: absolute;
  bottom: -3px;
  right: -3px;
  font-size: 11px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}

.team-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  max-width: 120px;
}

.team-xg {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  font-weight: 700;
  background: var(--cyan-dim);
  padding: 2px 7px;
  border-radius: var(--r-full);
  border: 1px solid rgba(0, 229, 255, 0.18);
}

/* VS / Score Box */
.vs-badge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.vs-badge {
  font-size: 0.60rem;
  font-weight: 900;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
}

.pred-score-label {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.predicted-score-pill {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 3px 12px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: var(--shadow-glow-gold);
}

.pred-score-prob {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.8;
}

/* Probability Bar */
.prob-bar-container {
  margin-bottom: 14px;
  background: rgba(5, 8, 17, 0.55);
  padding: 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
}

.prob-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.71rem;
  font-weight: 700;
  margin-bottom: 7px;
}

.prob-bar-labels .h-prob { color: var(--cyan); }
.prob-bar-labels .d-prob { color: var(--text-secondary); }
.prob-bar-labels .a-prob { color: var(--purple); }

.prob-bar {
  height: 7px;
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  overflow: hidden;
  gap: 2px;
}

.prob-bar-segment {
  height: 100%;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.prob-bar-segment.home {
  background: linear-gradient(90deg, #00c8e8, #0284c7);
  border-radius: var(--r-full) 0 0 var(--r-full);
}

.prob-bar-segment.draw {
  background: linear-gradient(90deg, #334155, #475569);
}

.prob-bar-segment.away {
  background: linear-gradient(90deg, #818cf8, #a855f7);
  border-radius: 0 var(--r-full) var(--r-full) 0;
}

/* Best Bet Banner */
.best-bet-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.10), rgba(6, 60, 45, 0.20));
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--r-md);
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 10px;
}

.best-bet-left { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.best-bet-tag {
  font-size: 0.60rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #34d399;
}

.best-bet-name {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: #ecfdf5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ev-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--emerald);
  background: var(--emerald-dim);
  padding: 4px 10px;
  border-radius: var(--r-full);
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}

/* Card Footer Action */
.card-footer-action {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.70rem;
  font-weight: 700;
  color: var(--text-tertiary);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  gap: 5px;
  transition: color 0.2s ease;
}

.fixture-card:hover .card-footer-action {
  color: var(--cyan);
}

/* ==========================================================================
   PANEL HEADER (Simulator / Guide)
   ========================================================================== */
.panel-header {
  margin-bottom: 20px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.panel-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   GLASS CARD (Simulator form wrapper)
   ========================================================================== */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   SIMULATOR FORM
   ========================================================================== */
.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.form-field { display: flex; flex-direction: column; }

.field-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.field-control {
  padding: 11px 14px;
  background: rgba(5, 8, 17, 0.80);
  border: 1px solid var(--border-default);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 0.90rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-control:focus {
  border-color: var(--border-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.10), var(--shadow-glow-cyan);
}

.optional-odds-block {
  background: rgba(5, 8, 17, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.oob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.oob-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.oob-help-badge {
  display: inline-block;
  font-size: 0.66rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 2px 8px;
  border-radius: var(--r-full);
  margin-left: 8px;
  font-weight: 700;
  vertical-align: middle;
}

.oob-description {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.oob-description strong { color: var(--text-primary); }
.oob-description code { font-family: var(--font-mono); font-size: 0.85em; color: var(--cyan); background: var(--cyan-dim); padding: 1px 5px; border-radius: 4px; }

.odds-inputs-container {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.odds-section {
  background: rgba(10, 16, 32, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 12px 14px;
  box-sizing: border-box;
  min-width: 0;
}

.odds-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.odds-sub-row {
  display: grid;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.odds-sub-row.three-col {
  grid-template-columns: repeat(3, 1fr);
}

.odds-sub-row.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.odds-sub-row .form-field {
  min-width: 0;
}

.odds-sub-row .field-control {
  width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--cyan), #0284c7);
  color: var(--bg-base);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 22px rgba(0, 229, 255, 0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 229, 255, 0.45);
}

.btn-primary:active { transform: scale(0.99); }

/* Form controls (alias used by legacy selects) */
.form-group label { display: block; font-size: 0.74rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.02em; }
.form-control { padding: 11px 14px; background: rgba(5, 8, 17, 0.80); border: 1px solid var(--border-default); border-radius: var(--r-md); color: var(--text-primary); font-size: 0.90rem; font-family: var(--font-body); outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%; }
.form-control:focus { border-color: var(--border-cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.10), var(--shadow-glow-cyan); }
.sim-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.simulator-card { background: var(--bg-glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--border-default); border-radius: var(--r-xl); padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.calc-inputs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.calc-input-group label { display: block; font-size: 0.70rem; color: var(--text-secondary); margin-bottom: 5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.calc-input-group input, .calc-input-group select { width: 100%; padding: 9px 12px; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--r-sm); color: var(--text-primary); font-family: var(--font-mono); font-size: 0.90rem; font-weight: 700; outline: none; transition: all 0.2s; }
.calc-input-group input:focus, .calc-input-group select:focus { border-color: var(--border-cyan); box-shadow: 0 0 12px var(--cyan-glow); }

/* ==========================================================================
   GLOSSARY
   ========================================================================== */
.glossary-list { display: flex; flex-direction: column; gap: 10px; }

.glossary-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.glossary-item:hover { border-color: var(--border-default); }

.glossary-trigger {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.glossary-trigger:hover { background: rgba(255, 255, 255, 0.03); }

.gt-icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.gt-text { flex: 1; }
.gt-arrow { color: var(--text-tertiary); font-size: 11px; flex-shrink: 0; transition: transform 0.2s; }

.glossary-content {
  display: none;
  padding: 0 20px 18px 56px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  line-height: 1.65;
}

.glossary-content.open { display: block; }
.glossary-content strong { color: var(--text-primary); }
.glossary-content code { font-family: var(--font-mono); font-size: 0.85em; color: var(--cyan); background: var(--cyan-dim); padding: 1px 5px; border-radius: 4px; }

/* ==========================================================================
   MATCH DETAIL MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 15, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
  animation: fade-in 0.18s ease-out;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 880px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 229, 255, 0.10);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
  animation: modal-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-in {
  from { transform: scale(0.95) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-drag-handle { display: none; }

.modal-header {
  position: sticky;
  top: 0;
  background: rgba(6, 10, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.modal-body { padding: 22px 24px; }

/* Modal internal sections */
.detail-section { margin-bottom: 22px; }

.detail-section-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metrics-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.metric-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: center;
}

.metric-stat-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 5px;
  font-weight: 700;
}

.metric-stat-val {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--text-primary);
}

.metric-stat-val.cyan { color: var(--cyan); }
.metric-stat-val.gold { color: var(--gold); }
.metric-stat-val.emerald { color: var(--emerald); }
.metric-stat-val.purple { color: var(--purple); }

.metric-stat-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 3px;
}

/* Markets Table */
.markets-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  margin-bottom: 18px;
}

.markets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.markets-table th {
  background: rgba(5, 8, 17, 0.85);
  padding: 10px 14px;
  color: var(--text-tertiary);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.markets-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
}

.markets-table tr:last-child td { border-bottom: none; }
.markets-table tr:hover { background: rgba(255, 255, 255, 0.02); }

.tag-value-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
}

.tag-value-pill.good {
  background: var(--emerald-dim);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.30);
}

.tag-value-pill.fair {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Score Matrix Heatmap */
.score-matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.matrix-cell {
  background: rgba(12, 20, 38, 0.70);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  padding: 9px 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.2s ease;
}

.matrix-cell:hover {
  transform: scale(1.06);
  border-color: var(--border-cyan);
  box-shadow: var(--shadow-glow-cyan);
  z-index: 2;
}

.matrix-cell .score-label {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.matrix-cell .score-prob {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.78rem;
  color: #fff;
}

.matrix-cell.top-pick {
  border-color: var(--gold);
  box-shadow: var(--shadow-glow-gold);
  background: var(--gold-dim) !important;
}

/* Kelly Calculator */
.calculator-box {
  background: rgba(5, 8, 17, 0.70);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 18px;
  margin-top: 14px;
}

.btn-bankroll-preset {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xs);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.70rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-bankroll-preset:hover {
  background: var(--cyan-dim);
  color: var(--cyan);
  border-color: rgba(0, 229, 255, 0.35);
}

.calc-results-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.86rem;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pro Mode */
.pro-element { display: none; }
body.pro-mode-active .pro-element { display: block; }
body.pro-mode-active span.pro-element,
body.pro-mode-active div.pro-inline { display: inline-block; }

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 229, 255, 0.15);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Pill alias */
.btn-pill {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-default);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-pill:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--border-cyan);
}

/* ==========================================================================
   MOBILE BOTTOM BAR & DRAWER (hidden on desktop)
   ========================================================================== */
.mobile-bottom-bar { display: none; }
.drawer-backdrop { display: none; }
.mobile-drawer-header { display: none; }
.mobile-sidebar-toggle-btn { display: none; }

.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--r-md);
  transition: all 0.2s ease;
}

.mobile-nav-btn .mnb-icon { font-size: 20px; transition: transform 0.2s; }
.mobile-nav-btn.active { color: var(--cyan); }
.mobile-nav-btn.active .mnb-icon { transform: scale(1.15); }

/* ==========================================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --side-nav-w: 200px; }

  .hero-headline { font-size: 2.4rem; }
  .hero-value-props { width: 260px; }
  .header-sports-capsule { display: none; }
}

/* ==========================================================================
   RESPONSIVE — Mobile / iPhone (≤ 768px)
   ========================================================================== */
@media (max-width: 768px) {
  body { padding-bottom: 90px; font-size: 14px; }

  .app-shell { padding: 0 12px; }

  /* Header */
  .app-header { top: 8px; margin: 8px 0 14px 0; }
  .header-inner { height: 56px; padding: 0 12px; border-radius: var(--r-lg); }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.05rem; }
  .header-center-intel { display: none; }
  .btn-guide-desktop { display: none; }
  .pro-toggle-wrap .pro-label { display: none; }

  /* Mobile Sidebar Toggle Button in Header */
  .mobile-sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    background: rgba(0, 229, 255, 0.10);
    border: 1px solid rgba(0, 229, 255, 0.30);
    border-radius: var(--r-full);
    color: var(--cyan);
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 6px;
    flex-shrink: 0;
  }

  .mobile-sidebar-toggle-btn:active {
    transform: scale(0.95);
    background: rgba(0, 229, 255, 0.22);
  }

  .mst-icon {
    font-size: 0.90rem;
    line-height: 1;
  }

  /* Drawer Backdrop */
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 18, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
  }

  .drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Slide-in Mobile Drawer (repurposing .side-nav) */
  .side-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 86vw);
    max-height: 100vh;
    height: 100vh;
    z-index: 1200;
    background: rgba(8, 14, 28, 0.98);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: none;
    border-right: 1px solid rgba(0, 229, 255, 0.25);
    border-radius: 0 24px 24px 0;
    padding: 16px 14px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 12px 0 50px rgba(0, 0, 0, 0.80);
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .side-nav.drawer-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  /* Mobile Drawer Header */
  .mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mdh-brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mdh-title {
    font-family: var(--font-display);
    font-size: 0.96rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
  }

  .mdh-sub {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .drawer-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
  }

  .drawer-close-btn:active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: scale(0.92);
  }

  /* Hero: on mobile/phone, only visible in Home menu */
  body:not([data-active-view="home-view"]) .hero-section {
    display: none !important;
  }

  .hero-section {
    margin: 0 0 16px 0;
  }

  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px;
    gap: 24px;
    border-radius: var(--r-lg);
  }

  .hero-headline { font-size: 2.0rem; }
  .hero-tagline { font-size: 0.88rem; }

  .hero-value-props {
    width: 100%;
  }

  .hero-vp-card { padding: 12px 14px; }

  /* Layout: collapse sidebar */
  .main-content {
    grid-template-columns: 1fr;
    width: 100%;
    min-width: 0;
  }

  /* Filter */
  .filter-row {
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .filter-pills {
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  /* Grid */
  .fixtures-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fixture-card { padding: 16px; border-radius: var(--r-lg); }
  .team-crest { width: 44px; height: 44px; }
  .team-name { font-size: 0.82rem; max-width: 100px; }
  .predicted-score-pill { font-size: 1rem; padding: 2px 10px; }

  /* Simulator */
  .sim-grid, .sim-form-grid { grid-template-columns: 1fr; gap: 12px; }
  .odds-inputs-row { grid-template-columns: 1fr 1fr; }
  .glass-card, .simulator-card { padding: 18px 14px; border-radius: var(--r-lg); }

  /* Glossary */
  .glossary-content { padding-left: 20px; }

  /* Modal → iOS Bottom Sheet */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
    background: rgba(2, 6, 15, 0.90);
  }

  .modal-container {
    border-radius: 26px 26px 0 0;
    max-height: 88vh;
    border-bottom: none;
    animation: slide-up 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .modal-drag-handle {
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: var(--r-full);
    margin: 10px auto 4px;
  }

  .modal-header { padding: 12px 18px; border-radius: 0; }
  .modal-body { padding: 16px 16px; }

  .score-matrix-grid { gap: 4px; }
  .matrix-cell { padding: 7px 3px; }
  .matrix-cell .score-label { font-size: 0.68rem; }
  .matrix-cell .score-prob { font-size: 0.68rem; }

  /* Bottom nav — 4 clean icons (Home, Matches, Simulator, Guide) */
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(6, 10, 22, 0.97);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-top: 1px solid var(--border-default);
    padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px)) 12px;
    z-index: 1000;
    justify-content: space-around;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.55);
    max-width: 100%;
  }

  .mobile-nav-btn {
    padding: 6px 8px;
    font-size: 0.68rem;
    gap: 3px;
    flex: 1;
    max-width: 85px;
  }

  .mobile-nav-btn .mnb-icon {
    font-size: 20px;
  }
}

/* ==========================================================================
   HOME VIEW — Modern Introduction Hub
   ========================================================================== */
.home-intro-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Brand Area interactive button */
.brand-area[role="button"] {
  cursor: pointer;
  border-radius: var(--r-md);
  padding: 4px 8px;
  margin: -4px -8px;
  transition: all 0.2s ease;
}

.brand-area[role="button"]:hover {
  background: rgba(255, 255, 255, 0.04);
}

.brand-area[role="button"]:hover .brand-logo-badge {
  transform: rotate(10deg) scale(1.05);
  box-shadow: 0 0 16px var(--cyan-glow);
}

/* Home Welcome Card */
.home-welcome-card {
  position: relative;
  overflow: hidden;
  padding: 30px 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 27, 75, 0.60));
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: var(--r-xl);
  box-shadow: 0 8px 32px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.home-welcome-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.12) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.hw-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  background: rgba(0, 229, 255, 0.10);
  border: 1px solid rgba(0, 229, 255, 0.30);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.hw-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: pulse-dot 2s infinite ease-in-out;
}

.hw-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hw-subtitle {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 820px;
  margin-bottom: 24px;
}

/* Home Welcome Stats Grid */
.hw-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hw-stat-item {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.50);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-lg);
  padding: 12px 14px;
}

.hw-stat-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.hw-stat-val.text-emerald { color: var(--emerald); }
.hw-stat-val.text-cyan { color: var(--cyan); }

.hw-stat-label {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* Section Blocks */
.home-section-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-block-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-block-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-block-desc {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* Leagues Grid */
.home-leagues-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.home-league-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.home-league-card.active-league {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), rgba(15, 23, 42, 0.85));
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.15);
  cursor: pointer;
}

.home-league-card.active-league:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.60);
  box-shadow: 0 8px 26px -2px rgba(16, 185, 129, 0.28);
}

.home-league-card.coming-card {
  opacity: 0.72;
  background: rgba(15, 23, 42, 0.45);
  border-style: dashed;
}

.home-league-card.coming-card:hover {
  opacity: 0.90;
  border-color: rgba(255, 255, 255, 0.18);
}

.hlc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hlc-icon {
  font-size: 1.4rem;
}

.hlc-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
}

.hlc-badge.live-badge {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.40);
  color: #34d399;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34d399;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

.hlc-badge.soon-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-tertiary);
}

.hlc-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hlc-desc {
  font-size: 0.76rem;
  color: var(--text-tertiary);
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.hlc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.hlc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hlc-btn {
  width: 100%;
  padding: 7px 12px;
  border-radius: var(--r-md);
  border: 1px solid rgba(16, 185, 129, 0.40);
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.hlc-btn:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.70);
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.30);
}

/* 3-Step Strategy Cards */
.home-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.home-step-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-xl);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.home-step-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
}

.hsc-number {
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
  pointer-events: none;
}

.hsc-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.hsc-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.hsc-desc {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.55;
}

/* Home CTA Bar */
.home-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 28px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(0, 229, 255, 0.20);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.80), rgba(16, 24, 48, 0.90));
}

.hcb-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.hcb-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.hcb-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Responsive adjustments for Home View */
@media (max-width: 1200px) {
  .home-leagues-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-leagues-grid {
    grid-template-columns: 1fr;
  }
  .hw-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .hw-stat-item {
    padding: 10px 12px;
    min-width: 0;
  }
  .hw-stat-val {
    font-size: clamp(0.95rem, 3.8vw, 1.30rem);
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .home-steps-grid {
    grid-template-columns: 1fr;
  }
  .home-cta-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 20px 16px;
  }
  .hcb-buttons {
    flex-direction: column;
    width: 100%;
  }
  .hcb-buttons .btn {
    width: 100%;
    justify-content: center;
  }
}
