/* ==========================================================================
   SUNMCS LIVE SCORE & ODDS STREAMING PLATFORM - STYLESHEET
   Deep Obsidian Navy Theme (#090f1a) + High-Legibility Thai & Tabular Typography
   ========================================================================== */

:root {
  /* Deep Obsidian Navy Theme (Matched to Reference Design) */
  --bg-body: #090f1a;
  --bg-surface: #0d1421;
  --bg-surface-2: #121a2a;
  --bg-surface-3: #182336;
  --bg-glass: rgba(9, 15, 26, 0.90);
  --bg-league-header: linear-gradient(90deg, #131d2e 0%, #0d1421 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(245, 158, 11, 0.16) 0%, #141f33 55%, #0d1421 100%);
  --bg-row-hover: rgba(71, 122, 186, 0.12);
  --bg-row-alt: rgba(255, 255, 255, 0.02);
  --bg-odds-box: #111a2b;
  --bg-odds-hover: rgba(71, 122, 186, 0.22);

  /* High-Contrast, Easy-to-Read Text Hierarchy */
  --text-primary: #f8fafc;
  --text-secondary: #a3b3c9;
  --text-muted: #7c8ea6;

  /* Crisp Hairline Borders (#212835 from Reference Pill Design) */
  --border-color: #212b3d;
  --border-subtle: rgba(163, 179, 201, 0.10);
  --border-focus: #5890d8;

  /* Brand & Semantic Accents */
  --accent-primary: #10b981;       /* Live Emerald Green */
  --accent-primary-glow: rgba(16, 185, 129, 0.28);
  --accent-secondary: #5890d8;     /* Reference Interactive Blue (#477aba / #5890d8) */
  --accent-gold: #fbbf24;          /* Featured League / Favorite Gold */
  --accent-danger: #f43f5e;        /* Red Card / Negative Malay Odds */
  --accent-purple: #a78bfa;        /* Corners / Step Accent */

  /* High-Legibility Odds & Team Colors */
  --odds-neg: #fb7185;             /* Malay Red Odds (-0.98) */
  --odds-pos: #34d399;             /* Malay Positive Odds (0.95) */
  --odds-1x2: #f1f5f9;             /* 1X2 Decimal Odds */
  --goal-line: #60a5fa;            /* Handicap / O/U Goal line (0.5-1) */
  --team-master: #fbbf24;          /* Favorite Team (ทีมต่อ) highlight */

  /* Shadows & Radius */
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.68);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-2: #f8fafc;
  --bg-surface-3: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.92);
  --bg-league-header: linear-gradient(90deg, #e2e8f0 0%, #f1f5f9 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, #f1f5f9 100%);
  --bg-row-hover: rgba(2, 132, 199, 0.06);
  --bg-row-alt: rgba(15, 23, 42, 0.02);
  --bg-odds-box: #f8fafc;
  --bg-odds-hover: rgba(2, 132, 199, 0.12);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  --border-color: #cbd5e1;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-focus: #0284c7;

  --accent-primary: #059669;
  --accent-primary-glow: rgba(5, 150, 105, 0.2);
  --accent-secondary: #0284c7;
  --accent-gold: #d97706;
  --accent-danger: #e11d48;
  --accent-purple: #7c3aed;

  --odds-neg: #e11d48;
  --odds-pos: #059669;
  --odds-1x2: #0f172a;
  --goal-line: #0284c7;
  --team-master: #b45309;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.15);
}

/* ==========================================================================
   15-THEME WHITE-LABEL COLOR SKINS (data-brand-theme="...")
   ========================================================================== */

/* 1. Navy Emerald (Default - #090f1a / #10b981) — inherits base :root */

/* 2. Crimson Arena & Gold (แดงสนามแข่ง-ทอง) */
:root:not([data-theme="light"])[data-brand-theme="crimson-gold"] {
  --bg-body: #14080c;
  --bg-surface: #1e0c12;
  --bg-surface-2: #281019;
  --bg-surface-3: #351622;
  --bg-glass: rgba(20, 8, 12, 0.92);
  --bg-league-header: linear-gradient(90deg, #2d121c 0%, #1e0c12 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(251, 191, 36, 0.20) 0%, #2d121c 55%, #1e0c12 100%);
  --bg-row-hover: rgba(244, 63, 94, 0.12);
  --bg-odds-box: #240e16;
  --bg-odds-hover: rgba(244, 63, 94, 0.22);
  --border-color: #421b29;
  --border-focus: #fbbf24;
  --accent-primary: #f43f5e;
  --accent-primary-glow: rgba(244, 63, 94, 0.30);
  --accent-secondary: #fbbf24;
  --accent-gold: #fde047;
}

/* 3. Royal Sapphire Blue (น้ำเงินรอยัลบลู) */
:root:not([data-theme="light"])[data-brand-theme="royal-blue"] {
  --bg-body: #071024;
  --bg-surface: #0b1836;
  --bg-surface-2: #10214a;
  --bg-surface-3: #172d63;
  --bg-glass: rgba(7, 16, 36, 0.92);
  --bg-league-header: linear-gradient(90deg, #132757 0%, #0b1836 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(56, 189, 248, 0.20) 0%, #132757 55%, #0b1836 100%);
  --bg-row-hover: rgba(59, 130, 246, 0.14);
  --bg-odds-box: #0e1d42;
  --bg-odds-hover: rgba(59, 130, 246, 0.24);
  --border-color: #1e3a7a;
  --border-focus: #38bdf8;
  --accent-primary: #3b82f6;
  --accent-primary-glow: rgba(59, 130, 246, 0.30);
  --accent-secondary: #38bdf8;
  --accent-gold: #fbbf24;
}

/* 4. Cyber Violet & Neon Cyan (ม่วงไซเบอร์-ฟ้าเรืองแสง) */
:root:not([data-theme="light"])[data-brand-theme="cyber-purple"] {
  --bg-body: #0f091d;
  --bg-surface: #170e2b;
  --bg-surface-2: #21143d;
  --bg-surface-3: #2c1b52;
  --bg-glass: rgba(15, 9, 29, 0.92);
  --bg-league-header: linear-gradient(90deg, #261747 0%, #170e2b 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(168, 85, 247, 0.22) 0%, #261747 55%, #170e2b 100%);
  --bg-row-hover: rgba(168, 85, 247, 0.14);
  --bg-odds-box: #1c1134;
  --bg-odds-hover: rgba(34, 211, 238, 0.22);
  --border-color: #382366;
  --border-focus: #22d3ee;
  --accent-primary: #a855f7;
  --accent-primary-glow: rgba(168, 85, 247, 0.32);
  --accent-secondary: #22d3ee;
  --accent-gold: #facc15;
}

/* 5. Stadium Turf Green & Gold (เขียวสนามหญ้า-ทอง) */
:root:not([data-theme="light"])[data-brand-theme="forest-turf"] {
  --bg-body: #06140d;
  --bg-surface: #0a1f14;
  --bg-surface-2: #0f2b1c;
  --bg-surface-3: #163b27;
  --bg-glass: rgba(6, 20, 13, 0.92);
  --bg-league-header: linear-gradient(90deg, #133322 0%, #0a1f14 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(234, 179, 8, 0.20) 0%, #133322 55%, #0a1f14 100%);
  --bg-row-hover: rgba(34, 197, 94, 0.13);
  --bg-odds-box: #0d2619;
  --bg-odds-hover: rgba(34, 197, 94, 0.22);
  --border-color: #1e4d33;
  --border-focus: #22c55e;
  --accent-primary: #22c55e;
  --accent-primary-glow: rgba(34, 197, 94, 0.30);
  --accent-secondary: #4ade80;
  --accent-gold: #eab308;
}

/* 6. VIP Obsidian Black & Luxury Gold (ดำนิล-ทองคำ VIP) */
:root:not([data-theme="light"])[data-brand-theme="gold-obsidian"] {
  --bg-body: #0a0a0c;
  --bg-surface: #121216;
  --bg-surface-2: #1a1a20;
  --bg-surface-3: #24242c;
  --bg-glass: rgba(10, 10, 12, 0.93);
  --bg-league-header: linear-gradient(90deg, #211d14 0%, #121216 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(245, 158, 11, 0.24) 0%, #241e12 55%, #121216 100%);
  --bg-row-hover: rgba(245, 158, 11, 0.12);
  --bg-odds-box: #16161c;
  --bg-odds-hover: rgba(245, 158, 11, 0.22);
  --border-color: #2e2a20;
  --border-focus: #f59e0b;
  --accent-primary: #f59e0b;
  --accent-primary-glow: rgba(245, 158, 11, 0.30);
  --accent-secondary: #fbbf24;
  --accent-gold: #fde047;
}

/* 7. Deep Ocean Teal & Aqua (เขียวน้ำทะเลลึก-อควา) */
:root:not([data-theme="light"])[data-brand-theme="ocean-teal"] {
  --bg-body: #061318;
  --bg-surface: #0a1e26;
  --bg-surface-2: #0f2933;
  --bg-surface-3: #153745;
  --bg-glass: rgba(6, 19, 24, 0.92);
  --bg-league-header: linear-gradient(90deg, #11303d 0%, #0a1e26 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(20, 184, 166, 0.20) 0%, #11303d 55%, #0a1e26 100%);
  --bg-row-hover: rgba(20, 184, 166, 0.13);
  --bg-odds-box: #0c242e;
  --bg-odds-hover: rgba(20, 184, 166, 0.22);
  --border-color: #1b4657;
  --border-focus: #2dd4bf;
  --accent-primary: #14b8a6;
  --accent-primary-glow: rgba(20, 184, 166, 0.30);
  --accent-secondary: #38bdf8;
  --accent-gold: #fbbf24;
}

/* 8. Sunset Blaze Orange & Gold (ส้มเพลิงสปอร์ต-เหลืองทอง) */
:root:not([data-theme="light"])[data-brand-theme="sunset-amber"] {
  --bg-body: #160b06;
  --bg-surface: #211109;
  --bg-surface-2: #2d180d;
  --bg-surface-3: #3b2012;
  --bg-glass: rgba(22, 11, 6, 0.92);
  --bg-league-header: linear-gradient(90deg, #331b0f 0%, #211109 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(249, 115, 22, 0.22) 0%, #331b0f 55%, #211109 100%);
  --bg-row-hover: rgba(249, 115, 22, 0.13);
  --bg-odds-box: #26140b;
  --bg-odds-hover: rgba(249, 115, 22, 0.22);
  --border-color: #4a2816;
  --border-focus: #f97316;
  --accent-primary: #f97316;
  --accent-primary-glow: rgba(249, 115, 22, 0.30);
  --accent-secondary: #fb923c;
  --accent-gold: #facc15;
}

/* 9. Titanium Slate & Ice Blue (เทาไทเทเนียม-ไอซ์บลู) */
:root:not([data-theme="light"])[data-brand-theme="titanium-silver"] {
  --bg-body: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-2: #1f2630;
  --bg-surface-3: #293240;
  --bg-glass: rgba(13, 17, 23, 0.92);
  --bg-league-header: linear-gradient(90deg, #212833 0%, #161b22 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(96, 165, 250, 0.18) 0%, #212833 55%, #161b22 100%);
  --bg-row-hover: rgba(96, 165, 250, 0.12);
  --bg-odds-box: #1a2029;
  --bg-odds-hover: rgba(96, 165, 250, 0.20);
  --border-color: #30363d;
  --border-focus: #60a5fa;
  --accent-primary: #60a5fa;
  --accent-primary-glow: rgba(96, 165, 250, 0.28);
  --accent-secondary: #93c5fd;
  --accent-gold: #f59e0b;
}

/* 10. Ruby Magenta & Rose Gold (แดงทับทิม-มาเจนต้า) */
:root:not([data-theme="light"])[data-brand-theme="ruby-magenta"] {
  --bg-body: #160712;
  --bg-surface: #220b1c;
  --bg-surface-2: #2e1026;
  --bg-surface-3: #3d1633;
  --bg-glass: rgba(22, 7, 18, 0.92);
  --bg-league-header: linear-gradient(90deg, #36122d 0%, #220b1c 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(236, 72, 153, 0.22) 0%, #36122d 55%, #220b1c 100%);
  --bg-row-hover: rgba(236, 72, 153, 0.13);
  --bg-odds-box: #280d21;
  --bg-odds-hover: rgba(236, 72, 153, 0.22);
  --border-color: #4d1c40;
  --border-focus: #f472b6;
  --accent-primary: #ec4899;
  --accent-primary-glow: rgba(236, 72, 153, 0.30);
  --accent-secondary: #f472b6;
  --accent-gold: #fda4af;
}

/* 11. Bet365 Classic Green & Yellow Gold (เขียวเข้ม Bet365-เหลืองทอง สไตล์ www.bet365.com) */
:root:not([data-theme="light"])[data-brand-theme="bet365-emerald"] {
  --bg-body: #18201d;
  --bg-surface: #222c28;
  --bg-surface-2: #2a3631;
  --bg-surface-3: #33423c;
  --bg-glass: rgba(18, 110, 81, 0.95);
  --bg-league-header: linear-gradient(90deg, #126e51 0%, #0e563f 60%, #1d2925 100%);
  --bg-league-featured: linear-gradient(90deg, #14805e 0%, #126e51 55%, #222c28 100%);
  --bg-row-hover: rgba(255, 223, 27, 0.10);
  --bg-odds-box: #2d3a35;
  --bg-odds-hover: rgba(255, 223, 27, 0.22);
  --border-color: #384842;
  --border-focus: #ffdf1b;
  --accent-primary: #20b486;
  --accent-primary-glow: rgba(32, 180, 134, 0.32);
  --accent-secondary: #ffdf1b;
  --accent-gold: #ffdf1b;
  --team-master: #ffdf1b;
  --goal-line: #a7f3d0;
  --odds-pos: #ffdf1b;
}

:root:not([data-theme="light"])[data-brand-theme="bet365-emerald"] .top-header {
  background: linear-gradient(90deg, #0d5c43 0%, #126e51 50%, #0b4f39 100%);
  border-bottom: 2px solid #ffdf1b;
}

:root:not([data-theme="light"])[data-brand-theme="bet365-emerald"] .nav-bar {
  background: #14382c;
  border-bottom: 1px solid #1f5442;
}

/* 12. Flashscore Carbon & Signal Red (ดำชาร์โคล-แดงสด สไตล์ www.flashscore.com) */
:root:not([data-theme="light"])[data-brand-theme="flashscore-red"] {
  --bg-body: #0b1116;
  --bg-surface: #121b22;
  --bg-surface-2: #18242e;
  --bg-surface-3: #20303d;
  --bg-glass: rgba(11, 17, 22, 0.93);
  --bg-league-header: linear-gradient(90deg, #1b2833 0%, #121b22 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(255, 0, 70, 0.22) 0%, #1b2833 55%, #121b22 100%);
  --bg-row-hover: rgba(255, 0, 70, 0.12);
  --bg-odds-box: #16212b;
  --bg-odds-hover: rgba(255, 0, 70, 0.22);
  --border-color: #263847;
  --border-focus: #ff0046;
  --accent-primary: #ff0046;
  --accent-primary-glow: rgba(255, 0, 70, 0.32);
  --accent-secondary: #00d2ff;
  --accent-gold: #ffcc00;
}

/* 13. Sofascore Electric Cobalt & Rating Green (น้ำเงินโคบอลต์-เขียวเรตติ้ง สไตล์ www.sofascore.com) */
:root:not([data-theme="light"])[data-brand-theme="sofascore-indigo"] {
  --bg-body: #0c1126;
  --bg-surface: #131b38;
  --bg-surface-2: #1a244b;
  --bg-surface-3: #233062;
  --bg-glass: rgba(12, 17, 38, 0.93);
  --bg-league-header: linear-gradient(90deg, #1f2b59 0%, #131b38 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(55, 77, 245, 0.26) 0%, #1f2b59 55%, #131b38 100%);
  --bg-row-hover: rgba(55, 77, 245, 0.15);
  --bg-odds-box: #172042;
  --bg-odds-hover: rgba(0, 230, 118, 0.22);
  --border-color: #2b3b75;
  --border-focus: #00e676;
  --accent-primary: #374df5;
  --accent-primary-glow: rgba(55, 77, 245, 0.35);
  --accent-secondary: #00e676;
  --accent-gold: #ffd600;
}

/* 14. ESPN Broadcast Studio Red & Carbon (ดำสตูดิโอ-แดงสด สไตล์ www.espn.com) */
:root:not([data-theme="light"])[data-brand-theme="espn-broadcast"] {
  --bg-body: #0c0d10;
  --bg-surface: #14161c;
  --bg-surface-2: #1c1f28;
  --bg-surface-3: #262a36;
  --bg-glass: rgba(12, 13, 16, 0.94);
  --bg-league-header: linear-gradient(90deg, #2b1114 0%, #14161c 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(230, 25, 25, 0.26) 0%, #2b1114 55%, #14161c 100%);
  --bg-row-hover: rgba(230, 25, 25, 0.13);
  --bg-odds-box: #191c24;
  --bg-odds-hover: rgba(230, 25, 25, 0.24);
  --border-color: #2e3340;
  --border-focus: #e61919;
  --accent-primary: #e61919;
  --accent-primary-glow: rgba(230, 25, 25, 0.34);
  --accent-secondary: #ffb703;
  --accent-gold: #ffb703;
}

/* 15. Pinnacle & SBOBET Pro Navy & Asian Odds Amber (กรมท่าอาร์กติก-ส้มเอเชียนแฮนดิแคป สไตล์ www.pinnacle.com) */
:root:not([data-theme="light"])[data-brand-theme="pinnacle-arctic"] {
  --bg-body: #08121e;
  --bg-surface: #0e1e30;
  --bg-surface-2: #142942;
  --bg-surface-3: #1c3757;
  --bg-glass: rgba(8, 18, 30, 0.93);
  --bg-league-header: linear-gradient(90deg, #17314f 0%, #0e1e30 100%);
  --bg-league-featured: linear-gradient(90deg, rgba(255, 107, 0, 0.22) 0%, #17314f 55%, #0e1e30 100%);
  --bg-row-hover: rgba(255, 107, 0, 0.13);
  --bg-odds-box: #12243a;
  --bg-odds-hover: rgba(0, 180, 216, 0.24);
  --border-color: #234368;
  --border-focus: #ff6b00;
  --accent-primary: #ff6b00;
  --accent-primary-glow: rgba(255, 107, 0, 0.32);
  --accent-secondary: #00b4d8;
  --accent-gold: #ffb703;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'IBM Plex Sans Thai', 'Inter', 'Noto Sans Lao', 'Noto Sans Khmer', 'Noto Sans Myanmar', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  background-image: radial-gradient(ellipse 80% 45% at 50% 0%, rgba(71, 122, 186, 0.10), transparent 70%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: 0.01em;
  min-height: 100vh;
  padding-top: var(--header-fixed-height, 130px);
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mono, .odds-val, .score-num, .clock-badge {
  font-family: 'JetBrains Mono', 'Inter', 'SFMono-Regular', Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #7ab3fc;
}

button, select, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   TOP HEADER & STREAMING STATUS BAR (LOCKED FIXED AT TOP)
   ========================================================================== */
.top-header-fixed-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: nowrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 360px;
  flex-shrink: 1;
}

.brand-text-wrap {
  min-width: 0;
  overflow: hidden;
}

.brand-logo {
  width: 98px;
  height: 46px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.22));
  flex-shrink: 0;
  transition: transform 0.18s ease, filter 0.18s ease;
}

[data-theme="dark"] .brand-logo {
  filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, 0.55)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.65));
}

.brand-logo:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.6));
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  line-height: 1.25;
}

.brand-name-heading {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.04rem;
}

.brand-num {
  font-weight: 900;
  margin-left: 1px;
  background: linear-gradient(135deg, #ff4d4d 0%, #ef4444 55%, #dc2626 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 6px rgba(239, 68, 68, 0.35));
}

.brand-live {
  color: #f8fafc;
  font-weight: 800;
}

.brand-score {
  color: #38bdf8;
  font-weight: 800;
}

[data-theme="light"] .brand-num {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 55%, #b91c1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: none;
}

[data-theme="light"] .brand-live {
  color: #0f172a;
}

[data-theme="light"] .brand-score {
  color: #0284c7;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.52rem;
  border-radius: 999px;
  background: rgba(244, 63, 94, 0.14);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

[data-theme="light"] .brand-badge {
  background: rgba(225, 29, 72, 0.10);
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.30);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Stream Controls Right (Single-Row Non-Wrapping Capsule Bar) */
.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-controls::-webkit-scrollbar {
  display: none;
}

.stream-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.85rem;
  background: #0f1623;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.stream-status-label {
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.stream-countdown-badge {
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 0.78rem;
}

.stream-divider {
  color: var(--border-color);
  font-size: 0.78rem;
  margin: 0 0.1rem;
}

.stream-clock-inline {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 0 0 var(--accent-primary-glow);
  animation: pulse-live 1.8s infinite;
  flex-shrink: 0;
}

.pulse-dot.paused {
  background-color: var(--accent-gold);
  animation: none;
}

.pulse-dot.error {
  background-color: var(--accent-danger);
  animation: none;
}

@keyframes pulse-live {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.control-select, .btn-control {
  background: #0f1623;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  height: 36px;
  padding: 0 0.82rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.lang-select-pill {
  border-color: rgba(88, 144, 216, 0.45);
  color: var(--text-primary);
  font-weight: 600;
}

.mobile-top-quick-actions {
  display: none;
}

#btnThemeToggle,
#btnContactTheme,
#btnDashTheme {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.12rem;
  line-height: 1;
  border-radius: 999px;
  flex-shrink: 0;
}

[data-theme="light"] .stream-pill,
[data-theme="light"] .control-select,
[data-theme="light"] .btn-control {
  background: var(--bg-surface-2);
}

.control-select:hover, .btn-control:hover {
  border-color: var(--accent-secondary);
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

.btn-control.btn-primary {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.38);
  color: #34d399;
}

[data-theme="light"] .btn-control.btn-primary {
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.35);
  color: var(--accent-primary);
}

.btn-control.btn-primary:hover {
  background: var(--accent-primary);
  color: #fff;
}

.btn-control.btn-accent {
  background: rgba(88, 144, 216, 0.14);
  border-color: rgba(88, 144, 216, 0.42);
  color: #7ab3fc;
}

[data-theme="light"] .btn-control.btn-accent {
  background: rgba(2, 132, 199, 0.10);
  border-color: rgba(2, 132, 199, 0.35);
  color: var(--accent-secondary);
}

.btn-control.btn-accent:hover {
  background: var(--accent-secondary);
  color: #fff;
}

.btn-control.btn-header-help {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-weight: 700;
}

[data-theme="light"] .btn-control.btn-header-help {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(217, 119, 6, 0.42);
  color: #b45309;
}

.btn-control.btn-header-help:hover,
.btn-control.btn-header-help.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.32);
}

@media (max-width: 1480px) and (min-width: 769px) {
  .header-controls {
    gap: 0.34rem;
  }
  .header-controls .control-select,
  .header-controls .btn-control {
    padding: 0 0.64rem;
    font-size: 0.76rem;
  }
  .header-controls .stream-pill {
    padding: 0 0.68rem;
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   MAIN NAVIGATION TABS
   ========================================================================== */
.nav-bar {
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-color);
}

.nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow: hidden;
}

.nav-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.15rem;
  flex-wrap: nowrap;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  height: 36px;
  padding: 0 0.68rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 1460px) {
  .nav-tab {
    padding: 0 0.5rem;
    font-size: 0.8rem;
    gap: 0.28rem;
  }
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
  border-color: var(--border-subtle);
}

.nav-tab.active,
.nav-tab[data-tab="docs"].active {
  color: var(--text-primary);
  background: var(--bg-surface-2);
  background: color-mix(in srgb, var(--accent-secondary) 15%, var(--bg-surface-2));
  border-color: var(--accent-secondary);
  border-color: color-mix(in srgb, var(--accent-secondary) 52%, var(--border-color));
  box-shadow: inset 0 -2px 0 var(--accent-secondary), 0 2px 8px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .nav-tab.active,
[data-theme="light"] .nav-tab[data-tab="docs"].active {
  color: var(--accent-secondary);
  background: rgba(2, 132, 199, 0.08);
  background: color-mix(in srgb, var(--accent-secondary) 10%, #ffffff);
  border-color: color-mix(in srgb, var(--accent-secondary) 45%, var(--border-color));
  box-shadow: inset 0 -2px 0 var(--accent-secondary), 0 1px 4px rgba(15, 23, 42, 0.05);
}

.tab-count {
  font-size: 0.72rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: var(--bg-surface-3);
  color: var(--text-secondary);
  font-weight: 700;
}

.nav-tab.active .tab-count {
  background: var(--accent-secondary);
  color: #fff;
}

/* Red Circle Indicator on "กำลังแข่งขัน (Live)" Tab — blinks when live matches > 0 */
.nav-tab[data-tab="live"] .live-tab-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff6b6b 0%, #ef4444 55%, #dc2626 100%);
  border: 1px solid rgba(254, 202, 202, 0.55);
  box-shadow: 0 0 4px rgba(239, 68, 68, 0.45);
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.nav-tab[data-tab="live"].has-live-matches .live-tab-dot,
.nav-tab[data-tab="live"] .live-tab-dot.is-blinking {
  opacity: 1;
  border-color: rgba(254, 226, 226, 0.9);
  animation: blinkLiveTabDot 1.15s infinite ease-in-out;
}

@keyframes blinkLiveTabDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.95), 0 0 0 0 rgba(239, 68, 68, 0.75);
  }
  50% {
    opacity: 0.28;
    transform: scale(0.88);
    box-shadow: 0 0 3px rgba(239, 68, 68, 0.35), 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* Prominent "▶ ดูสดทุกกีฬา (Live TV)" Navigation Pill Button with Red Play Circle */
.nav-tab[data-tab="streams"],
.nav-tab.nav-tab-streams {
  height: 34px;
  margin: 0 0.12rem;
  padding: 0 0.68rem 0 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.42);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(15, 23, 42, 0.9) 100%);
  color: #ecfdf5;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: none;
}

.nav-tab[data-tab="streams"]:hover,
.nav-tab.nav-tab-streams:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24) 0%, rgba(15, 23, 42, 0.94) 100%);
  border: 1px solid rgba(52, 211, 153, 0.68);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
  transform: translateY(-1px);
}

.nav-tab[data-tab="streams"].active,
.nav-tab.nav-tab-streams.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.30) 0%, rgba(6, 78, 59, 0.85) 100%);
  border: 1px solid rgba(52, 211, 153, 0.82);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.28);
}

.nav-tab[data-tab="streams"] .live-tv-dot,
.nav-tab.nav-tab-streams .live-tv-dot,
.nav-tab[data-tab="streams"].active .live-tv-dot,
.nav-tab.nav-tab-streams.active .live-tv-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3b3b 0%, #dc2626 100%);
  border: 1px solid rgba(254, 202, 202, 0.75);
  color: #ffffff;
  font-size: 0.62rem;
  line-height: 1;
  padding-left: 1.5px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
  animation: pulseLiveTvDot 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulseLiveTvDot {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.85); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.nav-tab[data-tab="streams"] .tab-count,
.nav-tab.nav-tab-streams .tab-count {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  font-weight: 800;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: none;
}

.nav-tab[data-tab="streams"].active .tab-count,
.nav-tab.nav-tab-streams.active .tab-count {
  background: rgba(6, 16, 31, 0.55);
  color: #ffffff;
  border: 1px solid rgba(52, 211, 153, 0.55);
}

[data-theme="light"] .nav-tab[data-tab="streams"],
[data-theme="light"] .nav-tab.nav-tab-streams {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #065f46;
  box-shadow: none;
}

[data-theme="light"] .nav-tab[data-tab="streams"]:hover,
[data-theme="light"] .nav-tab.nav-tab-streams:hover,
[data-theme="light"] .nav-tab[data-tab="streams"].active,
[data-theme="light"] .nav-tab.nav-tab-streams.active {
  background: rgba(16, 185, 129, 0.20);
  border: 1px solid rgba(5, 150, 105, 0.58);
  color: #064e3b;
  box-shadow: none;
}

[data-theme="light"] .nav-tab[data-tab="streams"] .tab-count,
[data-theme="light"] .nav-tab.nav-tab-streams .tab-count {
  background: #059669;
  color: #ffffff;
  border: none;
  box-shadow: none;
}

[data-theme="light"] .nav-tab[data-tab="streams"]:hover .tab-count,
[data-theme="light"] .nav-tab.nav-tab-streams:hover .tab-count,
[data-theme="light"] .nav-tab[data-tab="streams"].active .tab-count,
[data-theme="light"] .nav-tab.nav-tab-streams.active .tab-count {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* Live Ticker & Stats Strip */
.stats-strip {
  max-width: 1600px;
  width: 100%;
  margin: 0.9rem auto 0;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card.stat-live .stat-value { color: var(--accent-primary); }
.stat-card.stat-featured .stat-value { color: var(--accent-gold); }
.stat-card.stat-updates .stat-value { color: var(--accent-secondary); }

/* Live Event Ticker */
.live-ticker-bar {
  max-width: 1600px;
  width: 100%;
  margin: 0.7rem auto 0;
  padding: 0 1.25rem;
}

.ticker-inner {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.48rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.86rem;
  overflow: hidden;
}

.ticker-tag {
  background: rgba(88, 144, 216, 0.16);
  color: #7ab3fc;
  border: 1px solid rgba(88, 144, 216, 0.35);
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .ticker-tag {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.35);
}

.ticker-items {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-item.goal-event {
  color: var(--accent-gold);
  font-weight: 600;
}

.ticker-arrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1;
}

.ticker-arrow-up {
  color: #10b981;
  text-shadow: 0 0 6px rgba(16, 185, 129, 0.35);
}

.ticker-arrow-down {
  color: #ef4444;
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .ticker-arrow-up {
  color: #059669;
  text-shadow: none;
}

[data-theme="light"] .ticker-arrow-down {
  color: #dc2626;
  text-shadow: none;
}

/* ==========================================================================
   FILTER & VIEW TOOLBAR (Reference Pill Buttons Style)
   ========================================================================== */
.toolbar-section {
  max-width: 1600px;
  width: 100%;
  margin: 0.8rem auto;
  padding: 0 1.25rem;
}

.toolbar-box,
.toolbar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.72rem 1.05rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem 0.65rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* Top Row Layout on Desktop (> 768px): Scope Switcher (1) -> Market Chips (2) -> Filter Drawer Button (3) */
@media (min-width: 769px) {
  .toolbar-scope-group {
    display: contents;
  }
  .toolbar-scope-group .league-scope-pills {
    order: 1;
    flex-shrink: 0;
  }
  .yt-studio-market-chips-group {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
  }
  .yt-studio-market-chips-group .filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0.34rem;
    align-items: center;
  }
  .yt-studio-market-chips-group .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .yt-studio-market-chips-group .pill-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.38rem 0.78rem;
    font-size: 0.81rem;
  }
  .yt-studio-filter-drawer-btn {
    order: 3;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    height: 36px;
    padding: 0 0.88rem;
    border-radius: 999px;
    font-size: 0.81rem;
    font-weight: 600;
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.16s ease;
  }
  .yt-studio-filter-drawer-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    background: color-mix(in srgb, var(--accent-secondary) 10%, var(--bg-surface-2));
  }
  .yt-studio-filter-drawer-btn.active {
    background: color-mix(in srgb, var(--accent-secondary) 16%, var(--bg-surface-2));
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  }
  [data-theme="light"] .yt-studio-filter-drawer-btn.active {
    color: var(--accent-secondary);
    background: rgba(2, 132, 199, 0.10);
  }
  .yt-studio-drawer-arrow {
    font-size: 0.65rem;
    opacity: 0.85;
  }
  .yt-studio-collapsible-group {
    order: 4;
    width: 100%;
  }
  .quick-league-bar {
    order: 5;
  }
  .results-date-bar {
    order: 6;
  }
}

/* Collapsible Studio Filter & Tools Drawer (Default Collapsed on Desktop & Mobile) */
.toolbar-box:not(.mobile-studio-tools-open) .yt-studio-collapsible-group {
  display: none !important;
}

.toolbar-box.mobile-studio-tools-open .yt-studio-collapsible-group {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border-subtle);
}

/* Market Filter Pills (Matching the Reference Screenshot Pills) */
.filter-pills {
  display: inline-flex;
  background: transparent;
  padding: 0;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pill-btn {
  border: 1px solid var(--border-color);
  background: #0f1623;
  color: var(--text-secondary);
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

[data-theme="light"] .pill-btn {
  background: var(--bg-surface-2);
}

.pill-btn:hover {
  color: var(--text-primary);
  border-color: #364966;
  background: var(--bg-surface-2);
}

.pill-btn.active {
  background: rgba(88, 144, 216, 0.16);
  border-color: var(--accent-secondary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(88, 144, 216, 0.18);
}

[data-theme="light"] .pill-btn.active {
  background: var(--accent-secondary);
  color: #ffffff;
}

/* Global Primary League Scope Switcher (Popular Leagues vs All Leagues - Across All Menus) */
.toolbar-scope-group {
  display: flex;
  align-items: center;
}
.league-scope-pills,
.today-scope-pills {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.28rem 0.42rem;
  border-radius: 999px;
  border: 1px solid rgba(88, 144, 216, 0.25);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.pill-btn.is-scope-popular,
.pill-btn.is-today-popular {
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.pill-btn.is-scope-popular.active,
.pill-btn.is-today-popular.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.32) 0%, rgba(217, 119, 6, 0.42) 100%);
  border-color: #f59e0b;
  color: #fef08a;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
}
.pill-btn.is-scope-all,
.pill-btn.is-today-all {
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.pill-btn.is-scope-all.active,
.pill-btn.is-today-all.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.38) 100%);
  border-color: #10b981;
  color: #a7f3d0;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .league-scope-pills,
[data-theme="light"] .today-scope-pills {
  background: #f1f5f9;
  border-color: #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .pill-btn.is-scope-popular.active,
[data-theme="light"] .pill-btn.is-today-popular.active {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
[data-theme="light"] .pill-btn.is-scope-all.active,
[data-theme="light"] .pill-btn.is-today-all.active {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* Search & League Filter */
.search-input-wrap,
.search-box {
  position: relative;
  min-width: 230px;
}

.search-input {
  width: 100%;
  background: #0f1623;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.44rem 0.95rem 0.44rem 2.25rem;
  font-size: 0.86rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

[data-theme="light"] .search-input {
  background: var(--bg-surface-2);
}

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

.search-input:focus {
  border-color: var(--border-focus);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Quick League Bar & Multi-Sport Category Filter Bar (แถบลัดลีกดัง / เลือกประเภทกีฬา 1-Click) */
.quick-league-bar {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  padding: 0.7rem 2px 2px 0;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border-subtle);
  overflow: visible;
}

.quick-league-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.quick-league-list {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 0.26rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 2px 2px;
  scrollbar-width: none;
}

.quick-league-list::-webkit-scrollbar {
  display: none;
}

.quick-league-scroll {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.quick-league-btn,
.ql-pill {
  appearance: none;
  -webkit-appearance: none;
  background: #0f1623;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.3rem 0.56rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

[data-theme="light"] .quick-league-btn,
[data-theme="light"] .ql-pill {
  background: var(--bg-surface-2);
  color: var(--text-secondary);
}

.quick-league-btn:hover,
.ql-pill:hover {
  color: var(--text-primary);
  border-color: #364966;
  background: var(--bg-surface-2);
}

[data-theme="light"] .quick-league-btn:hover,
[data-theme="light"] .ql-pill:hover {
  border-color: var(--accent-secondary);
  background: #e2e8f0;
  color: var(--text-primary);
}

.quick-league-btn.active,
.ql-pill.active {
  background: rgba(88, 144, 216, 0.20);
  border-color: var(--accent-secondary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(88, 144, 216, 0.20);
}

[data-theme="light"] .quick-league-btn.active,
[data-theme="light"] .ql-pill.active {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: #ffffff;
}

/* Special Live Filter Chip (🟢 กำลังถ่ายทอดสด LIVE) */
.ql-pill.ql-pill-live {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
  color: #6ee7b7;
}

[data-theme="light"] .ql-pill.ql-pill-live {
  border-color: rgba(5, 150, 105, 0.40);
  background: rgba(5, 150, 105, 0.08);
  color: #047857;
}

.ql-pill.ql-pill-live:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: #10b981;
  color: #ffffff;
}

[data-theme="light"] .ql-pill.ql-pill-live:hover {
  background: rgba(5, 150, 105, 0.15);
  border-color: #059669;
  color: #065f46;
}

.ql-pill.ql-pill-live.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(5, 150, 105, 0.22) 100%);
  border-color: #10b981;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.28);
}

[data-theme="light"] .ql-pill.ql-pill-live.active {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}

.ql-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 700;
}

[data-theme="light"] .ql-count {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text-secondary);
}

.quick-league-btn.active .ql-count,
.ql-pill.active .ql-count {
  background: var(--accent-secondary);
  color: #ffffff;
}

.ql-pill.ql-pill-live .ql-count {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

[data-theme="light"] .ql-pill.ql-pill-live .ql-count {
  background: rgba(5, 150, 105, 0.16);
  color: #047857;
}

.ql-pill.ql-pill-live.active .ql-count {
  background: #10b981;
  color: #052e16;
}

[data-theme="light"] .quick-league-btn.active .ql-count,
[data-theme="light"] .ql-pill.active .ql-count,
[data-theme="light"] .ql-pill.ql-pill-live.active .ql-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Results Date Bar */
.results-date-bar {
  display: none;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.7rem;
  margin-top: 0.7rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.results-date-bar.visible {
  display: flex;
}

.date-input {
  background: #0f1623;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.86rem;
}

[data-theme="light"] .date-input {
  background: #ffffff;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-container {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
  flex: 1;
}

/* League Group Card */
.league-group {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.league-group.featured-league {
  border-color: rgba(251, 191, 36, 0.38);
}

.league-header {
  background: var(--bg-league-header);
  padding: 0.7rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

.league-group.featured-league .league-header {
  background: var(--bg-league-featured);
}

[data-theme="light"] .league-header {
  border-left: 4px solid var(--accent-secondary);
}

[data-theme="light"] .league-group.featured-league .league-header {
  border-left: 4px solid var(--accent-gold);
}

.league-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.star-league-badge {
  color: var(--accent-gold);
  font-size: 1.05rem;
}

.market-type-tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  background: rgba(88, 144, 216, 0.15);
  color: #7ab3fc;
  border: 1px solid rgba(88, 144, 216, 0.32);
}

[data-theme="light"] .market-type-tag {
  background: rgba(2, 132, 199, 0.10);
  color: var(--accent-secondary);
  border-color: rgba(2, 132, 199, 0.30);
}

.market-type-tag.tag-corners {
  background: rgba(167, 139, 250, 0.15);
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.32);
}

[data-theme="light"] .market-type-tag.tag-corners {
  background: rgba(124, 58, 237, 0.10);
  color: var(--accent-purple);
  border-color: rgba(124, 58, 237, 0.30);
}

.market-type-tag.tag-booking {
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border-color: rgba(251, 191, 36, 0.32);
}

.league-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.league-group.collapsed .league-body {
  display: none;
}

.league-group.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

.collapse-icon {
  transition: transform 0.2s ease;
}

/* ==========================================================================
   COMBINED LIVE SCORE & SPORTSBOOK ODDS TABLE (HIGH-LEGIBILITY TYPOGRAPHY)
   ========================================================================== */
.odds-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.odds-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1140px;
}

/* Sticky Locked Team Names Column (.col-teams) for Horizontal Odds Scrolling */
.odds-table:not(.results-table):not(.streams-table) col.col-teams {
  width: 260px;
}

.odds-table:not(.results-table):not(.streams-table) th.col-teams,
.odds-table:not(.results-table):not(.streams-table) td.col-teams {
  position: sticky;
  left: 0;
  z-index: 4;
  background-color: var(--bg-surface);
  background-clip: padding-box;
  box-shadow: 3px 0 10px -2px rgba(0, 0, 0, 0.45);
}

.odds-table:not(.results-table):not(.streams-table) thead th.col-teams {
  z-index: 6;
  background-color: var(--bg-surface-2);
}

.odds-table:not(.results-table):not(.streams-table) tbody tr:nth-child(even) td.col-teams {
  background-color: var(--bg-surface-2);
}

.odds-table:not(.results-table):not(.streams-table) tbody tr.sub-price-row td.col-teams {
  background-color: var(--bg-body);
}

[data-theme="light"] .odds-table:not(.results-table):not(.streams-table) th.col-teams,
[data-theme="light"] .odds-table:not(.results-table):not(.streams-table) td.col-teams {
  box-shadow: 3px 0 8px -2px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .odds-table:not(.results-table):not(.streams-table) tbody tr.sub-price-row td.col-teams {
  background-color: #f8fafc;
}

.odds-table:not(.results-table):not(.streams-table) tbody tr:hover td.col-teams {
  background-color: var(--bg-surface-3);
}

.odds-table thead th {
  background: var(--bg-surface-2);
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  padding: 0.48rem 0.4rem;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-subtle);
  text-align: center;
  white-space: nowrap;
}

[data-theme="light"] .odds-table thead th {
  color: var(--text-secondary);
}

.odds-table thead tr.sub-header th {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.34rem 0.25rem;
  background: rgba(9, 15, 26, 0.45);
  color: var(--text-secondary);
  white-space: nowrap;
}

[data-theme="light"] .odds-table thead tr.sub-header th {
  background: #f1f5f9;
}

.odds-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.12s ease;
}

.odds-table tbody tr:nth-child(even) {
  background-color: var(--bg-row-alt);
}

.odds-table tbody tr:hover {
  background-color: var(--bg-row-hover);
}

.odds-table tbody tr.sub-price-row {
  background-color: rgba(9, 15, 26, 0.32);
}

[data-theme="light"] .odds-table tbody tr.sub-price-row {
  background-color: #f8fafc;
}

.odds-table td {
  padding: 0.52rem 0.55rem;
  border-right: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.odds-table td.col-time {
  padding: 0.42rem 0.35rem;
}

.odds-table td.col-score,
.odds-table td.col-action {
  padding: 0.5rem 0.42rem;
}

.odds-table td.col-odds-group,
.odds-table td.col-1x2-group {
  padding: 0.48rem 0.38rem;
}

/* Column Widths (Sized for Longest Possible Handicap / O-U / 1X2 + Trend Arrow Data, Locked Across All League Tables via <colgroup>) */
.col-time       { width: 108px; min-width: 108px; max-width: 108px; text-align: center; }
.odds-table.is-schedule-table .col-time { width: 162px; min-width: 162px; max-width: 162px; }
.col-teams      { width: auto;  min-width: 240px; }
.col-score      { width: 68px;  min-width: 68px;  max-width: 68px;  text-align: center; }
.col-odds-group { width: 132px; min-width: 132px; max-width: 132px; }
.col-odds-hdp   { width: 132px; min-width: 132px; max-width: 132px; }
.col-odds-ou    { width: 152px; min-width: 152px; max-width: 152px; }
.col-1x2-group  { width: 96px;  min-width: 96px;  max-width: 96px;  }
.col-action     { width: 72px;  min-width: 72px;  max-width: 72px;  text-align: center; white-space: nowrap; }

/* Results Table — Fixed Layout, 2-Line Headers & Aligned VS Column Across All Tables */
.odds-table.results-table {
  table-layout: fixed;
  width: 100%;
  min-width: 680px;
}

.odds-table.results-table .col-time   { width: 172px; min-width: 172px; max-width: 172px; text-align: center; }
.odds-table.results-table .col-teams  { width: auto; }
.odds-table.results-table .col-score  { width: 120px; text-align: center; }
.odds-table.results-table .col-status { width: 140px; text-align: center; }

.odds-table.results-table th .th-two-line {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  line-height: 1.2;
  white-space: nowrap;
}

.odds-table.results-table th .th-line-main {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-primary);
}

.odds-table.results-table th .th-line-sub {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.odds-table.results-table th.col-score-ht {
  background: rgba(88, 144, 216, 0.08);
  border-left: 1px solid rgba(88, 144, 216, 0.22);
}

.odds-table.results-table th.col-score-ht .th-line-main {
  color: #7ab3fc;
}

.odds-table.results-table th.col-score-ht .th-line-sub {
  color: rgba(122, 179, 252, 0.78);
}

[data-theme="light"] .odds-table.results-table th.col-score-ht .th-line-main {
  color: #0284c7;
}

[data-theme="light"] .odds-table.results-table th.col-score-ht .th-line-sub {
  color: #0369a1;
}

.odds-table.results-table th.col-score-ft {
  background: rgba(16, 185, 129, 0.1);
  border-left: 1px solid rgba(16, 185, 129, 0.25);
  border-right: 1px solid rgba(16, 185, 129, 0.25);
}

.odds-table.results-table th.col-score-ft .th-line-main {
  color: var(--accent-primary);
}

.odds-table.results-table th.col-score-ft .th-line-sub {
  color: rgba(52, 211, 153, 0.82);
}

[data-theme="light"] .odds-table.results-table th.col-score-ft .th-line-sub {
  color: #047857;
}

.odds-table.results-table td.col-score-ht {
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(88, 144, 216, 0.03);
}

.odds-table.results-table td.col-score-ft {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--accent-primary);
  background: rgba(16, 185, 129, 0.05);
}

.results-teams-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.results-team-home {
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-vs-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  margin: 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 0.1rem 0;
  text-align: center;
}

.results-team-away {
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-team-home.is-winner,
.results-team-away.is-winner {
  color: var(--accent-primary);
  font-weight: 700;
}

.results-team-home.is-loser,
.results-team-away.is-loser {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Multi-Sport Live Stream Center Table — Fixed Layout & Aligned VS Column Across All Sport Tables */
.odds-table.streams-table {
  table-layout: fixed;
  width: 100%;
  min-width: 740px;
}

.odds-table.streams-table .col-stream-time   { width: 135px; text-align: center; }
.odds-table.streams-table .col-stream-league { width: 220px; text-align: left; }
.odds-table.streams-table .col-teams         { width: auto; }
.odds-table.streams-table .col-stream-ch     { width: 120px; text-align: center; }
.odds-table.streams-table .col-stream-action { width: 165px; text-align: center; }

.odds-table.streams-table th.col-stream-league {
  text-align: left;
  padding-left: 0.75rem;
}

.stream-teams-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.stream-team-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stream-team-cell.stream-team-home {
  align-items: flex-start;
  text-align: left;
}

.stream-team-cell.stream-team-away {
  align-items: flex-end;
  text-align: right;
}

.stream-team-cell .results-team-home,
.stream-team-cell .results-team-away {
  width: 100%;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stream-team-sub {
  width: 100%;
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Time & Live Status Cell */
.match-time-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.clock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.48rem;
  border-radius: 6px;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.clock-badge.is-live {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.38);
}

[data-theme="light"] .clock-badge.is-live {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.35);
}

.clock-badge.is-ht {
  background: rgba(251, 191, 36, 0.16);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.38);
}

[data-theme="light"] .clock-badge.is-ht {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.35);
}

.injury-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-danger);
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  white-space: nowrap;
}

.price-no-tag {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Teams Cell (Larger, Clearer Team Names) */
.teams-stack {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.team-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.team-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  min-width: 0;
  flex: 1;
}

.team-name-wrap > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Right-Side Badge Slots inside .col-teams (Compact Play Pill & Corner Badge) */
.team-right-slots {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.mobile-team-meta-row {
  display: none;
}

.slot-stream-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.slot-stream-pill:empty {
  display: none;
}

.slot-corner-pill {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.slot-corner-pill:empty {
  display: none;
}

.team-name-wrap.is-master {
  color: var(--team-master);
  font-weight: 700;
}

.master-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.18);
  color: var(--team-master);
  border: 1px solid rgba(251, 191, 36, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .master-pill {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.38);
}

.red-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e11d48;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.74rem;
  font-weight: 700;
  min-width: 18px;
  height: 20px;
  padding: 0 5px;
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(225, 29, 72, 0.55);
}

.corner-Summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.3);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  white-space: nowrap;
  box-sizing: border-box;
}

.slot-corner-pill .corner-Summary-pill {
  width: 56px;
}

[data-theme="light"] .corner-Summary-pill {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(124, 58, 237, 0.32);
}

.live-stream-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
}

.live-stream-pill:hover {
  background: rgba(56, 189, 248, 0.24);
  transform: translateY(-1px);
}

.live-stream-pill.is-now-playing {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .live-stream-pill {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.10);
  border-color: rgba(2, 132, 199, 0.32);
}

[data-theme="light"] .live-stream-pill.is-now-playing {
  color: #059669;
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.38);
}

/* Compact Play Button (▶ ดูสด) on In-Play / Match Rows, Cards & Live TV Table */
.btn-play-live-match {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  gap: 0.3rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d1fae5;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(15, 23, 42, 0.86) 100%);
  border: 1px solid rgba(16, 185, 129, 0.40);
  padding: 0.1rem 0.5rem 0.1rem 0.18rem;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 6px rgba(2, 6, 23, 0.26);
}

.slot-stream-pill .btn-play-live-match {
  width: auto;
}

.btn-play-live-match:hover {
  transform: translateY(-1px);
  color: #ffffff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 78, 59, 0.88) 100%);
  border-color: rgba(52, 211, 153, 0.72);
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.24);
}

.btn-play-live-match .play-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3b3b 0%, #dc2626 100%);
  border: 1px solid rgba(254, 202, 202, 0.75);
  color: #ffffff;
  font-size: 0.56rem;
  line-height: 1;
  padding-left: 1.5px;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.65);
}

.btn-play-live-match.is-now-playing {
  color: #ecfdf5;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.20) 0%, rgba(15, 23, 42, 0.88) 100%);
  border-color: rgba(52, 211, 153, 0.48);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.16);
}

.btn-play-live-match.is-now-playing:hover {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.32) 0%, rgba(6, 78, 59, 0.92) 100%);
  border-color: #34d399;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

.btn-play-live-match.is-now-playing .play-icon-circle {
  background: linear-gradient(135deg, #ff3b3b 0%, #dc2626 100%);
  border: 1px solid rgba(254, 202, 202, 0.82);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
  animation: pulsePlayGlow 1.8s infinite ease-in-out;
}

.btn-play-live-match.is-inline-active {
  color: #fde68a;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22) 0%, rgba(15, 23, 42, 0.90) 100%);
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.24);
}

.btn-play-live-match.is-inline-active .play-icon-circle {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: rgba(254, 243, 199, 0.9);
  color: #ffffff;
  padding-left: 0;
  animation: none;
}

@keyframes pulsePlayGlow {
  0%, 100% { transform: scale(1); box-shadow: 0 0 5px rgba(239, 68, 68, 0.65); }
  50% { transform: scale(1.07); box-shadow: 0 0 10px rgba(248, 113, 113, 0.95); }
}

[data-theme="light"] .btn-play-live-match {
  color: #065f46;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(236, 253, 245, 0.96) 100%);
  border-color: rgba(5, 150, 105, 0.42);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .btn-play-live-match:hover,
[data-theme="light"] .btn-play-live-match.is-now-playing:hover {
  color: #064e3b;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-color: #059669;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.18);
}

[data-theme="light"] .btn-play-live-match .play-icon-circle {
  background: linear-gradient(135deg, #ff3b3b 0%, #dc2626 100%);
  color: #ffffff;
}

[data-theme="light"] .btn-play-live-match.is-now-playing {
  color: #065f46;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(209, 250, 229, 0.94) 100%);
  border-color: rgba(5, 150, 105, 0.48);
}

[data-theme="light"] .btn-play-live-match.is-now-playing .play-icon-circle {
  background: linear-gradient(135deg, #ff3b3b 0%, #dc2626 100%);
  color: #ffffff;
}

[data-theme="light"] .btn-play-live-match.is-inline-active {
  color: #78350f;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: rgba(217, 119, 6, 0.6);
}

/* Score Cell */
.score-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: var(--bg-odds-box);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.28rem 0.35rem;
}

.score-num {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-primary);
}

.score-stack.live-score .score-num {
  color: #34d399;
}

[data-theme="light"] .score-stack.live-score .score-num {
  color: var(--accent-primary);
}

/* Odds Cells (HDP, O/U, 1X2 - Compact & Crisp Numbers, Sized for Max-Length Values) */
.odds-pair-grid {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  width: 100%;
}

.odds-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  white-space: nowrap;
  box-sizing: border-box;
  width: 100%;
  gap: 0.26rem;
  padding: 0.2rem 0.4rem;
  border-radius: 5px;
  background: var(--bg-odds-box);
  border: 1px solid rgba(163, 179, 201, 0.07);
  min-height: 26px;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.odds-line-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="light"] .odds-line-row {
  border-color: #e2e8f0;
}

.odds-line-row:hover {
  background: var(--bg-odds-hover);
  border-color: rgba(88, 144, 216, 0.35);
}

.goal-tag {
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--goal-line);
  white-space: nowrap;
  flex-shrink: 0;
}

.ou-prefix {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.odds-val {
  font-size: 0.83rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.14rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.odds-val.neg-odds {
  color: var(--odds-neg);
}

.odds-val.pos-odds {
  color: var(--odds-pos);
}

.odds-val.1x2-odds,
.odds-val.odds-1x2 {
  color: var(--odds-1x2);
}

.odds-1x2-stack {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}

.odds-1x2-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  white-space: nowrap;
  box-sizing: border-box;
  width: 100%;
  gap: 0.25rem;
  padding: 0.14rem 0.38rem;
  border-radius: 5px;
  background: var(--bg-odds-box);
  border: 1px solid rgba(163, 179, 201, 0.06);
  font-size: 0.81rem;
}

[data-theme="light"] .odds-1x2-row {
  border-color: #e2e8f0;
}

.odds-1x2-label {
  font-size: 0.73rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Real-Time Flash Animations for Score & Odds Updates */
@keyframes flashGreen {
  0% { background-color: rgba(16, 185, 129, 0.55); transform: scale(1.03); }
  100% { background-color: var(--bg-odds-box); transform: scale(1); }
}

@keyframes flashRed {
  0% { background-color: rgba(244, 63, 94, 0.55); transform: scale(1.03); }
  100% { background-color: var(--bg-odds-box); transform: scale(1); }
}

@keyframes flashGoal {
  0%, 20% { background-color: rgba(245, 158, 11, 0.65); box-shadow: 0 0 18px rgba(245, 158, 11, 0.8); transform: scale(1.08); }
  100% { background-color: var(--bg-odds-box); box-shadow: none; transform: scale(1); }
}

.flash-up {
  animation: flashGreen 2.5s ease-out;
}

.flash-down {
  animation: flashRed 2.5s ease-out;
}

.goal-flash {
  animation: flashGoal 3.5s ease-out;
}

.trend-arrow {
  font-size: 0.72rem;
}
.trend-up { color: #10b981; }
.trend-down { color: #f43f5e; }

/* Action Buttons in Row */
.action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem 0.22rem;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: all 0.15s ease;
  vertical-align: middle;
}

.action-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
  border-color: var(--border-color);
}

.action-btn.fav-active {
  color: var(--accent-gold);
}

/* ==========================================================================
   INLINE LIVE MATCH STREAM DOCK & MULTI-SPORT LIVE TV CENTER
   ========================================================================== */
.tv-player-dock {
  background: linear-gradient(180deg, #0d1526 0%, #070b14 100%);
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.05rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .tv-player-dock {
  background: linear-gradient(180deg, #0f172a 0%, #090d16 100%);
  color: #f8fafc;
}

.tv-player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.tv-player-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tv-player-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inline-player-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-size: 0.84rem;
  color: #f8fafc;
}

.inline-player-score-nums b {
  color: #34d399;
  font-size: 0.95rem;
  padding: 0 0.25rem;
}

.tv-player-frame-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #04070e;
}

.tv-player-iframe {
  width: 100%;
  height: 460px;
  border: 0;
  display: block;
  background: #04070e;
  overflow: hidden;
}

.btn-fullscreen-stream {
  border-color: rgba(16, 185, 129, 0.55) !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(14, 165, 233, 0.22) 100%) !important;
  color: #6ee7b7 !important;
  font-weight: 700 !important;
}

.btn-fullscreen-stream:hover {
  border-color: #34d399 !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38) 0%, rgba(14, 165, 233, 0.36) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
}

.tv-pseudo-fs-exit-btn {
  display: none;
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 12px));
  left: max(14px, env(safe-area-inset-left, 14px));
  z-index: 2147483647;
  height: 36px;
  padding: 0 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  color: #ffffff;
  border: 1.5px solid rgba(244, 63, 94, 0.65);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.78rem;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tv-player-frame-wrap.is-pseudo-fullscreen .tv-pseudo-fs-exit-btn,
.tv-player-frame-wrap:fullscreen .tv-pseudo-fs-exit-btn {
  display: inline-flex !important;
}

.tv-player-frame-wrap:-webkit-full-screen .tv-pseudo-fs-exit-btn {
  display: inline-flex !important;
}

.tv-player-frame-wrap:-moz-full-screen .tv-pseudo-fs-exit-btn {
  display: inline-flex !important;
}

.tv-player-frame-wrap.is-pseudo-fullscreen,
.tv-player-frame-wrap:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000000 !important;
  z-index: 2147483640 !important;
}

.tv-player-frame-wrap:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000000 !important;
  z-index: 2147483640 !important;
}

.tv-player-frame-wrap:-moz-full-screen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: unset !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000000 !important;
  z-index: 2147483640 !important;
}

.tv-player-frame-wrap.is-pseudo-fullscreen .tv-player-iframe,
.tv-player-frame-wrap:fullscreen .tv-player-iframe,
.tv-player-iframe:fullscreen {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
}

.tv-player-frame-wrap:-webkit-full-screen .tv-player-iframe,
.tv-player-iframe:-webkit-full-screen {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
}

.tv-player-frame-wrap:-moz-full-screen .tv-player-iframe,
.tv-player-iframe:-moz-full-screen {
  position: absolute !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
}

body.has-pseudo-fullscreen {
  overflow: hidden !important;
}

body.has-pseudo-fullscreen .top-header-fixed-wrap,
body.has-pseudo-fullscreen #ytStudioMobileBottomNav,
body.has-pseudo-fullscreen .ad-sticky-bottom-wrap {
  display: none !important;
}

body.has-pseudo-fullscreen .modal-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transform: none !important;
  z-index: 2147483635 !important;
}

body.has-pseudo-fullscreen .modal-dialog {
  transform: none !important;
  filter: none !important;
  overflow: visible !important;
  max-height: none !important;
}

@media (max-width: 768px) {
  .tv-player-iframe {
    height: 260px;
  }
}

.inline-player-switcher-bar {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.inline-switcher-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.inline-switcher-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.inline-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.inline-switcher-pill:hover {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.22);
}

.inline-switcher-pill.active {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.22);
  color: #ecfdf5;
}

/* Multi-Sport Stream Center Cards & Filter Pills */
.stream-center-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stream-sport-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.sport-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sport-filter-pill:hover {
  color: var(--text-primary);
  border-color: var(--accent-secondary);
}

.sport-filter-pill.active {
  color: #ecfdf5;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(14, 165, 233, 0.28) 100%);
  border-color: #34d399;
}

[data-theme="light"] .sport-filter-pill.active {
  color: #065f46;
  background: rgba(16, 185, 129, 0.16);
  border-color: #059669;
}

.sport-pill-count {
  font-size: 0.7rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: #38bdf8;
}

.sport-pill-live-dot {
  font-size: 0.68rem;
  color: #34d399;
  font-weight: 700;
}

.stream-sport-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.stream-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.75rem;
  padding: 0.85rem;
}

.stream-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.stream-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-md);
}

.stream-card.is-live-now {
  border-color: rgba(16, 185, 129, 0.42);
}

.stream-card.is-playing-card {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.stream-card-top,
.stream-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.stream-league-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.stream-teams-box {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.stream-team-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stream-watch-cta {
  font-size: 0.75rem;
  font-weight: 700;
  color: #34d399;
}

/* ==========================================================================
   MODERN SCOREBOARD CARDS VIEW (Alternative Layout)
   ========================================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 0.85rem;
  padding: 0.85rem;
}

.match-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-secondary);
  box-shadow: var(--shadow-md);
}

.match-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.match-card-scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.card-team {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-team.away {
  text-align: right;
  align-items: flex-end;
}

.card-team-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

.card-score-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.card-score-box.is-live {
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-primary);
}

.match-card-odds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.76rem;
}

.card-odd-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.card-odd-title {
  font-size: 0.66rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   RESULTS TABLE
   ========================================================================== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-completed {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-running {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-secondary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.status-refund {
  background: rgba(244, 63, 94, 0.14);
  color: var(--accent-danger);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   DOCUMENTATION & MANUAL TAB (USER & PROGRAMMER MANUALS)
   ========================================================================== */
.docs-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.docs-subnav {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-surface);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.docs-tab-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.docs-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

.docs-tab-btn.active {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-secondary);
  border-color: rgba(56, 189, 248, 0.35);
}

.doc-panel {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
}

.doc-panel.active {
  display: flex;
}

.doc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.doc-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-color);
}

.doc-card h3 {
  font-size: 1.02rem;
  margin: 1.1rem 0 0.5rem;
  color: var(--accent-secondary);
}

.doc-card p, .doc-card li {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.doc-card ul, .doc-card ol {
  padding-left: 1.35rem;
  margin-bottom: 0.75rem;
}

.doc-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.info-box {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-secondary);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.info-box.info-emerald { border-left-color: var(--accent-primary); }
.info-box.info-gold { border-left-color: var(--accent-gold); }
.info-box.info-danger { border-left-color: var(--accent-danger); }

.dict-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 0.65rem;
}

.dict-table th, .dict-table td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.dict-table th {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-weight: 600;
}

.dict-table tr:nth-child(even) {
  background: var(--bg-row-alt);
}

.code-block {
  background: #06090f;
  color: #e2e8f0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  overflow-x: auto;
  line-height: 1.55;
  margin-top: 0.5rem;
}

[data-theme="light"] .code-block {
  background: #0f172a;
  color: #f8fafc;
  border-color: #cbd5e1;
}

.endpoint-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-primary);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* API Playground */
.playground-endpoints {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.ep-btn {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ep-btn:hover, .ep-btn.active {
  border-color: var(--accent-secondary);
  background: rgba(56, 189, 248, 0.08);
}

.ep-btn-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.ep-btn-url {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  color: var(--accent-secondary);
  word-break: break-all;
}

/* ==========================================================================
   MODAL (MATCH DETAIL & RAW DATA INSPECTOR)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 15, 0.78);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 1rem 1.25rem;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Empty & Loading States */
.state-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

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

/* On-Page SEO Section Above Footer */
.seo-footer-section {
  background: var(--bg-body);
  padding: 1.25rem 0 1.75rem;
  margin-top: 1rem;
}

.seo-footer-inner {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.seo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

[data-theme="light"] .seo-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.seo-card h2,
.seo-card h3 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.55rem;
}

.seo-list {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.seo-links-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.seo-links-wrap a {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.75rem;
  border-radius: 999px;
  background: #0f1623;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.seo-links-wrap a:hover {
  border-color: var(--accent-secondary);
  color: var(--text-primary);
}

[data-theme="light"] .seo-links-wrap a {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #1e293b;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .seo-links-wrap a:hover {
  background: #f0f9ff;
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.seo-lang-links {
  margin-top: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.seo-lang-links a {
  color: var(--accent-secondary);
  font-weight: 500;
}

[data-theme="light"] .seo-lang-links a {
  color: #0284c7;
  font-weight: 600;
}

[data-theme="light"] .seo-lang-links a:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* Footer & Live Visitor Traffic Counter */
.app-footer {
  background: var(--bg-body);
  padding: 0.5rem 0 7.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-inner {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-traffic-bar {
  width: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-surface-2) 50%, rgba(88, 144, 216, 0.06) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .footer-traffic-bar {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 50%, #f0f9ff 100%);
  border-color: #cbd5e1;
}

.footer-traffic-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-traffic-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.78rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  white-space: nowrap;
}

.footer-traffic-badge.is-surge {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.18) 0%, rgba(16, 185, 129, 0.16) 100%);
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.42);
}

[data-theme="light"] .footer-traffic-badge {
  background: rgba(5, 150, 105, 0.12);
  color: #047857;
  border-color: rgba(5, 150, 105, 0.32);
}

[data-theme="light"] .footer-traffic-badge.is-surge {
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.14) 0%, rgba(5, 150, 105, 0.12) 100%);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.38);
}

.footer-traffic-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.95rem;
  flex: 1;
}

.traffic-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.traffic-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.traffic-stat-value {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-primary);
  padding: 0.14rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-odds-box);
  border: 1px solid var(--border-subtle);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.traffic-stat-item.is-online .traffic-stat-value {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.32);
}

[data-theme="light"] .traffic-stat-item.is-online .traffic-stat-value {
  color: #047857;
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.30);
}

.traffic-stat-item.is-watching .traffic-stat-value {
  color: #7ab3fc;
  background: rgba(88, 144, 216, 0.12);
  border-color: rgba(88, 144, 216, 0.32);
}

[data-theme="light"] .traffic-stat-item.is-watching .traffic-stat-value {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.10);
  border-color: rgba(2, 132, 199, 0.30);
}

.traffic-stat-item.is-peak .traffic-stat-value {
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.32);
}

[data-theme="light"] .traffic-stat-item.is-peak .traffic-stat-value {
  color: #b45309;
  background: rgba(217, 119, 6, 0.10);
  border-color: rgba(217, 119, 6, 0.30);
}

.traffic-stat-value.traffic-bump {
  transform: scale(1.05);
}

.traffic-stat-divider {
  width: 1px;
  height: 18px;
  background: var(--border-color);
}

.footer-brand-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .footer-traffic-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-traffic-stats {
    justify-content: center;
  }
  .traffic-stat-divider {
    display: none;
  }
}

/* ==========================================================================
   AD SPACE UX/UI ARCHITECTURE (10 RESPONSIVE SLOTS + ZERO CLS + THEMES)
   ========================================================================== */

/* Global Hide Ads State */
body.ads-hidden .ad-zone-container,
body.ads-hidden .ad-side-rail,
body.ads-hidden .ad-sticky-bottom-wrap,
body.ads-hidden .ad-slot-card {
  display: none !important;
}

body.ads-hidden .app-footer {
  padding-bottom: 1.25rem;
}

.btn-ad-toggle {
  border-color: rgba(251, 191, 36, 0.42);
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.08);
}

.btn-ad-toggle:hover {
  border-color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.16);
  color: var(--text-primary);
}

.btn-ad-toggle.ads-are-hidden {
  border-color: var(--border-color);
  color: var(--text-secondary);
  background: #0f1623;
}

[data-theme="light"] .btn-ad-toggle.ads-are-hidden {
  background: var(--bg-surface-2);
}

/* Ad Zone Containers */
.ad-zone-container {
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.ad-zone-top-grid {
  max-width: calc(780px * 2 + 0.85rem + 2.5rem);
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 780px));
  justify-content: center;
  gap: 0.85rem;
}

.ad-zone-mid-strip {
  margin-bottom: 0.9rem;
}

.ad-zone-pre-footer {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Base Ad Slot Card */
.ad-slot-card {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: linear-gradient(135deg, #131c2e 0%, #0d1422 100%);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ad-slot-card:hover {
  border-color: rgba(251, 191, 36, 0.62);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
}

.ad-slot-infeed {
  margin-bottom: 1rem;
}

/* Ad Slot Color Themes */
.ad-slot-card.ad-theme-crimson-gold {
  border-color: rgba(244, 63, 94, 0.42);
  background: linear-gradient(135deg, rgba(159, 18, 57, 0.34) 0%, #11192a 55%, rgba(217, 119, 6, 0.20) 100%);
}

.ad-slot-card.ad-theme-emerald-navy {
  border-color: rgba(16, 185, 129, 0.40);
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.36) 0%, #101929 55%, rgba(88, 144, 216, 0.20) 100%);
}

.ad-slot-card.ad-theme-royal-blue {
  border-color: rgba(88, 144, 216, 0.45);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.36) 0%, #0f1727 55%, rgba(16, 185, 129, 0.18) 100%);
}

.ad-slot-card.ad-theme-gold-obsidian {
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.30) 0%, #101827 55%, rgba(244, 63, 94, 0.18) 100%);
}

.ad-slot-card.ad-theme-purple-indigo {
  border-color: rgba(167, 139, 250, 0.42);
  background: linear-gradient(135deg, rgba(91, 33, 182, 0.34) 0%, #101827 55%, rgba(88, 144, 216, 0.20) 100%);
}

[data-theme="light"] .ad-slot-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: #cbd5e1;
}

[data-theme="light"] .ad-slot-card.ad-theme-crimson-gold {
  border-color: rgba(225, 29, 72, 0.32);
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 55%, #fffbeb 100%);
}

[data-theme="light"] .ad-slot-card.ad-theme-emerald-navy {
  border-color: rgba(5, 150, 105, 0.32);
  background: linear-gradient(135deg, #ecfdf5 0%, #ffffff 55%, #f0f9ff 100%);
}

[data-theme="light"] .ad-slot-card.ad-theme-royal-blue {
  border-color: rgba(2, 132, 199, 0.32);
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 55%, #ecfdf5 100%);
}

[data-theme="light"] .ad-slot-card.ad-theme-gold-obsidian {
  border-color: rgba(217, 119, 6, 0.35);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 55%, #fff1f2 100%);
}

[data-theme="light"] .ad-slot-card.ad-theme-purple-indigo {
  border-color: rgba(124, 58, 237, 0.32);
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 55%, #f0f9ff 100%);
}

[data-theme="light"] .ad-slot-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}

/* Floating Top Overlay Meta Bar (Top-Left Sponsored Badge & Top-Right Close Button) */
.ad-slot-meta {
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0;
  background: transparent;
  border: none;
  font-size: 0.6rem;
  line-height: 1.2;
  pointer-events: none;
}

[data-theme="light"] .ad-slot-meta {
  background: transparent;
  border: none;
}

.ad-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  max-width: calc(100% - 26px);
  overflow: hidden;
  white-space: nowrap;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(9, 15, 26, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  pointer-events: auto;
}

[data-theme="light"] .ad-meta-left {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.ad-sponsored-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 0.32rem;
  border-radius: 3px;
  background: rgba(251, 191, 36, 0.20);
  color: var(--accent-gold);
  border: 1px solid rgba(251, 191, 36, 0.38);
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.3;
}

.ad-badge-code {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.58rem;
}

.ad-size-spec {
  color: var(--text-muted);
  font-size: 0.56rem;
  padding-left: 0.3rem;
  border-left: 1px solid var(--border-subtle);
}

.ad-close-btn {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 15, 26, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-muted);
  font-size: 0.62rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  pointer-events: auto;
  transition: all 0.15s ease;
}

[data-theme="light"] .ad-close-btn {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(15, 23, 42, 0.16);
  color: var(--text-secondary);
}

.ad-close-btn:hover {
  background: var(--accent-danger);
  border-color: var(--accent-danger);
  color: #ffffff;
}

/* Horizontal Banner Body (Default: 80px for C1, C2 In-Feed Native Banners: 1200 × 80 px) */
.ad-banner-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.95rem 0.4rem 1rem;
  min-height: 80px;
  height: 80px;
  box-sizing: border-box;
  color: var(--text-primary);
  text-decoration: none;
}

.ad-banner-body:hover {
  color: var(--text-primary);
}

.ad-banner-content {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.ad-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="light"] .ad-banner-icon {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.12);
}

.ad-banner-text {
  min-width: 0;
}

.ad-banner-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-banner-desc {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ad-banner-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.32);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ad-banner-body:hover .ad-banner-cta {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.48);
}

/* Custom Image / HTML Ad Embed */
.ad-image-link {
  display: block;
  width: 100%;
  line-height: 0;
}

.ad-banner-img {
  width: 100%;
  height: 80px;
  max-height: 80px;
  object-fit: cover;
  display: block;
}

.ad-custom-embed {
  width: 100%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  box-sizing: border-box;
}

/* 1. Top Dual Leaderboard Banners (A1 & A2: Exact 780 × 90 px) & Pre-Footer Banner (F1: Exact 1600 × 90 px) */
.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-body,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-body,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-body {
  min-height: 90px;
  height: 90px;
  padding: 1.15rem 2rem 0.45rem 1.05rem;
  box-sizing: border-box;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-icon,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-icon,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 1.35rem;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-title,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-title,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-title {
  font-size: 0.94rem;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-desc,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-desc,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-desc {
  font-size: 0.79rem;
  margin-top: 0.14rem;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-cta,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-cta,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-cta {
  padding: 0.42rem 1rem;
  font-size: 0.8rem;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-img,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-img,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-img {
  width: 100%;
  height: 90px;
  max-height: 90px;
  object-fit: cover;
}

.ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-custom-embed,
.ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-custom-embed,
.ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-custom-embed {
  min-height: 90px;
}

/* 2. Mid Featured Promo Strip (B1: Exact 1600 × 72 px) & Match Modal Banner (M1: Exact 860 × 72 px) */
.ad-slot-card[data-ad-slot="mid_featured_strip"] .ad-banner-body,
.ad-slot-card[data-ad-slot="modal_match_banner"] .ad-banner-body {
  min-height: 72px;
  height: 72px;
  padding: 1.05rem 1.9rem 0.35rem 0.95rem;
  box-sizing: border-box;
}

.ad-slot-card[data-ad-slot="mid_featured_strip"] .ad-banner-icon,
.ad-slot-card[data-ad-slot="modal_match_banner"] .ad-banner-icon {
  width: 38px;
  height: 38px;
  font-size: 1.18rem;
}

.ad-slot-card[data-ad-slot="mid_featured_strip"] .ad-banner-img,
.ad-slot-card[data-ad-slot="modal_match_banner"] .ad-banner-img {
  width: 100%;
  height: 72px;
  max-height: 72px;
  object-fit: cover;
}

.ad-slot-card[data-ad-slot="mid_featured_strip"] .ad-custom-embed,
.ad-slot-card[data-ad-slot="modal_match_banner"] .ad-custom-embed {
  min-height: 72px;
}

/* 3. Floating Left & Right Skyscraper Side Rails (L1, L2, R1, R2: Exact 130 × 260 px each) */
.ad-side-rail {
  position: fixed;
  top: calc(var(--header-fixed-height, 130px) + 12px);
  z-index: 900;
  width: 130px;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.ad-rail-inner {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ad-rail-left {
  left: 8px;
}

.ad-rail-right {
  right: 8px;
}

.ad-rail-left.collapsed {
  transform: translateX(calc(-100% - 8px));
}

.ad-rail-right.collapsed {
  transform: translateX(calc(100% + 8px));
}

.ad-rail-handle {
  position: absolute;
  top: 10px;
  padding: 0.28rem 0.45rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.ad-rail-left .ad-rail-handle {
  right: -46px;
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.ad-rail-right .ad-rail-handle {
  left: -46px;
  border-radius: 6px 0 0 6px;
  border-right: none;
}

.ad-slot-vertical {
  width: 130px;
  box-sizing: border-box;
}

.ad-slot-vertical .ad-slot-meta {
  top: 3px;
  left: 4px;
  right: 4px;
}

.ad-slot-vertical .ad-meta-left {
  padding: 1px 4px;
  gap: 0.2rem;
}

.ad-slot-vertical .ad-badge-code {
  display: inline-block;
  font-size: 0.54rem;
}

.ad-slot-vertical .ad-size-spec {
  display: none;
}

.ad-slot-vertical .ad-banner-body {
  flex-direction: column;
  text-align: center;
  justify-content: space-between;
  padding: 1.5rem 0.45rem 0.55rem;
  min-height: 260px;
  height: 260px;
  box-sizing: border-box;
}

.ad-slot-vertical .ad-banner-img {
  width: 100%;
  height: 260px;
  max-height: 260px;
  object-fit: cover;
}

.ad-slot-vertical .ad-custom-embed {
  min-height: 260px;
}

.ad-slot-vertical .ad-banner-content {
  flex-direction: column;
  gap: 0.45rem;
}

.ad-slot-vertical .ad-banner-icon {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
}

.ad-slot-vertical .ad-banner-title {
  white-space: normal;
  font-size: 0.8rem;
  line-height: 1.25;
}

.ad-slot-vertical .ad-banner-desc {
  white-space: normal;
  font-size: 0.68rem;
  line-height: 1.35;
  margin-top: 0.18rem;
}

.ad-slot-vertical .ad-banner-cta {
  width: 100%;
  justify-content: center;
  padding: 0.34rem 0.45rem;
  font-size: 0.68rem;
}

/* 4. Sticky Bottom Anchor Ad Bar (S1: Exact 970 × 90 px) */
.ad-sticky-bottom-wrap {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 970px;
  z-index: 950;
  box-shadow: var(--shadow-lg);
}

.ad-sticky-bottom-wrap .ad-slot-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-width: 1.5px;
}

.ad-sticky-bottom-wrap .ad-banner-body,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-body {
  padding: 1.15rem 1.95rem 0.45rem 1rem;
  min-height: 90px;
  height: 90px;
  box-sizing: border-box;
}

.ad-sticky-bottom-wrap .ad-banner-icon,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  font-size: 1.32rem;
}

.ad-sticky-bottom-wrap .ad-banner-title,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-title {
  font-size: 0.92rem;
}

.ad-sticky-bottom-wrap .ad-banner-desc,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-desc {
  font-size: 0.78rem;
  margin-top: 0.14rem;
}

.ad-sticky-bottom-wrap .ad-banner-cta,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-cta {
  padding: 0.4rem 0.95rem;
  font-size: 0.78rem;
}

.ad-sticky-bottom-wrap .ad-banner-img,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-img {
  width: 100%;
  height: 90px;
  max-height: 90px;
  object-fit: cover;
}

.ad-sticky-bottom-wrap .ad-custom-embed,
.ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-custom-embed {
  min-height: 90px;
}

@media (max-width: 1360px) {
  .ad-side-rail {
    display: none;
  }
}

/* ==========================================================================
   YOUTUBE STUDIO MOBILE UX/UI & TABLET RESPONSIVE LAYOUT (<= 1180px & <= 768px)
   ========================================================================== */
.yt-studio-bottom-nav {
  display: none;
}

@media (max-width: 1180px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.5rem 0.85rem;
    gap: 0.45rem;
    min-height: auto;
  }
  .brand-group {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
    overflow: hidden;
  }
  .brand-logo {
    width: 76px;
    height: 36px;
  }
  .header-controls {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem;
    overflow: visible;
  }
  .nav-inner {
    height: auto;
    min-height: 44px;
    padding: 0.42rem 0.75rem;
    overflow: visible;
  }
  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.34rem;
    height: auto;
    overflow: visible;
  }
  .nav-tab,
  .nav-tab[data-tab="streams"],
  .nav-tab.nav-tab-streams {
    width: 100%;
    height: 36px;
    margin: 0;
    padding: 0 0.55rem;
    font-size: 0.76rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-2);
    justify-content: space-between;
    overflow: hidden;
  }
  .nav-tab > span[data-i18n] {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    text-align: left;
  }
  .nav-tab.active {
    border-color: var(--accent-secondary);
    background: rgba(88, 144, 216, 0.16);
    box-shadow: inset 0 -2px 0 var(--accent-secondary);
  }
  .quick-league-bar {
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .quick-league-list {
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.3rem;
  }
}

@media (max-width: 1024px) {
  .ad-zone-top-grid {
    grid-template-columns: 1fr;
  }
  .seo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 0 !important;
    padding-bottom: 62px !important;
  }

  /* 1. Sticky Top App Bar + Horizontal Chip Rail (Uses Original Theme Variables) */
  .top-header-fixed-wrap {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: var(--bg-body);
    box-shadow: var(--shadow-md);
  }
  .header-inner {
    padding: 0.4rem 0.65rem;
    gap: 0.34rem;
  }
  .brand-group {
    gap: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .brand-text-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }
  .brand-logo {
    width: 56px;
    height: 29px;
  }
  .brand-title {
    font-size: 0.98rem;
    gap: 0.3rem;
  }
  .brand-badge {
    font-size: 0.58rem;
    padding: 0.06rem 0.38rem;
  }
  .brand-subtitle {
    font-size: 0.65rem;
    opacity: 0.85;
  }

  /* Mobile Top-Right High-Visibility Language & Theme Switcher */
  .mobile-top-quick-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin-left: auto;
    flex-shrink: 0;
  }
  .mobile-top-lang-select {
    height: 30px;
    padding: 0 0.48rem;
    font-size: 0.73rem;
    font-weight: 700;
    border-radius: 999px;
    border: 1.5px solid rgba(56, 189, 248, 0.58);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text-primary);
    max-width: 118px;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.16);
  }
  [data-theme="light"] .mobile-top-lang-select {
    background: var(--bg-surface-2);
    border-color: rgba(2, 132, 199, 0.52);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }
  .mobile-top-theme-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 999px;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  /* Action Chips Strip inside Header Controls */
  .header-controls {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.32rem;
    padding-bottom: 2px;
  }
  .header-controls::-webkit-scrollbar {
    display: none;
  }
  .header-controls #langSelect,
  .header-controls #btnThemeToggle {
    display: none !important;
  }
  .stream-pill.stream-status-capsule {
    width: auto;
    flex: 0 0 auto;
    height: 29px;
    padding: 0 0.6rem;
    font-size: 0.71rem;
  }
  .stream-status-label {
    max-width: 115px;
  }
  .header-controls .control-select,
  .header-controls .btn-control {
    height: 29px;
    padding: 0 0.58rem;
    font-size: 0.71rem;
    flex: 0 0 auto;
    border-radius: 8px;
  }
  #btnContactTheme,
  #btnDashTheme {
    flex: 0 0 29px;
    width: 29px;
    min-width: 29px;
    height: 29px;
    font-size: 0.94rem;
    border-radius: 8px;
  }

  /* 2. Horizontal Navigation Tabs (.nav-bar / .nav-tabs — Original Website Theme Colors) */
  .nav-inner {
    padding: 0.36rem 0.5rem;
    min-height: 42px;
    overflow: hidden;
  }
  .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.36rem;
    width: 100%;
    justify-content: flex-start;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    width: auto;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 0.68rem;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.32rem;
    border-radius: 8px;
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
  }
  .nav-tab[data-tab="streams"],
  .nav-tab.nav-tab-streams {
    width: auto;
    flex: 0 0 auto;
    height: 32px;
    padding: 0 0.68rem 0 0.42rem;
    font-size: 0.75rem;
    gap: 0.32rem;
  }
  .nav-tab > span[data-i18n] {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .nav-tab.active {
    border-color: var(--accent-secondary);
    background: var(--bg-surface-2);
    background: color-mix(in srgb, var(--accent-secondary) 16%, var(--bg-surface-2));
    color: var(--text-primary);
    box-shadow: inset 0 -2px 0 var(--accent-secondary);
  }
  [data-theme="light"] .nav-tab.active {
    color: var(--accent-secondary);
    background: rgba(2, 132, 199, 0.10);
    background: color-mix(in srgb, var(--accent-secondary) 10%, #ffffff);
    border-color: var(--accent-secondary);
  }
  .tab-count {
    font-size: 0.67rem;
    padding: 0.08rem 0.38rem;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* 3. Symmetric 2x2 Bento KPI Grid on Mobile (.stats-strip — Zero Truncation, Theme-Adaptive) */
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
    padding: 0 0.6rem;
    margin-top: 0.5rem;
    overflow: visible;
  }
  .stats-strip::-webkit-scrollbar {
    display: none;
  }
  .stat-card {
    position: relative;
    flex: initial;
    min-width: 0;
    width: 100%;
    padding: 0.48rem 0.65rem 0.48rem 0.72rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    background: linear-gradient(145deg, var(--bg-surface) 0%, var(--bg-surface-2) 100%);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
    overflow: hidden;
  }
  .stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--text-muted);
    opacity: 0.65;
  }
  .stat-card.stat-live::before {
    background: var(--accent-primary);
    opacity: 1;
    box-shadow: 0 0 6px var(--accent-primary);
  }
  .stat-card.stat-featured::before {
    background: var(--accent-gold);
    opacity: 1;
  }
  .stat-card.stat-updates::before {
    background: var(--accent-secondary);
    opacity: 1;
  }
  .stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-secondary);
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
  }
  .stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0;
    padding: 0.24rem 0.46rem;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
    text-align: right;
  }
  [data-theme="light"] .stat-value {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--border-color);
  }
  .stat-card.stat-live .stat-value {
    background: color-mix(in srgb, var(--accent-primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-primary) 32%, transparent);
  }
  .stat-card.stat-featured .stat-value {
    background: color-mix(in srgb, var(--accent-gold) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-gold) 32%, transparent);
  }
  .stat-card.stat-updates .stat-value {
    background: color-mix(in srgb, var(--accent-secondary) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-secondary) 32%, transparent);
  }

  /* 4. Compact Toolbar & Collapsible Filter Drawer (Original Theme Colors) */
  .live-ticker-bar,
  .toolbar-section {
    padding: 0 0.6rem;
  }
  .toolbar-box,
  .toolbar-card {
    padding: 0.55rem 0.62rem;
    gap: 0.44rem;
    border-radius: 12px;
  }
  .toolbar-group {
    width: 100%;
    gap: 0.34rem;
  }
  .toolbar-scope-group {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    flex-wrap: nowrap;
  }
  .toolbar-scope-group .league-scope-pills {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }
  .toolbar-scope-group .pill-btn {
    width: 100%;
    justify-content: center;
    padding: 0.34rem 0.36rem;
    font-size: 0.71rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .yt-studio-filter-drawer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.26rem;
    height: 31px;
    padding: 0 0.58rem;
    border-radius: 8px;
    font-size: 0.71rem;
    font-weight: 700;
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.16s ease;
  }
  .yt-studio-filter-drawer-btn.active {
    background: rgba(88, 144, 216, 0.16);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
  }
  [data-theme="light"] .yt-studio-filter-drawer-btn.active {
    color: var(--accent-secondary);
    background: rgba(2, 132, 199, 0.10);
  }
  .yt-studio-drawer-arrow {
    font-size: 0.62rem;
    opacity: 0.85;
  }

  /* Horizontal Scrollable Market Chips on Mobile */
  .yt-studio-market-chips-group .filter-pills {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 0.3rem;
    padding-bottom: 2px;
  }
  .yt-studio-market-chips-group .filter-pills::-webkit-scrollbar {
    display: none;
  }
  .yt-studio-market-chips-group .pill-btn {
    flex: 0 0 auto;
    border-radius: 8px;
    padding: 0.32rem 0.6rem;
    font-size: 0.72rem;
  }

  /* Collapsible Advanced Controls on Mobile (Expanded when .toolbar-box.mobile-studio-tools-open) */
  .toolbar-box:not(.mobile-studio-tools-open) .yt-studio-collapsible-group {
    display: none !important;
  }
  .toolbar-box.mobile-studio-tools-open .yt-studio-collapsible-group {
    display: flex !important;
    flex-wrap: wrap;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--border-subtle);
  }

  /* Quick League Bar as Horizontal Scrollable YouTube Studio Chips */
  .quick-league-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.34rem;
    padding-top: 0.38rem;
  }
  .quick-league-bar::-webkit-scrollbar {
    display: none;
  }
  .quick-league-label {
    display: none;
  }
  .quick-league-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    overflow: visible;
    flex: 0 0 auto;
  }
  .quick-league-btn {
    flex: 0 0 auto;
    border-radius: 8px;
    font-size: 0.72rem;
    padding: 0.26rem 0.56rem;
  }

  .pill-btn {
    padding: 0.34rem 0.62rem;
    font-size: 0.73rem;
  }
  .search-input-wrap,
  .search-box {
    min-width: 0;
    width: 100%;
    flex: 1 1 100%;
  }
  #leagueSelect {
    max-width: 100% !important;
    width: 100%;
    flex: 1 1 100%;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Sticky Locked Team Column & Clean Mobile Match Row UX/UI (<= 768px) */
  .main-container {
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
  }
  .seo-footer-inner,
  .footer-inner {
    padding: 0 0.5rem;
  }
  .league-group {
    border-radius: 10px;
    margin-bottom: 0.7rem;
  }
  .league-header {
    padding: 0.52rem 0.72rem;
    gap: 0.4rem;
  }
  .league-title-wrap {
    font-size: 0.84rem;
    gap: 0.42rem;
    min-width: 0;
    flex: 1;
  }
  .league-title-wrap > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .league-meta {
    font-size: 0.74rem;
    gap: 0.4rem;
    flex-shrink: 0;
  }
  .league-standings-mini-btn span {
    display: none;
  }
  .league-standings-mini-btn {
    padding: 0.16rem 0.42rem;
    font-size: 0.72rem;
  }

  .odds-table:not(.results-table):not(.streams-table) {
    min-width: 920px;
  }
  .odds-table:not(.results-table):not(.streams-table) thead th {
    font-size: 0.72rem;
    padding: 0.38rem 0.3rem;
    white-space: normal;
    line-height: 1.25;
  }
  .odds-table:not(.results-table):not(.streams-table) thead th.col-teams {
    text-align: left;
    padding-left: 0.55rem;
  }
  .odds-table:not(.results-table):not(.streams-table) .col-time {
    width: 66px;
    min-width: 66px;
    max-width: 66px;
    padding: 0.35rem 0.22rem;
  }
  .odds-table.is-schedule-table:not(.results-table):not(.streams-table) .col-time {
    width: 88px;
    min-width: 88px;
    max-width: 88px;
    padding: 0.35rem 0.25rem;
  }
  .odds-table:not(.results-table):not(.streams-table) .clock-badge {
    font-size: 0.69rem;
    padding: 0.15rem 0.32rem;
    border-radius: 5px;
  }
  .odds-table:not(.results-table):not(.streams-table) col.col-teams,
  .odds-table:not(.results-table):not(.streams-table) th.col-teams,
  .odds-table:not(.results-table):not(.streams-table) td.col-teams {
    width: 174px;
    min-width: 174px;
    max-width: 174px;
    padding: 0.44rem 0.52rem;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .teams-stack {
    gap: 0.22rem;
  }
  /* Hide inline right badges on mobile so team names get 100% full width without truncation */
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .team-right-slots,
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .team-right-slots-ai {
    display: none !important;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .team-line {
    gap: 0.2rem;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .team-name-wrap {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.32;
    gap: 0.25rem;
    width: 100%;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .master-pill {
    font-size: 0.62rem;
    padding: 0.03rem 0.3rem;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .red-card-badge {
    font-size: 0.64rem;
    min-width: 15px;
    height: 16px;
    padding: 0 3px;
  }
  /* Dedicated compact bottom badge strip inside .col-teams on mobile */
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.26rem;
    margin-top: 0.16rem;
    padding-top: 0.2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
  }
  [data-theme="light"] .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row {
    border-top-color: rgba(15, 23, 42, 0.08);
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row .btn-play-live-match {
    font-size: 0.65rem;
    padding: 0.06rem 0.4rem 0.06rem 0.14rem;
    gap: 0.22rem;
    height: 20px;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row .btn-play-live-match .play-icon-circle {
    width: 14px;
    height: 14px;
    font-size: 0.48rem;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row .corner-Summary-pill {
    font-size: 0.65rem;
    padding: 0.05rem 0.36rem;
    height: 20px;
    width: auto;
  }
  .odds-table:not(.results-table):not(.streams-table) td.col-teams .mobile-team-meta-row .ai-row-pill {
    font-size: 0.62rem;
    padding: 0.05rem 0.36rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .odds-table:not(.results-table):not(.streams-table) .col-score {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    padding: 0.38rem 0.22rem;
  }
  .odds-table:not(.results-table):not(.streams-table) .score-num {
    font-size: 0.88rem;
  }
  .odds-table:not(.results-table):not(.streams-table) .col-odds-hdp {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
  }
  .odds-table:not(.results-table):not(.streams-table) .col-odds-ou {
    width: 126px;
    min-width: 126px;
    max-width: 126px;
  }
  .odds-table:not(.results-table):not(.streams-table) .col-1x2-group {
    width: 82px;
    min-width: 82px;
    max-width: 82px;
  }

  /* 5. Fixed Bottom Navigation Bar (#ytStudioMobileBottomNav — 5 Icons, Live Centered, Original Theme Colors) */
  .yt-studio-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 58px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    padding: 0 0.2rem env(safe-area-inset-bottom, 0px);
    z-index: 1060;
    box-shadow: var(--shadow-lg);
  }
  .yt-studio-nav-item.yt-studio-nav-item-center .yt-studio-nav-icon {
    font-size: 1.18rem;
    filter: drop-shadow(0 0 6px var(--accent-primary-glow));
  }
  .yt-studio-nav-item {
    background: transparent;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 4px 2px;
    transition: color 0.15s ease, transform 0.15s ease;
  }
  .yt-studio-nav-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2.5px;
    border-radius: 0 0 3px 3px;
    background: transparent;
    transition: background-color 0.15s ease;
  }
  .yt-studio-nav-item.active {
    color: var(--text-primary);
  }
  [data-theme="light"] .yt-studio-nav-item.active {
    color: var(--accent-secondary);
  }
  .yt-studio-nav-item.active::before {
    background: var(--accent-secondary);
    box-shadow: 0 1px 8px rgba(88, 144, 216, 0.55);
  }
  .yt-studio-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
  }
  .yt-studio-nav-icon {
    font-size: 1.05rem;
    line-height: 1;
  }
  .yt-studio-nav-badge {
    position: absolute;
    top: -4px;
    right: -14px;
    min-width: 16px;
    height: 14px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--bg-surface-3);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 12px;
    text-align: center;
  }
  .yt-studio-nav-item.active .yt-studio-nav-badge {
    background: var(--accent-secondary);
    color: #ffffff;
    border-color: var(--accent-secondary);
  }
  .yt-studio-nav-label {
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .yt-studio-nav-item.active .yt-studio-nav-label {
    font-weight: 700;
  }

  /* Offset Sticky Bottom Ad & Footer above YouTube Studio Bottom Nav */
  .ad-banner-body,
  .ad-slot-card[data-ad-slot="top_leaderboard_left"] .ad-banner-body,
  .ad-slot-card[data-ad-slot="top_leaderboard_right"] .ad-banner-body,
  .ad-slot-card[data-ad-slot="pre_footer_banner"] .ad-banner-body,
  .ad-slot-card[data-ad-slot="mid_featured_strip"] .ad-banner-body,
  .ad-slot-card[data-ad-slot="modal_match_banner"] .ad-banner-body {
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }
  .ad-banner-cta {
    align-self: flex-end;
  }
  .ad-sticky-bottom-wrap {
    bottom: 62px;
    width: calc(100% - 1rem);
  }
  .ad-sticky-bottom-wrap .ad-banner-img,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-img {
    height: 64px;
    max-height: 64px;
  }
  .ad-sticky-bottom-wrap .ad-banner-body,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-body {
    flex-direction: row;
    align-items: center;
    height: 64px;
    min-height: 64px;
    padding: 0.85rem 1.45rem 0.25rem 0.65rem;
    gap: 0.5rem;
  }
  .ad-sticky-bottom-wrap .ad-banner-icon,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }
  .ad-sticky-bottom-wrap .ad-banner-title,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-title {
    font-size: 0.78rem;
  }
  .ad-sticky-bottom-wrap .ad-banner-desc,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-desc {
    font-size: 0.66rem;
    margin-top: 0.05rem;
  }
  .ad-sticky-bottom-wrap .ad-banner-cta,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-banner-cta {
    align-self: center;
    padding: 0.28rem 0.64rem;
    font-size: 0.68rem;
  }
  .ad-sticky-bottom-wrap .ad-custom-embed,
  .ad-slot-card[data-ad-slot="bottom_sticky_anchor"] .ad-custom-embed {
    min-height: 64px;
  }
  .app-footer {
    padding-bottom: 8.2rem;
  }
}

/* ==========================================================================
   FRONTEND ANTI-COPY & ASSET PROTECTION SHIELD (.code-guard-active)
   ========================================================================== */
body.code-guard-active {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.code-guard-active input,
body.code-guard-active textarea,
body.code-guard-active select {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

body.code-guard-active img,
body.code-guard-active a {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ==========================================================================
   AI MATCH PREDICTOR & BIG-LEAGUE SMART PICKS (Today Strip + Row Badge + Modal)
   ========================================================================== */
.pill-btn.pill-btn-stream {
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
}

.pill-btn.pill-btn-stream:hover,
.pill-btn.pill-btn-stream.active {
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  border-color: rgba(52, 211, 153, 0.72);
  color: #ffffff;
}

[data-theme="light"] .pill-btn.pill-btn-stream {
  border-color: rgba(5, 150, 105, 0.35);
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
}

[data-theme="light"] .pill-btn.pill-btn-stream:hover,
[data-theme="light"] .pill-btn.pill-btn-stream.active {
  background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  color: #ffffff;
}

.pill-btn.pill-btn-ai {
  border: 1px solid rgba(139, 92, 246, 0.42);
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
}

.pill-btn.pill-btn-ai:hover,
.pill-btn.pill-btn-ai.active {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  border-color: rgba(167, 139, 250, 0.65);
  color: #ffffff;
}

[data-theme="light"] .pill-btn.pill-btn-ai {
  border-color: rgba(109, 40, 217, 0.35);
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.08);
}

[data-theme="light"] .pill-btn.pill-btn-ai:hover,
[data-theme="light"] .pill-btn.pill-btn-ai.active {
  background: linear-gradient(135deg, #6d28d9 0%, #2563eb 100%);
  color: #ffffff;
}

.ai-predictor-strip {
  margin-bottom: 1.15rem;
  background: var(--bg-surface);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .ai-predictor-strip {
  border-color: rgba(109, 40, 217, 0.28);
}

.ai-predictor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.72rem 1rem;
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.16) 0%, rgba(14, 165, 233, 0.12) 60%, rgba(15, 23, 42, 0.4) 100%);
  border-bottom: 1px solid rgba(139, 92, 246, 0.25);
  cursor: pointer;
}

.ai-predictor-strip.is-collapsed .ai-predictor-header {
  border-bottom: none;
}

[data-theme="light"] .ai-predictor-header {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.10) 0%, rgba(2, 132, 199, 0.08) 100%);
  border-bottom-color: rgba(109, 40, 217, 0.18);
}

.ai-predictor-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.ai-badge-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  white-space: nowrap;
}

.ai-predictor-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-predictor-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

[data-theme="light"] .ai-predictor-count {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(109, 40, 217, 0.28);
}

.ai-predictor-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ai-predictor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.85rem;
  padding: 0.9rem 1rem;
}

.ai-pick-card {
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
  padding: 0.85rem 0.95rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.ai-pick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.55);
}

.ai-pick-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ai-pick-league {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.38);
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
}

[data-theme="light"] .ai-confidence-pill {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(109, 40, 217, 0.32);
}

.ai-stars {
  color: #fbbf24;
  letter-spacing: -1px;
}

.ai-pick-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ai-pick-team-names {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
  flex: 1;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.ai-team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-team-name.is-ai-fav {
  color: var(--team-master);
}

.ai-vs-sep {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}

.ai-projected-score {
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-odds-box);
  border: 1px solid var(--border-subtle);
  padding: 0.14rem 0.48rem;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ai-projected-score b {
  color: var(--accent-gold);
  font-weight: 800;
}

.ai-prob-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.ai-prob-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
}

.ai-prob-bar {
  display: flex;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.15);
  gap: 2px;
}

.ai-prob-seg.seg-home { background: #fb7185; }
.ai-prob-seg.seg-draw { background: #64748b; }
.ai-prob-seg.seg-away { background: #0ea5e9; }

[data-theme="light"] .ai-prob-labels .prob-home { color: #e11d48 !important; }
[data-theme="light"] .ai-prob-labels .prob-draw { color: #475569 !important; }
[data-theme="light"] .ai-prob-labels .prob-away { color: #0284c7 !important; }

.ai-picks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.ai-modal-picks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.ai-pick-box {
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  padding: 0.42rem 0.58rem;
  border-radius: 7px;
  background: var(--bg-odds-box);
  border: 1px solid var(--border-subtle);
}

.ai-pick-box.is-hdp {
  border-left: 3px solid #fb7185;
}

.ai-pick-box.is-ou {
  border-left: 3px solid #38bdf8;
}

.ai-pick-box.is-score {
  border-left: 3px solid #f59e0b;
}

.ai-pick-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.ai-pick-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-pick-insight {
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.4;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border-subtle);
}

/* Inline AI Row Pill inside .col-teams (2nd line right-aligned) */
.team-right-slots-ai {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.ai-row-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.71rem;
  font-weight: 700;
  color: #ddd6fe;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.38);
  padding: 0.08rem 0.48rem;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 188px;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="light"] .ai-row-pill {
  color: #5b21b6;
  background: rgba(124, 58, 237, 0.09);
  border-color: rgba(109, 40, 217, 0.30);
}

/* Modal AI Deep-Dive Card */
.ai-modal-card {
  margin-top: 0.85rem;
  padding: 0.9rem 1.05rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.10) 0%, rgba(14, 165, 233, 0.08) 100%);
  border: 1px solid rgba(139, 92, 246, 0.38);
  border-radius: var(--radius-md);
}

[data-theme="light"] .ai-modal-card {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(2, 132, 199, 0.05) 100%);
  border-color: rgba(109, 40, 217, 0.28);
}

.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ==========================================================================
   LIVE GOAL ALERT TOAST POPUP, PINNED FAVORITES & ODDS MOVEMENT TRACKER
   (All Notifications Positioned at Top-Right Corner / มุมขวาบน)
   ========================================================================== */
.goal-toast-container,
.top-right-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  bottom: auto;
  left: auto;
  z-index: 3200;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 390px;
  width: calc(100vw - 2.5rem);
  pointer-events: none;
}

@media (max-width: 640px) {
  .goal-toast-container,
  .top-right-toast-stack {
    top: 0.75rem;
    right: 0.75rem;
    width: calc(100vw - 1.5rem);
  }
}

.goal-toast-card {
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.96) 0%, rgba(15, 23, 42, 0.97) 65%, rgba(180, 83, 9, 0.92) 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.65);
  border-radius: 12px;
  padding: 0.78rem 0.95rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 18px rgba(16, 185, 129, 0.28);
  color: #f8fafc;
  cursor: pointer;
  animation: goalToastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.goal-toast-card:hover {
  transform: translateY(-2px);
  border-color: #fbbf24;
}

@keyframes goalToastSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) translateX(14px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
  }
}

.goal-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.42rem;
}

.goal-toast-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
  color: #04130d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.goal-toast-league {
  font-size: 0.73rem;
  color: #cbd5e1;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.goal-toast-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #e2e8f0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.goal-toast-close:hover {
  background: rgba(244, 63, 94, 0.85);
  color: #ffffff;
}

.goal-toast-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.goal-toast-teams {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.goal-toast-team {
  font-size: 0.84rem;
  font-weight: 600;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goal-toast-team.is-scorer {
  color: #fde047;
  font-weight: 800;
}

.goal-toast-score {
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.25rem 0.68rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: #fde047;
  flex-shrink: 0;
}

/* Pinned Favorites Section at Top of Match Table */
.pinned-favorites-group {
  border: 1.5px solid rgba(251, 191, 36, 0.52) !important;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.10);
  margin-bottom: 1.05rem;
}

.pinned-favorites-group > .league-header {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.22) 0%, rgba(16, 185, 129, 0.12) 60%, var(--bg-league-header) 100%);
  border-bottom-color: rgba(251, 191, 36, 0.35);
}

[data-theme="light"] .pinned-favorites-group > .league-header {
  background: linear-gradient(90deg, #fef3c7 0%, #ecfdf5 65%, #f8fafc 100%);
}

.pinned-league-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.08rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
  max-width: 195px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modal Odds Movement Tracker (Initial vs Current Odds) */
.odds-movement-card {
  padding: 0.9rem 1.05rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.55) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
}

[data-theme="light"] .odds-movement-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.06) 0%, #ffffff 100%);
  border-color: rgba(5, 150, 105, 0.28);
}

.odds-movement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-top: 0.65rem;
}

@media (max-width: 720px) {
  .odds-movement-grid {
    grid-template-columns: 1fr;
  }
}

.odds-movement-box {
  background: var(--bg-odds-box);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.55rem 0.72rem;
  font-size: 0.78rem;
}

.odds-movement-box-title {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.odds-movement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.16rem 0;
  border-top: 1px dashed rgba(148, 163, 184, 0.14);
}

.odds-movement-row:first-of-type {
  border-top: none;
}

.odds-movement-log {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  max-height: 135px;
  overflow-y: auto;
  font-size: 0.75rem;
}

.odds-flow-verdict-banner {
  margin-top: 0.58rem;
  padding: 0.52rem 0.75rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(56, 189, 248, 0.32);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

[data-theme="light"] .odds-flow-verdict-banner {
  background: rgba(240, 249, 255, 0.85);
  border-color: rgba(2, 132, 199, 0.26);
}

.odds-flow-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.odds-flow-meter-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
}

.odds-flow-meter-bar {
  display: flex;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.18);
  gap: 2px;
}

.odds-flow-seg-home {
  background: linear-gradient(90deg, #fb7185 0%, #f43f5e 100%);
}

.odds-flow-seg-away {
  background: linear-gradient(90deg, #38bdf8 0%, #0284c7 100%);
}

.odds-drift-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  white-space: nowrap;
}

.odds-drift-pill.is-up {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.38);
}

.odds-drift-pill.is-down {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(251, 113, 133, 0.38);
}

.odds-drift-pill.is-flat {
  color: var(--text-secondary);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

[data-theme="light"] .odds-drift-pill.is-up {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(5, 150, 105, 0.35);
}

[data-theme="light"] .odds-drift-pill.is-down {
  color: #be123c;
  background: rgba(244, 63, 94, 0.10);
  border-color: rgba(225, 29, 72, 0.32);
}

/* Shareable Match Link & Viral AI Pick Share Bar (LINE / Telegram / Copy) */
.match-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 0.72rem;
  padding-top: 0.62rem;
  border-top: 1px dashed rgba(139, 92, 246, 0.32);
}

.ai-card-share-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding-top: 0.42rem;
  border-top: 1px dashed var(--border-subtle);
}

.btn-share-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.26rem 0.62rem;
  font-size: 0.73rem;
  font-weight: 700;
  border-radius: 7px;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, border-color 0.14s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-share-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-share-pill.is-copy {
  background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
  border: 1px solid rgba(167, 139, 250, 0.65);
  color: #ffffff;
}

.btn-share-pill.is-line {
  background: rgba(6, 199, 85, 0.16);
  border: 1px solid rgba(6, 199, 85, 0.50);
  color: #4ade80;
}

[data-theme="light"] .btn-share-pill.is-line {
  background: rgba(6, 199, 85, 0.10);
  color: #15803d;
}

.btn-share-pill.is-tg {
  background: rgba(34, 158, 217, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.50);
  color: #38bdf8;
}

[data-theme="light"] .btn-share-pill.is-tg {
  background: rgba(34, 158, 217, 0.10);
  color: #0369a1;
}

.btn-share-pill.is-link {
  background: var(--bg-odds-box);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* ==========================================================================
   QUICK LEAGUE STANDINGS BUTTON & POPULAR LEAGUE STANDINGS MODAL
   ========================================================================== */
.quick-league-btn.quick-league-standings-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(16, 185, 129, 0.16) 100%);
  border: 1px solid rgba(251, 191, 36, 0.52);
  color: #fde68a;
  font-weight: 700;
  margin-left: auto;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.14);
}

.quick-league-btn.quick-league-standings-btn:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(16, 185, 129, 0.28) 100%);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

[data-theme="light"] .quick-league-btn.quick-league-standings-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(5, 150, 105, 0.12) 100%);
  border-color: rgba(217, 119, 6, 0.45);
  color: #b45309;
}

[data-theme="light"] .quick-league-btn.quick-league-standings-btn:hover {
  background: #d97706;
  border-color: #b45309;
  color: #ffffff;
}

.league-standings-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.42);
  color: #fcd34d;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.league-standings-mini-btn:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
  color: #ffffff;
  transform: translateY(-1px);
}

[data-theme="light"] .league-standings-mini-btn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.38);
  color: #b45309;
}

[data-theme="light"] .league-standings-mini-btn:hover {
  background: #d97706;
  border-color: #b45309;
  color: #ffffff;
}

.standings-modal-dialog {
  max-width: 1080px;
  width: 95%;
}

.standings-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #6ee7b7;
}

[data-theme="light"] .standings-sync-badge {
  background: rgba(5, 150, 105, 0.10);
  border-color: rgba(5, 150, 105, 0.32);
  color: #047857;
}

.standings-league-tabs {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.85rem;
}

.standings-league-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.standings-league-tab:hover {
  border-color: var(--accent-secondary);
  color: var(--text-primary);
}

.standings-league-tab.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24) 0%, rgba(16, 185, 129, 0.22) 100%);
  border-color: #fbbf24;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .standings-league-tab.active {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: #ffffff;
}

.standings-subbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

[data-theme="light"] .standings-subbar {
  background: #f8fafc;
}

.standings-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}

.standings-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.standings-table thead th {
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.58rem 0.55rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
  white-space: nowrap;
}

.standings-table thead th.col-st-team {
  text-align: left;
  padding-left: 0.85rem;
}

.standings-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.12s ease;
}

.standings-table tbody tr:nth-child(even) {
  background-color: var(--bg-row-alt);
}

.standings-table tbody tr:hover {
  background-color: var(--bg-row-hover);
}

.standings-table td {
  padding: 0.52rem 0.55rem;
  text-align: center;
  vertical-align: middle;
}

.standings-table td.col-st-team {
  text-align: left;
  padding-left: 0.85rem;
}

.standings-rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.standings-rank-pill.zone-ucl {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.48);
}

.standings-rank-pill.zone-uel {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.48);
}

.standings-rank-pill.zone-rel {
  background: rgba(244, 63, 94, 0.18);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.48);
}

[data-theme="light"] .standings-rank-pill.zone-ucl {
  background: rgba(5, 150, 105, 0.14);
  color: #047857;
}

[data-theme="light"] .standings-rank-pill.zone-uel {
  background: rgba(2, 132, 199, 0.14);
  color: #0369a1;
}

[data-theme="light"] .standings-rank-pill.zone-rel {
  background: rgba(225, 29, 72, 0.14);
  color: #be123c;
}

.standings-team-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.standings-team-crest {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px;
  flex-shrink: 0;
}

.standings-team-abbr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  background: rgba(88, 144, 216, 0.16);
  border: 1px solid rgba(88, 144, 216, 0.35);
  color: #93c5fd;
  flex-shrink: 0;
}

[data-theme="light"] .standings-team-abbr-badge {
  background: rgba(2, 132, 199, 0.12);
  color: #0369a1;
}

.standings-pts-cell {
  font-weight: 800;
  font-size: 0.94rem;
  color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.06);
}

[data-theme="light"] .standings-pts-cell {
  color: #b45309;
  background: rgba(245, 158, 11, 0.08);
}

.standings-form-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.standings-form-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
}

.standings-form-pill.is-w {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.standings-form-pill.is-d {
  background: rgba(148, 163, 184, 0.20);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.38);
}

.standings-form-pill.is-l {
  background: rgba(244, 63, 94, 0.20);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.42);
}

[data-theme="light"] .standings-form-pill.is-w {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

[data-theme="light"] .standings-form-pill.is-d {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

[data-theme="light"] .standings-form-pill.is-l {
  background: #ffe4e6;
  color: #be123c;
  border-color: #fda4af;
}

.standings-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.standings-legend-items {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.standings-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 0.35rem;
}

/* ==========================================================================
   MODAL SUBTABS & TACTICAL FORMATION PITCH BOARD (Enhanced Features)
   ========================================================================== */
/* Modal Navigation Subtabs - Sleek Underline Style */
.modal-subtab-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin: 0.5rem 0 1.25rem 0;
  border: none !important;
  border-bottom: none !important;
  padding: 1rem 1rem 0.25rem 1rem !important;
  overflow-x: auto;
  scrollbar-width: none;
  position: relative;
  top: 0;
  z-index: 10;
  background: transparent;
}
.modal-subtab-bar::-webkit-scrollbar { display: none; }

.modal-subtab-btn {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #94a3b8 !important;
  font-family: inherit !important;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.35rem 0.25rem 0.65rem 0.25rem;
  border-bottom: 2.5px solid transparent !important;
  border-radius: 2px !important;
  box-shadow: none !important;
  white-space: nowrap;
  line-height: 1.4;
  transition: color 0.18s ease, border-color 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
}
.modal-subtab-btn:hover {
  background: transparent !important;
  border: none !important;
  color: #f1f5f9 !important;
  border-bottom: 2.5px solid rgba(255, 255, 255, 0.25) !important;
}
.modal-subtab-btn.active {
  background: transparent !important;
  color: #ffffff !important;
  font-weight: 700;
  border-bottom: 2.5px solid #ffffff !important;
  box-shadow: none !important;
}

/* Tactical Football Pitch Board */
.pitch-container {
  background: #09121a;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 0.65rem;
}

.pitch-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border-color);
}

.pitch-turf {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  height: 520px;
  border-radius: 10px;
  background: repeating-linear-gradient(
    180deg,
    #134e2a 0px,
    #134e2a 40px,
    #0f3d20 40px,
    #0f3d20 80px
  );
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 4px 20px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Pitch Field Lines */
.pitch-half-divider {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%);
}

.pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110px;
  height: 110px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-center-spot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.pitch-penalty-box-top {
  position: absolute;
  top: 0;
  left: 50%;
  width: 220px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top: none;
  transform: translateX(-50%);
}

.pitch-penalty-box-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 220px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: none;
  transform: translateX(-50%);
}

.pitch-half {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 0.5rem 1rem;
}

.formation-line {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

.player-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: default;
  transition: transform 0.16s ease;
}
.player-node:hover {
  transform: scale(1.12);
}

.player-jersey {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.player-jersey.home-jersey {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.player-jersey.away-jersey {
  background: linear-gradient(135deg, #0284c7, #0369a1);
}

.player-jersey.gk-jersey {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #1e293b;
  border-color: #fef08a;
}

.player-name {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  margin-top: 0.2rem;
  max-width: 88px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.bench-section {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
}

.bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
}

.bench-col {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem;
}

.bench-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bench-player-list {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.bench-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.btn-share-pill.is-card {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}
.btn-share-pill.is-card:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
}

/* Social Match Card Action Bar */
.social-card-actions-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.social-card-actions-bar .btn-control {
  min-width: 170px;
  justify-content: center;
}
@media (max-width: 640px) {
  .social-card-actions-bar .btn-control {
    width: 100%;
    min-width: unset;
  }
}







/* ==========================================================================
   2.5D VIRTUAL STADIUM MATCH TRACKER & ADVANCED LIVE STATS WIDGET (BET365 / SOFASCORE STYLE)
   ========================================================================== */
.match-tracker-25d-wrapper {
  background: #090d14;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

/* Match Header */
.tracker-top-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tracker-team-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}
.tracker-score-pill {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #facc15;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

/* 2.5D Virtual Stadium Pitch Viewport */
.tracker-stadium-viewport {
  position: relative;
  width: 100%;
  height: 280px;
  background: radial-gradient(circle at 50% 10%, #1e293b 0%, #0a0e17 85%);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Stadium Grandstand Silhouette & Lights */
.tracker-stadium-stands {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: 
    radial-gradient(ellipse at 50% -20%, rgba(56, 189, 248, 0.15) 0%, transparent 70%),
    repeating-linear-gradient(0deg, #111827 0px, #111827 4px, #0f172a 4px, #0f172a 8px);
  opacity: 0.85;
}
.tracker-stadium-stands::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 35px;
  background: repeating-linear-gradient(90deg, #1e293b 0px, #1e293b 8px, #334155 8px, #334155 16px);
  opacity: 0.6;
}

/* LED Perimeter Ad Ribbon */
.tracker-led-ribbon {
  position: absolute;
  top: 72px;
  left: 4%;
  right: 4%;
  height: 20px;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 4px;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  z-index: 2;
  overflow: hidden;
  white-space: nowrap;
}
.tracker-led-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ledMarquee 24s linear infinite;
  will-change: transform;
}
.tracker-led-track span {
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding-right: 2.5rem;
}
@keyframes ledMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Perspective 2.5D Turf */
.tracker-pitch-perspective {
  position: relative;
  width: 90%;
  max-width: 600px;
  height: 195px;
  margin-bottom: 8px;
  transform: perspective(480px) rotateX(44deg);
  background: repeating-linear-gradient(
    90deg,
    #1b7a37 0px,
    #1b7a37 38px,
    #15682e 38px,
    #15682e 76px
  );
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.8),
    inset 0 0 25px rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  z-index: 3;
}

/* Field Markings */
.tracker-pitch-center-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(-50%);
}
.tracker-pitch-center-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.tracker-pitch-penalty-left {
  position: absolute;
  top: 22%;
  left: 0;
  width: 70px;
  height: 56%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-left: none;
}
.tracker-pitch-penalty-right {
  position: absolute;
  top: 22%;
  right: 0;
  width: 70px;
  height: 56%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-right: none;
}
.tracker-goal-left {
  position: absolute;
  top: 36%;
  left: -14px;
  width: 14px;
  height: 28%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #ffffff;
  border-right: none;
}
.tracker-goal-right {
  position: absolute;
  top: 36%;
  right: -14px;
  width: 14px;
  height: 28%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid #ffffff;
  border-left: none;
}

/* Animated Ball & Player Beacon */
.tracker-ball-beacon {
  position: absolute;
  top: 48%;
  left: 50%;
  right: auto;
  bottom: auto;
  z-index: 15;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 1.4s cubic-bezier(0.25, 1, 0.5, 1), top 1.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: left, top;
}
.tracker-ball-dot {
  position: relative;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #ffffff 65%, #94a3b8 100%);
  border-radius: 50%;
  box-shadow: 0 0 12px #ffffff, 0 0 20px rgba(56, 189, 248, 0.9), 0 3px 6px rgba(0, 0, 0, 0.8);
  margin: 0 auto;
}
.tracker-ball-radar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  margin-left: -16px;
  border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.85);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  animation: trackerRadarPulse 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  pointer-events: none;
}
@keyframes trackerRadarPulse {
  0% { transform: scale(0.4); opacity: 1; }
  70% { transform: scale(2.2); opacity: 0.25; }
  100% { transform: scale(3.0); opacity: 0; }
}
.tracker-player-pill {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.tracker-player-pill::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* Stadium Overlays */
.tracker-top-tags {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}
.tracker-btn-goalscorers {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.tracker-clock-tag {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #34d399;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

.tracker-possession-banner {
  position: absolute;
  bottom: 12px;
  right: 16px;
  background: rgba(15, 23, 42, 0.88);
  border-left: 3px solid #38bdf8;
  padding: 4px 12px;
  border-radius: 0 6px 6px 0;
  z-index: 5;
  text-align: left;
}
.tracker-possession-team {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f8fafc;
}
.tracker-possession-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Tracker Navigation Subtabs */
.tracker-subtabs-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.65rem 1rem;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.tracker-subtab-link {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.tracker-subtab-link.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Expected Goals (xG) Row */
.tracker-xg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem 0.5rem 1rem;
}
.tracker-xg-val {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: monospace;
}
.tracker-xg-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Circular Donut Gauges */
.tracker-gauges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 1rem 1.25rem;
  text-align: center;
}
.tracker-gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tracker-gauge-title {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.tracker-gauge-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}
.tracker-gauge-num {
  font-size: 1.15rem;
  font-weight: 800;
  font-family: monospace;
  color: #f8fafc;
}
.tracker-gauge-circle {
  position: relative;
  width: 44px;
  height: 44px;
}
.tracker-gauge-circle svg {
  transform: rotate(-90deg);
  width: 44px;
  height: 44px;
}
.tracker-gauge-circle circle {
  fill: none;
  stroke-width: 4;
}
.tracker-gauge-circle .bg-ring {
  stroke: rgba(255, 255, 255, 0.1);
}
.tracker-gauge-circle .progress-ring {
  stroke: #ffffff;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.tracker-gauge-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
}

/* Disciplinary & Shots Row */
.tracker-discipline-shots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tracker-cards-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: monospace;
}
.tracker-shots-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  max-width: 220px;
}
.tracker-shots-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}
.tracker-shots-bar-dual {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  display: flex;
  overflow: hidden;
}
.tracker-shots-bar-home {
  background: #f87171;
  height: 100%;
}
.tracker-shots-bar-away {
  background: #ffffff;
  height: 100%;
}

/* Action Areas (3-Zone Pitch Territory) */
.tracker-action-areas-section {
  padding: 1rem 1.5rem;
  text-align: center;
}
.tracker-action-areas-title {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
  font-weight: 600;
}
.tracker-action-areas-pitch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.6);
  position: relative;
  overflow: hidden;
}
.tracker-zone-box {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 800;
  font-family: monospace;
  color: #f8fafc;
  border-right: 1px dashed rgba(255, 255, 255, 0.2);
  position: relative;
}
.tracker-zone-box:last-child {
  border-right: none;
}
.tracker-zone-box.zone-mid::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Detailed Comparison Bars */
.tracker-detailed-bars {
  padding: 0.75rem 1.5rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.tracker-stat-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.tracker-stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: monospace;
}
.tracker-stat-title {
  font-family: sans-serif;
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}
.tracker-stat-bar-track {
  display: flex;
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  gap: 3px;
}
.tracker-stat-bar-fill-left {
  height: 100%;
  background: #f87171;
  border-radius: 2px;
  margin-left: auto;
}
.tracker-stat-bar-fill-right {
  height: 100%;
  background: #ffffff;
  border-radius: 2px;
  margin-right: auto;
}

.espn-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  padding: 2px 10px;
  letter-spacing: 0.3px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}


