* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0b1220;
  color: #ffffff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background:
    linear-gradient(180deg, rgba(10,17,30,0.96), rgba(8,14,25,0.92)),
    radial-gradient(circle at 18% 0%, rgba(224,184,79,0.08), transparent 28%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: 100%;
  min-height: 128px;
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) auto minmax(150px, 0.8fr);
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: 8px clamp(16px, 4vw, 44px);
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  justify-self: center;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.nav-link {
  position: relative;
  color: #dfe7f5;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #ffffff;
  background: rgba(255,255,255,0.075);
  outline: none;
  transform: translateY(-1px);
}

.nav-link.active {
  color: #101827;
  background: linear-gradient(180deg, #f4d779, #d8ad3e);
  box-shadow: 0 8px 18px rgba(224,184,79,0.16);
}

.nav-link.active::after {
  content: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  color: #ffffff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.menu-toggle:focus-visible {
  outline: 2px solid rgba(224,184,79,0.75);
  outline-offset: 3px;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  flex: 0 1 auto;
  min-width: 0;
  line-height: 0;
  filter:
    drop-shadow(0 5px 9px rgba(0,0,0,0.42))
    drop-shadow(0 0 18px rgba(224,184,79,0.13));
  transition: transform 180ms ease, filter 180ms ease;
}

.site-logo-link:hover {
  transform: translateY(-1px) scale(1.015);
  filter:
    drop-shadow(0 7px 13px rgba(0,0,0,0.46))
    drop-shadow(0 0 22px rgba(224,184,79,0.18));
}

.site-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 116px;
  object-fit: contain;
  image-rendering: auto;
}

.header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(224,184,79,0.32);
  border-radius: 999px;
  color: #f7dda0;
  background:
    linear-gradient(180deg, rgba(224,184,79,0.14), rgba(224,184,79,0.06));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.header-cta:hover,
.header-cta:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(224,184,79,0.56);
  background: rgba(224,184,79,0.14);
  outline: none;
}

.container,
.home-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.home-shell {
  padding-top: 34px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 22px;
}

.hero-copy,
.hero-panel,
.section-block,
.data-card,
.stats-hub,
.footer-cta {
  border: 1px solid rgba(255,255,255,0.08);
  background:
    linear-gradient(180deg, rgba(18,28,47,0.96), rgba(10,16,28,0.96));
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.20);
}

.hero-copy {
  padding: clamp(24px, 5vw, 52px);
  background:
    radial-gradient(circle at 28% 42%, rgba(255,255,255,0.055), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    radial-gradient(circle at 12% 12%, rgba(224,184,79,0.13), transparent 28%),
    radial-gradient(circle at 86% 24%, rgba(76,139,255,0.11), transparent 26%),
    linear-gradient(180deg, rgba(18,28,47,0.98), rgba(9,15,27,0.98));
  background-size: auto, 22px 22px, auto, auto, auto;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 650px;
  color: #b8c2d8;
  font-size: 17px;
  line-height: 1.55;
  margin: 16px 0 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  max-width: 680px;
}

.hero-mini-stats:empty {
  display: none;
}

.hero-mini-stats div {
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 16px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.035);
}

.hero-mini-stats span {
  display: block;
  color: #91a0ba;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero-mini-stats strong {
  display: block;
  margin-top: 7px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-action,
.secondary-action,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-action {
  color: #111827;
  background: #e0b84f;
}

.secondary-action,
.section-link {
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
}

.section-link {
  min-height: 36px;
  padding: 0 15px;
  border-color: rgba(224,184,79,0.16);
  color: #f4d779;
  background:
    linear-gradient(135deg, rgba(224,184,79,0.13), rgba(224,184,79,0.035) 58%, rgba(255,255,255,0.025));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.primary-action:hover,
.secondary-action:hover,
.section-link:hover {
  transform: translateY(-1px);
  border-color: rgba(224,184,79,0.44);
  background:
    linear-gradient(135deg, rgba(224,184,79,0.18), rgba(224,184,79,0.055) 58%, rgba(255,255,255,0.035));
  box-shadow: 0 10px 22px rgba(224,184,79,0.075), inset 0 1px 0 rgba(255,255,255,0.08);
}

.hero-panel {
  padding: 18px;
  display: grid;
  gap: 11px;
  background:
    radial-gradient(circle at 24% 0%, rgba(224,184,79,0.10), transparent 34%),
    linear-gradient(180deg, rgba(16,26,43,0.98), rgba(8,13,23,0.98));
}

.dashboard-header,
.dashboard-section {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header span,
.dashboard-section h3 {
  display: block;
  color: #91a0ba;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-header strong {
  color: #e0b84f;
}

.dashboard-section h3 {
  margin: 0 0 10px;
}

.hero-dashboard-main {
  order: -1;
  border-color: rgba(224,184,79,0.18);
  background:
    radial-gradient(circle at 20% 0%, rgba(224,184,79,0.13), transparent 42%),
    rgba(255,255,255,0.045);
}

.dashboard-soft-state {
  margin: 0 0 8px;
  color: #b8c2d8;
  font-size: 13px;
}

.dashboard-skeleton-list {
  display: grid;
  gap: 8px;
}

.dashboard-skeleton-list span {
  color: #b8c2d8;
  font-size: 13px;
}

.dashboard-skeleton-list i {
  display: block;
  height: 9px;
  width: 72%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.07), rgba(255,255,255,0.14), rgba(255,255,255,0.07));
  background-size: 220% 100%;
  animation: squadSkeleton 1.4s ease-in-out infinite;
}

.top-scorer-list {
  display: grid;
  gap: 8px;
}

.top-scorer-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 13px;
  padding: 8px;
  background: rgba(255,255,255,0.025);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.top-scorer-row:hover {
  transform: translateY(-2px);
  border-color: rgba(224,184,79,0.26);
  background: rgba(224,184,79,0.055);
}

.top-scorer-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(224,184,79,0.13);
  color: #f4d779;
  font-size: 12px;
  font-weight: 900;
}

.top-scorer-main {
  min-width: 0;
}

.top-scorer-main strong,
.top-scorer-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-scorer-main strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.2;
}

.top-scorer-main small {
  color: #91a0ba;
  font-size: 11px;
  margin-top: 2px;
}

.top-scorer-row em {
  color: #e0b84f;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.dashboard-live-list,
.dashboard-table-top {
  display: grid;
  gap: 8px;
}

.dashboard-team-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}

.dashboard-team-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-team-row strong {
  color: #e0b84f;
  white-space: nowrap;
}

.match-card.compact {
  grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  padding: 12px 14px;
  border-radius: 13px;
}

.match-card.compact .match-team-logo {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.match-card.compact .match-score-block {
  min-width: 58px;
}

.match-card.compact .match-score-block strong {
  font-size: 14px;
}

.next-match-feature {
  padding: 18px;
  background:
    radial-gradient(circle at 20% 20%, rgba(224,184,79,0.10), transparent 40%),
    rgba(255,255,255,0.045);
}

.next-match-teams {
  display: grid;
  gap: 5px;
}

.next-match-teams span {
  font-size: 18px;
  font-weight: 850;
}

.next-match-teams strong {
  color: #e0b84f;
  font-size: 10px;
  opacity: 0.72;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.next-match-feature p {
  margin: 12px 0 0;
  color: #b8c2d8;
}

.home-league-toggle {
  justify-content: center;
  padding: 6px;
  margin: 0 auto 26px;
  width: fit-content;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.section-block {
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.section-heading h2,
.stats-hub h2,
.footer-cta h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ai-ask-section {
  border-color: rgba(224,184,79,0.14);
  background:
    linear-gradient(180deg, rgba(22,33,52,0.96), rgba(9,15,27,0.98));
}

.ai-ask-form {
  display: grid;
  gap: 12px;
}

.ai-ask-form textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255,255,255,0.055);
  color: #ffffff;
  font: inherit;
  line-height: 1.45;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ai-ask-form textarea::placeholder {
  color: #91a0ba;
}

.ai-ask-form textarea:focus {
  border-color: rgba(224,184,79,0.58);
  background: rgba(255,255,255,0.075);
  box-shadow: 0 0 0 3px rgba(224,184,79,0.12);
}

.ai-ask-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ai-ask-actions span {
  color: #91a0ba;
  font-size: 13px;
  font-weight: 700;
}

.ai-ask-actions button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.ai-answer {
  margin-top: 16px;
}

.ai-answer:empty {
  display: none;
}

.ai-answer-card {
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,0.045);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.ai-answer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.ai-answer-meta span {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
  color: #dfe7f5;
  font-size: 12px;
  font-weight: 800;
}

.ai-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ai-answer-grid section {
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 16px;
  padding: 15px;
  background: rgba(8,14,25,0.42);
}

.ai-answer-grid h3,
.ai-error strong,
.ai-warnings strong {
  display: block;
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 14px;
}

.ai-answer-grid p,
.ai-error p,
.ai-loading p,
.ai-warnings p {
  margin: 0;
  color: #c6d0e2;
  line-height: 1.55;
}

.ai-warnings {
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
}

.ai-error {
  border-color: rgba(255,115,115,0.35);
}

.match-center-grid,
.table-stats-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.table-stats-layout {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
  align-items: start;
}

.data-card {
  padding: 18px;
  border-radius: 20px;
}

.data-card h3 {
  margin: 0 0 14px;
}

.matchcenter-section .eyebrow {
  color: rgba(224,184,79,0.78);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.matchcenter-section .section-heading {
  align-items: end;
  margin-bottom: 18px;
}

.matchcenter-section .section-heading h2 {
  letter-spacing: -0.035em;
}

.match-column {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-color: rgba(255,255,255,0.075);
  background:
    linear-gradient(180deg, rgba(18,28,47,0.94), rgba(8,14,25,0.96));
  box-shadow:
    0 18px 45px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.live-column {
  background:
    linear-gradient(180deg, rgba(22,33,52,0.96), rgba(8,14,25,0.97));
  border-color: rgba(224,184,79,0.13);
}

.match-column::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.live-column::before {
  background:
    radial-gradient(circle at 15% 0%, rgba(224,184,79,0.16), transparent 36%),
    linear-gradient(135deg, rgba(224,184,79,0.045), transparent 42%);
}

.schedule-column::before {
  background: radial-gradient(circle at 50% 0%, rgba(90,143,255,0.09), transparent 34%);
}

.results-column::before {
  background: radial-gradient(circle at 85% 0%, rgba(255,255,255,0.07), transparent 32%);
}

.match-column h3 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  font-size: 15px;
  letter-spacing: 0.015em;
}

.match-column h3::after {
  content: "";
  width: 32px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(224,184,79,0.7), transparent);
}

.quick-stats-stack {
  display: grid;
  gap: 16px;
}

.match-list,
.mini-list {
  display: grid;
  gap: 14px;
}

.live-column .match-list:empty {
  min-height: 112px;
}

.match-card,
.mini-row,
.team-card,
.stats-feature {
  color: inherit;
  text-decoration: none;
}

.match-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  min-height: 124px;
  padding: 16px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.075);
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,0.058), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.020));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.match-card:hover,
.mini-row:hover {
  transform: translateY(-2px);
  border-color: rgba(224,184,79,0.44);
  background:
    radial-gradient(circle at 50% 48%, rgba(255,255,255,0.075), transparent 68%),
    linear-gradient(180deg, rgba(255,255,255,0.074), rgba(255,255,255,0.032));
  box-shadow:
    0 16px 34px rgba(0,0,0,0.28),
    0 0 28px rgba(224,184,79,0.10),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.match-card:hover .match-team-logo {
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    0 10px 22px rgba(0,0,0,0.24),
    0 0 16px rgba(224,184,79,0.11);
}

.match-card.live {
  border-color: rgba(224,184,79,0.34);
  background:
    radial-gradient(circle at 50% 0%, rgba(224,184,79,0.12), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.026));
}

.match-card.soon {
  border-color: rgba(224,184,79,0.18);
}

.match-column-note {
  display: inline-flex;
  width: fit-content;
  color: rgba(244,215,121,0.9);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0 0 8px;
  border-bottom: 1px solid rgba(224,184,79,0.22);
}

.match-team {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  width: 100%;
  text-align: left;
  font-size: 13.4px;
  font-weight: 900;
  color: #f3f6fb;
}

.match-team.right {
  justify-content: flex-end;
  text-align: right;
}

.match-team span {
  display: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  text-wrap: balance;
  line-height: 1.25;
}

.match-team.winner {
  color: #ffffff;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(255,255,255,0.10);
}

.match-team-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255,255,255,0.035);
  padding: 2px;
  box-shadow:
    0 8px 18px rgba(0,0,0,0.18),
    0 0 10px rgba(224,184,79,0.055);
  filter: drop-shadow(0 0 7px rgba(99,150,255,0.055));
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.match-score-block {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  min-width: 80px;
  max-width: 80px;
  padding: 0 2px;
}

.match-score-block strong {
  display: block;
  color: #ffffff;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.match-score-block small {
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 3px;
  width: auto;
  color: rgba(143,157,182,0.78);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin-top: 4px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  text-transform: uppercase;
}

.match-card:not(.live) .match-score-block strong {
  color: #f8fafc;
}

.schedule-column .match-card .match-score-block strong,
.live-column .match-card.soon .match-score-block strong {
  color: rgba(244,215,121,0.48);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.schedule-column .match-card .match-score-block small,
.live-column .match-card.soon .match-score-block small {
  background: transparent;
  color: rgba(143,157,182,0.68);
}

.results-column .match-card .match-score-block strong {
  font-size: 34px;
  letter-spacing: -0.055em;
}

.schedule-column .match-status-chip,
.live-column .match-card.soon .match-status-chip {
  font-size: 7.5px;
  padding: 2px 6px;
}

.match-card.live .match-status-chip {
  border-color: rgba(255,89,89,0.42);
  color: #ff8a8a;
  background: rgba(255,89,89,0.10);
  box-shadow: 0 0 0 0 rgba(255,89,89,0.24);
  animation: livePulse 1.8s ease-in-out infinite;
}

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255,89,89,0.24);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(255,89,89,0);
  }
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.snapshot-grid div,
.mini-row {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}

.snapshot-grid span,
.empty-state {
  color: #91a0ba;
}

.snapshot-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
  color: #e0b84f;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mini-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.team-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 13px;
  min-height: 178px;
  padding: 24px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,0.055), transparent 42%),
    rgba(255,255,255,0.035);
  text-align: center;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition:
    transform 210ms ease,
    border-color 210ms ease,
    background 210ms ease,
    box-shadow 210ms ease;
}

.team-card-logo {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 50%;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.20);
  transition: transform 210ms ease;
}

.team-card strong {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.25;
  transition: color 210ms ease, transform 210ms ease;
}

.team-card span {
  color: #91a0ba;
  font-size: 13px;
  font-weight: 700;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(224,184,79,0.42);
  background:
    radial-gradient(circle at 50% 8%, rgba(224,184,79,0.09), transparent 44%),
    rgba(255,255,255,0.065);
  box-shadow: 0 20px 42px rgba(0,0,0,0.28);
}

.team-card:hover .team-card-logo {
  transform: scale(1.06);
}

.team-card:hover strong {
  color: #f7e4a1;
  transform: translateY(-1px);
}

.stats-hub,
.footer-cta {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  align-items: center;
  padding: clamp(22px, 4vw, 36px);
  margin-bottom: 22px;
}

.stats-hub p {
  color: #b8c2d8;
  line-height: 1.7;
}

.stats-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stats-feature {
  display: grid;
  gap: 7px;
  min-height: 132px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.09);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.035));
  box-shadow: 0 12px 28px rgba(0,0,0,0.13);
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.stats-feature.featured {
  min-height: 154px;
  background:
    radial-gradient(circle at 18% 14%, rgba(224,184,79,0.14), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.078), rgba(255,255,255,0.038));
  border-color: rgba(224,184,79,0.26);
}

.stats-feature span {
  color: #e0b84f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.stats-feature strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.15;
}

.stats-feature.featured strong {
  font-size: 22px;
}

.stats-feature small {
  color: #9fb0cc;
  line-height: 1.45;
}

.stats-feature:hover {
  transform: translateY(-5px);
  border-color: rgba(224,184,79,0.38);
  background:
    radial-gradient(circle at 18% 14%, rgba(224,184,79,0.10), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.088), rgba(255,255,255,0.048));
  box-shadow: 0 20px 42px rgba(0,0,0,0.25);
}

.footer-cta {
  grid-template-columns: 1fr;
  text-align: center;
  justify-items: center;
}

.league-switcher {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.league-btn {
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  background: #1b2740;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}

.league-btn.active {
  background: #e0b84f;
  color: #111;
}

.card {
  background: #121c2f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.card h2 {
  margin-top: 0;
}

.table-wrap {
  height: auto;
  overflow: visible;
  padding: 2px 0 4px;
}

.premium-table-wrap {
  border-radius: 16px;
}

.standings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  min-width: 0;
  table-layout: auto;
}

.standings-table th,
.standings-table td {
  padding: 13px 9px;
  text-align: left;
  white-space: nowrap;
}

.standings-table th {
  position: sticky;
  top: 0;
  z-index: 4;
  color: #b8c2d8;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(8,13,23,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.standings-table td {
  font-size: 14px;
  color: #d8e1f2;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.046), rgba(255,255,255,0.022));
  border-top: 1px solid rgba(255,255,255,0.055);
  border-bottom: 1px solid rgba(255,255,255,0.035);
  transition: background 190ms ease, border-color 190ms ease, transform 190ms ease, box-shadow 190ms ease;
}

.standings-row {
  cursor: pointer;
  position: relative;
  transform: translateY(0);
}

.standings-row:hover {
  transform: translateY(-2px);
}

.standings-row td:first-child {
  border-left: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px 0 0 14px;
}

.standings-row td:last-child {
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 14px 14px 0;
}

.standings-row:hover td {
  background:
    radial-gradient(circle at 12% 50%, rgba(224,184,79,0.09), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  border-color: rgba(224,184,79,0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.standings-row.zone-top td:first-child {
  box-shadow: inset 3px 0 0 rgba(67,220,132,0.62);
}

.standings-row.zone-bottom td:first-child {
  box-shadow: inset 3px 0 0 rgba(239,91,91,0.58);
}

.standings-row.zone-mid td:first-child {
  box-shadow: inset 3px 0 0 rgba(224,184,79,0.18);
}

.rank-col,
.rank-cell {
  width: 44px;
  text-align: center;
}

.rank-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255,255,255,0.055);
  font-weight: 900;
}

.team-cell {
  min-width: 190px;
}

.team-cell-main {
  min-width: 0;
}

.team-link {
  color: #ffffff;
  font-weight: 850;
  text-decoration: none;
}

.team-link:hover {
  color: #f4d675;
}

.standings-table td:not(.team-cell):not(.form-cell) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.goal-diff {
  font-weight: 900;
}

.goal-diff.positive {
  color: #53df91;
}

.goal-diff.negative {
  color: #ff7373;
}

.goal-diff.neutral {
  color: #b8c2d8;
}

.points-col,
.points-cell {
  text-align: center;
}

.points-cell strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #07111c;
  background: linear-gradient(135deg, #f0d37a, #d7aa39);
  box-shadow: 0 8px 18px rgba(224,184,79,0.16);
  font-size: 15px;
  font-weight: 950;
}

.form-cell {
  min-width: 94px;
}

.table-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.table-form.empty {
  color: #6f7d95;
}

.table-form-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.045), 0 5px 12px rgba(0,0,0,0.18);
}

.table-form-dot.win {
  background: #36d284;
}

.table-form-dot.draw {
  background: #e0b84f;
}

.table-form-dot.loss {
  background: #ef5b5b;
}

.fixtures-list {
  display: grid;
  gap: 10px;
}

.fixture-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.fixture-row span:last-child {
  text-align: right;
}

.fixture-row strong {
  color: #e0b84f;
  white-space: nowrap;
}

.fixtures-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fixture-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.02);
}

.fixture-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.fixture-team {
  font-weight: 600;
}

.fixture-team-left {
  text-align: left;
}

.fixture-team-right {
  text-align: right;
}

.fixture-center {
  text-align: center;
  min-width: 110px;
}

.fixture-score {
  font-size: 20px;
  font-weight: 700;
}

.fixture-status {
  font-size: 12px;
  color: #e0b84f;
  margin-top: 4px;
}

.fixture-date {
  font-size: 12px;
  color: #b8c2d8;
  margin-top: 4px;
}

@media (max-width: 1040px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    min-height: 78px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .main-nav {
    gap: 2px;
  }

  .nav-link {
    font-size: 12px;
    padding: 8px 9px;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }

  .hero-section,
  .table-stats-layout,
  .stats-hub {
    grid-template-columns: 1fr;
  }

  .match-center-grid {
    grid-template-columns: 1fr;
  }

  .teams-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    position: relative;
    grid-template-columns: auto 1fr auto auto;
    min-height: 70px;
    padding: 0 16px;
    gap: 10px;
  }

  .site-logo {
    width: clamp(150px, 42vw, 190px);
    height: auto;
    max-height: 54px;
  }

  .header-cta {
    justify-self: end;
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    background: rgba(11,18,32,0.98);
    box-shadow: 0 18px 40px rgba(0,0,0,0.35);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .main-nav.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    padding: 12px 14px;
    font-size: 15px;
  }

  .nav-link.active::after {
    left: 14px;
    right: auto;
    width: 26px;
  }

  .home-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 34px;
  }

  .hero-copy,
  .hero-panel,
  .section-block,
  .data-card,
  .stats-hub,
  .footer-cta {
    border-radius: 18px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-league-toggle {
    width: min(100%, 420px);
    margin-left: auto;
    margin-right: auto;
  }

  .home-league-toggle .league-btn {
    flex: 1;
    min-height: 44px;
  }

  .section-heading {
    display: grid;
  }

  .ai-ask-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-answer-grid {
    grid-template-columns: 1fr;
  }

  .match-card {
    grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
    text-align: center;
    gap: 14px;
    min-height: 114px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .match-team {
    font-size: 12.2px;
    gap: 0;
  }

  .match-team-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .match-team,
  .match-team.right {
    text-align: left;
  }

  .match-team.right {
    text-align: right;
  }

  .snapshot-grid,
  .stats-feature-grid {
    grid-template-columns: 1fr;
  }

  .teams-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .team-card {
    min-height: 150px;
    padding: 22px 16px;
  }

  .standings-table {
    min-width: 0;
  }

  .standings-table th,
  .standings-table td {
    padding: 10px 5px;
    font-size: 12px;
  }

  .standings-table th {
    font-size: 9px;
    letter-spacing: 0.05em;
  }

  .rank-col,
  .rank-cell {
    width: 30px;
  }

  .rank-cell span {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .team-cell {
    min-width: 130px;
  }

  .team-link {
    font-size: 12px;
  }

  .team-cell .team-logo,
  .team-cell .team-logo-placeholder {
    width: 28px;
    height: 28px;
  }

  .points-cell strong {
    min-width: 28px;
    padding: 5px 6px;
    font-size: 13px;
  }

  .form-cell {
    min-width: 64px;
  }

  .table-form {
    gap: 4px;
  }

  .table-form-dot {
    width: 8px;
    height: 8px;
  }

  .fixture-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .fixture-team-left,
  .fixture-team-right {
    text-align: center;
  }
}

/* Premium statistics overview */
.stats-overview-section {
  padding: clamp(18px, 3vw, 28px);
}

.stats-overview {
  display: grid;
  gap: 18px;
}

.stats-row-heading {
  color: #f4d779;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stats-row-heading.player-heading {
  margin-top: 8px;
}

.stats-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stats-metric-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 20px;
  background:
    radial-gradient(circle at 82% 10%, rgba(224,184,79,0.13), transparent 11rem),
    linear-gradient(180deg, rgba(18,30,50,0.96), rgba(7,13,24,0.98));
  box-shadow:
    0 18px 50px rgba(0,0,0,0.24),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stats-metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(224,184,79,0.28);
  box-shadow:
    0 22px 58px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

.stats-card-bg {
  position: absolute;
  inset: auto -24px -42px auto;
  width: 150px;
  aspect-ratio: 1;
  border: 1px solid rgba(224,184,79,0.16);
  border-radius: 50%;
  opacity: 0.6;
  background:
    linear-gradient(90deg, transparent 48%, rgba(224,184,79,0.16) 50%, transparent 52%),
    radial-gradient(circle, transparent 0 48%, rgba(224,184,79,0.14) 49%, transparent 51%);
}

.stats-card-media {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.stats-card-logo,
.stats-player-photo,
.stats-player-placeholder {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 50%;
  background: #ffffff;
  object-fit: contain;
  padding: 5px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.stats-player-photo {
  object-fit: cover;
  padding: 0;
  background: rgba(255,255,255,0.08);
}

.stats-player-placeholder {
  display: inline-block;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,255,255,0.24), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.04));
}

.stats-card-label {
  display: block;
  color: #9daac0;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stats-card-value {
  display: block;
  margin-top: 8px;
  color: #f4d779;
  font-size: clamp(42px, 5vw, 58px);
  line-height: 0.95;
  font-weight: 950;
}

.stats-metric-card h3 {
  margin: 12px 0 0;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.15;
}

.stats-metric-card p {
  margin: 8px 0 0;
  color: #c2ccdc;
  line-height: 1.45;
}

.stats-card-fallback {
  display: block;
  margin-top: 14px;
  color: #c2ccdc;
  line-height: 1.5;
}

.stats-form-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.stats-form-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #101827;
  font-size: 13px;
  font-weight: 950;
}

.stats-form-pills .win {
  background: #36d284;
}

.stats-form-pills .draw {
  background: #e0b84f;
}

.stats-form-pills .loss {
  background: #ef5b5b;
}

.league-stat-lab {
  display: grid;
  gap: 18px;
  margin-top: 10px;
}

.league-stat-panel {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 0%, rgba(224,184,79,0.10), transparent 18rem),
    linear-gradient(180deg, rgba(17,29,48,0.96), rgba(6,12,22,0.98));
  box-shadow:
    0 18px 50px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.league-stat-panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.league-stat-panel-heading span {
  display: block;
  color: #f4d779;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.league-stat-panel-heading h3 {
  margin: 5px 0 0;
  color: #ffffff;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.league-stat-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.league-stat-controls label {
  display: grid;
  gap: 5px;
  color: #93a2bc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.league-stat-controls select {
  min-height: 38px;
  min-width: 130px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  background: rgba(4,9,17,0.72);
  color: #ffffff;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}

.league-stat-controls select:focus {
  border-color: rgba(224,184,79,0.48);
  box-shadow: 0 0 0 3px rgba(224,184,79,0.10);
}

.league-stat-controls select:disabled {
  color: #8b98ad;
  opacity: 0.72;
}

.league-stat-table-wrap {
  overflow-x: auto;
  padding: 8px 12px 14px;
}

.league-stat-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0 6px;
  color: #ffffff;
  font-size: 13px;
}

.league-stat-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0 10px 6px;
  color: #8f9db6;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  background: rgba(6,12,22,0.96);
}

.league-stat-table td {
  padding: 10px;
  background: rgba(255,255,255,0.035);
  border-top: 1px solid rgba(255,255,255,0.055);
  border-bottom: 1px solid rgba(255,255,255,0.055);
  vertical-align: middle;
  white-space: nowrap;
}

.league-stat-table td:first-child {
  border-left: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px 0 0 12px;
  color: #9cabc3;
  font-weight: 900;
}

.league-stat-table td:last-child {
  border-right: 1px solid rgba(255,255,255,0.055);
  border-radius: 0 12px 12px 0;
}

.league-stat-team,
.league-stat-player {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
}

.league-stat-logo,
.league-stat-player img,
.league-stat-player span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.league-stat-logo {
  padding: 2px;
}

.league-stat-player img {
  object-fit: cover;
}

.league-stat-player span {
  display: inline-block;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,0.20), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
}

.league-form-pills {
  display: inline-flex;
  gap: 4px;
}

.league-form-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #07101f;
  font-size: 10px;
  font-weight: 950;
}

.league-form-pills .win {
  background: #36d284;
}

.league-form-pills .draw {
  background: #e0b84f;
}

.league-form-pills .loss {
  background: #ef5b5b;
}

.league-stat-muted {
  color: #8f9db6;
}

.player-stat-table {
  min-width: 760px;
}

@media (max-width: 1040px) {
  .stats-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .league-stat-panel-heading {
    align-items: start;
    flex-direction: column;
  }

  .league-stat-controls {
    justify-content: flex-start;
    width: 100%;
  }
}

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

  .stats-metric-card {
    min-height: 210px;
  }

  .league-stat-panel-heading {
    padding: 16px;
  }

  .league-stat-panel-heading h3 {
    font-size: 21px;
  }

  .league-stat-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .league-stat-controls select {
    width: 100%;
  }

  .league-stat-table-wrap {
    padding: 6px 8px 12px;
  }
}

/* Hero AI platform polish */
.hero-section {
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: stretch;
}

.hero-copy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 470px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.030) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    radial-gradient(ellipse at 78% 32%, rgba(224,184,79,0.20), transparent 24rem),
    radial-gradient(ellipse at 18% 88%, rgba(88,136,255,0.14), transparent 20rem),
    linear-gradient(180deg, rgba(17,31,51,0.98), rgba(6,12,22,0.98));
  background-size: 42px 42px, 42px 42px, auto, auto, auto;
}

.hero-copy::before {
  content: "";
  position: absolute;
  inset: 24px;
  z-index: -1;
  border: 1px solid rgba(224,184,79,0.12);
  border-radius: 28px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(224,184,79,0.13) 50%, transparent 51%),
    radial-gradient(circle at 50% 50%, transparent 0 4.8rem, rgba(224,184,79,0.12) 4.9rem, transparent 5rem),
    linear-gradient(90deg, rgba(224,184,79,0.10), transparent 18%, transparent 82%, rgba(224,184,79,0.10));
  opacity: 0.62;
}

.hero-copy::after {
  content: "AI";
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(24px, 5vw, 58px);
  z-index: -1;
  width: clamp(112px, 15vw, 168px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(224,184,79,0.20);
  border-radius: 50%;
  color: rgba(244,215,121,0.20);
  background:
    radial-gradient(circle, rgba(224,184,79,0.10), rgba(255,255,255,0.025) 58%, transparent 60%),
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01));
  box-shadow: 0 0 42px rgba(224,184,79,0.08);
  font-size: 40px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.hero-copy h1 {
  max-width: 720px;
  font-size: clamp(42px, 5.6vw, 76px);
}

.hero-text {
  max-width: 600px;
  margin-bottom: 0;
}

.hero-mini-stats {
  max-width: 620px;
  gap: 10px;
  margin-top: 18px;
}

.hero-mini-stats div {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 12px 13px 12px 15px;
  background: rgba(4,9,17,0.42);
}

.hero-mini-stats div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: #e0b84f;
}

.hero-mini-stats span {
  font-size: 9px;
}

.hero-mini-stats strong {
  margin-top: 5px;
  font-size: 16px;
}

.hero-actions .primary-action,
.hero-actions .secondary-action {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 14px 30px rgba(0,0,0,0.16), inset 0 1px 0 rgba(255,255,255,0.08);
}

.hero-actions .primary-action:hover,
.hero-actions .primary-action:focus-visible,
.hero-actions .secondary-action:hover,
.hero-actions .secondary-action:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.hero-panel {
  padding: 16px;
  gap: 12px;
}

.dashboard-ai-card {
  display: grid;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(224,184,79,0.20);
  border-radius: 18px;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(224,184,79,0.15), rgba(255,255,255,0.045));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dashboard-ai-card:hover,
.dashboard-ai-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(224,184,79,0.38);
  outline: none;
}

.dashboard-ai-card span,
.dashboard-ai-card small {
  color: #9daac0;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.dashboard-ai-card strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.25;
}

.dashboard-ai-card small {
  color: #d7deea;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.next-match-feature {
  padding: 16px;
}

.next-match-teams {
  gap: 8px;
}

.next-match-feature p,
.match-score-block small em {
  color: #aeb9cb;
  font-style: normal;
}

.match-score-block small {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.match-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid rgba(224,184,79,0.25);
  border-radius: 999px;
  padding: 3px 8px;
  color: #f4d779;
  background: rgba(224,184,79,0.10);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.dashboard-team-row {
  display: grid;
  grid-template-columns: 26px 28px minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px;
}

.dashboard-team-row.leader {
  border-color: rgba(224,184,79,0.26);
  background:
    linear-gradient(90deg, rgba(224,184,79,0.11), rgba(255,255,255,0.035));
}

.dashboard-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #f4d779;
  background: rgba(224,184,79,0.12);
  font-size: 12px;
  font-weight: 950;
}

.dashboard-team-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
}

.dashboard-team-logo.team-logo-placeholder {
  background: rgba(255,255,255,0.10);
}

.dashboard-team-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1041px) {
  .hero-section {
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  }
}

@media (max-width: 1040px) {
  .hero-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero-copy {
    min-height: 420px;
  }

  .hero-copy::before {
    inset: 16px;
  }

  .hero-copy::after {
    right: 18px;
    bottom: 18px;
    width: 104px;
    font-size: 30px;
  }

  .hero-mini-stats {
    grid-template-columns: 1fr;
  }
}

/* Hero right column table */
.hero-panel {
  padding: 0;
  overflow: hidden;
}

.hero-table-card {
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 0%, rgba(224,184,79,0.12), transparent 18rem),
    linear-gradient(180deg, rgba(17,29,48,0.98), rgba(6,12,22,0.98));
  box-shadow:
    0 18px 50px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.hero-table-heading {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hero-table-heading span {
  color: #f4d779;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-table-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.hero-table-wrap {
  min-width: 0;
  overflow: auto;
  padding: 8px 10px 12px;
}

.hero-standings-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  color: #ffffff;
  font-size: 13px;
}

.hero-standings-table th {
  padding: 0 8px 5px;
  color: #91a0ba;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.hero-standings-table th:nth-child(2) {
  text-align: left;
}

.hero-standings-table td {
  padding: 7px 8px;
  text-align: right;
  background: rgba(255,255,255,0.035);
  border-top: 1px solid rgba(255,255,255,0.055);
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.hero-standings-table td:first-child {
  width: 34px;
  border-left: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px 0 0 12px;
  color: #f4d779;
  font-weight: 950;
}

.hero-standings-table td:last-child {
  border-right: 1px solid rgba(255,255,255,0.055);
  border-radius: 0 12px 12px 0;
}

.hero-table-team {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.hero-table-team span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}

.hero-table-logo {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 3px;
}

.hero-table-logo.team-logo-placeholder {
  background: rgba(255,255,255,0.10);
}

.hero-table-top td {
  background: linear-gradient(90deg, rgba(224,184,79,0.10), rgba(255,255,255,0.035));
  border-color: rgba(224,184,79,0.14);
}

.hero-table-bottom td {
  background: linear-gradient(90deg, rgba(239,91,91,0.10), rgba(255,255,255,0.032));
  border-color: rgba(239,91,91,0.14);
}

@media (max-width: 760px) {
  .hero-table-heading {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .hero-table-heading h2 {
    font-size: 20px;
  }

  .hero-table-wrap {
    overflow-x: auto;
  }

  .hero-standings-table {
    min-width: 0;
    font-size: 12px;
  }

  .hero-standings-table th,
  .hero-standings-table td {
    padding-left: 6px;
    padding-right: 6px;
  }
}

@media (max-width: 560px) {
  .standings-table th,
  .standings-table td {
    padding: 9px 3px;
    font-size: 11px;
  }

  .standings-table th:nth-child(4),
  .standings-table th:nth-child(5),
  .standings-table th:nth-child(6),
  .standings-table th:nth-child(7),
  .standings-table th:nth-child(8),
  .standings-table td:nth-child(4),
  .standings-table td:nth-child(5),
  .standings-table td:nth-child(6),
  .standings-table td:nth-child(7),
  .standings-table td:nth-child(8) {
    display: none;
  }

  .team-cell {
    min-width: 114px;
  }

  .team-link {
    font-size: 11px;
  }

  .form-cell {
    min-width: 54px;
  }
}

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

.team-logo {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: contain;
  background: white;
}

.team-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.team-link:hover {
  color: #e0b84f;
}

.back-link {
  display: inline-flex;
  margin-bottom: 16px;
  color: #b8c2d8;
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  color: #e0b84f;
}

.team-hero {
  display: flex;
  align-items: center;
  gap: 18px;
}

.team-hero.expanded {
  align-items: flex-start;
  gap: 22px;
}

.team-hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 8px;
}

.team-hero h2 {
  margin: 0;
  font-size: 32px;
}

.team-hero-copy {
  flex: 1;
  min-width: 0;
}

.team-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.team-summary-stat {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(13,22,35,0.9), rgba(7,12,20,0.92));
}

.team-summary-stat span {
  display: block;
  color: #91a0ba;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.team-summary-stat strong {
  color: #ffffff;
  font-size: 20px;
}

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

.form-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #06111c;
  font-size: 11px;
  font-weight: 900;
}

.form-dot.win {
  background: #36d284;
}

.form-dot.draw {
  background: #e0b84f;
}

.form-dot.loss {
  background: #ef5b5b;
}

.team-section {
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(11,17,27,0.86), rgba(7,11,18,0.92));
}

.team-subnav {
  position: sticky;
  top: 96px;
  z-index: 12;
  display: flex;
  gap: 8px;
  margin: 18px 0 4px;
  padding: 8px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(7,12,22,0.88);
  backdrop-filter: blur(10px);
}

.team-subnav a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: #b8c2d8;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.team-subnav a:hover,
.team-subnav a:focus-visible {
  color: #ffffff;
  background: rgba(224,184,79,0.12);
  transform: translateY(-1px);
  outline: none;
}

.team-stat-groups {
  display: grid;
  gap: 16px;
}

.team-stat-group {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background:
    radial-gradient(circle at 0% 0%, rgba(224,184,79,0.06), transparent 34%),
    rgba(255,255,255,0.025);
}

.team-stat-group h4,
.player-toplist-card h4 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.team-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-metric-card {
  min-height: 84px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}

.team-metric-card span {
  display: block;
  color: #8fa0bd;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-metric-card strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 24px;
  line-height: 1.05;
}

.team-metric-card small {
  display: block;
  margin-top: 6px;
  color: #91a0ba;
}

.team-stat-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  background: rgba(255,255,255,0.026);
}

.team-stat-form-row > span {
  color: #8fa0bd;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.player-toplist-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.player-toplist-card {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.052), rgba(255,255,255,0.022));
}

.player-toplist-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  color: #dbe7fb;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.055);
}

.player-toplist-row span {
  color: #e0b84f;
  font-weight: 950;
}

.player-toplist-row strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-toplist-row em {
  color: #e0b84f;
  font-style: normal;
  font-weight: 950;
}

.player-stats-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.player-stats-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0 6px;
  color: #ffffff;
  font-size: 13px;
}

.player-stats-table th {
  padding: 0 10px 6px;
  color: #8fa0bd;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.player-stats-table td {
  padding: 10px;
  background: rgba(255,255,255,0.035);
  border-top: 1px solid rgba(255,255,255,0.055);
  border-bottom: 1px solid rgba(255,255,255,0.055);
  white-space: nowrap;
}

.player-stats-table td:first-child {
  border-left: 1px solid rgba(255,255,255,0.055);
  border-radius: 12px 0 0 12px;
}

.player-stats-table td:last-child {
  border-right: 1px solid rgba(255,255,255,0.055);
  border-radius: 0 12px 12px 0;
}

.player-stats-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
}

.player-stats-name img,
.player-stats-name span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  object-fit: cover;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,0.20), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.10);
}

.team-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.team-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-section-header h3 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
}

.team-section-header span {
  color: #91a0ba;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-facts-card {
  margin-top: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(11,17,27,0.86), rgba(7,11,18,0.92));
}

.team-facts-card h3 {
  margin: 0 0 14px;
}

.team-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.team-fact {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 10px;
  background: rgba(9,16,27,0.68);
}

.team-fact span {
  display: block;
  color: #b8c2d8;
  font-size: 12px;
  margin-bottom: 5px;
}

.team-fact strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 6px;
  color: #e0b84f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.team-info-card {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
}

.team-info-card h3 {
  margin: 0 0 8px;
}

.team-info-card p {
  margin: 0;
  color: #b8c2d8;
}

.team-empty {
  margin: 0;
  color: #91a0ba;
}

.team-match-row,
.squad-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 10px 12px;
  background:
    radial-gradient(circle at 8% 50%, rgba(224,184,79,0.06), transparent 30%),
    rgba(255,255,255,0.025);
  transition: transform 190ms ease, border-color 190ms ease, background 190ms ease, box-shadow 190ms ease;
}

.team-match-row + .team-match-row,
.squad-row + .squad-row {
  margin-top: 8px;
}

.team-match-row:hover,
.squad-row:hover {
  transform: translateY(-3px);
  border-color: rgba(224,184,79,0.34);
  background:
    radial-gradient(circle at 8% 50%, rgba(224,184,79,0.11), transparent 34%),
    rgba(255,255,255,0.045);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

.team-match-opponent,
.squad-player,
.squad-player-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.squad-player-main {
  flex: 1;
}

.team-match-opponent img,
.squad-player img,
.squad-player-main img,
.squad-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

.squad-avatar {
  background: linear-gradient(135deg, rgba(224,184,79,0.32), rgba(255,255,255,0.08));
}

.team-match-opponent strong,
.squad-player strong,
.squad-player-copy strong {
  display: block;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.squad-player-copy {
  min-width: 0;
}

.squad-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #91a0ba;
  font-size: 12px;
  margin-top: 4px;
  min-height: 16px;
}

.squad-meta span {
  color: #91a0ba;
  font-size: 12px;
}

.squad-flag {
  width: 18px;
  height: 13px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.team-match-opponent span,
.squad-row span {
  color: #91a0ba;
  font-size: 12px;
}

.team-match-score {
  display: grid;
  justify-items: end;
  gap: 2px;
  min-width: 78px;
}

.team-match-score strong {
  color: #ffffff;
  font-size: 18px;
}

.team-match-score span {
  border-radius: 999px;
  padding: 2px 8px;
  color: #06111c;
  font-size: 11px;
  font-weight: 900;
}

.team-match-score.win span {
  background: #36d284;
}

.team-match-score.draw span {
  background: #e0b84f;
}

.team-match-score.loss span {
  background: #ef5b5b;
}

.squad-table {
  display: grid;
  gap: 0;
}

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

.skeleton-row {
  pointer-events: none;
}

.skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  background-size: 220% 100%;
  animation: squadSkeleton 1.25s ease-in-out infinite;
}

.skeleton-line.wide {
  width: min(190px, 40vw);
}

.skeleton-line.medium {
  width: 96px;
}

.skeleton-line.short {
  width: 38px;
  min-width: 38px;
}

.skeleton-pulse {
  animation: squadSkeleton 1.25s ease-in-out infinite;
}

@keyframes squadSkeleton {
  0% {
    background-position: 100% 0;
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
  100% {
    background-position: -100% 0;
    opacity: 0.55;
  }
}

.squad-row em {
  color: #e0b84f;
  font-style: normal;
  font-weight: 950;
  font-size: 16px;
  min-width: 42px;
  text-align: right;
}

.squad-arrow {
  color: rgba(255,255,255,0.34);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transition: color 180ms ease, transform 180ms ease;
}

.squad-row:hover .squad-arrow {
  color: #e0b84f;
  transform: translateX(2px);
}

.team-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.team-stat-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 14px;
  background: rgba(9,16,27,0.72);
}

.team-stat-card span {
  display: block;
  color: #91a0ba;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.team-stat-card strong {
  display: block;
  color: #ffffff;
  font-size: 26px;
  line-height: 1.05;
}

.stat-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  margin-top: 12px;
}

.stat-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #36d284, #e0b84f);
}

.stat-meter.danger i {
  background: linear-gradient(90deg, #e0b84f, #ef5b5b);
}

.error-detail {
  color: #e0b84f;
  font-size: 13px;
  margin-top: 8px;
  word-break: break-word;
}

@media (max-width: 900px) {
  .team-summary-grid,
  .team-facts-grid,
  .team-stat-grid,
  .team-metric-grid,
  .player-toplist-grid,
  .team-split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .team-hero {
    align-items: flex-start;
  }

  .team-hero.expanded {
    flex-direction: column;
  }

  .team-summary-grid,
  .team-stat-grid,
  .team-metric-grid,
  .player-toplist-grid,
  .team-split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .team-facts-grid {
    grid-template-columns: 1fr;
  }

  .team-metric-grid,
  .player-toplist-grid,
  .team-split-grid {
    grid-template-columns: 1fr;
  }

  .team-subnav {
    top: 78px;
    border-radius: 16px;
  }

  .team-match-row,
  .squad-row {
    align-items: flex-start;
  }
}

/* Homepage premium refresh */
body {
  background:
    radial-gradient(circle at 50% -18%, rgba(224,184,79,0.16), transparent 34rem),
    linear-gradient(180deg, #07101d 0%, #0b1220 42%, #070d17 100%);
}

.home-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 18px;
}

.home-league-toggle {
  order: 1;
  align-self: center;
  margin: 0 auto 6px;
}

.hero-section { order: 2; }
#tabell { order: 3; }
#matcher { order: 4; }
#fraga-ai { order: 9; }

.hero-section,
.table-stats-layout,
.match-center-grid,
.stats-feature-grid,
.teams-grid {
  gap: 16px;
}

.hero-copy,
.hero-panel,
.section-block,
.data-card,
.stats-hub,
.footer-cta {
  border-color: rgba(255,255,255,0.10);
  background:
    linear-gradient(180deg, rgba(19,30,49,0.92), rgba(8,14,25,0.96));
  box-shadow:
    0 18px 50px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.hero-copy {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 18%, rgba(224,184,79,0.18), transparent 20rem),
    linear-gradient(135deg, rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(18,30,50,0.98), rgba(7,13,24,0.98));
  background-size: auto, 26px 26px, auto;
}

.hero-copy h1,
.section-heading h2,
.stats-hub h2,
.footer-cta h2 {
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(42px, 64px, 72px);
  line-height: 1;
}

.hero-text {
  max-width: 560px;
  color: #d7deea;
  font-size: 18px;
}

.hero-actions .primary-action,
.hero-actions .secondary-action,
.ai-ask-actions .primary-action {
  min-height: 48px;
  padding: 0 22px;
}

.primary-action {
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, #f4d779, #d7a936);
  box-shadow: 0 14px 28px rgba(224,184,79,0.18);
}

.secondary-action {
  background: rgba(255,255,255,0.065);
}

.hero-panel {
  align-content: start;
  border-color: rgba(224,184,79,0.16);
}

.dashboard-header {
  background:
    linear-gradient(135deg, rgba(224,184,79,0.16), rgba(255,255,255,0.04));
}

.next-match-feature {
  border-color: rgba(224,184,79,0.24);
}

.table-card {
  overflow: hidden;
}

.premium-table-wrap {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.075);
  background: rgba(4,9,17,0.26);
}

.standings-table {
  font-size: 13px;
}

.standings-table th {
  color: #8f9bb0;
  background: rgba(255,255,255,0.035);
}

.standings-table th,
.standings-table td {
  padding: 10px 9px;
}

.standings-row.zone-top td:first-child {
  box-shadow: inset 3px 0 0 rgba(224,184,79,0.82);
}

.standings-row.zone-top {
  background: linear-gradient(90deg, rgba(224,184,79,0.075), transparent 44%);
}

.team-logo,
.team-logo-placeholder,
.match-team-logo {
  border: 1px solid rgba(255,255,255,0.12);
}

.match-team-logo {
  border-color: rgba(255,255,255,0.08);
}

.match-card {
  min-height: 124px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.024));
}

.match-card {
  grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr);
}

.match-score-block strong {
  font-size: 29px;
}

.match-score-block small span {
  color: #f4d779;
  font-weight: 900;
}

.match-status-chip {
  font-size: 8px;
  padding: 2px 6px;
}

.ai-ask-section {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.5vw, 26px);
  border-color: rgba(224,184,79,0.20);
  background:
    radial-gradient(circle at 85% 0%, rgba(75,121,255,0.16), transparent 19rem),
    radial-gradient(circle at 12% 0%, rgba(224,184,79,0.16), transparent 18rem),
    linear-gradient(180deg, rgba(18,30,50,0.98), rgba(7,13,24,0.98));
}

.ai-ask-section .section-heading {
  margin-bottom: 12px;
}

.ai-ask-form textarea {
  min-height: 96px;
  border-radius: 16px;
  border-color: rgba(224,184,79,0.22);
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(4,9,17,0.56), rgba(9,18,32,0.42));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.ai-example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ai-example-chips button {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 7px 10px;
  color: #dfe7f5;
  background: rgba(255,255,255,0.055);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ai-example-chips button:hover,
.ai-example-chips button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(224,184,79,0.42);
  background: linear-gradient(180deg, rgba(224,184,79,0.13), rgba(63,99,190,0.08));
  outline: none;
}

.ai-ask-actions {
  margin-top: -2px;
}

.ai-answer-card {
  border-color: rgba(224,184,79,0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
}

.ai-answer-grid section {
  background: rgba(4,9,17,0.42);
}

.ai-answer-grid ul,
.ai-answer-grid dl {
  margin: 0;
  color: #c6d0e2;
  line-height: 1.55;
}

.ai-answer-grid ul {
  padding-left: 18px;
}

.ai-answer-grid dl div {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ai-answer-grid dl div:last-child {
  border-bottom: 0;
}

.ai-answer-grid dt {
  color: #f4d779;
  font-weight: 900;
}

.ai-answer-grid dd {
  margin: 0;
}

.quick-stats-stack .data-card {
  border-radius: 18px;
}

.mini-row,
.top-scorer-row,
.dashboard-team-row {
  border: 1px solid rgba(255,255,255,0.065);
}

@media (min-width: 1041px) {
  .home-shell {
    gap: 22px;
  }

  .hero-section {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  }

  .match-center-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero-copy {
    min-height: 0;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-mini-stats {
    grid-template-columns: 1fr;
  }

  .ai-example-chips {
    display: grid;
  }

  .ai-example-chips button {
    text-align: left;
  }

  .ai-answer-grid dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .match-card {
    grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr);
    gap: 14px;
    min-height: 114px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .match-team-logo {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }
}
