/* ============================================================
   悦盈体育赛事 · 共享 Site Kit
   硬蓝图网格 + 软圆角容器 ／ 墨绿夜间看板
   ============================================================ */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { padding: 0; list-style: none; }

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

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

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

h1, h2, h3, h4 { font-size: inherit; font-weight: inherit; }

/* ---------- tokens ---------- */
:root {
  --ink-900: #071A15;
  --ink-800: #0C2A22;
  --ink-700: #123A2F;
  --ink-600: #1B4C3C;

  --lime-400: #C6F24A;
  --lime-600: #9BD22B;
  --amber-400: #F2B23E;
  --cyan-300: #5FE0CE;

  --paper-100: #E6EFE9;
  --muted-400: #9BB3A8;
  --paper-50: #F4F7F2;
  --paper-ink: #16241E;
  --coral-400: #FF7A6B;

  --grid: 24px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --pill: 999px;

  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB",
    "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei",
    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Liberation Mono", monospace;

  --ease: 160ms ease;
  --header-h: 140px;
}

/* ---------- base ---------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--paper-100);
  background-color: var(--ink-900);
  background-image:
    linear-gradient(to right, rgba(95, 224, 206, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(95, 224, 206, 0.055) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  padding-top: 100px;
  min-height: 100vh;
  overflow-x: hidden;
}

#main-content {
  display: block;
  scroll-margin-top: 150px;
}

h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; }

p { max-width: 38em; }

::selection { background: var(--lime-400); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--lime-400);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- utilities ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 16px;
}

.section { padding-block: 32px; }

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-300);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan-300);
  flex: 0 0 auto;
}

.coord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-400);
}

.coord::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1px solid var(--cyan-300);
  border-radius: 2px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-240%);
  padding: 10px 18px;
  border-radius: var(--pill);
  background: var(--lime-400);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 700;
  transition: transform var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease),
    border-color var(--ease), transform var(--ease);
}

.btn--lime {
  background: var(--lime-400);
  color: var(--ink-900);
}
.btn--lime:hover,
.btn--lime:focus-visible { background: var(--lime-600); }

.btn--ghost {
  border-color: var(--ink-600);
  color: var(--paper-100);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

.btn--amber {
  background: var(--amber-400);
  color: var(--ink-900);
}
.btn--amber:hover,
.btn--amber:focus-visible { background: #d99a24; }

.btn:active { transform: translateY(1px); }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--pill);
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  color: var(--muted-400);
  font-size: 12px;
  transition: background-color 120ms ease, color 120ms ease,
    border-color 120ms ease;
}

.chip:hover { border-color: var(--lime-400); color: var(--paper-100); }

.chip[aria-pressed="true"],
.chip.is-active {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--ink-900);
  font-weight: 600;
}

.badge-sub {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--pill);
  background: var(--amber-400);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* ---------- card ---------- */
.card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--ink-700);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--ink-800), rgba(7, 26, 21, 0.65));
  transition: border-color var(--ease), background-color var(--ease);
}

.card:hover,
.card:focus-within { border-color: var(--lime-400); }

/* ---------- meter ---------- */
.meter {
  position: relative;
  height: 6px;
  border-radius: var(--pill);
  background: var(--ink-700);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--cyan-300);
}

/* ---------- media frame ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--ink-700);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(to right, rgba(95, 224, 206, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(95, 224, 206, 0.07) 1px, transparent 1px);
  background-size: 16px 16px;
  aspect-ratio: 4 / 3;
}

.media-frame > img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame__tag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--pill);
  background: rgba(7, 26, 21, 0.82);
  border: 1px solid var(--ink-600);
  color: var(--cyan-300);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--flush { border-radius: 0; border: 0; }

/* ---------- brand ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: var(--pill);
  transition: background-color var(--ease);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--lime-400);
  color: var(--ink-900);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--paper-100);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 120;
  padding: 0 12px;
  pointer-events: none;
}

.header-shell {
  pointer-events: auto;
  max-width: 1280px;
  margin-inline: auto;
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid var(--ink-700);
  background: rgba(12, 42, 34, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 22px 48px -28px rgba(0, 0, 0, 0.9);
  transition: border-radius var(--ease), padding var(--ease),
    border-color var(--ease);
}

.header-brand { grid-area: brand; min-width: 0; }
.header-meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.header-nav { grid-area: nav; min-width: 0; }

/* ---------- index badge ---------- */
.index-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: var(--pill);
  border: 1px solid var(--ink-600);
  background: rgba(7, 26, 21, 0.65);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan-300);
  cursor: default;
  white-space: nowrap;
}

.index-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-300);
  box-shadow: 0 0 0 3px rgba(95, 224, 206, 0.16);
  flex: 0 0 auto;
}

.index-badge-time { color: var(--paper-100); }

.index-badge-tip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  width: 240px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  color: var(--muted-400);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--ease), transform var(--ease),
    visibility var(--ease);
}

.index-badge:hover .index-badge-tip,
.index-badge:focus-visible .index-badge-tip,
.index-badge:focus-within .index-badge-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- nav toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--pill);
  border: 1px solid var(--ink-600);
  color: var(--paper-100);
  font-size: 13px;
  transition: border-color var(--ease), color var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

.nav-toggle-bars {
  display: grid;
  gap: 4px;
  width: 16px;
  flex: 0 0 auto;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child {
  transform: translateY(3px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* ---------- nav ---------- */
.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-size: 14px;
  color: var(--muted-400);
  transition: color var(--ease), border-color var(--ease),
    background-color var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--paper-100);
  border-color: var(--ink-600);
  background: var(--ink-700);
}

.nav-link[aria-current="page"] {
  color: var(--lime-400);
  border-color: var(--lime-400);
  background: rgba(198, 242, 74, 0.08);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.nav-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--pill);
  border: 1px dashed var(--ink-600);
  color: var(--muted-400);
  font-size: 13px;
  transition: border-color var(--ease), color var(--ease);
}

.nav-search:hover,
.nav-search:focus-visible {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

.nav-search-icon {
  position: relative;
  width: 11px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  flex: 0 0 auto;
}

.nav-search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

/* ---------- desktop grid ---------- */
@media (min-width: 900px) {
  body { padding-top: var(--header-h); }

  .site-header { top: 16px; padding: 0 16px; }

  .header-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "brand . meta"
      "nav nav nav";
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-lg);
  }

  .header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-left: 4px;
  }

  /* compact single-row state */
  .site-header[data-compact] .header-shell {
    grid-template-areas: "brand nav meta";
    padding: 7px 12px 7px 14px;
    border-radius: var(--pill);
    border-color: var(--ink-600);
  }

  .site-header[data-compact] .brand-sub { display: none; }
  .site-header[data-compact] .nav-link { padding: 6px 10px; font-size: 13px; }
  .site-header[data-compact] .nav-search-text { display: none; }
  .site-header[data-compact] .nav-search { padding: 8px 12px; }
  .site-header[data-compact] .nav-cta { min-height: 34px; padding: 0 15px; font-size: 13px; }
  .site-header[data-compact] .index-badge { padding: 5px 10px; }
}

/* ---------- mobile ---------- */
@media (max-width: 899px) {
  body { padding-top: 96px; }

  .header-shell {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand meta"
      "nav nav";
    padding: 8px 10px;
    border-radius: 24px;
  }

  .header-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-700);
  }

  .header-nav[data-open="true"] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    justify-content: space-between;
    padding: 11px 14px;
    font-size: 15px;
    border-radius: 14px;
  }

  .nav-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ink-700);
  }

  .nav-cta { flex: 1; }

  .nav-toggle { display: inline-flex; }

  .index-badge-label { display: none; }
  .brand-sub { display: none; }
  .brand-name { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 10px; font-size: 13px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: 72px;
  border-top: 1px solid var(--ink-700);
  background: linear-gradient(180deg, rgba(12, 42, 34, 0.85), var(--ink-900) 72%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime-400), transparent);
  opacity: 0.4;
}

.footer-grid {
  max-width: 1280px;
  margin-inline: auto;
  padding: 40px 16px 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.footer-lead { min-width: 0; }

.brand--footer { padding-left: 0; }
.brand--footer .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
.brand--footer .brand-name { font-size: 16px; }

.footer-tagline {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted-400);
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-400);
}

.footer-list {
  display: grid;
  gap: 9px;
  font-size: 14px;
  color: var(--paper-100);
}

.footer-list a {
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.footer-list a:hover,
.footer-list a:focus-visible {
  color: var(--lime-400);
  border-color: var(--lime-400);
}

.footer-list--contact { gap: 12px; }
.footer-list--contact li { display: grid; gap: 2px; }

.footer-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-400);
}

.footer-note {
  margin-top: 16px;
  max-width: 32ch;
  padding-left: 12px;
  border-left: 2px solid var(--amber-400);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted-400);
}

.footer-base {
  max-width: 1280px;
  margin-inline: auto;
  padding: 18px 16px 30px;
  border-top: 1px solid var(--ink-700);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 22px;
  font-size: 12px;
  color: var(--muted-400);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.footer-legal a {
  color: var(--muted-400);
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--lime-400);
  border-color: var(--lime-400);
}

.footer-legal .mono { color: var(--muted-400); letter-spacing: 0.04em; }

.footer-stamp { color: var(--cyan-300); font-size: 11px; letter-spacing: 0.08em; }

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    padding-inline: 28px;
  }
  .footer-lead { grid-column: 1 / -1; }
  .footer-base { padding-inline: 28px; }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.45fr 0.8fr 1.1fr;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 40px;
  }
  .footer-lead { grid-column: auto; }
  .site-footer { margin-top: 96px; }
}

/* ---------- injected back-to-index ---------- */
.to-index {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: var(--pill);
  border: 1px solid var(--ink-600);
  background: rgba(12, 42, 34, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--lime-400);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--ease), transform var(--ease),
    visibility var(--ease), border-color var(--ease);
}

.to-index[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-index:hover,
.to-index:focus-visible {
  border-color: var(--lime-400);
  background: var(--ink-700);
}

.to-index::before {
  content: "↑";
  font-size: 13px;
  line-height: 1;
}

/* ---------- reduced motion ---------- */
@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;
    scroll-behavior: auto !important;
  }
}
