/* ============================================
   AI PREDICT - Football Predictions
   Dark Premium Design v2
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0d0f;
  --bg-secondary: #111518;
  --bg-card: #171c21;
  --bg-card-hover: #1c2228;
  --bg-glass: rgba(23, 28, 33, 0.7);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(99, 102, 241, 0.3);
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-primary: #6366f1;
  --accent-secondary: #818cf8;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8);
  --green: #818cf8;
  --green-bg: rgba(129, 140, 248, 0.12);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(79, 70, 229, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}


/* ---- HEADER ---- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 0;
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Green accent gradient line under header */
.app-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), rgba(129, 140, 248, 0.3), transparent);
  pointer-events: none;
}

/* ---- GLOBAL SEARCH ---- */
.global-search {
  position: relative;
  display: flex;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 150;
}

.global-search-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 2;
}

.global-search-btn:hover {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

.global-search-input-wrap {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s;
  opacity: 0;
  pointer-events: none;
}

.global-search.open .global-search-input-wrap {
  width: var(--gs-input-width, 500px);
  opacity: 1;
  pointer-events: auto;
}

.global-search.open .global-search-btn {
  color: #6366f1;
}

.global-search-input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  background: var(--card-bg, #171c21);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.global-search-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.1);
}

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

.global-search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card-bg, #171c21);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  display: none;
  z-index: 200;
}

.global-search-results.visible {
  display: block;
}

.gs-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.gs-result-item:hover {
  background: rgba(99, 102, 241, 0.06);
}

.gs-result-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.gs-result-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.gs-result-info {
  flex: 1;
  min-width: 0;
}

.gs-result-name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gs-result-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.gs-result-category {
  padding: 6px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.04);
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
  .global-search.open .global-search-input-wrap {
    position: fixed;
    top: 60px;
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  .global-search-results {
    position: fixed;
    top: 104px;
    left: 12px;
    right: 12px;
    width: auto;
  }
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 240px 0 24px;
  /* right padding leaves room for user-bar buttons */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 32px;
  width: auto;
  filter: brightness(1.1);
}

.logo-ball {
  height: 22px;
  width: auto;
  opacity: 0.85;
  margin-left: -4px;
}

.logo-text {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-text span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 8px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}


/* ---- MAIN ---- */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}


/* ---- CALENDAR ---- */
.calendar-section {
  margin-bottom: 32px;
}

.calendar-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.calendar-strip::-webkit-scrollbar {
  display: none;
}

.cal-day {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  min-width: 72px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.cal-day:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.cal-day.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.cal-day.active .cal-weekday,
.cal-day.active .cal-date,
.cal-day.active .cal-month {
  color: #fff;
}

.cal-day.today:not(.active)::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-primary);
}

.cal-weekday {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cal-date {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.cal-month {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.cal-matches {
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  padding: 1px 6px;
  margin-top: 2px;
}

.cal-day.active .cal-matches {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

/* ---- HERO (compact) ---- */
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  position: relative;
  z-index: 50;
  overflow: visible;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.page-title h1 span {
  color: var(--text-secondary);
  font-weight: 400;
}

.title-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  padding: 5px 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar Icon on index page */
.cal-icon-wrap {
  position: relative;
}

.cal-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  color: var(--accent-primary, #6366f1);
}

.cal-icon:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.4);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.2);
}

.cal-icon svg {
  display: block;
}

/* Calendar Popup */
.cal-popup {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--card-bg, #171c21);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.cal-popup.open {
  display: block;
}

/* ---- STATS INLINE ---- */
.stats-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.stat-item {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.stat-item strong {
  color: var(--text-primary);
  font-weight: 700;
  margin-right: 3px;
}

.stat-dot {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0.5;
}

/* ---- LEAGUE GROUP (Flashscore Style) ---- */
.league-group {
  margin-bottom: 2px;
  background: var(--bg-card);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.league-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  background: rgba(99, 102, 241, 0.06);
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.league-header:hover {
  background: rgba(99, 102, 241, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.league-flag {
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.league-flag img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

.country-prefix {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-right: 4px;
}

.league-name-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Clickable country/league links in headers */
.league-header-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

.league-header-link:hover {
  color: var(--accent-primary);
}

.league-header-link .country-prefix:hover {
  color: var(--accent-primary);
}

.league-header-link .league-name-text:hover {
  color: var(--accent-primary);
}

a.league-name-link {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.15s ease;
}

a.league-name-link:hover {
  color: var(--accent-primary, #818cf8);
}

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

.match-count-badge {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
}

.chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.league-group.expanded .chevron {
  transform: rotate(180deg);
}

/* Collapsible logic */
.league-matches {
  transition: max-height 0.3s ease-out;
}

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

/* ---- MATCH ROW (Flashscore Style) ---- */
.match-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  position: relative;
  min-height: 52px;
  background: var(--bg-primary);
}

.match-insight-bar,
.match-summary-panel {
  flex-basis: 100%;
  width: calc(100% + 24px);
  margin-left: -12px;
  margin-right: -12px;
}

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

.match-row:hover {
  background: #0f0d1c;
}

.match-time-col {
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* First row is taller due to Score/AI header labels - push time down to align with team names */
.match-row:first-child .match-time-col,
.match-row.show-header .match-time-col {
  padding-top: 18px;
}

.match-time {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.match-date-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}


.match-status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}

.match-status-dot.active {
  background: #ef4444;
  box-shadow: 0 0 5px #ef4444;
}

.match-teams-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 10px;
  position: relative;
}

.team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-name-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-item.winner .team-name-row {
  color: var(--text-primary);
  font-weight: 600;
}

.team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
  box-sizing: content-box;
}

.country-flag {
  vertical-align: middle;
  border-radius: 3px;
  box-sizing: border-box;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.league-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
  background: #fff;
  border-radius: 4px;
  padding: 2px;
  box-sizing: content-box;
  margin-right: 10px;
}

.team-score-cell {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  width: 32px;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
}

/* ── Score column header labels ── */
.teams-header-labels {
  display: none;
  align-items: center;
  gap: 0;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  pointer-events: none;
  background: transparent;
  margin-left: -12px;
  margin-right: -12px;
  padding: 0 12px 2px 12px;
}

/* Only show column headers on the first match in each league or when JS adds .show-header */
.match-row:first-child .teams-header-labels,
.match-row.show-header .teams-header-labels {
  display: flex;
}

.col-label-spacer {
  flex: 1;
}

.score-ai-labels {
  display: inline-flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 1;
}

.col-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--text-muted);
  opacity: 0.6;
}

.score-col-label {
  width: 32px;
}

.ai-col-label {
  width: 32px;
  color: var(--accent-primary);
  opacity: 0.8;
}

/* AI predicted score cell */
.team-ai-cell {
  font-size: 13px;
  font-weight: 600;
  color: rgba(99, 102, 241, 0.85);
  width: 32px;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
}

/* ── Inline AI info toggle ── */
.ai-info-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  cursor: default;
  pointer-events: none;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(22, 163, 74, 0.15);
  border: 1px solid rgba(22, 163, 74, 0.35);
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  min-width: 80px;
  justify-content: center;
  position: absolute;
  right: calc(32px + 32px + 22px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

/* First row is taller due to SCORE/AI header labels - shift label down */
.match-row:first-child .ai-info-label,
.match-row.show-header .ai-info-label {
  top: calc(50% + 9px);
}

.ai-info-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  border-radius: 0;
  background: transparent;
  letter-spacing: 0.3px;
}

.ai-info-label.high {
  background: rgba(22, 163, 74, 0.18);
  border-color: rgba(22, 163, 74, 0.4);
}

.ai-info-label.high .ai-info-pct {
  color: #22c55e;
}

.ai-info-label.medium {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

.ai-info-label.medium .ai-info-pct {
  color: #f59e0b;
}

.ai-info-label.low {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}

.ai-info-label.low .ai-info-pct {
  color: #ef4444;
}

/* Combo probability badge in match rows */
.match-combo-badge {
  display: inline-block;
  padding: 1px 7px;
  background: rgba(22, 163, 74, 0.12);
  color: #22c55e;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 8px;
  letter-spacing: 0.02em;
  margin-left: 4px;
  vertical-align: middle;
}

.ai-info-result {
  font-size: 10px;
  font-weight: 700;
}

.ai-info-result.correct {
  color: #4ade80;
}

.ai-info-result.wrong {
  color: #f87171;
}

.ai-info-toggle-spacer {
  display: none;
}

.ai-info-col-label {
  display: none;
}

/* ── Match Insight Bar (confidence + one-liner) ── */
.match-insight-bar {
  position: relative;
  height: 26px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.insight-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transition: width 1s ease-out;
  opacity: 0.7;
  z-index: 1;
}

.insight-fill.high {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.6), rgba(129, 140, 248, 0.25));
}

.insight-fill.medium {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.6), rgba(245, 158, 11, 0.25));
}

.insight-fill.low {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.55), rgba(239, 68, 68, 0.2));
}

.insight-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  gap: 8px;
  align-items: center;
}

.insight-pct {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.insight-result {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.insight-result.correct {
  color: #4ade80;
}

.insight-result.wrong {
  color: #f87171;
}

.insight-brief {
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.insight-expand-icon {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  opacity: 0.7;
}

.match-insight-bar:hover {
  background: rgba(255, 255, 255, 0.06);
}

.match-insight-bar:hover .insight-expand-icon {
  opacity: 1;
}

/* ── Expandable Summary Panel (inline, below bar) ── */
.match-summary-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(180deg, rgba(30, 30, 45, 0.95), rgba(22, 22, 35, 0.98));
  border-top: 1px solid transparent;
}

.match-summary-panel.open {
  max-height: 200px;
  padding: 10px 14px;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.match-summary-panel.open+.match-row {
  border-top: none;
}

/* Rotate arrow when open */
.match-row.summary-open .insight-expand-icon {
  transform: rotate(180deg);
}

.summary-sentences {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-line {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.summary-bullet {
  color: var(--accent-primary);
  font-size: 11px;
  flex-shrink: 0;
  opacity: 0.75;
  margin-top: 1px;
}

/* ---- LIVE SCORES ---- */
.match-live {
  /* keep for live row styling hooks */
  position: relative;
}

.live-pulse {
  animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px #ef4444;
  }

  50% {
    opacity: 0.3;
    box-shadow: 0 0 8px #ef4444;
  }
}

.live-minute {
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  font-family: var(--font-mono);
  margin-top: 2px;
}

.match-finished .live-minute {
  color: var(--text-muted);
}

.score-live {
  color: #ef4444 !important;
  font-weight: 800;
}

.score-final {
  color: var(--text-primary);
  font-weight: 700;
}

/* Goal flash animation */
@keyframes goalFlash {

  0%,
  100% {
    background: transparent;
  }

  15% {
    background: rgba(220, 38, 38, 0.25);
  }

  30% {
    background: rgba(220, 38, 38, 0.08);
  }

  45% {
    background: rgba(220, 38, 38, 0.2);
  }

  60% {
    background: rgba(220, 38, 38, 0.06);
  }

  75% {
    background: rgba(220, 38, 38, 0.15);
  }
}

.goal-flash {
  animation: goalFlash 4s ease-out;
}

.goal-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: goalPulse 0.6s ease-in-out infinite alternate;
}

@keyframes goalPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

/* ---- FILTER BADGE BAR ---- */
.filter-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 10px;
  position: relative;
  z-index: 50;
}

.filter-groups {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.filter-primary {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Filters toggle button - hidden on desktop */
.filter-toggle-btn {
  display: none !important;
}

/* Secondary filters - inline on desktop */
.filter-more {
  display: contents;
}

.filter-group-left,
.filter-group-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-separator {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 8px;
  flex-shrink: 0;
}

.filter-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Goal-line dropdown */
.goal-select {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 2px 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeSlideIn 0.2s ease;
}

.goal-select.open {
  display: inline-flex;
}

.goal-opt {
  padding: 4px 8px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.goal-opt:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.goal-opt.active {
  background: rgba(220, 38, 38, 0.3);
  color: #ff6b6b;
  border: 1px solid rgba(220, 38, 38, 0.4);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Pred badge active uses a different accent */
.pred-badge.active {
  background: rgba(99, 102, 241, 0.85);
  border-color: rgba(99, 102, 241, 0.9);
  color: #fff;
}

.pred-badge:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

/* 1X2 tip badge - absolutely centered overlay on AI column */
.tip-overlay {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.tip-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.tip-badge.tip-1 {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tip-badge.tip-X {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.tip-badge.tip-2 {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}


.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.filter-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.filter-badge.active {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

.filter-badge[data-filter="live"] .live-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse-dot 2s infinite;
}

.filter-badge[data-filter="live"].active .live-filter-dot {
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
}

/* Hide odds by default */
body.hide-odds .match-odds-bar {
  display: none !important;
}


/* ---- NO MATCHES ---- */
.no-matches {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-matches-icon {
  font-size: 52px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-matches h3 {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}

.no-matches p {
  font-size: 14px;
  max-width: 360px;
  margin: 0 auto;
}

/* ---- FOOTER ---- */
.app-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(10, 10, 15, 0.5);
}

.app-footer a {
  color: var(--accent-primary);
  text-decoration: none;
}

.app-footer p+p {
  margin-top: 3px;
}

/* ---- LAST UPDATE ---- */
.last-update {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
  padding: 8px;
}

.last-update strong {
  color: var(--text-secondary);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .header-inner {
    gap: 10px;
  }

  .logo-text {
    font-size: 16px;
  }

  .stats-inline {
    gap: 6px;
  }

  .stat-item {
    font-size: 12px;
  }

  .match-teams {
    flex-direction: column;
    gap: 8px;
  }

  .team {
    justify-content: center !important;
    text-align: center !important;
  }

  .team-home {
    flex-direction: row-reverse;
  }

  .prediction-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .confidence-bar {
    grid-column: 1 / -1;
  }

  .page-title {
    gap: 8px;
  }

  .cal-day {
    min-width: 62px;
    padding: 8px 12px;
  }

  .cal-date {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 20px 14px 40px;
  }

  .match-card {
    padding: 14px 14px;
  }

  .stats-inline {
    gap: 4px 6px;
  }

  .stat-item {
    font-size: 11px;
  }
}

/* ---- ANIMATIONS ---- */
.fade-in {
  animation: fadeIn 0.5s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.match-card {
  animation: fadeIn 0.5s ease-out both;
}

.match-card:nth-child(1) {
  animation-delay: 0.03s;
}

.match-card:nth-child(2) {
  animation-delay: 0.06s;
}

.match-card:nth-child(3) {
  animation-delay: 0.09s;
}

.match-card:nth-child(4) {
  animation-delay: 0.12s;
}

.match-card:nth-child(5) {
  animation-delay: 0.15s;
}

.match-card:nth-child(6) {
  animation-delay: 0.18s;
}

.match-card:nth-child(7) {
  animation-delay: 0.21s;
}

.match-card:nth-child(8) {
  animation-delay: 0.24s;
}

.match-card:nth-child(9) {
  animation-delay: 0.27s;
}

.match-card:nth-child(10) {
  animation-delay: 0.30s;
}

.league-group {
  animation: fadeIn 0.4s ease-out both;
}

/* Calendar scroll hint on mobile */
@media (max-width: 640px) {
  .calendar-strip {
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }
}

/* ---- NAV LINKS ---- */
.nav-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.back-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent-primary);
}

/* ---- TEAM LINKS (clickable names) ---- */
.team-link {
  text-decoration: none;
  color: var(--text-primary);
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.team-link:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* ---- TEAM HERO ---- */
.team-hero {
  text-align: center;
  padding: 32px 20px 24px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.team-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
}

.team-hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.team-hero-icon img {
  width: 56px;
  height: 42px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.team-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.team-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.team-meta-item {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 14px;
}

.team-description {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 10px;
  line-height: 1.7;
}

.team-style {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- TEAM TRAITS ---- */
.team-traits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.trait-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.trait-box h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.trait-box ul {
  list-style: none;
  padding: 0;
}

.trait-box li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  border-bottom: 1px solid var(--border-color);
}

.trait-box li:last-child {
  border-bottom: none;
}

.trait-strengths {
  border-left: 3px solid var(--green);
}

.trait-weaknesses {
  border-left: 3px solid var(--red);
}

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

  .team-hero h1 {
    font-size: 22px;
  }
}

/* ---- SECTION TITLES ---- */
.section-title {
  margin-bottom: 16px;
}

.section-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* ---- ARCHIVE PAGE ---- */
.hero {
  text-align: center;
}

.hero h1 {
  margin-bottom: 6px;
}

.hero p {
  font-size: 14px;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.archive-matches.collapsed {
  display: none;
}

.match-card.compact {
  padding: 14px 16px;
}

.archive-prediction-info {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.archive-prediction-info strong {
  color: var(--text-primary);
}

/* ---- RESULT INDICATORS ---- */
.pred-item.result-correct {
  border-color: var(--green);
  background: var(--green-bg);
}

.pred-item.result-correct .pred-value {
  color: var(--green);
}

.pred-item.result-wrong {
  border-color: var(--red);
  background: var(--red-bg);
}

.pred-item.result-wrong .pred-value {
  color: var(--red);
}

.match-card.has-result {
  border-left: 3px solid var(--text-muted);
}

.match-card.has-result .match-status.finished {
  background: rgba(107, 114, 128, 0.15);
}

/* ---- VS SCORE (actual result) ---- */
.vs-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0;
}

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
  margin-bottom: 20px;
}

.pagination-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.pagination-btn.disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.4;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.pagination-num:hover {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

.pagination-num.active {
  color: #fff;
  background: var(--accent-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.pagination-dots {
  font-size: 13px;
  color: var(--text-muted);
  padding: 0 2px;
}

.pagination-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- EXPAND ICON ---- */
.expand-icon {
  font-size: 10px;
  margin-left: 6px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.archive-matches.collapsed~.league-header .expand-icon,
.league-header:has(+ .archive-matches.collapsed) .expand-icon {
  transform: rotate(-90deg);
}

/* ---- RESULT TEXT ---- */
.result-ok {
  color: var(--green) !important;
}

.result-bad {
  color: var(--red) !important;
}

@media (max-width: 480px) {
  .pagination {
    gap: 4px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .pagination-num {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

/* ---- ARCHIVE CALENDAR PICKER ---- */
.archive-calendar {
  margin-bottom: 8px;
}

.cal-picker-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cal-picker-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.cal-picker-icon {
  font-size: 20px;
}

.cal-picker-label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.cal-picker-arrow {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.cal-grid-wrapper {
  display: none;
  margin-top: 8px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  animation: fadeIn 0.2s ease-out;
}

.cal-grid-wrapper.open {
  display: block;
}

.cal-grid-wrapper.open~.cal-picker-toggle .cal-picker-arrow,
.cal-picker-toggle:has(~ .cal-grid-wrapper.open) .cal-picker-arrow {
  transform: rotate(180deg);
}

.cal-grid-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-nav-btn {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.cal-nav-btn:hover {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

.cal-grid-month {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.cal-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.cal-grid-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 0;
}

.cal-grid-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-day-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
}

.cal-day-cell.empty {
  visibility: hidden;
}

.cal-day-cell.has-data {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
  cursor: pointer;
}

.cal-day-cell.has-data:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  transform: scale(1.05);
}

.cal-day-cell.selected {
  color: #fff;
  background: var(--accent-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
  font-weight: 700;
}

.cal-day-cell.is-today {
  border: 2px solid var(--accent-primary);
}

.cal-day-cell.is-today.selected {
  border-color: transparent;
}

/* ---- PAGE TITLE ---- */
.page-title {
  margin-bottom: 20px;
}

.page-title h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.title-badge {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .cal-picker-label {
    font-size: 13px;
  }

  .cal-day-cell {
    height: 34px;
    font-size: 12px;
  }

  .cal-grid-wrapper {
    padding: 14px;
  }

  .page-title h1 {
    font-size: 18px;
  }
}

/* ---- BUTTON NAV (calendar arrows) ---- */
button.cal-nav-btn {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

button.cal-nav-btn:hover:not(:disabled) {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.08);
}

button.cal-nav-btn:disabled,
button.cal-nav-btn.disabled {
  color: var(--text-muted);
  opacity: 0.3;
  cursor: default;
}

/* ---- LEAGUE CARD LINKS ---- */
.league-card-link {
  text-decoration: none;
  display: block;
}

.league-card-link .match-card:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.leagues-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 0 8px;
}

.league-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 20px;
}

/* Country page league cards */
.country-league-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-card, #171c21);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  cursor: pointer;
}

.country-league-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.country-league-info {
  flex: 1;
  min-width: 0;
}

.country-league-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #fff);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.country-league-name img {
  flex-shrink: 0;
}

.country-league-desc {
  font-size: 12px;
  color: var(--text-muted, #8890a0);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.country-league-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.country-league-level {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent, #6366f1);
  background: rgba(99, 102, 241, 0.1);
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.country-league-teams {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #8890a0);
  white-space: nowrap;
}

.country-league-arrow {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  transition: color 0.15s ease, transform 0.15s ease;
}

.country-league-card:hover .country-league-arrow {
  color: rgba(255, 255, 255, 0.6);
  transform: translateX(2px);
}

@media (max-width: 480px) {
  .leagues-grid {
    gap: 6px;
  }

  .country-league-card {
    padding: 12px 14px;
    border-radius: 12px;
    gap: 10px;
  }

  .country-league-name {
    font-size: 13px;
  }

  .country-league-desc {
    font-size: 11px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .country-league-level {
    font-size: 9px;
    padding: 3px 8px;
  }

  .country-league-teams {
    display: none;
  }
}

/* ============================================
   MATCH DETAIL PAGE
   ============================================ */

/* --- Match Hero / Scoreboard --- */
.match-hero {
  text-align: center;
  padding: 32px 20px 24px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.match-hero-league {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.match-hero-league img {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: middle;
}

.match-hero-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid transparent;
}

.match-hero-link:hover {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.match-hero-separator {
  margin: 0 2px;
  opacity: 0.4;
}

.match-hero-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.match-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.match-scoreboard-team {
  flex: 1;
  max-width: 200px;
  text-align: center;
}

.match-scoreboard-team .team-link {
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.match-scoreboard-team .team-link:hover {
  color: var(--accent-primary);
}

.scoreboard-team-icon {
  font-size: 40px;
  line-height: 1;
}

.scoreboard-team-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.match-scoreboard-center {
  min-width: 140px;
  text-align: center;
}

.scoreboard-actual-label,
.scoreboard-predicted-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.scoreboard-score {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  letter-spacing: 2px;
}

.scoreboard-score.actual {
  font-size: 36px;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.scoreboard-score.predicted {
  font-size: 22px;
  color: var(--accent-primary);
  opacity: 0.8;
}

.scoreboard-score.predicted.large {
  font-size: 42px;
  opacity: 1;
}

.scoreboard-vs-badge {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
}

.match-hero-verdict {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.verdict-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.verdict-badge.correct {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.verdict-badge.wrong {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.verdict-badge.pending {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* --- AI Analysis --- */
.match-analysis {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 24px;
  margin-bottom: 20px;
}

.match-analysis h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.analysis-confidence {
  margin-bottom: 16px;
}

.confidence-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
}

.confidence-badge.high {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.confidence-badge.medium {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.3);
}

.confidence-badge.low {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.analysis-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.analysis-bullet {
  color: var(--accent-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Prediction Breakdown --- */
.match-predictions {
  margin-bottom: 20px;
}

.match-predictions h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.prediction-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.pred-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  position: relative;
  transition: transform 0.2s, border-color 0.2s;
}

.pred-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
}

.pred-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pred-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pred-card-value.high {
  color: #2ecc71;
}

.pred-card-value.medium {
  color: #f1c40f;
}

.pred-card-value.low {
  color: #e74c3c;
}

.pred-card-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.pred-card-result {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.pred-card-result.correct {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
}

.pred-card-result.wrong {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* --- Team Comparison --- */
.match-teams-comparison {
  margin-bottom: 20px;
}

.match-teams-comparison h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.teams-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.compare-team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
}

.compare-team-card.home {
  border-top: 3px solid var(--accent-primary);
}

.compare-team-card.away {
  border-top: 3px solid #e74c3c;
}

.compare-team-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.compare-team-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.compare-team-header h3 .team-link {
  color: var(--text-primary);
  text-decoration: none;
}

.compare-team-header h3 .team-link:hover {
  color: var(--accent-primary);
}

.compare-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.home-badge {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent-primary);
}

.away-badge {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.compare-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.compare-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.compare-style {
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid var(--accent-primary);
}

.compare-traits h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.compare-traits ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}

.compare-traits li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}

.compare-traits li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
}

/* --- Head to Head --- */
.match-h2h {
  margin-bottom: 20px;
}

.match-h2h h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.h2h-list {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.h2h-row {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
  transition: background 0.2s;
}

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

.h2h-row:hover {
  background: var(--bg-card-hover);
}

.h2h-date {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 80px;
  flex-shrink: 0;
}

.h2h-teams {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.h2h-scores {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}

.h2h-actual {
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.h2h-predicted {
  color: var(--accent-primary);
  font-weight: 600;
}

.h2h-result {
  flex-shrink: 0;
}

/* --- Recent Form --- */
.match-form {
  margin-bottom: 20px;
}

.match-form h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-column h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
}

.form-empty {
  font-size: 13px;
  color: var(--text-muted);
  padding: 12px;
}

.form-match-link {
  text-decoration: none;
  display: block;
}

.form-match-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 6px;
  padding: 8px 12px;
  transition: background 0.2s, border-color 0.2s;
}

.form-match-card:hover {
  background: #0f0d1c;
  border-color: rgba(255, 255, 255, 0.12);
}

.form-match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.form-date {
  color: var(--text-muted);
  font-size: 11px;
}

.form-venue {
  font-weight: 700;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.form-col-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted, #666);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

.form-col-label:first-of-type {
  width: 24px;
  min-width: 24px;
}

.form-col-label:last-of-type {
  width: 24px;
  min-width: 24px;
}

.form-team-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.form-match-teams {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.form-team-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-team-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-team-score {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  width: 24px;
  min-width: 24px;
  text-align: center;
}

.form-team-pred {
  font-weight: 600;
  font-size: 12px;
  color: var(--accent-primary);
  width: 24px;
  min-width: 24px;
  text-align: center;
  opacity: 0.7;
}

/* --- Match Row Clickable --- */
.match-row[data-match-url] {
  cursor: pointer;
}

.match-row[data-match-url]:hover {
  background: #0f0d1c;
}

/* --- Responsive: Match Page --- */
@media (max-width: 768px) {
  .prediction-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .teams-compare-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .match-scoreboard {
    gap: 12px;
  }

  .scoreboard-team-name {
    font-size: 14px;
  }

  .scoreboard-score.actual {
    font-size: 28px;
  }

  .scoreboard-score.predicted.large {
    font-size: 32px;
  }
}

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

  .match-scoreboard {
    gap: 8px;
  }

  .match-scoreboard-center {
    min-width: 100px;
  }

  .match-scoreboard-team {
    max-width: 120px;
  }

  .h2h-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .form-match-card {
    padding: 6px 10px;
  }
}

/* ============================================================
   LEAGUE STANDINGS TABLE
   ============================================================ */
.standings-section {
  margin: 16px 0;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

/* Collapsible: clip table to ~5 rows when not expanded */
.standings-collapsible:not(.expanded) .standings-table-wrap {
  max-height: 230px;
  overflow: hidden;
}

/* Gradient blur overlay */
.standings-blur-overlay {
  position: relative;
  margin-top: -60px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--card-bg, #171c21));
  pointer-events: none;
  z-index: 1;
}

/* Full-width expand button */
.standings-expand-btn {
  display: block;
  width: 100%;
  padding: 10px 0;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.standings-expand-btn:hover {
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
  color: var(--accent-primary, #818cf8);
}

.standings-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.standings-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.standings-table thead tr {
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.standings-table th {
  padding: 8px 6px;
  text-align: center;
  color: #8890a0;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.standings-table th.st-team {
  text-align: left;
}

.standings-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.standings-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.standings-row td {
  padding: 9px 6px;
  text-align: center;
  color: #ccc;
}

.standings-row td.st-pos {
  font-weight: 700;
  color: #8890a0;
  width: 28px;
}

.standings-row td.st-team {
  text-align: left;
  font-weight: 500;
  color: #e0e0e0;
  white-space: nowrap;
}

.standings-row td.st-team a {
  color: inherit;
  text-decoration: none;
}

.standings-row td.st-team a:hover {
  color: #a5b4fc;
}

.standings-row td.st-pts {
  font-weight: 700;
  color: #f0f0f0;
  font-size: 0.88rem;
}

/* Zone coloring */
.standings-row.zone-champ {
  border-left: 3px solid #22c55e;
}

.standings-row.zone-champ td.st-pos {
  color: #22c55e;
}

.standings-row.zone-releg {
  border-left: 3px solid #ef4444;
}

.standings-row.zone-releg td.st-pos {
  color: #ef4444;
}

/* Legend */
.standings-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.7rem;
  color: #8890a0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.legend-dot.champ {
  background: #22c55e;
}

.legend-dot.releg {
  background: #ef4444;
}

/* ── League Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card, #171c21);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.stat-card:last-child {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(99, 102, 241, 0.08));
  border-color: rgba(99, 102, 241, 0.2);
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary, #fff);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-card:last-child .stat-value {
  background: linear-gradient(135deg, #818cf8, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted, #8890a0);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 600px) {
  .standings-table {
    font-size: 0.75rem;
  }

  .standings-table th,
  .standings-row td {
    padding: 7px 3px;
  }

  .st-hide-mobile {
    display: none;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
  }
}

/* ============================================================
   BETTING ODDS SECTION (match.php)
   ============================================================ */
.odds-section {
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.odds-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.odds-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.odds-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
}

.odds-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.odds-card.ai-pick {
  border-color: #a5b4fc;
  background: rgba(52, 211, 153, 0.08);
}

.odds-card-label {
  font-size: 0.7rem;
  color: #8890a0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.odds-card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f0f0f0;
}

.odds-card-outcome {
  font-size: 0.75rem;
  color: #a0a8b8;
  margin-top: 4px;
}

.odds-card .ai-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.odds-extra {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.odds-extra-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.odds-extra-label {
  font-size: 0.68rem;
  color: #8890a0;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.odds-extra-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
}

.odds-source {
  margin-top: 12px;
  font-size: 0.65rem;
  color: #6a7080;
  text-align: right;
  font-style: italic;
}

@media (max-width: 480px) {
  .odds-cards {
    gap: 8px;
  }

  .odds-card {
    padding: 12px 8px;
  }

  .odds-card-value {
    font-size: 1.2rem;
  }
}

/* ============================================================
   REAL H2H SECTION (match.php)
   ============================================================ */
.real-h2h-section {
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.real-h2h-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.real-h2h-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.h2h-summary-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}

.h2h-summary-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0f0f0;
}

.h2h-summary-label {
  font-size: 0.68rem;
  color: #8890a0;
  margin-top: 4px;
  text-transform: uppercase;
}

.real-h2h-match {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.real-h2h-match:last-child {
  border-bottom: none;
}

.real-h2h-date {
  color: #8890a0;
  font-size: 0.72rem;
  min-width: 80px;
}

.real-h2h-teams {
  flex: 1;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.real-h2h-score {
  font-weight: 700;
  color: #f0f0f0;
  min-width: 40px;
  text-align: center;
}

.real-h2h-league {
  font-size: 0.68rem;
  color: #6a7080;
  min-width: 60px;
  text-align: right;
}

/* ============================================================
   MATCH LINEUPS
   ============================================================ */
.lineups-section {
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lineups-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.lineups-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lineup-team {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
}

.lineup-team-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lineup-team-header h3 {
  margin: 0;
  font-size: 0.85rem;
  color: #e0e0e0;
  flex: 1;
}

.lineup-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.home-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.away-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.lineup-formation {
  font-size: 0.7rem;
  color: #a5b4fc;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.lineup-pitch {
  padding: 8px;
  background: linear-gradient(180deg, rgba(34, 120, 60, 0.15), rgba(34, 120, 60, 0.08));
  min-height: 160px;
}

.lineup-player {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 0.78rem;
  color: #d0d0d0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.player-number {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f0f0;
  font-weight: 700;
  font-size: 0.7rem;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.player-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineup-subs {
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lineup-subs h4 {
  margin: 0 0 6px 0;
  font-size: 0.7rem;
  color: #8890a0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-player {
  display: inline-block;
  font-size: 0.72rem;
  color: #9a9a9a;
  margin: 2px 8px 2px 0;
}

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

/* ============================================================
   MATCH EVENTS TIMELINE
   ============================================================ */
.events-section {
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.events-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.events-timeline {
  position: relative;
}

.events-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
}

.event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  position: relative;
  width: 50%;
}

.event-row.home {
  justify-content: flex-end;
  text-align: right;
  padding-right: 20px;
  flex-direction: row-reverse;
}

.event-row.away {
  margin-left: 50%;
  padding-left: 20px;
}

.event-minute {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  min-width: 30px;
}

.event-icon {
  font-size: 1rem;
}

.event-player {
  font-size: 0.8rem;
  color: #e0e0e0;
  font-weight: 500;
}

.event-detail {
  font-size: 0.7rem;
  color: #8890a0;
}

@media (max-width: 600px) {
  .events-timeline::before {
    left: 20px;
  }

  .event-row,
  .event-row.home,
  .event-row.away {
    width: 100%;
    margin-left: 0;
    padding-left: 40px;
    padding-right: 0;
    justify-content: flex-start;
    flex-direction: row;
    text-align: left;
  }
}

/* ============================================================
   TRIPLE PREDICTION COMPARISON
   ============================================================ */
.triple-pred-section {
  max-width: 1280px;
  margin: 16px auto;
  padding: 20px;
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.triple-pred-section h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  color: #f0f0f0;
}

.triple-pred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.triple-pred-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s;
}

.triple-pred-card:hover {
  transform: translateY(-2px);
}

.triple-pred-card.ai-card {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.06);
}

.triple-pred-card.api-card {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.06);
}

.triple-pred-card.market-card {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.triple-pred-source {
  font-size: 0.7rem;
  color: #8890a0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.triple-pred-tip {
  font-size: 2rem;
  font-weight: 800;
  color: #f0f0f0;
  line-height: 1;
}

.ai-card .triple-pred-tip {
  color: #a5b4fc;
}

.api-card .triple-pred-tip {
  color: #fbbf24;
}

.market-card .triple-pred-tip {
  color: #22c55e;
}

.triple-pred-label {
  font-size: 0.78rem;
  color: #b0b8c8;
  margin-top: 4px;
}

.triple-pred-conf {
  font-size: 0.72rem;
  color: #8890a0;
  margin-top: 6px;
}

.triple-pred-score {
  font-size: 0.72rem;
  color: #6a7080;
  margin-top: 4px;
}

.triple-pred-consensus {
  margin-top: 14px;
  text-align: center;
}

.consensus-badge {
  display: inline-block;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.consensus-mixed {
  display: inline-block;
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ==============================
   SQUAD SECTION
   ============================== */
.squad-section {
  margin-top: 28px;
}

.squad-section h2 {
  font-size: 1.2rem;
  color: var(--text-primary, #e2e8ea);
  margin-bottom: 20px;
}

.squad-position-group {
  margin-bottom: 22px;
}

.squad-position-title {
  font-size: 0.95rem;
  color: var(--accent-primary, #818cf8);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
}

.squad-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.squad-player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg, rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.2s, background 0.2s;
}

.squad-player-card:hover {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.05);
}

.squad-player-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid rgba(96, 165, 250, 0.3);
}

.squad-player-number {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary, #818cf8);
  min-width: 30px;
  text-align: center;
}

.squad-player-info {
  flex: 1;
  min-width: 0;
}

.squad-player-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8ea);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.squad-player-meta {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.squad-player-nat {
  opacity: 0.8;
}

.squad-player-age {
  opacity: 0.65;
}

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

  .match-odds-bar {
    display: none;
  }

  body.show-odds .match-odds-bar {
    display: inline-flex;
    position: static;
    transform: none;
    margin-top: 4px;
    width: 100%;
    justify-content: center;
  }
}

/* ==============================
   MATCH ODDS BAR (Listing rows)
   ============================== */
.match-odds-bar {
  display: inline-flex;
  gap: 4px;
  position: absolute;
  right: calc(32px + 32px + 22px + 100px + 16px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.match-row:first-child .match-odds-bar,
.match-row.show-header .match-odds-bar {
  top: calc(50% + 9px);
}

.match-odds-na {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  font-style: italic;
}

.odds-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--text-secondary, #94a3b8);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: default;
  white-space: nowrap;
}

.odds-chip b {
  color: var(--text-primary, #e2e8ea);
  font-weight: 700;
  font-size: 10px;
}

.odds-chip:hover {
  background: rgba(96, 165, 250, 0.08);
  border-color: rgba(96, 165, 250, 0.2);
}

/* ==============================
   PLAYER PAGE
   ============================== */
.player-hero {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 20px;
}

.player-number-badge {
  font-size: 3rem;
  font-weight: 800;
  color: var(--accent-primary, #818cf8);
  line-height: 1;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

.player-hero h1 {
  font-size: 1.8rem;
  color: var(--text-primary, #e2e8ea);
  margin-bottom: 8px;
}

.player-hero-meta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-secondary, #94a3b8);
  font-size: 0.9rem;
}

.player-hero-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.player-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.player-info-card {
  background: var(--card-bg, rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.player-info-label {
  font-size: 0.75rem;
  color: var(--text-secondary, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.player-info-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8ea);
}

/* Lineup section on match page */
.lineup-section {
  margin-top: 28px;
}

.lineup-section h2 {
  font-size: 1.2rem;
  color: var(--text-primary, #e2e8ea);
  margin-bottom: 16px;
}

.lineup-team-block {
  margin-bottom: 20px;
}

.lineup-team-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-primary, #818cf8);
  margin-bottom: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
}

.lineup-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lineup-player-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card-bg, rgba(17, 24, 39, 0.6));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 0.82rem;
  color: var(--text-primary, #e2e8ea);
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}

.lineup-player-tag:hover {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(96, 165, 250, 0.08);
}

.lineup-player-num {
  font-weight: 700;
  color: var(--accent-primary, #818cf8);
  font-size: 0.8rem;
}

.lineup-player-pos {
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  opacity: 0.7;
}

/* ==============================
   FOOTBALL PITCH - Formation View
   ============================== */
/* ==============================
   VERTICAL TEAM PITCH (team.php)
   ============================== */
.team-pitch-container {
  position: relative;
  margin-bottom: 16px;
}

.team-pitch-formation-label {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 14px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.team-pitch {
  display: flex;
  flex-direction: column;
  background:
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 40px,
      transparent 40px, transparent 80px),
    linear-gradient(180deg, #163523 0%, #0d2818 40%, #0f2e1d 70%, #1a3a2a 100%);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  padding: 36px 8px 0;
  min-height: 420px;
}

/* Pitch outline */
.team-pitch::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

/* Center line */
.team-pitch::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
}

.team-pitch-row {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex: 1;
  padding: 6px 12px;
  z-index: 2;
}

.team-pitch-gk {
  flex: 0.6;
}

/* Goal mouth at the bottom */
.team-pitch-goal {
  position: relative;
  height: 42px;
  margin: 0 auto;
  width: 100%;
  flex-shrink: 0;
  z-index: 1;
}

/* Penalty area */
.team-pitch-goal::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  pointer-events: none;
}

/* 6-yard box */
.team-pitch-goal::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
  pointer-events: none;
}

.predicted-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 6px;
  padding: 4px 12px;
  margin-bottom: 14px;
}

.pitch-container {
  position: relative;
  margin-bottom: 24px;
}

.pitch-formation-label {
  position: absolute;
  top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  z-index: 3;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.pitch-formation-label.left {
  left: 12px;
}

.pitch-formation-label.right {
  right: 12px;
}

.pitch {
  display: flex;
  flex-direction: row;
  background:
    /* Vertical grass stripes */
    repeating-linear-gradient(90deg,
      rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 40px,
      transparent 40px, transparent 80px),
    linear-gradient(160deg, #1a3a2a 0%, #0d2818 30%, #0f2e1d 70%, #163523 100%);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  min-height: 340px;
}

/* Field markings: center line + center circle */
.pitch::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, transparent 48px, rgba(255, 255, 255, 0.07) 48px, rgba(255, 255, 255, 0.07) 50px, transparent 50px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255, 255, 255, 0.1) calc(50% - 1px), rgba(255, 255, 255, 0.1) calc(50% + 1px), transparent calc(50% + 1px));
  pointer-events: none;
  z-index: 0;
}

/* Pitch outline border */
.pitch::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

.pitch-half {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: stretch;
  padding: 12px 6px;
  position: relative;
  z-index: 1;
}

/* Goal area - LEFT (home GK side) */
.pitch-half.home-half::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-radius: 0 4px 4px 0;
  pointer-events: none;
  z-index: 0;
}

/* Small 6-yard box */
.pitch-half.home-half::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-radius: 0 3px 3px 0;
  pointer-events: none;
  z-index: 0;
}

/* Goal area - RIGHT (away GK side) */
.pitch-half.away-half::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 4px 0 0 4px;
  pointer-events: none;
  z-index: 0;
}

/* Small 6-yard box */
.pitch-half.away-half::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-right: none;
  border-radius: 3px 0 0 3px;
  pointer-events: none;
  z-index: 0;
}

.pitch-center-line {
  width: 2px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  z-index: 1;
}

/* Each formation row is now a COLUMN of players (stacked vertically) */
.formation-row {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  flex: 1;
  padding: 4px 0;
  z-index: 2;
}

/* GK row gets less space (only 1 player) */
.formation-gk {
  flex: 0.5;
}

.pitch-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  transition: transform 0.2s;
  min-width: 48px;
}

.pitch-player:hover {
  transform: scale(1.12);
}

.player-avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.player-avatar-circle.home-color {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: rgba(96, 165, 250, 0.4);
}

.player-avatar-circle.away-color {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  border-color: rgba(248, 113, 113, 0.4);
}

.player-pitch-label {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  max-width: 62px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.player-pitch-num {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
}

/* Team labels under pitch */
.pitch-team-labels {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px 0;
  font-size: 0.82rem;
  font-weight: 600;
}

.pitch-team-home {
  color: #818cf8;
}

.pitch-team-away {
  color: #f87171;
}

/* ==============================
   BENCH / SUBSTITUTES LIST
   ============================== */
.bench-section {
  margin-top: 16px;
}

.squad-bench-block {
  margin-top: 12px;
}

.squad-bench-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8ea);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.squad-bench-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 4px;
}

.squad-bench-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary, #e2e8ea);
  transition: background 0.2s;
}

.squad-bench-player:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bench-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.bench-avatar.home-color {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.bench-avatar.away-color {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.bench-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary, #94a3b8);
  min-width: 22px;
  text-align: right;
}

.bench-name {
  font-size: 0.82rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bench-pos {
  font-size: 0.7rem;
  color: var(--text-secondary, #94a3b8);
  opacity: 0.7;
  text-transform: uppercase;
}

/* Responsive pitch - on mobile, stack vertically */
@media (max-width: 600px) {
  .pitch {
    flex-direction: column;
    min-height: 520px;
  }

  .pitch-center-line {
    width: auto;
    height: 2px;
  }

  .pitch-half {
    flex-direction: column;
  }

  .formation-row {
    flex-direction: row;
    justify-content: space-evenly;
    flex: auto;
  }

  .formation-gk {
    flex: auto;
  }

  .player-avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 0.58rem;
  }

  .player-pitch-label {
    font-size: 0.55rem;
    max-width: 50px;
  }

  .pitch-player {
    min-width: 40px;
  }

  .pitch-formation-label.right {
    right: auto;
    left: 12px;
    top: auto;
    bottom: 8px;
  }

  .pitch-half.home-half::before,
  .pitch-half.home-half::after {
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
  }

  .pitch-half.home-half::after {
    width: 70px;
    height: 16px;
  }

  .pitch-half.away-half::before,
  .pitch-half.away-half::after {
    top: 0;
    bottom: auto;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    border-radius: 0 0 4px 4px;
  }

  .pitch-half.away-half::after {
    width: 70px;
    height: 16px;
  }

  .squad-bench-list {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESULTS PAGE
   ============================================================ */

/* Period selector bar */
.results-period-bar {
  display: flex;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 16px;
}

.results-period-bar::-webkit-scrollbar {
  display: none;
}

.period-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.period-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.period-btn.active {
  background: var(--accent-primary, #818cf8);
  color: #fff;
  border-color: var(--accent-primary, #818cf8);
}

/* Results section */
.results-section {
  background: var(--card-bg, #171c21);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px;
  margin-bottom: 16px;
}

.results-total {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 16px;
  font-weight: 500;
}

.results-total span {
  color: var(--accent-primary, #818cf8);
  font-weight: 700;
}

.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.results-table thead tr {
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.results-table th {
  padding: 10px 8px;
  text-align: center;
  color: #8890a0;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.results-table th.rt-cat {
  text-align: left;
}

/* Section header rows */
.rt-section-row td {
  padding: 14px 8px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent-primary, #818cf8);
  border-bottom: 1px solid rgba(96, 165, 250, 0.15);
}

/* Data rows */
.rt-data-row {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s;
}

.rt-data-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.rt-data-row td {
  padding: 10px 8px;
}

.rt-data-row td.rt-cat {
  text-align: left;
  color: #e0e0e0;
  font-weight: 500;
}

.rt-data-row td.rt-stat {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Accuracy cell with mini bar */
.rt-pct {
  min-width: 100px;
}

.rt-pct span {
  font-weight: 700;
  font-size: 0.85rem;
}

.rt-pct-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-bottom: 4px;
  overflow: hidden;
}

.rt-pct-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
  background: rgba(255, 255, 255, 0.3);
}

.rt-good .rt-pct-fill {
  background: #22c55e;
}

.rt-good span {
  color: #22c55e;
}

.rt-mid .rt-pct-fill {
  background: #fbbf24;
}

.rt-mid span {
  color: #fbbf24;
}

.rt-bad .rt-pct-fill {
  background: #f87171;
}

.rt-bad span {
  color: #f87171;
}

/* Info box */
.results-info {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.results-info p {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.results-info strong {
  color: rgba(255, 255, 255, 0.7);
}

.results-info em {
  color: var(--accent-primary, #818cf8);
  font-style: normal;
  font-weight: 600;
}

/* ── Leagues page ── */
.leagues-search-wrap {
  margin-bottom: 14px;
}

.leagues-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
  transition: all 0.2s ease;
}

.leagues-search-box:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.leagues-search-icon {
  font-size: 14px;
  opacity: 0.5;
  flex-shrink: 0;
}

.leagues-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.leagues-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.leagues-search-clear {
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.leagues-search-clear:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

/* League rows - same style as match rows on predictions page */
.leagues-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  cursor: pointer;
  background: var(--bg-primary);
}

.leagues-row:hover {
  background: #0f0d1c;
}

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

.leagues-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.leagues-row-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leagues-row-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.leagues-row-count {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 12px;
}

.leagues-row-arrow {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.15s ease, transform 0.15s ease;
}

.leagues-row:hover .leagues-row-arrow {
  color: rgba(255, 255, 255, 0.6);
  transform: translateX(2px);
}

/* ========================================= */
/*  HEAD-TO-HEAD PAGE                        */
/* ========================================= */

/* Search Section */
.h2h-search-section {
  text-align: center;
  padding: 60px 20px;
}

.h2h-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.h2h-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.h2h-search-form {
  max-width: 700px;
  margin: 0 auto;
}

.h2h-search-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.h2h-input-wrap {
  flex: 1;
  position: relative;
  text-align: left;
}

.h2h-input-wrap label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.h2h-search-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.h2h-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.h2h-vs-badge {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
  padding-bottom: 12px;
  flex-shrink: 0;
}

.h2h-compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 300px;
  margin: 24px auto 0;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  letter-spacing: 0.5px;
}

.h2h-compare-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.45);
}

.h2h-compare-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.15);
}

/* Autocomplete */
.h2h-autocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: #171c21;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin-top: 4px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.h2h-ac-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.12s;
}

.h2h-ac-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

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

.h2h-ac-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.h2h-ac-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.h2h-ac-empty {
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Hero Banner */
.h2h-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.h2h-hero-team {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.h2h-hero-logo {
  margin-bottom: 8px;
}

.h2h-hero-logo img {
  width: 64px;
  height: 64px;
}

.h2h-hero-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.h2h-hero-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.h2h-hero-center {
  text-align: center;
  flex-shrink: 0;
  min-width: 140px;
}

.h2h-vs-big {
  font-size: 36px;
  font-weight: 900;
  color: var(--text-muted);
  letter-spacing: 4px;
}

.h2h-prediction-label,
.h2h-actual-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.h2h-prediction-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.h2h-prediction-tip {
  margin-bottom: 10px;
}

.h2h-actual-label {
  margin-top: 12px;
}

.h2h-actual-score {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

/* Prediction cards */
.h2h-pred-cards {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* AI Summary */
.h2h-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 16px;
}

.h2h-summary h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

/* Side-by-side grid */
.h2h-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.h2h-team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.h2h-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.h2h-card-header h2 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Info rows */
.h2h-info-list {
  margin-bottom: 14px;
}

.h2h-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.h2h-info-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.h2h-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.h2h-style {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* Traits */
.h2h-traits {
  margin-bottom: 14px;
}

.h2h-traits h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.h2h-traits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.h2h-traits li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 3px 0;
  padding-left: 14px;
  position: relative;
}

.h2h-traits li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Form / Recent Matches */
.h2h-form-section {
  margin-bottom: 14px;
}

.h2h-form-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.h2h-mini-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.h2h-stat {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.h2h-recent-match {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.12s;
}

.h2h-recent-match:hover {
  background: rgba(255, 255, 255, 0.03);
}

.h2h-rm-date {
  color: var(--text-muted);
  font-size: 11px;
  min-width: 42px;
}

.h2h-rm-label {
  color: var(--text-muted);
  font-size: 10px;
  min-width: 14px;
}

.h2h-rm-opp {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-weight: 500;
}

.h2h-rm-score {
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 30px;
  text-align: center;
}

.h2h-rm-result {
  font-size: 10px;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2h-rm-w {
  background: #22c55e22;
  color: #22c55e;
}

.h2h-rm-d {
  background: #f59e0b22;
  color: #f59e0b;
}

.h2h-rm-l {
  background: #ef444422;
  color: #ef4444;
}

/* Squad */
.h2h-squad-section h3 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.h2h-squad-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.h2h-squad-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  transition: background 0.12s;
}

.h2h-squad-player:hover {
  background: rgba(255, 255, 255, 0.04);
}

.h2h-pl-num {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 22px;
  text-align: center;
  font-size: 11px;
}

.h2h-pl-name {
  flex: 1;
  font-weight: 500;
  color: var(--text-primary);
}

.h2h-pl-pos {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

/* Nav link active state */
.nav-link.active {
  color: var(--accent);
}

/* ============================================================
   COMPREHENSIVE MOBILE RESPONSIVE OVERHAUL
   ============================================================ */

/* ── TABLET (max-width: 768px) ── */
@media (max-width: 768px) {

  /* Header & Nav - compact */
  .header-inner {
    padding: 0 14px;
    gap: 8px;
  }

  .app-header {
    padding: 10px 0;
  }

  .header-nav {
    gap: 4px;
  }

  .nav-link {
    font-size: 11px;
    padding: 4px 10px;
  }



  .logo img {
    height: 26px;
  }

  /* Main content */
  .main-content {
    padding: 16px 10px 40px;
  }

  /* League groups */
  .league-header {
    padding: 5px 10px;
  }

  .country-prefix {
    font-size: 10px;
  }

  .league-name-text {
    font-size: 11px;
  }

  /* Stats inline */
  .stats-inline {
    gap: 6px;
  }

  .stat-item {
    font-size: 12px;
  }

  /* Match rows - tighter */
  .match-row {
    padding: 8px 8px;
  }

  .match-time-col {
    width: 44px;
  }

  .match-time {
    font-size: 10px;
  }

  .team-name-row {
    font-size: 12px;
    gap: 5px;
  }

  .team-logo {
    width: 18px;
    height: 18px;
  }

  .team-score-cell {
    font-size: 13px;
    width: 28px;
  }

  .team-ai-cell {
    font-size: 12px;
    width: 28px;
  }

  .col-label {
    font-size: 8px;
  }

  .score-col-label {
    width: 28px;
  }

  .ai-col-label {
    width: 28px;
  }

  /* AI info label - absolute position adjustments */
  .ai-info-label {
    font-size: 9px;
    padding: 2px 6px;
    width: 85px;
    right: calc(28px + 28px + 16px);
  }

  .ai-info-pct {
    font-size: 8px;
    padding: 1px 3px;
  }

  /* Odds bar - show when body has show-odds */
  .match-odds-bar {
    display: none;
  }

  body.show-odds .match-odds-bar {
    display: inline-flex;
    position: static;
    transform: none;
    margin-top: 4px;
    width: 100%;
    justify-content: center;
  }

  /* Calendar strip */
  .calendar-strip {
    gap: 6px;
    padding: 10px 10px;
  }

  .cal-day {
    min-width: 58px;
    padding: 7px 10px;
  }

  .cal-day-name {
    font-size: 10px;
  }

  .cal-date {
    font-size: 16px;
  }

  /* Page title */
  .page-title {
    gap: 8px;
  }

  .stat-item {
    font-size: 11px;
  }

  /* Filter bar - collapsible on mobile */
  .filter-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-groups {
    flex-direction: column;
    gap: 6px;
  }

  .filter-primary {
    display: flex;
    width: 100%;
    gap: 5px;
  }

  .filter-primary .filter-badge {
    flex: 1;
    justify-content: center;
    padding: 10px 6px;
    font-size: 11px;
    border-radius: 8px;
  }

  /* Show the Filters toggle on mobile */
  .filter-toggle-btn {
    display: inline-flex !important;
    gap: 6px;
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .filter-toggle-btn.active {
    background: rgba(99, 102, 241, 0.5) !important;
    border-color: rgba(99, 102, 241, 0.7) !important;
    color: #fff !important;
  }

  .filter-toggle-btn svg {
    transition: transform 0.2s ease;
  }

  .filter-toggle-btn.active svg {
    transform: rotate(180deg);
  }

  /* Collapsible filter panel */
  .filter-more {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    animation: filterSlideDown 0.25s ease;
  }

  .filter-more.open {
    display: flex;
  }

  @keyframes filterSlideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .filter-more .filter-group-left,
  .filter-more .filter-group-right {
    width: 100%;
    justify-content: flex-start;
    gap: 5px;
    flex-wrap: wrap;
  }

  .filter-more .filter-separator {
    display: none;
  }

  .filter-more .filter-badge {
    flex: 1;
    justify-content: center;
    padding: 10px 6px;
    font-size: 10px;
    border-radius: 8px;
  }

  .filter-more .filter-badge-wrap {
    flex: 1;
    min-width: 0;
  }

  .filter-more .filter-badge-wrap .filter-badge {
    width: 100%;
  }

  .filter-more .goal-select {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: 6px;
  }

  /* When goal-select is open, make parent wrap take full width */
  .filter-more .filter-badge-wrap:has(.goal-select.open) {
    flex-basis: 100%;
  }

  /* League logo */
  .league-logo {
    width: 16px;
    height: 16px;
    margin-right: 6px;
  }

  /* ── Match detail page ── */
  .match-hero {
    padding: 24px 14px 18px;
  }

  .match-scoreboard {
    gap: 12px;
  }

  .scoreboard-team-name {
    font-size: 14px;
  }

  .scoreboard-score.actual {
    font-size: 28px;
  }

  .scoreboard-score.predicted.large {
    font-size: 32px;
  }

  .prediction-cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .pred-card {
    padding: 16px 12px;
  }

  .pred-card-value {
    font-size: 22px;
  }

  .teams-compare-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .match-analysis {
    padding: 18px 14px;
  }

  .analysis-line {
    font-size: 13px;
  }

  .h2h-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
  }

  .form-match-card {
    padding: 6px 10px;
  }

  /* ── Team page ── */
  .team-hero {
    padding: 24px 14px 20px;
  }

  .team-hero h1 {
    font-size: 22px;
  }

  .team-traits {
    grid-template-columns: 1fr;
  }

  .team-meta-item {
    font-size: 12px;
    padding: 3px 10px;
  }

  .team-description {
    font-size: 13px;
  }

  /* Squad */
  .squad-players-grid {
    grid-template-columns: 1fr;
  }

  /* ── Player page ── */
  .player-hero h1 {
    font-size: 1.4rem;
  }

  .player-number-badge {
    font-size: 2.2rem;
  }

  .player-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Leagues page ── */
  .leagues-row {
    padding: 10px 12px;
  }

  .leagues-row-name {
    font-size: 13px;
  }

  /* ── Results page ── */
  .results-section {
    padding: 14px;
  }

  .results-table {
    font-size: 0.78rem;
  }

  .results-table th,
  .rt-data-row td {
    padding: 8px 5px;
  }

  /* ── H2H page ── */
  .h2h-search-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .h2h-input-wrap {
    width: 100%;
    text-align: center;
  }

  .h2h-input-wrap label {
    text-align: center;
  }

  .h2h-vs-badge {
    padding-bottom: 0;
    text-align: center;
    align-self: center;
  }

  .h2h-hero {
    flex-direction: column;
    gap: 16px;
    padding: 24px 14px;
  }

  .h2h-hero-center {
    min-width: auto;
  }

  .h2h-grid {
    grid-template-columns: 1fr;
  }

  .h2h-hero-name {
    font-size: 15px;
  }

  .h2h-pred-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .h2h-info-row {
    font-size: 12px;
  }

  /* Standings */
  .standings-section {
    padding: 14px;
  }

  /* Odds */
  .odds-section {
    padding: 14px;
  }

  /* Triple prediction */
  .triple-pred-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .triple-pred-tip {
    font-size: 1.5rem;
  }

  /* Footer */
  .app-footer {
    padding: 16px 14px;
    font-size: 10px;
  }
}

/* ── SMALL TABLET / LARGE PHONE (max-width: 600px) ── */
@media (max-width: 600px) {

  /* Match rows - even more compact */
  .match-time-col {
    width: 38px;
  }

  .match-time {
    font-size: 9px;
  }

  .match-date-label {
    font-size: 9px;
  }

  .team-name-row {
    font-size: 11px;
    gap: 4px;
  }

  .team-logo {
    width: 16px;
    height: 16px;
  }

  .team-score-cell {
    font-size: 12px;
    width: 24px;
  }

  .team-ai-cell {
    font-size: 11px;
    width: 24px;
  }

  .score-col-label,
  .ai-col-label {
    width: 24px;
    font-size: 7px;
  }

  /* AI label - even more compact */
  .ai-info-label {
    font-size: 8px;
    padding: 1px 4px;
    width: 70px;
    right: calc(24px + 24px + 12px);
  }

  /* Match row first child offset */
  .match-row:first-child .match-time-col,
  .match-row.show-header .match-time-col {
    padding-top: 16px;
  }

  .match-row:first-child .ai-info-label,
  .match-row.show-header .ai-info-label {
    top: calc(50% + 8px);
  }

  /* Insight bar */
  .insight-content {
    font-size: 10px;
    padding: 0 8px;
  }

  .insight-pct {
    font-size: 9px;
    padding: 1px 4px;
  }

  /* Summary panel */
  .match-summary-panel.open {
    padding: 8px 10px;
  }

  .summary-line {
    font-size: 11px;
  }

  /* Filter badges */
  .filter-badge {
    padding: 9px 5px;
    font-size: 9px;
  }

  /* League headers */
  .league-flag {
    font-size: 18px;
  }

  .country-prefix {
    font-size: 9px;
  }

  .league-name-text {
    font-size: 11px;
  }

  .match-count-badge {
    font-size: 9px;
    padding: 2px 6px;
  }

  .header-right {
    gap: 6px;
  }

  /* ── Match detail page ── */
  .match-scoreboard-center {
    min-width: 100px;
  }

  .scoreboard-score.actual {
    font-size: 24px;
  }

  .scoreboard-score.predicted {
    font-size: 18px;
  }

  .scoreboard-score.predicted.large {
    font-size: 28px;
  }

  .match-hero-league {
    font-size: 12px;
  }

  .match-hero-date {
    font-size: 11px;
  }

  .match-analysis h2,
  .match-predictions h2,
  .match-teams-comparison h2,
  .match-form h2,
  .match-h2h h2 {
    font-size: 16px;
  }

  .compare-team-card {
    padding: 16px;
  }

  .compare-team-header h3 {
    font-size: 14px;
  }

  .compare-desc {
    font-size: 12px;
  }

  /* ── Standings responsive ── */
  .standings-table {
    font-size: 0.72rem;
  }

  .standings-table th,
  .standings-row td {
    padding: 7px 3px;
  }

  .st-hide-mobile {
    display: none;
  }

  /* ── Lineups responsive ── */
  .lineups-grid {
    grid-template-columns: 1fr;
  }

  /* ── Events responsive ── */
  .events-timeline::before {
    left: 20px;
  }

  .event-row,
  .event-row.home,
  .event-row.away {
    width: 100%;
    margin-left: 0;
    padding-left: 40px;
    padding-right: 0;
    justify-content: flex-start;
    flex-direction: row;
    text-align: left;
  }

  /* ── Team page ── */
  .team-hero h1 {
    font-size: 20px;
  }

  .team-meta {
    gap: 8px;
  }

  .trait-box {
    padding: 14px 16px;
  }

  .trait-box h3 {
    font-size: 13px;
  }

  .trait-box li {
    font-size: 12px;
  }

  /* Team pitch */
  .team-pitch {
    min-height: 360px;
    padding: 30px 4px 0;
  }

  .team-pitch-formation-label {
    font-size: 0.78rem;
  }

  /* ── Player page ── */
  .player-hero {
    padding: 20px 14px;
  }

  .player-hero-meta {
    gap: 10px;
    font-size: 0.8rem;
  }

  .player-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .player-info-card {
    padding: 12px;
  }

  .player-info-value {
    font-size: 1rem;
  }

  /* ── Leagues page ── */
  .leagues-search-box {
    padding: 8px 12px;
  }

  .leagues-search-input {
    font-size: 13px;
  }

  /* ── H2H page ── */
  .h2h-title {
    font-size: 22px;
  }

  .h2h-card-header h2 {
    font-size: 16px;
  }

  .h2h-hero-logo img,
  .h2h-hero-logo .team-logo {
    width: 48px !important;
    height: 48px !important;
  }

  .h2h-prediction-score {
    font-size: 28px;
  }

  .h2h-pred-cards .pred-card {
    padding: 12px 8px;
  }

  /* ── Results page ── */
  .results-table th,
  .rt-data-row td {
    padding: 7px 4px;
  }

  .rt-pct {
    min-width: 80px;
  }

  .period-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* ── PHONE (max-width: 480px) ── */
@media (max-width: 480px) {

  /* Header - ultra compact */
  .header-inner {
    padding: 0 10px;
    gap: 6px;
  }

  .app-header {
    padding: 8px 0;
  }

  .nav-link {
    font-size: 10px;
    padding: 3px 8px;
  }



  .logo img {
    height: 22px;
  }

  .logo-text {
    font-size: 14px;
  }

  /* Main content - edge to edge feel */
  .main-content {
    padding: 12px 8px 32px;
  }

  /* Calendar */
  .cal-day {
    min-width: 52px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .cal-date {
    font-size: 15px;
  }

  .cal-day-name {
    font-size: 9px;
  }

  /* Stats inline */
  .stats-inline {
    gap: 4px 6px;
  }

  .stat-item {
    font-size: 11px;
  }

  .stat-dot {
    font-size: 12px;
  }

  /* Match rows - most compact */
  .match-row {
    padding: 6px 6px;
    min-height: 46px;
  }

  .match-teams-col {
    padding-left: 6px;
  }

  .match-time-col {
    width: 34px;
  }

  .team-name-row {
    font-size: 11px;
  }

  .team-logo {
    width: 15px;
    height: 15px;
    padding: 1px;
  }

  .team-score-cell {
    font-size: 12px;
    width: 22px;
  }

  .team-ai-cell {
    font-size: 11px;
    width: 22px;
  }

  .score-col-label,
  .ai-col-label {
    width: 22px;
  }

  /* AI info label - keep absolute on mobile */
  .ai-info-label {
    font-size: 8px;
    padding: 1px 4px;
    width: auto;
    right: calc(22px + 22px + 10px);
  }

  .match-row:first-child .ai-info-label,
  .match-row.show-header .ai-info-label {
    top: calc(50% + 8px);
  }

  /* Match insight bar */
  .match-insight-bar {
    height: 22px;
  }

  .insight-content {
    font-size: 9px;
    gap: 4px;
  }

  .insight-brief {
    display: none;
  }

  /* League headers */
  .league-header {
    padding: 4px 8px;
  }

  .league-flag {
    font-size: 16px;
  }

  .header-left {
    gap: 6px;
  }

  .league-name-text {
    font-size: 10px;
  }

  .country-prefix {
    font-size: 8px;
  }

  .league-logo {
    width: 14px;
    height: 14px;
    margin-right: 4px;
  }

  /* Filter bar */
  .filter-badge {
    padding: 8px 4px;
    font-size: 9px;
    border-radius: 6px;
  }

  .filter-separator {
    display: none;
  }

  /* League group cards */
  .league-group {
    border-radius: 8px;
  }

  /* Pagination */
  .pagination {
    gap: 4px;
    flex-wrap: wrap;
  }

  .pagination-btn {
    padding: 6px 10px;
    font-size: 11px;
  }

  .pagination-num {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  /* ── Match detail page ── */
  .match-hero {
    padding: 18px 10px 14px;
    border-radius: 12px;
  }

  .match-scoreboard {
    gap: 6px;
  }

  .match-scoreboard-center {
    min-width: 80px;
  }

  .match-scoreboard-team {
    max-width: 110px;
  }

  .scoreboard-team-name {
    font-size: 12px;
  }

  .scoreboard-team-icon {
    font-size: 28px;
  }

  .scoreboard-score.actual {
    font-size: 22px;
  }

  .scoreboard-score.predicted {
    font-size: 16px;
  }

  .scoreboard-score.predicted.large {
    font-size: 26px;
  }

  .verdict-badge {
    font-size: 11px;
    padding: 3px 10px;
  }

  .prediction-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .pred-card {
    padding: 12px 8px;
    border-radius: 10px;
  }

  .pred-card-value {
    font-size: 20px;
  }

  .pred-card-label {
    font-size: 10px;
  }

  .match-analysis {
    padding: 14px 10px;
    border-radius: 12px;
  }

  .confidence-badge {
    font-size: 12px;
    padding: 4px 12px;
  }

  .analysis-line {
    font-size: 12px;
    gap: 6px;
  }

  .compare-team-card {
    padding: 14px 12px;
    border-radius: 10px;
  }

  .compare-meta {
    gap: 8px;
    font-size: 11px;
  }

  .compare-style {
    font-size: 12px;
    padding: 8px 10px;
  }

  .compare-traits li {
    font-size: 12px;
  }

  /* Form match cards */
  .form-match-card {
    padding: 6px 8px;
    border-radius: 8px;
  }

  .form-team-name {
    font-size: 12px;
  }

  .form-team-score {
    font-size: 13px;
    min-width: 16px;
  }

  .form-team-pred {
    font-size: 11px;
    min-width: 16px;
  }

  /* H2H rows on match page */
  .h2h-row {
    padding: 10px 12px;
    gap: 6px;
  }

  .h2h-date {
    font-size: 11px;
    min-width: 60px;
  }

  .h2h-teams {
    font-size: 12px;
  }

  .h2h-scores {
    font-size: 11px;
    gap: 8px;
  }

  /* Odds section */
  .odds-section {
    padding: 12px 10px;
    border-radius: 12px;
  }

  .odds-cards {
    gap: 6px;
  }

  .odds-card {
    padding: 10px 6px;
    border-radius: 10px;
  }

  .odds-card-value {
    font-size: 1.1rem;
  }

  .odds-card-label {
    font-size: 0.65rem;
  }

  /* Standings */
  .standings-section {
    padding: 12px 8px;
    border-radius: 12px;
  }

  .standings-table {
    font-size: 0.7rem;
  }

  .standings-table th,
  .standings-row td {
    padding: 6px 2px;
  }

  /* Triple prediction */
  .triple-pred-section {
    padding: 14px 10px;
  }

  .triple-pred-card {
    padding: 12px 8px;
  }

  .triple-pred-tip {
    font-size: 1.3rem;
  }

  .triple-pred-label {
    font-size: 0.7rem;
  }

  /* Lineups */
  .lineups-section {
    padding: 12px 8px;
  }

  .lineup-player-tag {
    padding: 4px 8px;
    font-size: 0.75rem;
  }

  /* ── Team page ── */
  .team-hero {
    padding: 20px 12px 16px;
    border-radius: 12px;
  }

  .team-hero h1 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .team-hero-icon {
    font-size: 36px;
    margin-bottom: 8px;
  }

  .team-meta {
    gap: 6px;
  }

  .team-meta-item {
    font-size: 11px;
    padding: 3px 8px;
  }

  .team-description {
    font-size: 12px;
    line-height: 1.6;
  }

  .team-style {
    font-size: 12px;
  }

  .trait-box {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .section-title h2 {
    font-size: 16px;
  }

  /* Squad cards */
  .squad-player-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .squad-player-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.55rem;
  }

  .squad-player-name {
    font-size: 0.82rem;
  }

  .squad-player-meta {
    font-size: 0.7rem;
  }

  .squad-position-title {
    font-size: 0.85rem;
  }

  /* Team pitch */
  .team-pitch {
    min-height: 320px;
    border-radius: 10px;
  }

  /* ── Player page ── */
  .player-hero {
    padding: 16px 10px;
  }

  .player-hero h1 {
    font-size: 1.3rem;
  }

  .player-number-badge {
    font-size: 2rem;
  }

  .player-hero-meta {
    gap: 8px;
    font-size: 0.75rem;
  }

  .player-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .player-info-card {
    padding: 10px;
    border-radius: 10px;
  }

  .player-info-label {
    font-size: 0.65rem;
  }

  .player-info-value {
    font-size: 0.95rem;
  }

  /* ── Leagues page ── */
  .leagues-row {
    padding: 8px 10px;
  }

  .leagues-row-name {
    font-size: 12px;
  }

  .leagues-row-count {
    font-size: 10px;
    padding: 2px 8px;
  }

  .leagues-search-box {
    padding: 8px 10px;
    border-radius: 10px;
  }

  /* ── Results page ── */
  .results-section {
    padding: 12px 8px;
    border-radius: 12px;
  }

  .results-table {
    font-size: 0.72rem;
  }

  .results-table th {
    padding: 6px 4px;
    font-size: 0.65rem;
  }

  .rt-data-row td {
    padding: 6px 3px;
  }

  .rt-pct {
    min-width: 60px;
  }

  .period-btn {
    padding: 5px 10px;
    font-size: 0.72rem;
  }

  .results-info {
    padding: 12px 14px;
  }

  .results-info p {
    font-size: 0.75rem;
  }

  /* ── H2H comparison page ── */
  .h2h-search-section {
    padding: 24px 12px;
  }

  .h2h-title {
    font-size: 20px;
  }

  .h2h-subtitle {
    font-size: 13px;
  }

  .h2h-search-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .h2h-compare-btn {
    padding: 12px 18px;
    font-size: 14px;
  }

  .h2h-hero {
    padding: 18px 10px;
    border-radius: 12px;
  }

  .h2h-hero-name {
    font-size: 14px;
  }

  .h2h-hero-meta {
    font-size: 11px;
  }

  .h2h-prediction-score {
    font-size: 24px;
  }

  .h2h-prediction-label {
    font-size: 10px;
  }

  .h2h-pred-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .h2h-summary {
    padding: 14px 10px;
  }

  .h2h-summary h2 {
    font-size: 16px;
  }

  .h2h-team-card {
    padding: 14px 10px;
    border-radius: 10px;
  }

  .h2h-card-header h2 {
    font-size: 15px;
  }

  .h2h-info-row {
    font-size: 12px;
    padding: 6px 0;
  }

  .h2h-desc {
    font-size: 12px;
  }

  .h2h-traits h3 {
    font-size: 13px;
  }

  .h2h-traits li {
    font-size: 12px;
  }

  .h2h-squad-player {
    padding: 6px 8px;
  }

  .h2h-pl-name {
    font-size: 12px;
  }

  .h2h-mini-stats {
    gap: 8px;
  }

  .h2h-stat {
    font-size: 12px;
    padding: 4px 10px;
  }

  /* Archive calendar */
  .cal-picker-toggle {
    padding: 10px 14px;
  }

  .cal-picker-label {
    font-size: 13px;
  }

  .cal-grid-wrapper {
    padding: 12px;
  }

  .cal-day-cell {
    height: 32px;
    font-size: 11px;
  }

  /* No matches */
  .no-matches {
    padding: 40px 16px;
  }

  .no-matches-icon {
    font-size: 40px;
  }

  .no-matches h3 {
    font-size: 16px;
  }

  .no-matches p {
    font-size: 12px;
  }

  /* Footer */
  .app-footer {
    padding: 12px 10px;
    font-size: 10px;
  }

  /* Back link */
  .back-link {
    font-size: 12px;
  }

  /* Bench list */
  .squad-bench-list {
    grid-template-columns: 1fr;
  }

  .bench-name {
    font-size: 0.75rem;
  }
}

/* ── VERY SMALL PHONE (max-width: 360px) ── */
@media (max-width: 360px) {

  .nav-link {
    font-size: 9px;
    padding: 3px 6px;
  }



  .logo img {
    height: 20px;
  }

  .main-content {
    padding: 10px 6px 28px;
  }

  .match-row {
    padding: 5px 4px;
  }

  .match-time-col {
    width: 30px;
  }

  .team-name-row {
    font-size: 10px;
  }

  .team-logo {
    width: 13px;
    height: 13px;
  }

  .team-score-cell,
  .team-ai-cell {
    width: 20px;
    font-size: 10px;
  }

  .score-col-label,
  .ai-col-label {
    width: 20px;
  }

  .ai-info-label {
    font-size: 7px;
    padding: 1px 3px;
    width: auto;
    right: calc(20px + 20px + 8px);
  }

  .filter-badge {
    padding: 7px 3px;
    font-size: 8px;
    border-radius: 6px;
  }

  .cal-day {
    min-width: 44px;
    padding: 5px 6px;
  }

  .prediction-cards {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .h2h-pred-cards {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }

  .triple-pred-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   HAMBURGER MENU + CONSISTENT NAV
   ============================================ */

/* Move clock between logo and nav on all screens */
.header-inner {
  position: relative;
}

/* Hamburger button - hidden on desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 7px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Hamburger to X animation */
.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu panel */
.mobile-menu-panel {
  display: none;
  flex-direction: column;
  background: rgba(18, 18, 26, 0.98);
  border-top: 1px solid var(--border-color);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-menu-panel.open {
  max-height: 500px;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu-link:hover,
.mobile-menu-link:active {
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-primary);
}

.mobile-menu-link.active {
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

/* Auth toast notifications */
.auth-toast {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
  max-width: 90vw;
  text-align: center;
  backdrop-filter: blur(12px);
}

.auth-toast.show {
  top: 20px;
}

.auth-toast-success {
  background: rgba(129, 140, 248, 0.9);
  color: #fff;
  box-shadow: 0 4px 20px rgba(129, 140, 248, 0.3);
}

.auth-toast-error {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.3);
}

/* Mobile menu divider (separates nav from auth) */
.mobile-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  margin: 4px 16px;
}

/* Premium CTA link in mobile menu */
.mobile-menu-premium {
  color: #7c3aed !important;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1)) !important;
  font-weight: 700 !important;
}

.mobile-menu-premium:hover,
.mobile-menu-premium:active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.2)) !important;
  color: #6ee7b7 !important;
}

/* ── MOBILE: show hamburger, hide nav links, hide user-bar ── */
@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }

  .header-nav .nav-link {
    display: none;
  }

  .mobile-menu-panel {
    display: flex;
  }

  .user-bar {
    display: none !important;
  }

  .header-inner {
    padding-right: 12px !important;
  }

}

/* ---- SCROLL TO TOP BUTTON ---- */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(99, 102, 241, 0.25);
  font-size: 22px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.25);
}

/* ---- BREADCRUMBS ---- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 0 4px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
}

.breadcrumbs .bc-sep {
  opacity: 0.7;
  font-size: 10px;
}

.breadcrumbs .bc-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ---- SHARE BUTTON ---- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.share-btn.copied {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

/* ---- RESULTS TABLE MOBILE ---- */
@media (max-width: 600px) {

  .results-table th,
  .results-table td {
    padding: 8px 6px;
    font-size: 12px;
  }

  .results-table .progress-bar-wrap {
    min-width: 50px;
  }

  .results-table th:nth-child(3),
  .results-table td:nth-child(3) {
    display: none;
  }
}

/* ---- STATS BAR 5 COLUMNS ---- */
@media (min-width: 601px) {

  .team-hero~.stats-bar,
  .stats-bar:has(.stat-card:nth-child(5)) {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════
   AUTH SYSTEM - User Bar, Modal, Lock, Pricing
   ═══════════════════════════════════════════════════════════════ */

/* ── User Bar (fixed in header area) ── */
.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 200;
}

.btn-user-login {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.btn-user-login:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-premium-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  border: none;
  color: #fff;
  padding: 7px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}

.btn-premium-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.premium-badge-header {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.premium-badge-header.expiring {
  background: linear-gradient(135deg, #ff9800, #ff5722);
  -webkit-background-clip: text;
  background-clip: text;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.6
  }
}

/* Dropdown subscription detail line */
.user-dropdown-sub {
  padding: 4px 16px 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border, rgba(255, 255, 255, 0.06));
  margin-bottom: 4px;
}

/* User avatar button */
.btn-user-avatar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-user-avatar:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-user-avatar.premium {
  border-color: rgba(255, 215, 0, 0.3);
}

.user-avatar-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.btn-user-avatar.premium .user-avatar-letter {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
}

/* User dropdown */
.user-menu-wrap {
  position: relative;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  min-width: 200px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 300;
}

.user-menu-wrap.open .user-dropdown {
  display: block;
  animation: fadeSlideDown 0.2s;
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-dropdown-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.user-dropdown-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.user-dropdown-badge.free {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.user-dropdown-badge.premium {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
}

.user-dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.user-dropdown-item:hover {
  background: var(--hover-bg);
}

/* ── Auth Modal ── */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.auth-overlay.open {
  display: flex;
  animation: fadeIn 0.25s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.auth-modal {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

.auth-header {
  text-align: center;
  margin-bottom: 0;
}

.auth-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.auth-header h2 {
  color: var(--text-primary);
  margin: 0 0 6px;
  font-size: 1.4rem;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 6px;
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.auth-field input::placeholder {
  color: var(--text-muted, #555);
}

.auth-field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
}

.auth-checkbox input {
  margin: 0;
  accent-color: var(--accent-primary);
}

.auth-link {
  color: var(--accent-primary);
  font-size: 0.85rem;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-error {
  font-size: 0.85rem;
  min-height: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.auth-btn-primary {
  width: 100%;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ── Pricing Card ── */
.pricing-card {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.08), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  position: relative;
  margin-bottom: 0;
}

.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #000;
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.pricing-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  margin-top: 8px;
}

.pricing-price {
  margin: 12px 0;
}

.pricing-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.pricing-period {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  text-align: left;
}

.pricing-features li {
  color: var(--text-primary);
  padding: 6px 0;
  font-size: 0.9rem;
}

.auth-btn-subscribe {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-btn-subscribe:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.3);
}

.auth-btn-subscribe:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pricing-note {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 12px;
}

.pricing-comparison {
  margin-top: 12px;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr 60px 70px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--card-border);
}

.comparison-row:first-child {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
}

/* ── Inline Pricing Register Form ── */
.pricing-register-wrap {
  margin-top: 20px;
  padding: 24px;
  border-top: 2px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
  border-radius: 12px;
}

.pricing-register-header {
  text-align: center;
  margin-bottom: 16px;
}

.pricing-register-header h3 {
  margin: 8px 0 4px;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.pricing-register-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.pricing-register-step {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, var(--accent-primary), #818cf8);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Locked Prediction Indicators ── */
.ai-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted, #555);
  font-size: 0.85rem;
  cursor: pointer;
}

.ai-locked .lock-icon {
  font-size: 0.8rem;
}

.lock-cta-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px 0;
}

.lock-cta-inline:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.2), rgba(99, 102, 241, 0.2));
  transform: translateY(-1px);
}

/* Locked AI cell - no blur, just subtle styling */
.team-ai-cell.locked {
  user-select: none;
  pointer-events: none;
  color: var(--text-secondary);
}

.ai-info-label.locked {
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
}

/* Lock banner at top of match rows */
.prediction-locked-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.06), rgba(99, 102, 241, 0.06));
  border: 1px dashed rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  margin: 12px 0;
  cursor: pointer;
  transition: all 0.2s;
}

.prediction-locked-banner:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.12), rgba(99, 102, 241, 0.12));
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.prediction-locked-banner .lock-emoji {
  font-size: 1.3rem;
}

.prediction-locked-banner .lock-msg {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.prediction-locked-banner .lock-sub {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.prediction-locked-banner .lock-arrow {
  font-size: 1.1rem;
  color: var(--accent-primary);
}

/* ── Mobile adjustments ── */
@media (max-width: 600px) {
  .header-inner {
    padding: 0 160px 0 12px;
    /* smaller right pad on mobile */
  }

  .user-bar {
    position: fixed;
    top: 10px;
    right: 50px;
    /* leave room for hamburger */
    gap: 5px;
  }

  .btn-user-login,
  .btn-premium-cta {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .auth-modal {
    padding: 24px 20px;
    border-radius: 16px;
    max-width: 95vw;
  }

  .pricing-amount {
    font-size: 1.8rem;
  }
}

/* ═══════════════ FOMO & PAWAPAY ═══════════════ */

/* FOMO badge in header bar */
.fomo-badge {
  background: linear-gradient(135deg, #ff6b35, #ff4757);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  animation: fomoPulse 2s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes fomoPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(255, 71, 87, 0);
  }
}

/* FOMO banner inside pricing tab */
.fomo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #ff6b3520, #ff475720);
  border: 1px solid #ff475740;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  animation: fomoPulse 2s ease-in-out infinite;
}

.fomo-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.fomo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fomo-text strong {
  color: #ff4757;
  font-size: 0.95rem;
}

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

/* Payment method toggle */
.payment-method-toggle {
  display: flex;
  gap: 0;
  background: var(--hover-bg);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}

.pmt-btn {
  flex: 1;
  padding: 10px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.pmt-btn.active {
  background: var(--card-bg);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* PawaPay form elements */
.auth-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-sizing: border-box;
}

.auth-select:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* Account page FOMO section */
.account-fomo {
  background: linear-gradient(135deg, #ff6b3510, #ff475710);
  border: 1px solid #ff475730;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
}

.account-fomo h3 {
  color: #ff4757;
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.account-fomo p {
  color: var(--text-secondary);
  margin: 0 0 16px;
  font-size: 0.9rem;
}

.account-fomo .countdown {
  font-size: 2rem;
  font-weight: 800;
  color: #ff4757;
  margin: 12px 0;
  font-variant-numeric: tabular-nums;
}

.account-fomo .account-btn {
  margin-top: 8px;
}

/* ═══════════════ UNLOCK CTA BAR ═══════════════ */
.unlock-cta-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.1), rgba(99, 102, 241, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 14px;
  margin: 0 0 16px;
  cursor: pointer;
  transition: all 0.25s;
}

.unlock-cta-bar:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), rgba(99, 102, 241, 0.18));
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.unlock-icon {
  font-size: 1.3rem;
}

.unlock-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.unlock-arrow {
  font-size: 1.1rem;
  color: var(--accent-primary);
  transition: transform 0.2s;
}

.unlock-cta-bar:hover .unlock-arrow {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .unlock-cta-bar {
    padding: 12px 16px;
    margin: 0 0 12px;
  }

  .unlock-text {
    font-size: 0.85rem;
  }
}

/* ---- VALUE BETS SECTION ---- */
.value-bets-section {
  margin: 0 0 20px;
}

.value-bets-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.value-bets-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.value-bets-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.value-bets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.value-bet-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text-primary);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.value-bet-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22c55e, #6366f1);
  border-radius: 14px 14px 0 0;
}

.value-bet-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
}

.value-bet-edge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(22, 163, 74, 0.15);
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.3px;
}

.value-bet-teams {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.vb-team {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-vs {
  font-size: 0.7rem;
  color: var(--text-muted);
  padding-left: 26px;
}

.vb-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.value-bet-comparison {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.vb-prob-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vb-prob-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 42px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* (B) colored marker with click tooltip */
.vb-b-marker {
  color: #ff9f43;
  font-weight: 700;
  cursor: pointer;
  position: relative;
}

.vb-b-marker::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: #1e2235;
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 20;
}

.vb-b-marker.show-tip::after {
  opacity: 1;
  pointer-events: auto;
}

/* Outcome label: Home Win / Draw / Away Win */
.vb-outcome-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: #7c8db5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
  margin-bottom: -2px;
  padding-left: 2px;
}

/* Info icon & tooltip for B (Bookmakers) */
.vb-info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 10px;
  color: #ff9f43;
  cursor: pointer;
  vertical-align: middle;
  border-radius: 50%;
  transition: color 0.2s;
}

.vb-info-icon:hover {
  color: #ffc048;
}

.vb-info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg, #1a1d2e);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
  text-transform: none;
  letter-spacing: 0;
}

.vb-info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--card-bg, #1a1d2e);
}

.vb-info-icon.active .vb-info-tooltip {
  display: block;
}

.vb-prob-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.vb-prob-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.vb-prob-fill.ai {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}

.vb-prob-fill.bookie {
  background: rgba(255, 255, 255, 0.2);
}

.vb-prob-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

.vb-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vb-tip-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.vb-tip-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.vb-tip-odds {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.vb-tip-locked {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 3px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.vb-tip-locked:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

.value-bet-card.confidence-pick::before {
  background: linear-gradient(90deg, #f59e0b, #6366f1);
}

.confidence-badge {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #f59e0b !important;
}

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

@media (max-width: 500px) {
  .value-bets-grid {
    grid-template-columns: 1fr;
  }

  .value-bets-header {
    flex-direction: column;
    gap: 4px;
    background: var(--card-bg, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    align-items: center;
  }

  .value-bets-title {
    font-size: 1.05rem;
  }

  .value-bets-subtitle {
    font-size: 0.75rem;
    line-height: 1.4;
  }
}

/* ---- VALUE BETS MINI CARDS (MOBILE) ---- */

/* Desktop: hide mini row and show-details */
.vb-mini-row,
.vb-show-details {
  display: none;
}

/* Mini card grid */
.vb-mini-row {
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.vb-mini-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: default;
}

.vb-mini-card.confidence-pick {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.06);
}

.vb-mini-edge {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #22c55e;
  line-height: 1.2;
}

.vb-mini-teams {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted, #888);
  margin-top: 3px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vb-mini-combo {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #22c55e;
  line-height: 1.2;
}

.vb-show-details {
  display: none;
  width: 100%;
  padding: 10px;
  text-align: center;
  color: var(--text-muted, #888);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.vb-show-details:hover {
  color: var(--accent-primary, #818cf8);
}

@media (max-width: 600px) {
  .vb-mini-row {
    display: grid;
  }

  .vb-show-details {
    display: block;
  }

  .vb-full-cards {
    display: none;
  }
}

/* ---- LANGUAGE SWITCHER ---- */
.lang-switcher {
  position: relative;
  z-index: 200;
}

.lang-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-size: 12px;
}

.lang-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.lang-flag-img {
  border-radius: 2px;
  display: block;
}

.lang-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.lang-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 180px;
  max-height: 360px;
  overflow-y: auto;
  background: #171c21;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.lang-switcher-dropdown.open {
  display: block;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
}

.lang-option.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  font-weight: 600;
}

.lang-option img {
  border-radius: 2px;
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .lang-switcher-dropdown {
    width: 160px;
  }
}

/* ---- TRACK RECORD ---- */
.track-hero {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 16px;
  padding: 28px 24px 20px;
  margin-bottom: 20px;
  text-align: center;
}

.track-hero-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.track-hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.track-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.track-stat-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.track-stat-card.accent {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.25);
}

.track-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.track-stat-card.accent .track-stat-value {
  color: var(--accent-primary);
}

.track-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.track-recent-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.track-recent-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.track-recent-dot {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50%;
}

.track-recent-dot.win {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.track-recent-dot.loss {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Best Categories with Donut Charts */
.track-best-cats {
  margin-bottom: 20px;
}

.track-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.track-period-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 12px;
}

.track-donut-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.track-donut-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.donut-chart {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(var(--color, #22c55e) 0% calc(var(--pct, 0) * 1%),
      rgba(255, 255, 255, 0.06) calc(var(--pct, 0) * 1%) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.donut-chart::before {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-primary, #0f0f23);
}

.donut-value {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-primary);
}

.donut-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.donut-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Per-League Accuracy */
.track-league-section {
  margin-bottom: 20px;
}

.track-league-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.track-league-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.track-league-info {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 180px;
  flex-shrink: 0;
}

.track-league-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-league-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.track-league-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.track-league-bar.good {
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.track-league-bar.mid {
  background: linear-gradient(90deg, #eab308, #facc15);
}

.track-league-bar.bad {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

.track-league-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  width: 90px;
  justify-content: flex-end;
}

.track-league-pct {
  font-size: 0.82rem;
  font-weight: 700;
}

.track-league-pct.good {
  color: #22c55e;
}

.track-league-pct.mid {
  color: #eab308;
}

.track-league-pct.bad {
  color: #ef4444;
}

.track-league-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

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

  .track-donut-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .track-league-info {
    width: 120px;
  }

  .track-league-stats {
    width: 70px;
  }
}

@media (max-width: 480px) {
  .track-hero {
    padding: 20px 16px 16px;
  }

  .track-stat-value {
    font-size: 1.15rem;
  }

  .track-league-card {
    flex-wrap: wrap;
    gap: 8px;
  }

  .track-league-info {
    width: 100%;
  }

  .track-league-bar-wrap {
    flex: 1;
    min-width: 60px;
  }
}

/* ---- ACCUMULATOR BUILDER ---- */
.accu-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  background: rgba(15, 15, 35, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  z-index: 1000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: none;
}

.accu-panel.has-items {
  display: block;
}

.accu-panel-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.accu-panel-icon {
  font-size: 1.1rem;
}

.accu-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

.accu-panel-count {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 50%;
}

.accu-panel-arrow {
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.accu-panel-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accu-panel.expanded .accu-panel-body {
  max-height: 500px;
  overflow-y: auto;
}

.accu-matches {
  padding: 8px 12px;
}

.accu-empty {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
}

.accu-match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.accu-match-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.accu-match-teams {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accu-match-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.accu-match-tip strong {
  color: var(--accent-primary);
}

.accu-remove-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.68rem;
  flex-shrink: 0;
  margin-left: 8px;
  transition: all 0.2s;
}

.accu-remove-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

.accu-summary {
  padding: 0 12px 8px;
}

.accu-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.accu-summary-value {
  font-weight: 700;
  color: var(--text-primary);
}

.accu-summary-value.accu-conf {
  color: var(--accent-primary);
}

.accu-summary-row.accu-return {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 4px;
  padding-top: 8px;
}

.accu-summary-value.accu-pot {
  font-size: 0.92rem;
  color: #22c55e;
}

.accu-actions {
  padding: 8px 12px 12px;
}

.accu-clear-btn {
  width: 100%;
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.accu-clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

/* Add to Accumulator Button on Match Rows */
.accu-add-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 6px;
}

.accu-add-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  transform: scale(1.1);
}

.accu-add-btn.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.3);
}

@media (max-width: 768px) {
  .accu-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  .accu-panel.expanded .accu-panel-body {
    max-height: 50vh;
  }
}

/* ============================================
   TUTORIAL / GUIDED TOUR
   ============================================ */

/* Tutorial button in header */
.tutorial-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eab308;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.tutorial-btn:hover {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.25);
  text-shadow: 0 0 14px rgba(234, 179, 8, 0.5);
}

/* Overlay */
.tutorial-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9990;
  transition: opacity 0.3s;
}

/* Highlight box — the 9999px spread covers the entire viewport with dark overlay,
   but the hole is cut out by the element's position */
.tutorial-highlight {
  display: none;
  position: absolute;
  z-index: 9991;
  border: 2px solid #eab308;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(234, 179, 8, 0.5),
    inset 0 0 20px rgba(234, 179, 8, 0.08);
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tooltip */
.tutorial-tooltip {
  display: none;
  position: absolute;
  z-index: 9995;
  background: var(--card-bg, #111827);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 14px;
  padding: 18px 20px;
  width: 320px;
  max-width: calc(100vw - 24px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(234, 179, 8, 0.1);
  animation: tutorialFadeIn 0.3s ease;
}

@keyframes tutorialFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.tutorial-tooltip-title {
  font-size: 1rem;
  font-weight: 700;
  color: #eab308;
}

.tutorial-tooltip-counter {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 10px;
  border-radius: 10px;
}

.tutorial-tooltip-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.tutorial-tooltip-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tutorial-tooltip-nav {
  display: flex;
  gap: 8px;
}

.tutorial-btn-next,
.tutorial-btn-prev {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tutorial-btn-next {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
}

.tutorial-btn-next:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

.tutorial-btn-prev {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.tutorial-btn-prev:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tutorial-btn-skip {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.tutorial-btn-skip:hover {
  opacity: 1;
  color: #ef4444;
}

/* Intro Modal */
.tutorial-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: tutorialFadeIn 0.3s ease;
}

.tutorial-modal {
  background: var(--card-bg, #111827);
  border: 1px solid rgba(234, 179, 8, 0.2);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.tutorial-modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(234, 179, 8, 0.4));
}

.tutorial-modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.tutorial-modal-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.tutorial-modal-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tutorial-modal-btn.start {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.25);
}

.tutorial-modal-btn.start:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(234, 179, 8, 0.4);
}

.tutorial-modal-btn.close {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  transition: color 0.2s;
}

.tutorial-modal-btn.close:hover {
  color: var(--text-primary);
}

/* When tutorial active, ensure highlighted element is visible */
body.tutorial-active {
  overflow-x: hidden;
}

/* Mobile tutorial link in menu */
.mobile-menu-link.tutorial-link {
  color: #eab308 !important;
}

/* Mobile: hide tutorial button from header (it's in the hamburger menu) */
@media (max-width: 768px) {
  .tutorial-btn {
    display: none !important;
  }
}