    :root {
      --bg-global-header: #4f82be;
      --primary: #00529b;
      --primary-dark: #001e3d;
      --bg: #f4f6f8;
      --card-bg: #ffffff;
      --border: #e2e8f0;
      --text: #1a1a1a;
      --muted: #64748b;
      --green: #10b981;
      --red: #ef4444;
      --yellow: #f59e0b;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
    body { background-color: var(--bg); color: var(--text); line-height: 1.5; padding-bottom: 50px; }
    .container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

    /* ==========================================================================
       2. TIER 1: SCORESTIME GLOBAL HEADER
       ========================================================================== */
    .global-header {
      background-color: var(--bg-global-header);
      color: #ffffff;
      border-bottom: 1px solid #1e293b;
      height: 56px;
    }

    .global-header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 100%;
    }

    /* Site Logo */
    .brand-logo {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -0.5px;
      color: #ffffff;
    }

    .brand-logo span {
      color: var(--primary-accent);
      font-weight: 700;
      font-size: 1.3em;
      letter-spacing: 4px;
      vertical-align: top;
    }

    .global-header a {
      color: white;
      font-size: 14px;
      text-decoration: none;
      padding: 15px 9px;
    }

    /* Global Header Actions & Leagues Menu */
    .global-actions {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    /* Leagues Switcher Menu Button */
    .leagues-menu-wrapper {
      position: relative;
    }

    .leagues-menu-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: var(--primary-accent);
      color: #0f172a;
      border: none;
      padding: 8px 14px;
      border-radius: 6px;
      font-size: 0.85rem;
      font-weight: 700;
      cursor: pointer;
      transition: background-color 0.15s ease;
    }

    /* Leagues Dropdown Menu */
    .leagues-dropdown {
      display: none; /* Controlled via JS or CSS focus state */
      position: absolute;
      right: 0;
      top: 114%;
      margin-top: 8px;
      width: 240px;
      background: var(--bg-global-header);
      background: #0f172a; 
      border: 1px solid #334155;
      border-radius: 8px;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
      padding: 8px 0;
      z-index: 1000;
    }

    /* Hover effect to display menu */
    .leagues-menu-wrapper:hover .leagues-dropdown,
    .leagues-menu-wrapper:focus-within .leagues-dropdown {
      display: block;
    }

    .dropdown-section-title {
      padding: 8px 14px 4px;
      font-size: 0.7rem;
      font-weight: 700;
      text-transform: uppercase;
      color: var(--text-muted);
      letter-spacing: 0.5px;
    }

    .league-option {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 9px 14px;
      font-size: 0.85rem;
      color: #f1f5f9;
      transition: background 0.15s ease;
    }

    .league-option:hover {
      background: #1e293b;
      color: var(--primary-accent);
    }

    .league-option img {
      width: 16px;
      height: 12px;
      border-radius: 2px;
      object-fit: cover;
    }
    /* LEAGUE HEADER BRANDING */
    .league-header { background: var(--primary-dark); color: #fff; padding: 20px 0 16px; }
    .header-flex { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
    .league-title { display: flex; align-items: center; gap: 14px; }
    .league-crest { width: 52px; height: 52px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--primary-dark); font-size: 1.2rem; }
    .league-crest img { max-height: 37px; max-width: 37px; }
    .season-select { background: rgba(255,255,255,0.12); color: white; border: 1px solid rgba(255,255,255,0.25); padding: 8px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; }

    /* STICKY MAIN NAVIGATION */
    .sticky-nav-wrapper { position: sticky; top: 0; z-index: 100; background: #ffffff; border-bottom: 1px solid var(--border); box-shadow: 0 2px 4px rgba(0,0,0,0.03); }
    .main-nav { display: flex; gap: 4px; overflow-x: auto; }
    .main-nav-btn { padding: 14px 20px; font-weight: 700; font-size: 0.95rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
    .main-nav-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

    /* SUBMENU NAVIGATION */
    .sub-nav-wrapper { background: #f8fafc; border-bottom: 1px solid var(--border); padding: 10px 0; }
    .sub-nav { display: flex; gap: 8px; overflow-x: auto; }
    .sub-pill { padding: 6px 14px; font-size: 0.85rem; font-weight: 600; color: var(--muted); background: #ffffff; border: 1px solid var(--border); border-radius: 20px; text-decoration: none; white-space: nowrap; }
    .sub-pill.active { background: var(--primary); color: #ffffff; border-color: var(--primary); }

    /* TOP FEATURED SECTION STYLES */
    .top-feature-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    @media (min-width: 900px) {
      .top-feature-grid {
        grid-template-columns: 1.8fr 1.2fr;
      }
    }

    /* TOP NEWS HERO CARD */
    .top-news-card {
      position: relative;
      background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
/*
      background: linear-gradient(135deg, #001e3d 0%, #00529b 100%);
*/
      color: #ffffff;
      border-radius: 12px;
      padding: 24px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      min-height: 260px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .top-news-badge {
      position: absolute;
      top: 16px;
      left: 16px;
      background: #ef4444;
      color: #fff;
      font-size: 0.75rem;
      font-weight: 800;
      text-transform: uppercase;
      padding: 4px 10px;
      border-radius: 20px;
    }

    .top-news-meta {
      font-size: 0.8rem;
      color: #93c5fd;
      font-weight: 600;
      margin-bottom: 6px;
      display: block;
    }

    .top-news-content {
      margin-top: 30px;
    }

    .top-news-content h2 {
      font-size: 1.4rem;
      line-height: 1.3;
      margin-bottom: 8px;
    }

    .top-news-content p {
      font-size: 0.9rem;
      color: #e2e8f0;
      margin-bottom: 14px;
    }

    .top-news-btn {
      display: inline-block;
      color: #ffffff;
      font-weight: 700;
      font-size: 0.88rem;
      text-decoration: none;
    }

    /* TOP MATCH HERO CARD */
    .top-match-card {
      background: #ffffff;
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    }

    .top-match-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--border);
      padding-bottom: 10px;
    }

    .match-badge {
      font-size: 0.8rem;
      font-weight: 800;
      color: #b91c1c;
    }

    .match-time-badge {
      font-size: 0.78rem;
      font-weight: 700;
      background: #f1f5f9;
      padding: 3px 8px;
      border-radius: 6px;
      color: var(--muted);
    }

    .top-match-body {
      display: flex;
      align-items: center;
      justify-content: space-around;
      padding: 20px 0;
    }

    .featured-team {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .team-badge-circle {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: #f1f5f9;
      border: 1px solid var(--border);
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 0.9rem;
      color: var(--primary-dark);
    }

    .team-name {
      font-size: 0.95rem;
      font-weight: 700;
    }

    .match-vs-badge {
      font-weight: 900;
      font-size: 0.85rem;
      color: var(--muted);
      background: #f8fafc;
      border: 1px solid var(--border);
      padding: 6px 10px;
      border-radius: 50%;
    }

    .top-match-footer {
      border-top: 1px solid var(--border);
      padding-top: 10px;
      text-align: center;
    }

    .match-hub-btn {
      display: block;
      margin-top: 10px;
      background: var(--primary);
      color: #ffffff;
      text-align: center;
      padding: 8px 12px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 0.85rem;
      text-decoration: none;
    }

    /* LAYOUT GRID */
    .grid-main { display: grid; grid-template-columns: 1fr; margin-top: 24px; gap: 24px; }
    @media(min-width: 900px) { .grid-main { grid-template-columns: 2fr 1fr; } }
    @media(max-width: 700px) { .grid-main { gap: 0px; } }

    .card { background: var(--card-bg); border-radius: 10px; border: 1px solid var(--border); padding: 20px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
    .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 10px; flex-wrap: wrap; gap: 10px; }
    .card-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); }
    .view-all-link { font-size: 0.85rem; font-weight: 600; color: var(--primary); text-decoration: none; }

    /* LEAGUE STATS BANNER */
    .stats-banner { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 24px; text-align: center; }
    .stat-num { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
    .stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; }

    /* MATCHES & FIXTURES MODULE */
    .filter-btn {
      background: #f1f5f9;
      border: 1px solid var(--border);
      padding: 5px 12px;
      border-radius: 6px;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--muted);
      cursor: pointer;
    }
    .filter-btn.active {
      background: var(--primary);
      color: #fff;
      border-color: var(--primary);
    }

    .matches-list { display: flex; flex-direction: column;/* gap: 12px;*/ }

    /* GROUP DATE HEADER */
    .date-header {
      font-size: 0.75rem;
      font-weight: 800;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 8px;
      margin-bottom: -4px;
      padding-left: 4px;
      border-bottom: 1px solid var(--border);
      padding-bottom: 4px;
    }

    /* WHOLE MATCH CARD AS A CLICKABLE LINK */
    .match-row-link {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 12px;
      background: #f8fafc;
      border: 1px solid var(--border);
      border-radius: 8px;
      text-decoration: none;
      color: inherit;
      transition: all 0.2s ease;
    }

/* Base sizing so both <a> and <div> align perfectly */
.match-arrow,
.match-arrow-space {
  width: 20px;
  text-align: right;
  font-size: 1rem;
}

/* 1. Clickable Behavior (<a> tag) */
a.match-row-link {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

a.match-row-link:hover {
  background-color: #f0f9ff;
}

a.match-row-link .match-arrow {
  color: #0284c7;
  font-weight: 700;
  transition: transform 0.15s ease;
}

a.match-row-link:hover .match-arrow {
  transform: translateX(3px); /* Subtitle slide effect on hover */
}

/* 2. Static Behavior (<div> tag) */
div.match-row-link {
  cursor: default;
  background-color: #fafafa;
  color: #64748b;
}

    /* MATCH MAIN CONTENT LAYOUT */
    .match-main-content {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    /* TIME / STATUS AT THE FRONT */
    .match-status-col {
      min-width: 50px;
      font-size: 0.8rem;
      font-weight: 800;
      color: var(--muted);
      text-align: center;
      padding-right: 8px;
      border-right: 1px solid var(--border);
    }
    .match-status-col.live {
      color: var(--red);
    }

    /* TEAMS & SCORE ALIGNMENT */
    .match-teams-inline {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      font-size: 0.9rem;
      font-weight: 600;
      flex: 1;
    }

    .match-team {
      flex: 1;
      display: flex;
      align-items: center;
    }
    .match-team.home { justify-content: flex-end; text-align: right; }
    .match-team.away { justify-content: flex-start; text-align: left; }
    .match-team.winner { font-weight: 800; color: #0f172a; }

    .match-score-badge {
      font-family: monospace;
      font-size: 0.9rem;
      font-weight: 800;
      background: #ffffff;
      border: 1px solid var(--border);
      padding: 2px 8px;
      border-radius: 6px;
      white-space: nowrap;
      color: var(--text);
    }

    /* COLORFUL EDITORIAL BLOCKS */
    .editorial-note {
      padding: 6px 10px;
      border-radius: 4px;
      font-size: 0.78rem;
      line-height: 1.3;
      border-left: 3px solid var(--muted);
      background: #ffffff;
      color: #334155;
    }
    .editorial-note.derby { background: #fef2f2; border-left-color: #ef4444; color: #991b1b; }
    .editorial-note.big-match { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }
    .editorial-note.info { background: #f0f9ff; border-left-color: #0284c7; color: #075985; }
    .editorial-note.recap { background: #f0fdf4; border-left-color: #10b981; color: #166534; }
    .note-icon { font-weight: 700; margin-right: 4px; }

    /* TABLES */
    .data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.noForm { display: none }
.data-table.all #home { display: none }
.data-table.all #away { display: none }
.data-table.all #form { display: none }
.data-table.home #all { display: none }
.data-table.home #away { display: none }
.data-table.home #form { display: none }
.data-table.home .form { display: none }
.data-table.away #all { display: none }
.data-table.away #home { display: none }
.data-table.away #form { display: none }
.data-table.away .form { display: none }
.data-table.form #all { display: none }
.data-table.form #home { display: none }
.data-table.form #away { display: none }
.data-table.form .form { display: "" }
.data-table .formDecor {     display: flex; flex-wrap: wrap; justify-content: center; align-items: center; }
    .data-table th { text-align: left; padding: 8px; color: var(--muted); background: #f8fafc; border-bottom: 1px solid var(--border); font-size: 0.78rem; text-transform: uppercase; text-align: center; }
    .data-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: center; }
    .data-table .name { text-align: left; }
    .data-table tr:last-child td { border-bottom: none; }
    .form-dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 0.65rem; font-weight: 800; text-align: center; line-height: 18px; margin-right: 2px; text-transform: uppercase; }
    .dot-w { background: var(--green); }
    .dot-d { background: var(--muted); }
    .dot-l { background: var(--red); }

/* top players */
/* Container Layout */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
}

/* List Formatting */
.player-stat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.player-stat-item {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

/* Rank & Avatar */
.rank {
  font-weight: 700;
  font-size: 0.9rem;
  width: 20px;
  color: #6b7280;
}

.player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #f3f4f6;
  margin: 0 10px;
}

/* Text & Stats */
.player-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.player-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #111827;
}

.player-team {
  font-size: 0.75rem;
  color: #6b7280;
}

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

    /* added */
    .mt20 { margin-top: 20px; } 
    .mb10 { margin-bottom: 10px; } 
    .mb8 { margin-bottom: 8px; } 
    .fw700 { font-weight: 700; } 
    .subTitle { font-size: 0.8rem; color: var(--muted); } 
    .inlineMenu { display: flex; gap: 8px; }
    .article { margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 10px; } 
    .news { font-size: 0.95rem; font-weight: 700; margin-top: 2px; }
    .season { font-size: 0.85rem; color: #94a3b8; }
    .listInfo { list-style: none; font-size: 0.85rem; }

/* FIX UNEVEN GAPS ON MOBILE (Width <= 640px) */
@media (max-width: 640px) {
  /* 1. Ensure equal side padding on main containers */
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* 2. Switch stats banner to a clean 2-column flex layout on small screens */
  .stats-banner {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Forces 2 equal columns */
    gap: 8px !important;
    padding: 12px !important;
  }

  /* 3. Eliminate overflow on tables & match rows */
  .card {
    padding: 14px 12px !important; /* Equal internal card padding */
    overflow-x: hidden;
  }

  .match-teams-inline {
    gap: 4px !important; /* Tighter gap for small mobile screens */
  }
}
@media (max-width: 600px) {
    .all .form { display: none; }
    .noForm { display: block; }
}

