/* ============================================================================
   HashureSport — World Cup Experience
   Design system + components. RTL Persian. Self-hosted typography.
   ========================================================================== */

/* ---- Self-hosted typography (IRANSANSX) ---------------------------------- */
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-LIGHT.TTF") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-REGULAR.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-MEDIUM.TTF") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-DEMIBOLD.TTF") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-BOLD.TTF") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-EXTRABOLD.TTF") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IRANSansX";
  src: url("/fonts/IRANSANSX-BLACK.TTF") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---- Token layer --------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #2f6bff;
  --brand-bright: #4f8cff;
  --brand-soft: #6ea0ff;
  --brand-cyan: #29c5dc;
  --brand-deep: #15306f;
  --gold: #e9c668;
  --gold-soft: #f2d98f;

  /* Backdrop */
  --bg-0: #04060f;
  --bg-1: #070b1c;
  --bg-2: #0a1230;

  /* Surfaces */
  --surface-1: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.08);
  --surface-raised: linear-gradient(180deg, rgba(35, 52, 102, 0.30), rgba(12, 20, 48, 0.32));

  /* Lines */
  --border: rgba(140, 165, 230, 0.12);
  --border-soft: rgba(140, 165, 230, 0.08);
  --border-strong: rgba(120, 160, 255, 0.32);

  /* Text */
  --text: #eef3ff;
  --text-dim: #a6b6da;
  --text-faint: #6c7da4;

  /* Status */
  --live: #ff4d63;
  --win: #34d27f;
  --draw: #8aa0c8;
  --loss: #ff5a72;
  --upcoming: var(--brand-soft);

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.45);
  --shadow-md: 0 20px 45px rgba(2, 6, 23, 0.55);
  --shadow-lg: 0 40px 90px rgba(2, 6, 23, 0.65);
  --glow-brand: 0 0 0 1px rgba(79, 140, 255, 0.18), 0 18px 60px rgba(28, 78, 200, 0.28);
  --glow-gold: 0 0 0 1px rgba(233, 198, 104, 0.30), 0 22px 60px rgba(150, 110, 20, 0.22);

  /* Rhythm */
  --content-width: 1080px;
  --gap: 18px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IRANSansX", system-ui, "Segoe UI", sans-serif;
  font-weight: 400;
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(47, 107, 255, 0.22), transparent 60%),
    radial-gradient(900px 560px at 6% 2%, rgba(41, 197, 220, 0.14), transparent 58%),
    radial-gradient(1200px 900px at 50% 120%, rgba(21, 48, 111, 0.40), transparent 70%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Diagonal motion streaks — subtle athletic energy behind content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(115deg, transparent 0 42%, rgba(79, 140, 255, 0.05) 42% 43%, transparent 43%),
    linear-gradient(115deg, transparent 0 64%, rgba(41, 197, 220, 0.045) 64% 64.6%, transparent 65%),
    linear-gradient(115deg, transparent 0 78%, rgba(79, 140, 255, 0.04) 78% 78.5%, transparent 79%);
  opacity: 0.9;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Numeric runs (scores, clocks) stay LTR even inside RTL flow */
.num {
  unicode-bidi: isolate;
}

/* ---- Layout shell -------------------------------------------------------- */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px clamp(14px, 3vw, 28px) 60px;
}

.section {
  margin-top: clamp(26px, 4vw, 44px);
}

/* leave room so the sticky nav never covers a jumped-to heading */
#top,
.section {
  scroll-margin-top: 86px;
}

/* ---- Quick-access section dock ------------------------------------------- */
.dock {
  position: fixed;
  z-index: 45;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(13, 21, 50, 0.9), rgba(7, 11, 28, 0.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.dock__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  color: var(--text-dim);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.dock__item:hover { color: var(--text); background: var(--surface-2); }

.dock__item.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.4);
}

.dock__icon { display: grid; place-items: center; }
.dock__icon svg { width: 20px; height: 20px; }
.dock__label { font-size: 0.7rem; font-weight: 700; white-space: nowrap; }

/* Wide screens: dock the quick-nav vertically against the side margin.
   Faded by default so it never competes with reading; clarifies on hover/focus. */
@media (min-width: 1240px) {
  .dock {
    left: 22px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: var(--r-lg);
    opacity: 0.52;
    transition: opacity 0.25s var(--ease);
  }
  .dock:hover,
  .dock:focus-within { opacity: 1; }

  .dock__item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    width: 100%;
    min-width: 138px;
    padding: 10px 14px;
    border-radius: var(--r-md);
  }
  .dock__icon svg { width: 19px; height: 19px; }
  .dock__label { font-size: 0.86rem; }
}

/* ---- Top navigation ------------------------------------------------------ */
.nav {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(13, 21, 50, 0.86), rgba(7, 11, 28, 0.86));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__logo {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 4px 14px rgba(47, 107, 255, 0.45));
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.brand__tag {
  font-size: 0.66rem;
  color: var(--text-faint);
  font-weight: 500;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: 6px;
}

.nav__link {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav__link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav__spacer {
  flex: 1 1 auto;
}

.nav__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav__live svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--brand-soft); }

.nav__live:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.nav__live[data-live="true"] {
  border-color: rgba(255, 77, 99, 0.4);
  color: #ffd2d8;
  background: rgba(255, 77, 99, 0.12);
}

.nav__live[data-live="true"] svg { color: #ff9aa8; }

/* The status dot only appears while a match is actually live */
.nav__live .live-dot { display: none; }
.nav__live[data-live="true"] .live-dot { display: block; }

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: 0 0 auto;
}

.nav__live[data-live="true"] .live-dot {
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(255, 77, 99, 0.6);
  animation: pulse 1.8s infinite;
}

.season { position: relative; flex: 0 0 auto; }

.nav__season {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.18), rgba(47, 107, 255, 0.06));
  color: #dbe7ff;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav__season:hover { background: linear-gradient(180deg, rgba(47, 107, 255, 0.28), rgba(47, 107, 255, 0.10)); }
.nav__season svg { width: 14px; height: 14px; transition: transform 0.22s var(--ease); }
.nav__season[aria-expanded="true"] svg { transform: rotate(180deg); }

.season__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 50;
  min-width: 168px;
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(7, 11, 28, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
  display: none;
}

.season__menu.is-open { display: grid; gap: 4px; }

.season__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: start;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.season__opt:hover { background: var(--surface-2); color: var(--text); }

.season__opt[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.26), rgba(47, 107, 255, 0.1));
}

.season__opt .tick { width: 15px; height: 15px; color: var(--brand-soft); opacity: 0; }
.season__opt[aria-selected="true"] .tick { opacity: 1; }

.nav__toggle {
  display: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 99, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(255, 77, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 99, 0); }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(20px, 3vw, 38px);
  align-items: center;
  padding: clamp(26px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background:
    radial-gradient(700px 400px at 92% 0%, rgba(47, 107, 255, 0.28), transparent 60%),
    radial-gradient(560px 360px at 0% 100%, rgba(41, 197, 220, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(16, 27, 64, 0.92), rgba(7, 11, 28, 0.94));
  box-shadow: var(--shadow-lg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(120deg, transparent 0 56%, rgba(255, 255, 255, 0.05) 56% 56.5%, transparent 57%),
    linear-gradient(120deg, transparent 0 72%, rgba(79, 140, 255, 0.10) 72% 72.7%, transparent 73%),
    linear-gradient(120deg, transparent 0 84%, rgba(41, 197, 220, 0.08) 84% 84.5%, transparent 85%);
}

.hero__copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 0.78rem;
  font-weight: 700;
  color: #cfe0ff;
}

.eyebrow__star {
  color: var(--gold);
}

.hero__title {
  margin: 18px 0 14px;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.hero__title .accent {
  background: linear-gradient(120deg, var(--brand-soft), var(--brand-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 0 0 22px;
  max-width: 40ch;
  color: var(--text-dim);
  font-size: clamp(0.96rem, 1.4vw, 1.08rem);
  line-height: 1.95;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.meta-pill svg {
  width: 15px;
  height: 15px;
  color: var(--brand-soft);
  flex: 0 0 auto;
}

/* ---- Featured match card ------------------------------------------------- */
.featured {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  background:
    radial-gradient(420px 220px at 50% -10%, rgba(233, 198, 104, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(20, 32, 74, 0.72), rgba(8, 13, 33, 0.78));
  box-shadow: var(--glow-brand);
}

.featured__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.featured__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
}

.featured__label svg { width: 16px; height: 16px; }

.featured__round {
  font-size: 0.76rem;
  color: var(--text-faint);
  font-weight: 600;
}

.featured__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.featured__team {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  min-width: 0;
}

.featured__crest {
  width: clamp(54px, 7vw, 72px);
  height: clamp(54px, 7vw, 72px);
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.5));
}

.featured__name {
  font-size: clamp(0.92rem, 1.4vw, 1.06rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.featured__center {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 0 6px;
}

.featured__score {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.featured__kick {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.featured__vs {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
}

.featured__date {
  font-size: 0.74rem;
  color: var(--text-dim);
  text-align: center;
}

/* Countdown */
/* Countdown — digital scoreboard, reads left→right: روز : ساعت : دقیقه : ثانیه */
.countdown {
  display: inline-flex;
  direction: ltr;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(120% 140% at 50% -20%, rgba(47, 107, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(9, 14, 36, 0.92), rgba(13, 21, 50, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 14px 34px rgba(2, 6, 23, 0.5);
}

.countdown__cell {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 56px;
  padding: 6px 6px 4px;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 0 0 1px rgba(140, 165, 230, 0.08);
}

.countdown__val {
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(79, 140, 255, 0.55);
}

.countdown__unit {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-faint);
}

.countdown__sep {
  align-self: center;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  color: var(--brand-soft);
  opacity: 0.65;
  transform: translateY(-6px);
  animation: blink 1.6s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0.18; } }

.featured__venue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-dim);
  padding-top: 2px;
  border-top: 1px solid var(--border-soft);
  margin-top: 2px;
  padding-top: 12px;
}

.featured__venue svg { width: 14px; height: 14px; color: var(--brand-soft); }

/* ---- Panels -------------------------------------------------------------- */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: linear-gradient(180deg, rgba(12, 19, 44, 0.66), rgba(7, 11, 28, 0.70));
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 22px) clamp(16px, 2.4vw, 24px);
  border-bottom: 1px solid var(--border-soft);
}

.panel__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 800;
}

.panel__icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.28), rgba(47, 107, 255, 0.10));
  border: 1px solid var(--border-strong);
  color: var(--brand-soft);
}

.panel__icon svg { width: 18px; height: 18px; }

.count-chip {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.30), rgba(47, 107, 255, 0.12));
  border: 1px solid var(--border-strong);
  font-size: 0.82rem;
  font-weight: 800;
  color: #dbe7ff;
}

.panel__body {
  padding: clamp(14px, 2vw, 20px) clamp(14px, 2.4vw, 22px) clamp(18px, 2.4vw, 24px);
}

/* ---- Filter tabs --------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.4vw, 24px) clamp(14px, 2vw, 18px);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
}

.tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.tab[aria-pressed="true"] {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.35);
}

.tab__badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  font-size: 0.72rem;
  font-weight: 700;
}

.tab[aria-pressed="true"] .tab__badge {
  background: rgba(255, 255, 255, 0.22);
}

/* ---- Round (stage) filter dropdown -------------------------------------- */
.round-filter { position: relative; margin-inline-start: auto; }

.round-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.round-btn:hover,
.round-btn[aria-expanded="true"] { color: var(--text); border-color: var(--border-strong); }
.round-btn svg { width: 14px; height: 14px; flex: 0 0 auto; }
.round-btn svg:first-child { color: var(--brand-soft); }
.round-btn .chev { transition: transform 0.22s var(--ease); }
.round-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.round-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 30;
  min-width: 210px;
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(7, 11, 28, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
  display: none;
}

.round-menu.is-open { display: grid; gap: 4px; }

.round-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.round-opt:hover { background: var(--surface-2); color: var(--text); }

.round-opt[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.26), rgba(47, 107, 255, 0.1));
}

.round-opt__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.round-opt .count-chip { background: var(--surface-2); border-color: var(--border); color: var(--text-dim); min-width: 24px; height: 22px; font-size: 0.72rem; }
.round-opt[aria-selected="true"] .count-chip { background: rgba(255, 255, 255, 0.18); color: #fff; }

/* ---- Match groups + rows ------------------------------------------------- */
.match-groups {
  display: grid;
  gap: 22px;
}

.match-group__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 12px;
  color: var(--brand-soft);
  font-size: 0.92rem;
  font-weight: 800;
}

.match-group__head .count-chip {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-dim);
  min-width: 24px;
  height: 24px;
  font-size: 0.74rem;
}

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

.match {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(8px, 2vw, 18px);
  padding: 14px clamp(14px, 2vw, 20px);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.match::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 55%, rgba(79, 140, 255, 0.10) 100%);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
  pointer-events: none;
}

.match:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.match:hover::before { opacity: 1; }

.match.is-active {
  border-color: var(--border-strong);
  box-shadow: var(--glow-brand);
}

.match.is-live {
  border-color: rgba(255, 77, 99, 0.32);
}

.match__side {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  direction: ltr; /* lay flag/name physically, independent of RTL flow */
}

/* Right team: name toward centre, flag pinned to the far right edge */
.match__side--home { justify-content: flex-end; text-align: right; }
/* Left team: flag pinned to the far left edge, name toward centre.
   (row-reverse flips the main axis, so flex-end packs to the physical left) */
.match__side--away { justify-content: flex-end; flex-direction: row-reverse; text-align: left; }

.match__crest {
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex: 0 0 auto;
}

.match__team {
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match__center {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 72px;
}

.match__time {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.match__score {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
}

.match__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--text-dim);
}

.match__status.is-live {
  background: rgba(255, 77, 99, 0.15);
  color: #ffb8c1;
}

.match__status.is-live .live-dot {
  width: 6px; height: 6px;
  background: var(--live);
  animation: pulse 1.8s infinite;
}

.match__status.is-finished {
  background: rgba(52, 210, 127, 0.14);
  color: #93e7bd;
}

.match__date {
  font-size: 0.68rem;
  color: var(--text-faint);
}

.match__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, #ff5a6e, #e23048);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(255, 77, 99, 0.35);
  transition: filter 0.18s var(--ease), transform 0.18s var(--ease);
}

.match__live svg { width: 13px; height: 13px; }
.match__live:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---- Standings ----------------------------------------------------------- */
.standings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: clamp(14px, 2vw, 18px) clamp(16px, 2.4vw, 24px) 4px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex: 0 0 auto;
}

.legend-swatch--qualify { background: linear-gradient(180deg, var(--brand-bright), var(--brand)); }
.legend-swatch--playoff { background: linear-gradient(180deg, var(--gold), #c79a32); }

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

.group {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--surface-1);
  overflow: hidden;
}

.group__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 13px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.10), transparent);
}

.group__title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-soft);
}

.table {
  width: 100%;
}

.thead,
.trow {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) repeat(5, 30px) 34px 64px;
  align-items: center;
  gap: 4px;
  padding: 9px 14px;
}

.thead {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border-soft);
}

.trow {
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.trow:last-child { border-bottom: 0; }

.trow.is-qualify::before,
.trow.is-playoff::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
}

.trow.is-qualify::before { background: linear-gradient(180deg, var(--brand-bright), var(--brand)); }
.trow.is-playoff::before { background: linear-gradient(180deg, var(--gold), #c79a32); }

.th-num,
.td-num {
  text-align: center;
  color: var(--text-dim);
}

.td-pts {
  font-weight: 800;
  color: var(--text);
}

.td-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--surface-2);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-dim);
}

.td-team {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.td-team__crest {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}

.td-team__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form {
  display: inline-flex;
  gap: 3px;
  justify-content: flex-end;
}

.form__cell {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: #06121a;
}

.form__cell--W { background: var(--win); }
.form__cell--D { background: var(--draw); }
.form__cell--L { background: var(--loss); color: #fff; }

.form__empty { color: var(--text-faint); font-size: 0.72rem; }

/* ---- States -------------------------------------------------------------- */
.state {
  padding: 26px 18px;
  text-align: center;
  border-radius: var(--r-md);
  border: 1px dashed var(--border);
  background: var(--surface-1);
  color: var(--text-dim);
  line-height: 1.9;
}

.state--error {
  border-color: rgba(255, 90, 114, 0.3);
  background: rgba(255, 90, 114, 0.06);
  color: #ffc2cb;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-1);
  border-radius: var(--r-md);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
}

.skeleton--row { height: 60px; margin-bottom: 10px; }
.skeleton--group { height: 220px; }
.skeleton--hero { height: 220px; width: 100%; }

/* Accessible skip link */
.skip-link {
  position: absolute;
  right: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

.noscript {
  max-width: var(--content-width);
  margin: 16px auto;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-1);
  color: var(--text-dim);
  text-align: center;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ---- Footer -------------------------------------------------------------- */
/* ---- About / SEO prose -------------------------------------------------- */
.seo-prose p {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 2.05;
}
.seo-prose p:last-child { margin-bottom: 0; }
.seo-en {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-faint);
  font-size: 0.86rem;
  line-height: 1.8;
}

/* ---- FAQ ----------------------------------------------------------------- */
.faq__item {
  margin-bottom: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface-1);
  overflow: hidden;
}
.faq__item:last-child { margin-bottom: 0; }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.18s var(--ease);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { background: var(--surface-2); }
.faq__item summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brand-soft);
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
}
.faq__item[open] summary::after { content: "\2212"; }
.faq__a {
  padding: 0 16px 16px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 2;
}

/* ---- Footer (minimal, compact) ------------------------------------------ */
.footer {
  margin-top: clamp(22px, 3.5vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(12, 19, 44, 0.5), rgba(7, 11, 28, 0.6));
  box-shadow: var(--shadow-sm);
}

.footer .brand__logo { height: 28px; }

.footer__copy { font-size: 0.78rem; color: var(--text-faint); }

/* ---- Responsive ---------------------------------------------------------- */
/* keep the footer clear of the bottom-docked quick-nav */
@media (max-width: 1239px) {
  .shell { padding-bottom: 100px; }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero__copy { text-align: center; }
  .hero__lead { margin-inline: auto; }
  .hero__meta { justify-content: center; }
  .standings-grid { grid-template-columns: 1fr; }
  .footer { justify-content: center; text-align: center; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__links.is-open {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: rgba(7, 11, 28, 0.97);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-md);
  }
  .nav__links.is-open .nav__link { width: 100%; }
  .nav__toggle {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: var(--r-pill);
    border: 1px solid var(--border);
    background: var(--surface-1);
    color: var(--text);
  }
  .nav__toggle svg { width: 20px; height: 20px; }
  .nav { position: relative; }
  .nav__season { padding: 7px 11px; font-size: 0.78rem; }
  .brand__tag { display: none; }
}

@media (max-width: 560px) {
  .nav__live span:not(.live-dot) { display: none; }
  .countdown__cell { min-width: 46px; }

  /* Condense standings columns on phones: keep rank, team, GD, points */
  .thead,
  .trow {
    grid-template-columns: 24px minmax(0, 1fr) 40px 52px;
  }
  .col-w, .col-d, .col-l, .col-gf, .col-ga { display: none; }
  .form__cell { width: 14px; height: 14px; }
}

@media (max-width: 420px) {
  .match {
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    padding: 12px 10px;
  }
  .match__team { font-size: 0.84rem; }
  .match__crest { width: 26px; height: 26px; }
  .match__center { min-width: 58px; }
}

/* ---- Modal / drill-downs ------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 28px);
  background: rgba(2, 5, 15, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}

.modal-overlay.is-open { opacity: 1; }

.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 720px;
  max-height: 88vh;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  background:
    radial-gradient(600px 300px at 90% -5%, rgba(47, 107, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(13, 21, 50, 0.98), rgba(7, 11, 28, 0.98));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(14px) scale(0.99);
  transition: transform 0.22s var(--ease);
}

.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }

.modal__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: clamp(16px, 2.4vw, 22px);
  border-bottom: 1px solid var(--border-soft);
}

.modal__crest {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface-2);
  padding: 6px;
  flex: 0 0 auto;
}

.modal__titles { min-width: 0; flex: 1; }

.modal__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal__sub {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.modal__close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-dim);
  flex: 0 0 auto;
  transition: all 0.2s var(--ease);
}

.modal__close:hover { color: #fff; border-color: var(--border-strong); background: var(--surface-2); }
.modal__close svg { width: 18px; height: 18px; }

.modal__tabs {
  display: flex;
  gap: 6px;
  padding: 10px clamp(16px, 2.4vw, 22px);
  border-bottom: 1px solid var(--border-soft);
}

.modal__tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  color: var(--text-dim);
  font-size: 0.86rem;
  font-weight: 700;
  transition: all 0.18s var(--ease);
}

.modal__tab svg { width: 16px; height: 16px; }
.modal__tab:hover { color: var(--text); background: var(--surface-1); }

.modal__tab[aria-selected="true"] {
  color: #fff;
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(47, 107, 255, 0.22), rgba(47, 107, 255, 0.08));
}

.modal__body {
  padding: clamp(14px, 2.4vw, 20px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 600;
}

.modal__back:hover { color: var(--text); border-color: var(--border-strong); }
.modal__back svg { width: 15px; height: 15px; }

/* Competition list (team statistics tab) */
.comp-list { display: grid; gap: 8px; }

.comp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface-1);
  text-align: start;
  width: 100%;
  transition: all 0.16s var(--ease);
}

.comp-row:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }
.comp-row__logo { width: 26px; height: 26px; object-fit: contain; flex: 0 0 auto; background: #fff; border-radius: 6px; padding: 2px; }
.comp-row__name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-row__year { font-size: 0.8rem; color: var(--text-faint); font-weight: 700; }
.comp-row__chev { color: var(--text-faint); }
.comp-row__chev svg { width: 16px; height: 16px; }

/* Stat grid (team statistics detail) */
.stat-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.stat-banner__title { font-weight: 800; }
.stat-banner__form { display: inline-flex; gap: 4px; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.stat-box {
  padding: 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.stat-box__label { font-size: 0.76rem; color: var(--text-faint); }
.stat-box__value { margin-top: 6px; font-size: 1.5rem; font-weight: 900; }
.stat-box__split { margin-top: 4px; font-size: 0.72rem; color: var(--text-dim); }

/* Squad */
.squad-group { margin-bottom: 18px; }
.squad-group:last-child { margin-bottom: 0; }

.squad-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--brand-soft);
}

.squad-group__title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-soft); }

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

.player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface-1);
  text-align: start;
  width: 100%;
  transition: all 0.16s var(--ease);
}

.player:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); }

.player__photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  flex: 0 0 auto;
}

.player__name { font-weight: 700; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__meta { font-size: 0.74rem; color: var(--text-faint); }

/* Player detail */
.player-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.player-hero__photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: 0 0 auto; }
.player-hero__name { margin: 0; font-size: 1.2rem; font-weight: 800; }
.player-hero__sub { margin: 4px 0 0; font-size: 0.84rem; color: var(--text-dim); }

/* Stadium */
.venue-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
  margin-bottom: 16px;
}

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

.venue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.venue-row__label { color: var(--text-dim); font-size: 0.84rem; }
.venue-row__value { font-weight: 700; text-align: end; }

/* Fixture detail */
.fx-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-size: 0.84rem;
}

.fx-detail__board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 20px 12px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface-1);
}

.fx-team { display: grid; justify-items: center; gap: 10px; text-align: center; }
.fx-team__crest { width: 64px; height: 64px; object-fit: contain; }
.fx-team__name { font-weight: 700; }
.fx-team[role="button"]:hover .fx-team__name { color: var(--brand-soft); }

.fx-center { display: grid; justify-items: center; gap: 6px; }
.fx-center__score { font-size: 2.2rem; font-weight: 900; letter-spacing: 0.05em; }
.fx-center__time { font-size: 1.6rem; font-weight: 900; }
.fx-center__status { font-size: 0.74rem; font-weight: 700; color: var(--brand-soft); }

.fx-meta { margin-top: 14px; display: grid; gap: 8px; }

.modal-clickable { cursor: pointer; }

.fx-board__date {
  margin-top: 10px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Fixture tabs share .modal__tabs / .modal__tab; add spacing */
.fx-detail__board + .modal__tabs,
.fx-board__date + .modal__tabs { margin-top: 16px; }
#fxTabBody { margin-top: 14px; }

/* Events */
.ev-half {
  margin: 14px 0 8px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-dim);
}

.ev {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}

.ev__min { text-align: center; font-weight: 800; font-size: 0.8rem; color: var(--text-faint); }

.ev__cell { display: flex; align-items: center; gap: 8px; min-width: 0; direction: ltr; }
.ev__cell--home { justify-content: flex-end; text-align: right; }
.ev__cell--away { justify-content: flex-start; text-align: left; }

.ev__txt { display: grid; gap: 1px; min-width: 0; }
.ev__pl { font-weight: 700; font-size: 0.86rem; }
.ev__sub { font-size: 0.72rem; color: var(--text-faint); }

.ev__ic { flex: 0 0 auto; display: inline-grid; place-items: center; width: 20px; height: 20px; }
.ev__ic svg { width: 16px; height: 16px; }
.ev__ic--goal { color: var(--win); }
.ev__ic--own { color: var(--loss); }
.ev__ic--sub { color: var(--brand-soft); }
.ev__ic--var { font-size: 0.55rem; font-weight: 800; color: var(--text-faint); border: 1px solid var(--border); border-radius: 4px; }

.ev__card { flex: 0 0 auto; width: 12px; height: 16px; border-radius: 3px; }
.ev__card--Y { background: #f4c430; }
.ev__card--R { background: var(--loss); }

/* Statistics bars */
.statbar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.statbar__h { text-align: right; font-weight: 800; font-size: 0.96rem; }
.statbar__a { text-align: left; font-weight: 800; font-size: 0.96rem; }
.statbar__mid { display: grid; gap: 6px; justify-items: center; }
.statbar__label { font-size: 0.78rem; color: var(--text-dim); }

/* direction: ltr so away lands on the left half and home on the right half;
   each fill is anchored at the centre and grows outward toward its own edge. */
.statbar__track { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; direction: ltr; }
.statbar__side { position: relative; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.statbar__side .f { position: absolute; top: 0; bottom: 0; width: 0; border-radius: 999px; transition: width 0.4s var(--ease); }
/* away = left half → anchor at centre (right edge), grow left */
.statbar__side--away .f { right: 0; background: linear-gradient(270deg, var(--gold), #c79a32); }
/* home = right half → anchor at centre (left edge), grow right */
.statbar__side--home .f { left: 0; background: linear-gradient(90deg, var(--brand-bright), var(--brand)); }

/* Lineups */
.lu-forms { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 0.84rem; color: var(--text-dim); }
.lu-form b { color: var(--text); }

.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  margin-bottom: 16px;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.04) 0 8%, transparent 8% 16%),
    linear-gradient(180deg, #1f7a4d, #14603c);
  overflow: hidden;
}
.pitch__mid { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: rgba(255,255,255,0.35); }
.pitch__circle { position: absolute; top: 50%; left: 50%; width: 88px; height: 88px; transform: translate(-50%,-50%); border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; }

.pitch__pl { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; width: 56px; text-align: center; }
.pitch__shirt { width: 40px; height: 38px; display: block; filter: drop-shadow(0 4px 7px rgba(0,0,0,0.5)); }
.pitch__shirt .jersey { width: 100%; height: 100%; display: block; }
.pitch__name {
  font-size: 0.6rem; font-weight: 700; color: #fff;
  max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.lu-subs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.lu-subcol__t { margin: 0 0 8px; font-size: 0.82rem; font-weight: 800; color: var(--brand-soft); }
.lu-sub { display: block; font-size: 0.8rem; color: var(--text-dim); padding: 3px 0; }
.lu-subs .num { color: var(--text-faint); font-weight: 700; }

/* Players table */
.pl-block { margin-bottom: 18px; }
.pl-team { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; font-weight: 800; }
.pl-team img { width: 22px; height: 22px; object-fit: contain; }
.pl-scroll { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--r-md); }
.pl-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; white-space: nowrap; }
.pl-table th, .pl-table td { padding: 8px 9px; text-align: center; border-bottom: 1px solid var(--border-soft); }
.pl-table thead th { color: var(--text-faint); font-size: 0.7rem; font-weight: 700; position: sticky; top: 0; background: rgba(10, 16, 40, 0.96); }
.pl-table th[scope="row"], .pl-table thead th:first-child { text-align: start; position: sticky; inset-inline-start: 0; background: rgba(10, 16, 40, 0.96); z-index: 1; font-weight: 700; }
.pl-table tbody tr:hover td, .pl-table tbody tr:hover th { background: var(--surface-1); }

.is-loading-block {
  display: grid;
  place-items: center;
  padding: 40px 12px;
  color: var(--text-dim);
}

.spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--brand-bright);
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

body.modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .modal__tab span { display: none; }
  .modal__tab { flex: 1; }
  .fx-team__crest { width: 48px; height: 48px; }

  /* Pitch: numbers only (names collide at this width); taller for spacing */
  .pitch { aspect-ratio: 3 / 4; }
  .pitch__name { display: none; }
  .pitch__pl { width: 36px; }
  .pitch__shirt { width: 34px; height: 32px; }
  .statbar { grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 8px; }
  .statbar__h, .statbar__a { font-size: 0.86rem; }
  .ev { grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
