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

:root {
  --gold: #FFD700;
  --gold-dim: #C8960C;
  --gold-light: #FFF0A0;
  --dark: #0a0a14;
  --dark2: #10101e;
  --dark3: #16162a;
  --dark4: #1e1e36;
  --surface: rgba(255,255,255,0.04);
  --surface2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0f8;
  --text2: #9090b0;
  --text3: #5c5c7a;
  --teal: #1D9E75;
  --teal-dim: #0F6E56;
  --red: #E24B4A;
  --blue: #378ADD;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --header-bg: rgba(10,10,20,0.92);
}

/* ===== LIGHT MODE ===== */
html[data-theme="light"] {
  --dark: #f0f0f8;
  --dark2: #e8e8f4;
  --dark3: #dcdcee;
  --dark4: #d0d0e4;
  --surface: rgba(0,0,0,0.04);
  --surface2: rgba(0,0,0,0.08);
  --border: rgba(0,0,0,0.1);
  --border2: rgba(0,0,0,0.18);
  --text: #1a1a2e;
  --text2: #55557a;
  --text3: #8888aa;
  --header-bg: rgba(240,240,248,0.92);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--dark);
  background-image:
    linear-gradient(rgba(10,10,20,0.82), rgba(10,10,20,0.92)),
    url('../images/bg.jpg');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
}

html[data-theme="light"] body {
  background-image:
    linear-gradient(rgba(240,240,248,0.88), rgba(240,240,248,0.94)),
    url('../images/bg.jpg');
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--text);
  letter-spacing: 0.05em;
}
.logo-text em { color: var(--gold); font-style: normal; }

.main-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}
.nav-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 0.5px solid transparent;
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.nav-btn:hover { color: var(--text); background: var(--surface); }
.nav-btn.active {
  background: var(--gold);
  color: #0a0a14;
  border-color: var(--gold);
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.header-flag { font-size: 16px; letter-spacing: 3px; }
.theme-toggle {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}
.theme-toggle:hover { background: var(--surface2); }

/* ===== HAMBURGER BUTTON ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 6px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.nav-toggle:hover { background: var(--surface2); }
.nav-toggle-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== PAGES ===== */
.page { display: none; }
.page.active { display: block; }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 24px 50px;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, rgba(255,215,0,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(29,158,117,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(55,138,221,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 700px; margin: 0 auto; }
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(52px, 9vw, 90px);
  line-height: 0.95;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}
.hero-title span { color: var(--gold); }
.hero-sub { font-size: 15px; color: var(--text2); margin-bottom: 32px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 36px;
}
.hstat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hstat-n {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  color: var(--gold);
  line-height: 1;
}
.hstat-l { font-size: 12px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; }

/* ===== COUNTDOWN ===== */
.countdown-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 0.5px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px 28px;
}
.countdown-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  font-weight: 600;
}
.countdown-timer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cd-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 36px;
  color: var(--gold);
  line-height: 1;
  min-width: 44px;
  text-align: center;
}
.cd-label {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.cd-sep {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: var(--text3);
  margin-bottom: 12px;
}

/* ===== LIVE API STATUS BAR ===== */
.live-api-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-refresh-btn {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s, transform 0.15s;
  line-height: 1;
}
.live-refresh-btn:hover { opacity: 1; transform: rotate(30deg); }
.live-api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  border: 0.5px solid var(--border);
  transition: all 0.3s;
}
.live-api-status a { color: inherit; text-decoration: underline; }
.status-unconfigured { background: var(--surface); color: var(--text3); }
.status-loading      { background: rgba(255,193,7,0.1); border-color: rgba(255,193,7,0.3); color: #FFC107; }
.status-ok           { background: rgba(29,158,117,0.1); border-color: rgba(29,158,117,0.3); color: var(--teal); }
.status-live         { background: rgba(226,75,74,0.12); border-color: rgba(226,75,74,0.35); color: var(--red); animation: live-bar-pulse 2s infinite; }
.status-error        { background: rgba(226,75,74,0.1); border-color: rgba(226,75,74,0.3); color: var(--red); }
@keyframes live-bar-pulse { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

.match-live-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(226,75,74,0.15);
  border: 0.5px solid rgba(226,75,74,0.4);
  color: var(--red);
  animation: live-bar-pulse 1.5s infinite;
  flex-shrink: 0;
}

/* ===== SCHEDULE CONTROLS ===== */
.schedule-controls {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0 18px;
  color: var(--text2);
  max-width: 420px;
}
.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 12px 0;
}
.search-box input::placeholder { color: var(--text3); }
.phase-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.phase-btn {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.phase-btn:hover { border-color: var(--border2); color: var(--text); }
.phase-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.today-filter-btn.active {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #0a0a14 !important;
}

/* ===== SCHEDULE LIST ===== */
.schedule-list {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.phase-block { margin-bottom: 40px; }
.phase-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  padding-bottom: 10px;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 16px;
}
.day-group { margin-bottom: 20px; }
.day-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.day-label-today {
  color: var(--gold);
}
.today-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255,215,0,0.15);
  border: 0.5px solid rgba(255,215,0,0.4);
  color: var(--gold);
  text-transform: uppercase;
}

/* ===== MATCH ROWS (Flashscore style) ===== */
.match-rows-block {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 0.5px solid var(--border);
  margin-bottom: 4px;
}

.match-row {
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  transition: background 0.12s;
  min-height: 56px;
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: var(--surface2); }
.match-row.is-live  { background: rgba(226,75,74,0.05); }
.match-row.is-next  { background: rgba(255,215,0,0.04); }
.match-row.is-fin   { opacity: 0.78; }
.match-row.morocco  { background: rgba(255,111,0,0.05); }

/* ---- Time column ---- */
.mr-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 54px;
  flex-shrink: 0;
  border-right: 0.5px solid var(--border);
  gap: 2px;
  padding: 4px 0;
}
.mr-time.live-time { background: rgba(226,75,74,0.08); }
.mr-time.fin-time  { }
.mr-time.next-time { }

.mr-kickoff {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.03em;
}
.mr-fin {
  font-size: 9px;
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.mr-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: live-pulse 1.2s infinite;
  flex-shrink: 0;
}
.mr-min {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}
.mr-next-arrow {
  font-size: 8px;
  color: var(--gold);
  margin-top: 1px;
}

/* ---- Teams column ---- */
.mr-teams {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 4px;
}
.mr-team {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
  min-width: 0;
}
.mr-team:hover { background: var(--surface2); }
.mr-team:hover .mr-name { color: var(--gold); }
.mr-flag { line-height: 1; flex-shrink: 0; display: flex; align-items: center; }

/* Flag images — replaces emoji for cross-platform support */
.flag-img {
  display: inline-block;
  height: 16px;
  width: auto;
  vertical-align: middle;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.12);
}
.team-card-flag .flag-img  { height: 26px; border-radius: 3px; }
.det-flag .flag-img        { height: 34px; border-radius: 3px; }
.sc-flag .flag-img         { height: 15px; }
.tick-flag .flag-img       { height: 11px; border-radius: 1px; }
.sw-flag .flag-img         { height: 13px; }
.bracket-team-flag .flag-img { height: 10px; border-radius: 1px; }
.standing-flag .flag-img   { height: 15px; }

.mr-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.1s;
}

/* ---- Score column ---- */
.mr-scores {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  gap: 2px;
  padding: 4px 0;
}
.mr-scores-live { background: rgba(226,75,74,0.06); }
.mr-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  line-height: 1;
  text-align: center;
  min-width: 22px;
}
.mr-score.live-sc { color: var(--red); }
.mr-score.done-sc { color: var(--text); }
.mr-vs {
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
}

/* ---- Meta column (group badge + venue) ---- */
.mr-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 6px 12px;
  gap: 4px;
  border-left: 0.5px solid var(--border);
  min-width: 110px;
  flex-shrink: 0;
}
.mr-grp {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 0.5px solid;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  letter-spacing: 0.05em;
}
.mr-grp:hover { opacity: 0.7; }
.mr-venue {
  font-size: 10px;
  color: var(--text3);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@keyframes pulse-score { 0%,100% { opacity:1; } 50% { opacity:0.4; } }

.no-results {
  text-align: center;
  color: var(--text3);
  padding: 60px 0;
  font-size: 15px;
  line-height: 1.8;
}

/* ===== PAGE HEADER ===== */
.page-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}
.page-header h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  letter-spacing: 0.03em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}
.page-header h2 span { color: var(--gold); }
.page-header p { font-size: 14px; color: var(--text2); }

/* ===== STANDINGS PAGE ===== */
.standings-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px;
}
.standing-group {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.standing-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 0.5px solid var(--border);
}
.standing-group-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.06em;
}
.standing-see-matches {
  background: transparent;
  border: none;
  color: var(--text3);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s;
}
.standing-see-matches:hover { color: var(--gold); }
.standing-table-wrap { overflow-x: auto; }
.standing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.standing-table thead tr {
  background: var(--surface2);
}
.standing-table th {
  padding: 8px 10px;
  color: var(--text3);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: nowrap;
}
.standing-table th:nth-child(2) { text-align: left; }
.standing-table td {
  padding: 9px 10px;
  text-align: center;
  border-top: 0.5px solid var(--border);
  color: var(--text2);
}
.standing-table td:nth-child(2) { text-align: left; }
.standing-row.qualified td:first-child {
  border-left: 3px solid var(--teal);
}
.standing-pos { font-weight: 600; color: var(--text3); font-size: 12px; }
.standing-team {
  display: flex;
  align-items: center;
  gap: 8px;
}
.standing-flag { flex-shrink: 0; display: flex; align-items: center; }
.standing-team-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  text-align: left;
  padding: 0;
}
.standing-team-btn:hover { color: var(--gold); }
.standing-pts { font-weight: 700; color: var(--text); }
.gd-pos { color: var(--teal); font-weight: 600; }
.gd-neg { color: var(--red); font-weight: 600; }
.standing-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 11px;
  color: var(--text3);
  border-top: 0.5px solid var(--border);
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.qualified-dot { background: var(--teal); }

/* ===== GROUPES PAGE ===== */
.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(229,57,53,0.12);
  border: 0.5px solid rgba(229,57,53,0.3);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #ef5350;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef5350;
  animation: live-pulse 1.2s infinite;
}
@keyframes live-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.4; transform:scale(0.7); }
}
.icons-timestamp {
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0;
  margin-left: 4px;
}
.icons-scene {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.icons-section {}
.icons-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 16px;
}
.group-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.group-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  border: none;
}
.group-badge:hover { opacity: 0.82; transform: translateY(-1px); }
.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 8px;
}
.team-card {
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0.5px solid transparent;
  transition: transform 0.15s, opacity 0.15s;
}
.team-card:hover { transform: translateY(-2px); opacity: 0.9; }
.team-card-flag { line-height: 1; display: flex; align-items: center; }
.team-card-name { font-size: 13px; font-weight: 600; margin-top: 3px; }
.team-card-sub { font-size: 10px; opacity: 0.6; margin-top: 2px; }
.team-card-right { text-align: right; }
.team-card-group { font-size: 11px; opacity: 0.5; }
.team-card-tag { font-size: 11px; font-weight: 600; margin-top: 4px; }
.phase-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.phase-pill {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 0.5px solid transparent;
  transition: opacity 0.15s, transform 0.1s;
}
.phase-pill:hover { opacity: 0.8; transform: translateY(-1px); }

/* ===== BRACKET ===== */
.bracket-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 60px;
  overflow-x: auto;
}
.bracket-rounds {
  display: flex;
  gap: 16px;
  min-width: 960px;
  align-items: flex-start;
}
.bracket-round { flex: 1; display: flex; flex-direction: column; gap: 0; min-width: 0; }
.bracket-round-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  text-align: center;
}
.bracket-matches { display: flex; flex-direction: column; gap: 5px; }
.bracket-match {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.bracket-match:hover { border-color: var(--border2); background: var(--surface2); }
.bracket-team {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  border-bottom: 0.5px solid var(--border);
}
.bracket-team:last-child { border-bottom: none; }
.bracket-team.winner { color: var(--text); font-weight: 600; }
.bracket-team-flag { font-size: 12px; flex-shrink: 0; }
.bracket-team-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.bracket-team-score { font-size: 11px; font-weight: 700; color: var(--gold); min-width: 14px; text-align: right; }
.bracket-spacer { height: 5px; }
.bracket-final-match {
  background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,215,0,0.04));
  border: 0.5px solid rgba(255,215,0,0.3) !important;
}
.bracket-final-match .bracket-team { padding: 8px 12px; font-size: 13px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-flag { display: none; }
  .standings-container { grid-template-columns: 1fr; }
  .countdown-block { padding: 12px 20px; }
  .cd-num { font-size: 28px; }
  body { background-attachment: scroll; }
}

/* — Mobile navigation — */
@media (max-width: 640px) {
  /* Show hamburger, hide inline nav */
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 60px; left: 0; right: 0;
    z-index: 200;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 20px;
    background: var(--dark2);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.65);
    display: none;
    flex: unset;
    flex-wrap: unset;
  }
  .main-nav.open {
    display: flex;
    animation: slideDown 0.2s ease;
  }
  .nav-btn {
    width: 100%; text-align: center;
    padding: 13px 16px; font-size: 15px;
    border-radius: 10px;
    background: var(--surface);
    border: 0.5px solid var(--border);
  }
  .nav-btn.active {
    background: var(--gold);
    color: #0a0a14;
    border-color: var(--gold);
  }
  /* Header: logo fills remaining space */
  .logo { flex: 1; }
  .header-inner { gap: 10px; padding: 0 14px; }
  .header-right { gap: 8px; }

  /* Schedule */
  .hero-stats { gap: 24px; }
  .phase-filters {
    overflow-x: auto; flex-wrap: nowrap;
    padding-bottom: 6px; gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .phase-filters::-webkit-scrollbar { display: none; }
  .phase-btn { padding: 5px 12px; font-size: 12px; flex-shrink: 0; }
  .icons-header-row { flex-direction: column; align-items: flex-start; }

  /* Match rows */
  .mr-meta { display: none; }
  .mr-name { font-size: 13px; }
  .mr-score { font-size: 17px; }
  .mr-time { width: 44px; }
  .mr-kickoff { font-size: 11px; }

  /* Detail panel — full width on mobile but still centered */
  .det-overlay { padding: 10px; }
  .det-panel { border-radius: 14px; max-height: 92vh; }

  /* Team cards: 2 per row on mobile */
  .team-cards { grid-template-columns: repeat(2, 1fr) !important; }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== FAVORITES ===== */
.fav-star {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.fav-star:hover    { color: var(--gold); transform: scale(1.2); }
.fav-star.fav-on   { color: var(--gold); }
.match-row.fav-match { background: rgba(255,215,0,0.04); border-left: 2px solid rgba(255,215,0,0.4); }

/* ===== DETAIL BUTTON (›) ===== */
.mr-detail {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  color: var(--text3);
  font-size: 14px;
  font-weight: 700;
  padding: 1px 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.mr-detail:hover { color: var(--gold); border-color: var(--gold); }
.mr-scores-click { cursor: pointer; }
.mr-scores-click:hover { background: var(--surface2); }

/* ===== MATCH DETAIL PANEL ===== */
.det-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.det-overlay.open {
  pointer-events: all;
  opacity: 1;
}
.det-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.det-panel {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  background: var(--dark2);
  border: 0.5px solid var(--border2);
  border-radius: 16px;
  overflow-y: auto;
  transform: scale(0.95) translateY(12px);
  transition: transform 0.25s cubic-bezier(.22,.88,.34,1);
}
.det-overlay.open .det-panel { transform: scale(1) translateY(0); }

.det-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 0.5px solid var(--border);
}
.det-caption {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
}
.det-close {
  background: var(--surface2);
  border: 0.5px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text2);
  font-size: 12px;
  transition: all 0.15s;
}
.det-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

.det-scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
  gap: 12px;
}
.det-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}
.det-side-r { align-items: center; }
.det-flag { line-height: 1; display: flex; align-items: center; justify-content: center; }
.det-tname { font-size: 14px; font-weight: 600; color: var(--text); }
.det-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.det-score {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  line-height: 1;
  color: var(--text);
  letter-spacing: 0.04em;
}
.det-dash { color: var(--text3); }
.det-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.det-live { background: rgba(226,75,74,0.15); border: 0.5px solid rgba(226,75,74,0.4); color: var(--red); animation: live-bar-pulse 1.5s infinite; }
.det-fin  { background: rgba(144,144,176,0.12); border: 0.5px solid var(--border); color: var(--text3); }
.det-up   { background: rgba(255,215,0,0.1); border: 0.5px solid rgba(255,215,0,0.3); color: var(--gold); }

.det-body { padding: 0 0 24px; }
.det-section { padding: 16px 18px 0; }
.det-section + .det-section { border-top: 0.5px solid var(--border); margin-top: 16px; padding-top: 16px; }
.det-sec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 12px;
}
.det-loading { font-size: 13px; color: var(--text3); font-style: italic; padding: 8px 0; }
.det-empty   { font-size: 13px; color: var(--text3); padding: 8px 0; }

/* Live stream embed */
.det-stream-sec { padding: 16px 18px 0; margin-bottom: 4px; }
.det-stream-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 60, 60, 0.4);
  box-shadow: 0 0 20px rgba(255, 60, 60, 0.15);
}
.det-stream-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---- Events / Timeline (single col, kept for fallback) ---- */
.ev-list { display: flex; flex-direction: column; gap: 6px; }
.ev-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 0.5px solid var(--border);
}
.ev-row:last-child { border-bottom: none; }
.ev-min { font-size: 11px; font-weight: 700; color: var(--text3); min-width: 32px; text-align: right; }
.ev-icon { font-size: 15px; flex-shrink: 0; }
.ev-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.ev-player { font-size: 13px; font-weight: 600; color: var(--text); }
.ev-assist { font-size: 11px; color: var(--text3); }
.ev-team-lbl { font-size: 10px; color: var(--text3); }

/* ---- Events / Timeline 2-column (home left, away right) ---- */
.ev-list-2col { display: flex; flex-direction: column; gap: 4px; }
.ev-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 0.5px solid var(--border);
}
.ev-row-2col:last-child { border-bottom: none; }
.ev-col-home { display: flex; justify-content: flex-start; }
.ev-col-away { display: flex; justify-content: flex-end; }
.ev-col-away .ev-cell { flex-direction: row-reverse; text-align: right; }
.ev-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}
.ev-cell .ev-icon { font-size: 14px; flex-shrink: 0; }
.ev-cell .ev-player { font-size: 12px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-cell .ev-assist { font-size: 10px; color: var(--text3); }
.ev-min-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Stats bars ---- */
.stat-list { display: flex; flex-direction: column; gap: 10px; }
.stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-val-h, .stat-val-a {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 36px;
}
.stat-val-h { text-align: right; }
.stat-val-a { text-align: left; }
.stat-mid { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.stat-label { font-size: 10px; color: var(--text3); text-align: center; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.stat-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ===== TOP BUTEURS ===== */
.scorers-block {
  max-width: 480px;
  margin: 0 auto;
  padding-top: 8px;
}
.scorers-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.scorer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  transition: background 0.12s;
}
.scorer-row:hover { background: var(--surface2); }
.sc-medal { font-size: 18px; flex-shrink: 0; min-width: 24px; text-align: center; }
.sc-rank  { font-size: 13px; font-weight: 700; color: var(--text3); }
.sc-flag  { flex-shrink: 0; display: flex; align-items: center; }
.sc-info  { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sc-name  { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-team  { font-size: 11px; color: var(--text3); }
.sc-goals { font-size: 14px; font-weight: 700; color: var(--gold); flex-shrink: 0; }

/* ===== NEWS PAGE ===== */
.news-list { max-width: 1100px; margin: 0 auto; padding: 0 24px 48px; }
.news-loading, .news-empty { text-align: center; color: var(--text3); padding: 60px 0; font-size: 15px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.news-card:hover { transform: translateY(-3px); border-color: rgba(255,215,0,0.4); }
.news-img-wrap { aspect-ratio: 16/9; overflow: hidden; }
.news-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.news-card:hover .news-img { transform: scale(1.05); }
.news-body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.news-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.news-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #FFD700; background: rgba(255,215,0,0.1); padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.news-date { font-size: 10px; color: var(--text3); }
.news-title { font-size: 15px; font-weight: 700; line-height: 1.4; margin: 0; color: var(--text1); }
.news-desc { font-size: 13px; color: var(--text2); line-height: 1.55; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-read-more { font-size: 12px; font-weight: 600; color: #FFD700; margin-top: auto; padding-top: 10px; }

/* ---- Overlay article complet ---- */
.art-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: none; align-items: flex-end; justify-content: center;
}
.art-overlay.open { display: flex; }
.art-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); }
.art-panel {
  position: relative; z-index: 1;
  width: 100%; max-width: 720px;
  height: 92vh;
  background: #0f0f1e;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; flex-direction: column;
  animation: slideUp .28s ease;
}
[data-theme="light"] .art-panel { background: #ffffff; }
.art-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.art-cat-pill { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #FFD700; background: rgba(255,215,0,0.12); padding: 3px 10px; border-radius: 20px; }
.art-permalink { margin-left: auto; font-size: 14px; text-decoration: none; opacity: .4; padding: 4px 8px; transition: opacity .15s; }
.art-permalink:hover { opacity: .9; }
.art-close { background: none; border: none; font-size: 18px; color: var(--text2); cursor: pointer; padding: 4px 8px; }
.art-close:hover { color: var(--text1); }
.news-seo-link { display: contents; text-decoration: none; color: inherit; }
.art-scroll { flex: 1; overflow-y: auto; }
.art-hero-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.art-content { padding: 24px 28px 40px; }
.art-date { font-size: 11px; color: var(--text3); margin-bottom: 10px; text-transform: capitalize; }
.art-title { font-size: 22px; font-weight: 800; line-height: 1.3; margin: 0 0 14px; color: var(--text1); }
.art-lead { font-size: 15px; color: var(--text2); line-height: 1.6; margin: 0 0 20px; font-style: italic; border-left: 3px solid #FFD700; padding-left: 14px; }
.art-body { font-size: 14px; color: var(--text2); line-height: 1.8; }
.art-body p { margin: 0 0 14px; }


/* ================================================================
   PORTAL REDESIGN
   ================================================================ */

[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input { font-family: "Cairo", "Inter", sans-serif; }
[dir="rtl"] .logo-text { font-family: "Cairo", "Bebas Neue", sans-serif; font-weight: 700; }

/* Ticker */
.live-ticker {
  background: #080c14;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  height: 36px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: sticky;
  top: 0;
  z-index: 200;
}
.ticker-label {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.ticker-wrap { flex: 1; overflow: hidden; }
.ticker-track {
  display: flex;
  align-items: center;
  animation: ticker-scroll 50s linear infinite;
  white-space: nowrap;
  will-change: transform;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.tick-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 18px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: color 0.15s;
  border-right: 1px solid rgba(255,255,255,0.07);
}
.tick-item:hover { color: var(--text); }
.tick-item.tick-live { color: var(--text); }
.tick-flag { display: flex; align-items: center; }
.tick-name { font-size: 12px; }
.tick-score { font-weight: 700; font-size: 12px; padding: 1px 6px; border-radius: 3px; min-width: 36px; text-align: center; }
.tick-score-live { color: var(--red); background: rgba(226,75,74,0.1); animation: live-bar-pulse 1.5s infinite; }
.tick-score-fin  { color: var(--text2); }
.tick-score-time { color: var(--text3); font-weight: 400; }
.tick-sep { color: var(--text3); padding: 0 6px; font-size: 11px; }
.live-ticker + .site-header { top: 36px; }

/* Lang button */
.lang-btn {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text2);
  transition: all 0.15s;
  font-family: "Cairo", "Inter", sans-serif;
}
.lang-btn:hover { color: var(--gold); border-color: var(--gold); background: rgba(255,215,0,0.08); }

/* Portal layout */
.portal-wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
}
.portal-main { min-width: 0; }
.portal-sidebar { position: sticky; top: 80px; }

/* Sidebar widget */
.sidebar-widget {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.sw-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--dark3);
  border-bottom: 0.5px solid var(--border);
}
.sw-icon { font-size: 14px; }
.sw-title { font-size: 12px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.sw-match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.sw-match:last-child { border-bottom: none; }
.sw-match:hover { background: var(--surface2); }
.sw-team { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-team-r { text-align: right; }
[dir="rtl"] .sw-team-r { text-align: left; }
.sw-score, .sw-time { font-size: 11px; font-weight: 700; text-align: center; padding: 2px 5px; border-radius: 3px; min-width: 38px; white-space: nowrap; }
.sw-live { color: var(--red); background: rgba(226,75,74,0.1); animation: live-bar-pulse 1.5s infinite; }
.sw-fin  { color: var(--text2); }
.sw-time { color: var(--text3); font-weight: 400; background: none; }
.sw-min  { font-size: 9px; color: var(--red); margin-left: 2px; }
.sw-empty { padding: 14px 16px; font-size: 12px; color: var(--text3); text-align: center; }
.sw-see-all {
  display: block; width: 100%; padding: 9px;
  background: none; border: none; border-top: 0.5px solid var(--border);
  color: var(--gold); font-size: 11.5px; font-weight: 700;
  cursor: pointer; text-align: center; transition: background 0.15s;
  font-family: inherit;
}
.sw-see-all:hover { background: var(--surface2); }
.sw-grp-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; border-bottom: 0.5px solid var(--border); }
.sw-grp-tab {
  padding: 3px 7px; border-radius: 4px; border: 0.5px solid var(--border);
  background: none; color: var(--text2); font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.15s; font-family: inherit; line-height: 1.6;
}
.sw-grp-tab.active, .sw-grp-tab:hover { background: var(--gold); color: #0a0a14; border-color: var(--gold); }
.sw-stand-row {
  display: grid; grid-template-columns: 18px 20px 1fr auto;
  align-items: center; gap: 6px; padding: 7px 14px;
  border-bottom: 0.5px solid var(--border); cursor: pointer;
  font-size: 12px; transition: background 0.15s;
}
.sw-stand-row:last-child { border-bottom: none; }
.sw-stand-row:hover { background: var(--surface2); }
.sw-stand-row.sw-qualified { border-left: 2px solid var(--teal); }
[dir="rtl"] .sw-stand-row.sw-qualified { border-left: none; border-right: 2px solid var(--teal); }
.sw-pos  { color: var(--text3); font-size: 10px; text-align: center; font-weight: 600; }
.sw-flag { display: flex; align-items: center; }
.sw-sname { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-pts  { font-weight: 700; color: var(--text); font-size: 13px; }

/* Home — Featured article */
.hf-card {
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  position: relative; margin-bottom: 28px; display: block;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.hf-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.hf-img-wrap { position: relative; width: 100%; aspect-ratio: 16/7; overflow: hidden; }
.hf-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.hf-card:hover .hf-img { transform: scale(1.04); }
.hf-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.35) 55%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 28px 32px;
}
.hf-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.hf-cat { background: var(--gold); color: #0a0a14; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.hf-date { font-size: 11px; color: rgba(255,255,255,0.55); }
.hf-title { font-size: clamp(18px, 2.8vw, 30px); font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 10px; }
.hf-desc { font-size: 13.5px; color: rgba(255,255,255,0.72); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== LIVE STREAM (home) ===== */
.ls-section { margin-bottom: 28px; }
.ls-live-badge {
  font-size: 11px; font-weight: 800; color: #f44; letter-spacing: 0.5px;
  background: rgba(255,60,60,0.12); border: 1px solid rgba(255,60,60,0.35);
  padding: 2px 8px; border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}
.ls-matches-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.ls-match-info {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid rgba(255,60,60,0.25);
  border-radius: 8px; padding: 8px 14px; cursor: pointer;
  transition: background 0.15s;
  flex: 1; min-width: 200px;
}
.ls-match-info:hover { background: var(--surface2); }
.ls-team { display: flex; align-items: center; gap: 7px; flex: 1; }
.ls-team-r { justify-content: flex-end; }
.ls-flag { width: 28px; height: auto; border-radius: 2px; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.ls-abbr { font-size: 13px; font-weight: 800; color: var(--text); letter-spacing: 0.5px; }
.ls-center { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.ls-score { font-size: 20px; font-weight: 900; color: #FFD700; letter-spacing: 2px; line-height: 1; }
.ls-min { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text3); font-weight: 600; }
.ls-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #f44; box-shadow: 0 0 5px #f44;
  animation: pulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
.ls-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255,60,60,0.3);
  box-shadow: 0 0 30px rgba(255,60,60,0.12);
}
.ls-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; display: block; }

/* Home — News grid */
.section-hdr { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 2px solid var(--gold); }
.section-hdr-icon { font-size: 16px; }
.section-hdr-title { font-size: 14px; font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: 0.06em; }
.hn-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 32px; }
.hn-card {
  background: var(--surface); border: 0.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.hn-card:hover { transform: translateY(-3px); border-color: rgba(255,215,0,0.3); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
.hn-img-wrap { aspect-ratio: 16/9; overflow: hidden; flex-shrink: 0; }
.hn-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s; }
.hn-card:hover .hn-img { transform: scale(1.06); }
.hn-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.hn-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hn-cat { background: rgba(255,215,0,0.15); color: var(--gold); font-size: 9px; font-weight: 800; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.06em; }
.hn-date { font-size: 10.5px; color: var(--text3); }
.hn-title { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.45; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hn-desc { font-size: 12px; color: var(--text2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px; flex: 1; }
.hn-more { font-size: 11.5px; color: var(--gold); font-weight: 700; margin-top: auto; }

/* RTL */
[dir="rtl"] .hf-overlay  { text-align: right; }
[dir="rtl"] .hf-top      { flex-direction: row-reverse; }
[dir="rtl"] .section-hdr { flex-direction: row-reverse; }
[dir="rtl"] .hn-meta     { flex-direction: row-reverse; }
[dir="rtl"] .sw-header   { flex-direction: row-reverse; }
[dir="rtl"] .sw-grp-tabs { direction: rtl; }
[dir="rtl"] .art-lead    { border-left: none; border-right: 3px solid #FFD700; padding-left: 0; padding-right: 14px; }

/* Responsive — portal */
@media (max-width: 1060px) {
  .portal-wrapper { grid-template-columns: 1fr; padding: 16px; }
  .portal-sidebar { display: none; }
}
@media (max-width: 768px) {
  .hn-grid { grid-template-columns: 1fr 1fr; }
  .hf-img-wrap { aspect-ratio: 4/3; }
  .live-ticker { display: none !important; }
  .portal-wrapper { padding: 12px; }
  .ls-matches-bar { gap: 8px; }
  .ls-match-info { padding: 8px 10px; min-width: 0; }
  .ls-score { font-size: 17px; }
}
@media (max-width: 480px) {
  .hn-grid { grid-template-columns: 1fr; }
  .portal-wrapper { padding: 10px; }
  .hf-title { font-size: 18px; }
  .ls-matches-bar { flex-direction: column; }
  .mh-card { flex: 0 0 130px; }
}

/* ===== SOCIAL SHARE ===== */
.art-share {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--border); margin-top: 20px;
}
.art-share-label { font-size: 12px; color: var(--text3); font-weight: 600; }
.share-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; text-decoration: none;
  color: var(--text); background: var(--card); transition: all .15s;
}
.share-btn:hover { transform: translateY(-1px); }
.share-btn svg { width: 14px; height: 14px; }
.share-wa  { color: #25d366; border-color: #25d36630; }
.share-wa:hover  { background: #25d36615; }
.share-x   { color: #e7e9ea; border-color: #ffffff20; }
.share-x:hover   { background: #ffffff10; }
.share-copy { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.share-copy:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.art-views { font-size: 11px; color: var(--text3); margin-left: auto; }

/* ===== RELATED ARTICLES ===== */
.art-related { padding: 16px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.art-related-title { font-size: 13px; font-weight: 700; color: var(--text2); margin-bottom: 12px; }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.related-card { cursor: pointer; border-radius: 10px; overflow: hidden; background: var(--card);
  border: 1px solid var(--border); transition: transform .15s; }
.related-card:hover { transform: translateY(-2px); }
.related-img { width: 100%; height: 72px; object-fit: cover; display: block; }
.related-title { font-size: 11px; font-weight: 600; padding: 8px; line-height: 1.4;
  color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr 1fr; } }

/* ===== VENUES PAGE ===== */
.venue-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.venue-filter-btn {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card); color: var(--text2); font-size: 13px; cursor: pointer; transition: all .15s;
}
.venue-filter-btn.active { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }

.venue-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.venue-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s;
}
.venue-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.venue-img-wrap { position: relative; height: 160px; overflow: hidden; }
.venue-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.venue-card:hover .venue-img { transform: scale(1.04); }
.venue-country-badge {
  position: absolute; bottom: 8px; left: 8px; background: rgba(0,0,0,.75);
  backdrop-filter: blur(6px); border-radius: 20px; padding: 3px 10px;
  font-size: 11px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 4px;
}
.venue-country-badge img { height: 12px; border-radius: 2px; }
.venue-body { padding: 14px; }
.venue-name { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.venue-city { font-size: 12px; color: var(--text3); margin-bottom: 10px; }
.venue-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.venue-cap { font-size: 12px; color: var(--text2); font-weight: 600; }
.venue-role { font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: rgba(255,215,0,.1); color: var(--accent); font-weight: 700; }
.venue-role.role-final { background: rgba(255,215,0,.2); color: var(--accent); }
.venue-footer { display: flex; align-items: center; justify-content: space-between; }
.venue-surface { font-size: 11px; color: var(--text3); }
.surf-grass { color: #4ade80; }
.surf-art   { color: #60a5fa; }
.venue-map-btn {
  font-size: 11px; padding: 4px 10px; border-radius: 8px;
  background: var(--surface); color: var(--text2); text-decoration: none;
  border: 1px solid var(--border); transition: background .15s;
}
.venue-map-btn:hover { background: var(--border); }

/* Venue detail panel */
.venue-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.venue-overlay.open { opacity: 1; pointer-events: all; }
.venue-backdrop { position: absolute; inset: 0; }
.venue-panel {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 560px; max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(.95) translateY(12px);
  transition: transform .25s cubic-bezier(.22,.88,.34,1);
}
.venue-overlay.open .venue-panel { transform: scale(1) translateY(0); }
.venue-panel-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.venue-panel-country { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text2); }
.venue-panel-country img { height: 16px; border-radius: 2px; }
.venue-panel-scroll { overflow-y: auto; flex: 1; }
.venue-panel-img { width: 100%; height: 200px; object-fit: cover; display: block; }
.venue-panel-content { padding: 18px; }
.venue-panel-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.venue-panel-city { font-size: 13px; color: var(--text3); margin-bottom: 16px; }
.venue-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.vinfo-item { background: var(--card); border-radius: 10px; padding: 10px 12px; }
.vinfo-label { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--text3); text-transform: uppercase; margin-bottom: 4px; }
.vinfo-val { font-size: 14px; font-weight: 700; color: var(--text); }
.role-highlight { color: var(--accent); }
.venue-map-full-btn {
  display: flex; align-items: center; gap: 6px; justify-content: center;
  padding: 11px; border-radius: 10px; background: rgba(255,215,0,.1);
  color: var(--accent); text-decoration: none; font-weight: 700; font-size: 13px;
  border: 1px solid rgba(255,215,0,.2); margin-bottom: 14px; transition: background .15s;
}
.venue-map-full-btn:hover { background: rgba(255,215,0,.18); }
.venue-map-embed { border-radius: 12px; overflow: hidden; }

/* ===== PLAYERS PAGE ===== */
.players-search-wrap { margin-bottom: 16px; }
.players-search {
  width: 100%; padding: 10px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-size: 14px; outline: none;
}
.players-search:focus { border-color: var(--accent); }

.players-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; margin-bottom: 24px; }
.player-team-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 10px; cursor: pointer; text-align: center; position: relative;
  transition: transform .15s, border-color .15s;
}
.player-team-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.player-team-card.has-squad { border-color: rgba(255,215,0,.2); }
.ptc-flag { margin-bottom: 6px; }
.ptc-flag img { height: 28px; border-radius: 3px; }
.ptc-name { font-size: 11px; font-weight: 600; color: var(--text2); line-height: 1.3; }
.ptc-badge { position: absolute; top: 5px; right: 5px; font-size: 9px; color: var(--accent); font-weight: 700; }

.players-squad-panel {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 0 0 16px; overflow: hidden;
}
.squad-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.squad-team-name { font-size: 17px; font-weight: 800; flex: 1; }
.squad-count { font-size: 12px; color: var(--text3); }
.squad-close { background: none; border: 1px solid var(--border); color: var(--text2);
  border-radius: 50%; width: 28px; height: 28px; cursor: pointer; font-size: 13px; }
.squad-body { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.squad-pos-group {}
.squad-pos-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.squad-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 8px; }
.squad-player-card {
  display: flex; align-items: center; gap: 10px; background: var(--surface);
  border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border);
}
.spc-num { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.spc-info { min-width: 0; }
.spc-name { font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spc-club { font-size: 11px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.squad-empty { padding: 24px; text-align: center; color: var(--text3); }
.squad-espn-link {
  display: inline-block; margin-top: 12px; padding: 8px 16px; border-radius: 8px;
  background: var(--surface); color: var(--accent); text-decoration: none;
  font-size: 13px; font-weight: 600; border: 1px solid var(--border);
}

/* Light mode */
[data-theme="light"] .live-ticker   { background: #eef0f5; border-color: rgba(0,0,0,0.1); }
[data-theme="light"] .ticker-label  { background: #e53935; }
[data-theme="light"] .lang-btn      { background: rgba(0,0,0,0.05); }

/* ===== TOP SCORERS (new) ===== */
.scorers-page { padding: 4px 0 24px; }
.scorers-hdr { margin-bottom: 20px; }
.scorers-hdr h3 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.scorers-hdr p  { font-size: 13px; color: var(--text3); }
.scorers-body { max-width: 560px; }
.scorers-loading { padding: 40px; text-align: center; color: var(--text3); }
.scorers-empty   { padding: 50px 20px; text-align: center; color: var(--text3); font-size: 14px; }
.scorers-note    { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text3); margin-bottom: 10px; }
.scorers-table   { display: flex; flex-direction: column; gap: 8px; }
.scorer-rank { font-size: 13px; font-weight: 800; color: var(--text3); min-width: 24px; text-align: center; }
.rank-gold   { color: #FFD700; }
.rank-silver { color: #C0C0C0; }
.rank-bronze { color: #CD7F32; }
.scorer-avatar    { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface2); flex-shrink: 0; }
.scorer-avatar-ph { width: 38px; height: 38px; border-radius: 50%; background: var(--surface2); flex-shrink: 0; }
.scorer-info      { flex: 1; min-width: 0; }
.scorer-name      { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scorer-team      { font-size: 11px; color: var(--text3); margin-top: 1px; }
.scorer-goals     { font-size: 16px; font-weight: 800; color: var(--accent); flex-shrink: 0; }

/* ===== PREDICTIONS / PRONOSTICS ===== */
.pred-page { padding: 4px 0 24px; }
.pred-hdr  { margin-bottom: 20px; }
.pred-hdr h3 { font-size: 22px; font-weight: 800; margin-bottom: 2px; }
.pred-hdr p  { font-size: 13px; color: var(--text3); }
.pred-empty  { padding: 50px 20px; text-align: center; color: var(--text3); font-size: 14px; }
.pred-list   { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }

.pred-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px 18px;
}
.pred-card-date { font-size: 11px; color: var(--text3); margin-bottom: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pred-card-teams {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.pred-team { font-size: 14px; font-weight: 700; flex: 1; }
.pred-team-home { text-align: left; }
.pred-team-away { text-align: right; }
.pred-vs { font-size: 11px; font-weight: 800; color: var(--text3); flex-shrink: 0; }
.pred-btns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
.pred-btn {
  padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: none; color: var(--text2); cursor: pointer; font-size: 12px;
  font-weight: 600; transition: all .15s; font-family: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pred-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pred-btn.voted { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pred-btn:disabled { opacity: .5; cursor: not-allowed; }
.pred-draw { border-color: var(--border2); }

.pred-bars { margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
.pred-bar-row { display: flex; align-items: center; gap: 10px; }
.pred-bar-label { font-size: 11px; font-weight: 600; color: var(--text3); min-width: 54px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pred-bar-label.pred-my-vote { color: var(--accent); }
.pred-bar-track { flex: 1; height: 7px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.pred-bar-fill  { height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.25,.8,.25,1); }
.pred-fill-home { background: var(--teal); }
.pred-fill-draw { background: var(--text3); }
.pred-fill-away { background: var(--blue); }
.pred-bar-pct   { font-size: 11px; font-weight: 700; color: var(--text2); min-width: 30px; text-align: right; }
.pred-total     { font-size: 11px; color: var(--text3); margin-top: 4px; text-align: right; }
