/*
  AsiaBoba clean stylesheet
  Order: tokens, base, shell, views, sections, components, responsive.
*/

:root {
  --bg: #05080e;
  --bg-soft: #08110d;
  --surface: #1e2d36;
  --surface-soft: #243743;
  --surface-deep: #0f1a21;
  --surface-rail: #22333e;
  --line: #405865;
  --line-soft: rgba(185, 201, 206, 0.18);
  --text: #f4fbf7;
  --ink: #f4fbf7;
  --muted: #aebec5;
  --muted-strong: #cad7d4;
  --green: #16c982;
  --green-bright: #4be091;
  --green-dark: #006d3f;
  --blue: #75a4ff;
  --blue-light: #a8f0f9;
  --purple: #b78cff;
  --amber: #ffcf5a;
  --red: #ff6b70;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  --font: "Noto Sans SC", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --header-height: 72px;
  --tabs-height: 52px;
  --top-height: calc(var(--header-height) + var(--tabs-height));
  --home-latest-height: 204px;
  --drawer-width: 50vw;
  --shell-shift: -280px;
  --section-head-min: 56px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  letter-spacing: 0;
}

body.dark-theme {
  background: var(--bg);
  color: var(--text);
}

body.league-drawer-open,
body.is-loading {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  min-height: 100svh;
  margin: 0 auto;
  background: var(--bg);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease;
}

body.league-drawer-open .app-shell {
  transform: translateX(calc(-1 * var(--drawer-width)));
  box-shadow: 5px 0 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0,0,0,0.1);
}

.main-content,
.app-shell > main {
  flex: 1;
  display: block;
  width: 100%;
  min-width: 0;
  padding-bottom: 28px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-height);
  padding: 12px 14px;
  background: #07110c;
  border-bottom: 1px solid var(--line-soft);
}

.brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: rgba(22, 201, 130, 0.18);
}

.brand-mark img {
  width: 100%;
  /* height: 32px; */
  object-fit: contain;
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.league-menu-wrap {
  flex: 0 0 auto;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  gap: 0;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #172630;
  color: var(--text);
  font-weight: 800;
}

.menu-button #active-league {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.menu-icon {
  font-size: 18px;
  line-height: 1;
}

.top-tabs {
  position: sticky;
  top: var(--header-height);
  z-index: 70;
  display: flex;
  max-height: var(--tabs-height);
  overflow-x: auto;
  background: #172630;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
  justify-content: flex-start;
  gap: 24px;
  padding: 0 16px 8px;
}

.top-tabs::-webkit-scrollbar,
.latest-results-track::-webkit-scrollbar,
.standings-league-tabs::-webkit-scrollbar,
.standings-stats-scroll::-webkit-scrollbar,
.data-league-tabs::-webkit-scrollbar {
  display: none;
}

.top-tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: var(--tabs-height);
  /* padding: 0 14px; */
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.top-tab.is-active {
  color: var(--green-bright);
}

.top-tab.is-active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--green);
}

/* View routing */
body.view-home #results-section {
  display: none;
}

body.view-matches main > *:not(#matches-section),
body.view-results main > *:not(#results-section),
body.view-standings main > *:not(#standings-section),
body.view-data main > *:not(#data-section),
body.view-videos main > *:not(#video-section) {
  display: none;
}

body:not(.view-home) .more-link {
  display: none;
}

body.view-home #matches-filter-wrap,
body.view-home #video-filter-wrap,
body.view-home #results-filter-wrap {
  display: none !important;
}

body.view-home #data-rank-board .rank-row:nth-child(n+11),
body.view-home #video-grid .video-feed-card:nth-child(n+11),
body.view-home #video-section .video-lazy-note,
body.view-home #video-section .feed-tools {
  display: none !important;
}

/* Section layout */
.hero,
.latest-section,
.matches-section,
.results-section,
.standings-section,
.data-section,
.dashboard {
  min-width: 0;
  scroll-margin-top: calc(var(--top-height) + 12px);
}

.matches-section,
.results-section,
.standings-section,
.data-section,
.dashboard {
  padding: 0 12px 30px;
}

body.view-home .matches-section,
body.view-home .standings-section,
body.view-home .data-section,
body.view-home .dashboard {
  margin-top: 16px;
}

body.view-home .hero {
  height: calc(100svh - var(--top-height) - var(--home-latest-height) - 16px);
  min-height: 300px;
  max-height: 620px;
  padding: 0;
}

body.view-home .latest-section {
  height: var(--home-latest-height);
  overflow: hidden;
  padding: 0 0 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: var(--section-head-min);
  padding: 16px 4px 12px;
  background: transparent;
}

.section-head > div {
  display: flex;
  flex: 1 1 auto;
  align-items: flex-end;
  min-width: 0;
  gap: 8px;
}

.section-title,
.section-head h2 {
  display: inline-flex;
  order: 1;
  align-items: center;
  min-width: 0;
  margin: 0;
  padding-left: 10px;
  border-left: 4px solid var(--green);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.section-title span,
.section-head h2 span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eyebrow,
.section-eyebrow {
  order: 2;
  margin: 0 0 2px;
  color: var(--green-bright);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.more-link {
  flex: 0 0 auto;
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

/* Shared media and state */
.team-logo,
.league-logo,
.player-avatar {
  flex: 0 0 auto;
  object-fit: contain;
}

.team-logo {
  width: 40px;
  height: auto;
}

.section-head .league-logo {
  width: 24px;
  height: auto;
  padding: 1px;
  border-radius: 50%;
  background: #ffffff;
  margin-right: 8px;
}

.league-logo {
  width: 20px;
  height: auto;
  /* padding: 1px; */
  border-radius: 50%;
  /* background: #ffffff; */
}

.player-avatar {
  width: 50px;
  height: auto;
  border-radius: var(--radius);
  /* background: var(--surface-deep); */
  object-fit: cover;
}

.placeholder,
.is-missing {
  opacity: 0.42;
}

.empty,
.match-loader,
.match-end-note,
.video-lazy-note {
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.skeleton {
  min-height: 92px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #16242d, #243743, #16242d);
  background-size: 220% 100%;
  animation: skeletonPulse 1.25s linear infinite;
}

.skeleton.slim {
  min-height: 58px;
}

.skeleton.tall {
  min-height: 260px;
}

@keyframes skeletonPulse {
  to {
    background-position: -220% 0;
  }
}

/* Hero */
.feature-card,
.feature-slider,
.feature-track,
.feature-slide,
.feature-media {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.feature-card {
  overflow: hidden;
  background: var(--surface-deep);
}

.feature-slider {
  position: relative;
  overflow: hidden;
}

.feature-track {
  display: flex;
  transition: transform 360ms ease;
}

.feature-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  overflow: hidden;
  color: #ffffff;
}

.feature-media {
  position: relative;
  overflow: hidden;
  background: #111c23;
}

.feature-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 76% center;
}

.feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(2, 6, 7, 0.26) 42%, rgba(2, 6, 7, 0.88));
}

.feature-scoreboard {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 16px 46px;
  pointer-events: none;
}

.feature-meta-strip {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  max-width: 88%;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(10, 18, 24, 0.82);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.league-meta {
  display: inline-flex;
  align-items: anchor-center;
  min-width: 0;
  gap: 2px;
  justify-content: center;
}

.league-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-team-row {
  position: relative;
  display: grid;
  align-items: center;
  width: min(76%, 340px);
  max-width: calc(100% - 32px);
  min-height: 54px;
  overflow: hidden;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(14, 24, 31, 0.78);
}

.feature-home-row {
  grid-template-columns: 44px minmax(0, 1fr);
  align-self: flex-start;
}

.feature-away-row {
  grid-template-columns: minmax(0, 1fr) 44px;
  align-self: flex-end;
  text-align: right;
}

.feature-team-row strong {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 30px;
  font-style: italic;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-team-logo {
  display: grid;
  place-items: center;
}

.feature-team-logo .team-logo {
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
}

.feature-team-plate {
  display: none;
}

.feature-score-block {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 66px;
  padding: 6px 26px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-bottom: 5px solid var(--green-dark);
  background: var(--green);
  color: #03110a;
  font-size: 50px;
  font-weight: 900;
  line-height: 1;
  transform: skewX(-12deg);
  font-family: system-ui;
}

.feature-score-block span,
.feature-score-block em {
  transform: skewX(12deg);
}

.feature-score-block em {
  margin: 0 8px;
  color: rgba(3, 17, 10, 0.55);
  font-size: 0.62em;
  font-style: normal;
}

.feature-pen-pill,
.feature-pen-tag {
  align-self: center;
  margin-top: -6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 207, 90, 0.32);
  border-radius: 999px;
  background: rgba(8, 13, 16, 0.86);
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.feature-dots {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.feature-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.feature-dot.is-active {
  width: 28px;
  background: var(--green-bright);
}

.play-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green-bright);
  transform: translate(-50%, -50%);
}

.play-pill::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #03110a;
}

.feature-slide .play-pill {
  display: none;
}

/* Latest section */
.latest-section {
  background: #071020;
}

.latest-section .section-head {
  min-height: var(--section-head-min);
  padding: 16px 16px 12px;
}

.latest-head .section-eyebrow {
  display: inline-flex;
}

.latest-section .section-title {
  font-size: 18px;
}

.latest-section .more-link {
  color: var(--green-bright);
  font-size: 12px;
}

.latest-results-strip {
  min-width: 0;
  padding: 0 16px 14px !important;
}

.latest-results-track {
  display: flex;
  height: 128px;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.result-card {
  flex: 0 0 64%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #21333e;
  scroll-snap-align: start;
}

.result-card:nth-child(n+2) {
  flex-basis: 58%;
}

.result-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin: 0;
  padding: 0 9px;
  border-bottom: 1px solid var(--line);
  background: #0d1720;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
}

.result-card__league {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card__time {
  flex: 0 0 auto;
  max-width: 98%;
  overflow: hidden;
  white-space: nowrap;
}

.meta-ticker {
  height: 20px;
  overflow: hidden;
  line-height: 20px;
}

.ticker-track {
  display: flex;
  flex-direction: column;
  animation: tickerSlide 5s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

.ticker-item {
  height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
}

.result-card__pen-text {
  color: var(--amber);
  font-weight: 900;
}

@keyframes tickerSlide {
  0%, 42% {
    transform: translateY(0);
  }
  50%, 88% {
    transform: translateY(-20px);
  }
  96%, 100% {
    transform: translateY(0);
  }
}

.result-card__match {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.result-card__team-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  min-height: 47px;
  gap: 8px;
  padding: 0 9px;
}

.result-card__team-info {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.result-card__team-info .team-logo {
  width: 30px;
  height: auto;
}

.result-card__team-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-card__score {
  color: var(--green-bright);
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

/* Filters */
.video-filter-wrap {
  margin: 0 0 18px;
}

.video-filters-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.secondary-filters-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.filter-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.custom-dropdown {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--text);
  font-weight: 850;
}

.custom-dropdown.is-open .dropdown-trigger {
  border-color: var(--green);
}

.trigger-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.trigger-value b,
.trigger-value span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trigger-value .team-logo {
  width: 24px;
  height: 24px;
}

.trigger-arrow {
  flex: 0 0 auto;
  color: var(--muted);
  transition: transform 160ms ease;
}

.custom-dropdown.is-open .trigger-arrow {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 95;
  display: none;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101c23;
  box-shadow: var(--shadow);
}

.custom-dropdown.is-open .dropdown-menu {
  display: block;
}

.teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.team-grid-item,
.all-teams-option,
.menu-option {
  display: flex;
  align-items: center;
  min-height: 38px;
  gap: 7px;
  padding: 7px 8px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.team-grid-item span,
.all-teams-option,
.menu-option {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-filter-wrap .dropdown-trigger {
  padding: 0 9px;
}

.side-filter-wrap .trigger-value {
  font-size: 12px;
}

.opponent-filter-wrap .dropdown-menu {
  left: auto;
  right: 0;
  width: min(320px, calc(100vw - 30px));
  max-width: calc(100vw - 30px);
}

.opponent-filter-wrap .team-grid-item {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 13px;
}

.opponent-filter-wrap .team-grid-item span {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
}

.team-grid-item .team-logo {
  width: 24px;
  height: 24px;
}

.team-grid-item.is-active,
.all-teams-option.is-active,
.menu-option.is-active,
.team-grid-item:hover,
.all-teams-option:hover,
.menu-option:hover {
  background: rgba(22, 201, 130, 0.16);
  color: #ffffff;
}

/* Matches and results */
.match-feed,
.results-board {
  min-width: 0;
}

.match-scroll,
.match-day-list,
.results-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-scroll {
  overflow: visible;
  padding: 0;
}

.match-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.match-date-header {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 900;
}

.match-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.match-row.is-live {
  border-color: rgba(22, 201, 130, 0.62);
  background: #203b31;
}

.match-row-meta {
  display: flex;
  align-items: center;
  /* gap: 8px; */
  min-width: 0;
  /* margin-bottom: 9px; */
  padding-bottom: 4px;
  /* border-bottom: 1px solid var(--line); */
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.match-row-main {
  display: flex;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-content: space-between;
  align-items: center;
}

.match-day-list .match-row.no-matches {
  display:flex;
  justify-content:center;
  font-weight: 800;
  align-items: center;
}

.match-team {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  width: 40%;
}

.match-team.away {
  justify-content: flex-end;
  text-align: right;
}

.match-team b {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-score,
.score-vs {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 72px;
  min-height: 34px;
  padding: 8px;
  border: 1px solid rgba(22, 201, 130, 0.36);
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--green-bright);
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.match-score.is-clickable {
  cursor: pointer;
}

.score-chevron-svg {
  position: absolute;
  right: 4px;
  width: 18px;
  height: 18px;
  opacity: 0.8;
  transition: transform 160ms ease;
}

.score-chevron-svg.is-active {
  transform: rotate(180deg);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-bright);
}

.live-dot,
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
}

.extended {
  padding-top: 8px;
  font-weight: 800;
  text-align: center;
  color: var(--amber);
}

.goal-summary {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 9px;
  border-top: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
}

.goal-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.goal-line.away {
  justify-content: flex-end;
}

.goal-minute {
  color: var(--green-bright);
  font-weight: 900;
}

.match-split {
  display: grid;
  gap: 14px;
}

.match-panel {
  min-width: 0;
}

.match-panel-head {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 900;
}

.match-active-hint,
.match-lock-overlay {
  display: none;
}

.divider {
  /* background: var(--green-bright); */
  /* height: 3px; */
  width: 96%;
  margin: 0 auto;
}

/* Standings */
.standings-board,
.data-center {
  min-width: 0;
  background: var(--surface-soft);
}

.standings-card,
.data-rank-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.standings-card-header,
.data-rank-header {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-deep);
}

.standings-header-title {
  color: var(--text) !important;
}

.standings-league-tabs,
.data-league-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.standings-league-tab,
.data-league-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.standings-league-tab .league-logo,
.data-league-tab .league-logo {
  display: none;
}

.standings-league-tab.is-active,
.data-league-tab.is-active {
  background: var(--green);
  color: #03110a;
}

.standings-table-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-deep);
}

.standings-teams {
  min-width: 0;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface-rail);
}

.standings-stats-scroll {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--surface-deep);
  scrollbar-width: none;
}

.standings-stats-grid {
  width: max-content;
}

.standing-team-row,
.standing-stat-row {
  min-height: 42px;
  border-bottom: 1px solid rgba(64, 88, 101, 0.78);
}

.standing-team-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 13px;
  background: var(--surface-rail);
}

.standing-team-row:nth-child(even) {
  background: #1f303a;
}

.standing-team-row::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 4px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}

.standing-team-row.is-zone-rule::before {
  background: var(--standing-zone-color, var(--muted));
}

.standing-team-row.is-zone-ucl::before {
  background: var(--green);
}

.standing-team-row.is-zone-r16::before,
.standing-team-row.is-zone-uel::before,
.standing-team-row.is-zone-europe::before {
  background: var(--blue);
}

.standing-team-row.is-zone-uecl::before {
  background: var(--purple);
}

.standing-team-row.is-zone-playoff::before {
  background: var(--amber);
}

.standing-team-row.is-zone-danger::before {
  background: var(--red);
}

.standing-team-row.is-zone-ucl,
.standing-stat-row.is-zone-ucl {
  background-image: linear-gradient(90deg, rgba(22, 201, 130, 0.12), transparent);
}

.standing-team-row.is-zone-r16,
.standing-stat-row.is-zone-r16,
.standing-team-row.is-zone-uel,
.standing-stat-row.is-zone-uel,
.standing-team-row.is-zone-europe,
.standing-stat-row.is-zone-europe {
  background-image: linear-gradient(90deg, rgba(117, 164, 255, 0.12), transparent);
}

.standing-team-row.is-zone-uecl,
.standing-stat-row.is-zone-uecl {
  background-image: linear-gradient(90deg, rgba(183, 140, 255, 0.12), transparent);
}

.standing-team-row.is-zone-danger,
.standing-stat-row.is-zone-danger {
  background-image: linear-gradient(90deg, rgba(255, 107, 112, 0.12), transparent);
}

.standing-header {
  background: #304653 !important;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.standing-team-row .team-logo {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
}

.standing-rank {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.standing-team-row b {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standing-stat-row {
  display: grid;
  grid-template-columns: 46px 46px 46px 38px 38px 38px 38px 38px;
  align-items: center;
  width: max-content;
  background: var(--surface-deep);
  color: var(--muted-strong);
}

.standing-stat-row:nth-child(even) {
  background: #0c151b;
}

.standing-stat-row span,
.standing-stat-row strong {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 100%;
  font-size: 13px;
  font-weight: 850;
}

.standing-stat-row strong {
  color: var(--green-bright);
  font-weight: 950;
}

.standing-stat-row .is-plus {
  color: var(--blue-light);
}

.standing-stat-row .is-minus {
  color: var(--red);
}

.standing-stat-row .is-zero {
  color: var(--muted);
}

.standings-legend {
  margin: 0 12px 12px !important;
  padding: 12px 0 0 !important;
  border-top: 1px dashed var(--line) !important;
  color: var(--muted-strong) !important;
}

/* Data rankings */
.data-rank-panel {
  padding-bottom: 8px;
}

.data-type-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-deep);
}

.data-type-tab {
  min-height: 34px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 900;
}

.data-type-tab.is-active {
  background: #000000;
  color: var(--green-bright);
}

.rank-list {
  display: grid;
  gap: 0;
}

.rank-row,
.data-rank-row {
  display: grid;
  grid-template-columns: 30px 50px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 8px;
  min-height: 80px;
  padding: 10px 12px;
  border-top: 1px solid rgba(64, 88, 101, 0.72);
}

.rank-row:nth-child(even) {
  background: #1b2b35;
}

.rank-num {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-align: center;
}

.rank-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.rank-name {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-team {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.rank-team .team-logo {
  width: 20px;
  height: auto;
}

.rank-team span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-value {
  color: var(--green-bright);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

/* Videos */
.feed-tools {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
  gap: 8px;
}

.tool-chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-deep);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 900;
}

.tool-chip.is-active {
  border-color: var(--green);
  background: rgba(22, 201, 130, 0.16);
  color: var(--green-bright);
}

.video-grid {
  min-width: 0;
}

.video-list {
  display: grid;
  gap: 12px;
}

.video-feed-card,
.video-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.video-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-deep);
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card-info {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.match-title,
.team-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.title-team {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
}

.title-team.away {
  justify-content: flex-end;
  text-align: right;
}

.title-team span {
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.title-team .team-logo {
  width: 25px;
  height: 25px;
}

.versus {
  color: var(--green-bright);
}

/* Drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.64);
}

.league-menu {
  position: fixed;
  top: 0;
  right: 50%;
  margin-right: -260px;
  bottom: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  width: var(--drawer-width);
  background: #0a151b;
  border-left: 1px solid var(--line);
}

@media (max-width: 520px) {
  .league-menu {
    right: 0;
    margin-right: 0;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.drawer-header-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-bright);
  font-size: 13px;
  font-weight: 900;
}

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--text);
  font-size: 22px;
}

.drawer-profile,
.drawer-search,
.drawer-section,
.preference-panel {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.profile-glow {
  display: none;
}

.profile-user-info {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--green-bright);
  font-weight: 900;
  flex-shrink: 0;
}

.avatar-icon {
  font-size: 19px;
}

.profile-user-info h4,
.profile-user-info p,
.vip-sub {
  margin: 0;
}

.profile-user-info h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.profile-user-info p,
.vip-sub,
.stat-lbl,
.pref-lbl {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.profile-actions,
.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.profile-btn,
.logout-btn {
  min-height: 36px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 900;
}

.btn-primary,
.profile-btn.btn-primary {
  background: var(--green);
  color: #03110a;
}

.btn-secondary,
.profile-btn.btn-secondary,
.logout-btn {
  border: 1px solid var(--line);
  background: var(--surface-deep);
  color: var(--text);
}

.btn-danger,
.profile-btn.btn-danger {
  border: 1px solid rgba(255, 69, 58, 0.3);
  background: rgba(255, 69, 58, 0.1);
  color: #ff453a;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1f2933;
}

.google-icon {
  width: 18px;
  height: 18px;
}

.auth-input-group {
  margin-bottom: 8px;
}

.auth-input,
.search-input-wrap input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-deep);
  color: var(--text);
  padding: 0 10px;
  outline: 0;
}

.auth-input:focus,
.search-input-wrap input:focus {
  border-color: var(--green);
}

.search-input-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  color: var(--muted);
  transform: translateY(-50%);
}

.drawer-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.drawer-section-title,
.pref-title {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 900;
}

.drawer-leagues-list {
  display: grid;
  gap: 8px;
}

.drawer-league-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.drawer-league-item.is-active {
  border-color: var(--green);
  background: rgba(22, 201, 130, 0.14);
}

.league-info {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.league-icon-wrap {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 5px;
  border-radius: var(--radius);
  background: #ffffff;
}

.league-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.league-info strong,
.league-info small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.league-info strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.league-info small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.league-fav-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--surface-deep);
}

.drawer-search-empty {
  padding: 14px;
  color: var(--muted);
  text-align: center;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  width: 0;
  height: 0;
  opacity: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #2b3e4a;
}

.switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 160ms ease;
}

.switch-toggle input:checked + .switch-slider {
  background: var(--green);
}

.switch-toggle input:checked + .switch-slider::before {
  transform: translateX(20px);
}

.text-gold {
  color: var(--amber);
}

.text-green {
  color: var(--green-bright);
}

/* Modal, footer, toast, loading */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
}

.modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 0;
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, calc(92vh * 16 / 9), 860px);
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-frame {
  width: 100%;
  height: 100%;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--green);
  color: #03110a;
  font-size: 24px;
  font-weight: 900;
}

.site-footer {
  margin-top: 32px;
  padding: 26px 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface-deep);
  color: var(--muted);
}

.footer-content {
  display: grid;
  gap: 18px;
}

.footer-brand h3,
.footer-brand p,
.footer-disclaimer p,
.footer-bottom p {
  margin: 0;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.footer-brand p {
  margin-top: 3px;
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 900;
}

.footer-links,
.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

.footer-links a,
.footer-social a {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.footer-disclaimer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.back-to-top {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--surface);
}

.toast-notification {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 400;
  max-width: calc(100vw - 32px);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101c23;
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast-notification.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cinematic-loader {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: #020407;
  color: var(--text);
  overflow: hidden;
  transition: opacity 400ms ease, visibility 400ms ease;
}

.cinematic-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Ambient blurred background orbs */
.loader-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: driftGlow 10s infinite alternate ease-in-out;
  pointer-events: none;
}
.glow-1 {
  top: -15%;
  left: -10%;
  background: var(--green);
}
.glow-2 {
  bottom: -20%;
  right: -10%;
  background: var(--blue);
  animation-delay: -5s;
}

/* Premium glass panel */
.glass-panel {
  position: relative;
  z-index: 2;
  padding: 48px 40px;
  border-radius: 28px;
  background: rgba(10, 18, 24, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  min-width: 280px;
}

/* Radar Animation */
.signal-radar {
  position: relative;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
}
.radar-ring {
  position: absolute;
  border-radius: 50%;
  inset: 0;
  border: 1px solid rgba(22, 201, 130, 0.2);
}
.radar-ring.inner {
  inset: 12px;
  border-width: 2px;
  border-style: dashed;
  animation: spin 15s linear infinite reverse;
}
.radar-ring.outer {
  border-top-color: var(--green-bright);
  border-right-color: var(--green-bright);
  box-shadow: 0 0 18px rgba(22, 201, 130, 0.5), inset 0 0 18px rgba(22, 201, 130, 0.3);
  animation: spin 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.radar-scanner {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 70%, rgba(22, 201, 130, 0.6) 100%);
  animation: spin 2s linear infinite;
  mask-image: radial-gradient(transparent 50%, black 51%);
  -webkit-mask-image: radial-gradient(transparent 50%, black 51%);
}

.radar-logo-wrap {
  position: relative;
  z-index: 3;
  background: #020407;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}
.radar-logo {
  width: 44px;
  height: 44px;
  animation: pulseLogo 2.5s infinite ease-in-out;
}

/* Text and loading bar */
.signal-text-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.loading-text.glitched {
  font-size: 15px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  animation: glitch 4s infinite;
}

.signal-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.signal-progress {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30%;
  background: var(--green-bright);
  box-shadow: 0 0 12px var(--green-bright);
  border-radius: 3px;
  animation: signalSweep 1.8s infinite ease-in-out alternate;
}

.loading-subtext.tracking-wide {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  opacity: 0.7;
}

.loading-subtext.is-error {
  color: var(--red);
  opacity: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 8px rgba(22, 201, 130, 0.5)); }
  50% { transform: scale(0.92); opacity: 0.85; filter: drop-shadow(0 0 2px rgba(22, 201, 130, 0.2)); }
}

@keyframes driftGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 60px) scale(1.15); }
}

@keyframes glitch {
  0%, 100% { opacity: 1; transform: translateX(0); color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.3); }
  92% { opacity: 1; transform: translateX(0); }
  94% { opacity: 0.8; transform: translateX(-2px); color: var(--green-bright); text-shadow: none; }
  96% { opacity: 0.9; transform: translateX(2px); color: var(--blue); text-shadow: none; }
  98% { opacity: 1; transform: translateX(0); color: #fff; }
}

@keyframes signalSweep {
  0% { left: -10%; width: 20%; }
  100% { left: 90%; width: 50%; }
}

@media (max-width: 360px) {
  :root {
    --home-latest-height: 214px;
  }

  .brand-title {
    font-size: 16px;
  }

  .top-tab {
    padding: 0 11px;
    font-size: 14px;
  }

  .feature-team-row strong {
    font-size: 25px;
  }

  .feature-score-block {
    min-width: 132px;
    min-height: 56px;
    font-size: 36px;
  }

  .result-card {
    flex-basis: 76%;
  }

  .result-card:nth-child(n+2) {
    flex-basis: 66%;
  }

  .standings-table-wrap {
    grid-template-columns: minmax(0, 1fr) 142px;
  }

  .standing-stat-row {
    grid-template-columns: 44px 44px 44px 38px 38px 38px 38px 38px;
  }
}

@media (min-width: 700px) {
  :root {
    --shell-shift: -340px;
  }

  .app-shell {
    max-width: 720px;
  }

  body.view-home .hero {
    height: 520px;
  }

  .matches-section,
  .results-section,
  .standings-section,
  .data-section,
  .dashboard {
    padding-right: 16px;
    padding-left: 16px;
  }

  .feature-team-row strong {
    font-size: 34px;
  }

  .feature-score-block {
    font-size: 50px;
  }

  .result-card {
    flex-basis: 42%;
  }

  .result-card:nth-child(n+2) {
    flex-basis: 34%;
  }

  .video-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .match-split {
    grid-template-columns: 1fr 1fr;
  }

  .video-filters-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 92px minmax(0, 1fr);
    align-items: flex-end;
    gap: 12px;
  }
  .secondary-filters-row {
    display: contents;
  }
  .filter-item-wrap {
    min-width: 0;
  }

  .teams-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .opponent-filter-wrap .dropdown-menu {
    width: min(360px, calc(100vw - 30px));
  }
}


/* =========================================================================
   TABLET LAYOUT (>= 768px)
   ========================================================================= */
@media (min-width: 768px) {
  .app-shell {
    max-width: 800px;
  }
  
  body.view-home .hero {
    height: 480px;
  }

  /* 2-column grid for match cards within a group */
  .match-day {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .match-date-header {
    grid-column: 1 / -1;
  }

  /* Result cards wider in carousel */
  .result-card {
    flex-basis: 30%;
  }
  .result-card:nth-child(n+2) {
    flex-basis: 25%;
  }
  
  /* Feature team sizes */
  .feature-team-row strong {
    font-size: 38px;
  }
  .feature-score-block {
    font-size: 56px;
  }

  .standings-table-wrap {
    display: grid;
    grid-template-columns: 57% 43%;
    min-width: 0;
    background: var(--surface-deep);
}
}

/* =========================================================================
   DESKTOP LAYOUT (>= 1024px)
   ========================================================================= */
@media (min-width: 1024px) {

  /* Data Board: split side-by-side */
  .data-type-tabs {
    display: none !important;
  }
  .data-rank-split {
    display: flex;
  }
  .data-rank-col {
    display: block !important;
    flex: 1;
    min-width: 0;
  }
  .data-rank-col.col-scorers {
    border-right: 3px solid var(--primary);
  }
  .col-title.desktop-only {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px;
    font-weight: bold;
    color: var(--primary);
    border-bottom: 1px solid var(--line);
    letter-spacing: 2px;
  }

  .app-shell {
    max-width: 1100px;
  }

  /* Home View: Split into 2 columns for the main content areas */
  body.view-home .app-shell {
    display: grid;
    grid-template-columns: 65% 35%;
    grid-template-rows: auto auto auto auto auto auto auto auto;
    column-gap: 24px;
    align-items: start;
  }
  
  /* Span elements across full width */
  body.view-home .app-shell {
    grid-auto-flow: row dense;
  }
  
  /* Make ALL direct children span full width by default to prevent layout breaks */
  body.view-home .app-shell > * {
    grid-column: 1 / -1;
  }

  /* Left Column */
  body.view-home .app-shell > .matches-section,
  body.view-home .app-shell > .results-section,
  body.view-home .app-shell > .dashboard {
    grid-column: 1;
  }

  /* Right Column */
  body.view-home .app-shell > .standings-section,
  body.view-home .app-shell > .data-section {
    grid-column: 2;
    margin-top: 0;
  }

  /* Latest Results Track Optimization */
  .latest-results-track {
    height: 140px;
  }
  .result-card {
    flex-basis: 240px;
  }
  .result-card:nth-child(n+2) {
    flex-basis: 220px;
  }

  /* Nav Tabs */
  .nav-tabs {
    gap: 20px;
    justify-content: center;
  }
  .nav-tab {
    font-size: 15px;
    padding: 14px 16px;
  }
  
  /* Match list 2 columns everywhere on desktop */
  .match-day {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* For single view modes (Fixtures, Standings, etc.), center the content */
  body:not(.view-home) .app-shell {
    max-width: 860px; /* Readability max-width */
  }
  body.view-videos .app-shell {
    max-width: 1100px;
  }
}

/* =========================================================================
   WIDE DESKTOP (>= 1200px)
   ========================================================================= */
@media (min-width: 1200px) {
  .app-shell {
    max-width: 1200px;
  }
  
  body.view-videos .app-shell {
    max-width: 1200px;
  }

  body.view-home .app-shell {
    grid-template-columns: 65% 35%;
    column-gap: 32px;
  }

  .video-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .result-card {
    flex-basis: 260px;
  }
  .result-card:nth-child(n+2) {
    flex-basis: 240px;
  }
}


/* =========================================================================
   DRAWER FIX FOR TABLET/DESKTOP (>= 768px)
   ========================================================================= */
@media (min-width: 768px) {
  /* Do not shift the main content layout when drawer is open */
  body.league-drawer-open .app-shell {
    transform: none;
  }
  
  /* Make the drawer anchor to the right edge of the screen, acting as an overlay */
  .league-menu {
    right: 0;
    margin-right: 0;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.8);
  }

  /* Make sure overlay spans full screen */
  #drawer-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
  }
}

/* Data Board Mobile */

.data-rank-col { display: none; }
.data-rank-col.is-active { display: block; }
.col-title.desktop-only { display: none; }


/* =========================================================================
   STANDINGS REORDER FOR TABLET/DESKTOP (>= 768px)
   ========================================================================= */
@media (min-width: 768px) {
  /* Expand to show all stats */
  .standings-table-wrap {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }
  .standings-stats-scroll {
    overflow-x: visible !important;
  }

  /* Reorder stats: 赛(1) 胜(4) 平(5) 负(6) 进(7) 失(8) 净(2) 分(3) */
  .standing-stat-row {
    grid-template-columns: 46px 42px 42px 42px 42px 42px 46px 46px !important;
  }
  .standing-stat-row > *:nth-child(1) { order: 1; } /* 赛 Played */
  .standing-stat-row > *:nth-child(4) { order: 2; } /* 胜 Won */
  .standing-stat-row > *:nth-child(5) { order: 3; } /* 平 Drawn */
  .standing-stat-row > *:nth-child(6) { order: 4; } /* 负 Lost */
  .standing-stat-row > *:nth-child(7) { order: 5; } /* 进 GF */
  .standing-stat-row > *:nth-child(8) { order: 6; } /* 失 GA */
  .standing-stat-row > *:nth-child(2) { order: 7; } /* 净 GD */
  .standing-stat-row > *:nth-child(3) { order: 8; } /* 分 Pts */
}
