/* =========================================================
   球盟会主站 · 共享样式 /assets/site.css
   夜间赛场数据指挥中心 · 堆叠画板 · 刊头导航
   ========================================================= */

/* ---------- 1. RESET ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; }

/* ---------- 2. TOKENS ---------- */
:root {
  /* 色彩 */
  --ink: #061A14;
  --panel: #0B2A20;
  --panel-2: #0F3D2E;
  --cyan: #19F5C6;
  --cyan-soft: #7CFFE4;
  --ember: #FF4D2E;
  --ember-soft: #FFB38A;
  --white: #E8FFF9;
  --line: #6F8F86;
  --muted: #A7C4BB;

  --line-1: rgba(111, 143, 134, 0.20);
  --line-2: rgba(111, 143, 134, 0.36);
  --cyan-a08: rgba(25, 245, 198, 0.08);
  --cyan-a18: rgba(25, 245, 198, 0.18);
  --ember-a10: rgba(255, 77, 46, 0.10);

  /* 字体 */
  --font-display: "Barlow Condensed", "DIN Alternate", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  /* 节奏 */
  --step: 8px;
  --radius: 4px;
  --shell-max: 1280px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-1: 0 1px 0 rgba(232, 255, 249, 0.04), 0 22px 48px -30px rgba(0, 0, 0, 0.95);
}

/* ---------- 3. BASE / 中文排版 ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--white);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(111, 143, 134, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 143, 134, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

/* 环境光晕层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58vw 58vw at 84% -12%, rgba(25, 245, 198, 0.10), transparent 62%),
    radial-gradient(46vw 46vw at 4% 26%, rgba(255, 77, 46, 0.07), transparent 60%),
    radial-gradient(40vw 40vw at 50% 110%, rgba(25, 245, 198, 0.06), transparent 65%);
}

main { position: relative; z-index: 1; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--white);
}

p { text-wrap: pretty; }

a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

strong, b { font-weight: 700; color: var(--cyan-soft); }

::selection { background: var(--cyan); color: #04241C; }

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

/* ---------- 4. 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 6vw, 88px);
}

.grid {
  display: grid;
  gap: 24px;
}

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

/* ---------- 5. SKIP LINK ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  display: inline-block;
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--cyan);
  color: #04241C;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  box-shadow: 0 12px 28px -14px rgba(25, 245, 198, 0.9);
  transform: translateY(-180%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- 6. HEADER / 刊头 ---------- */
.site-header {
  position: relative;
  z-index: 50;
  background: linear-gradient(180deg, rgba(11, 42, 32, 0.94) 0%, rgba(6, 26, 20, 0.78) 100%);
  border-bottom: 1px solid var(--line-1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.site-header__inner {
  padding-top: clamp(18px, 3vw, 30px);
  padding-bottom: 0;
}

.masthead {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

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

.masthead__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(25, 245, 198, 0.9);
}

.masthead__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.6vw, 62px);
  line-height: 1.02;
  letter-spacing: 0.06em;
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 0 38px rgba(25, 245, 198, 0.24);
  transition: color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}

.masthead__brand:hover { color: var(--cyan-soft); text-shadow: 0 0 48px rgba(25, 245, 198, 0.45); }

.masthead__tagline {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: var(--cyan-soft);
  opacity: 0.82;
}

/* --- 栏目带 --- */
.nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin-top: clamp(14px, 2.4vw, 22px);
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  background: linear-gradient(180deg, rgba(15, 61, 46, 0.42), rgba(6, 26, 20, 0.05));
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 34px);
}

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding: 18px 2px;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11px;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s var(--ease);
}

.primary-nav__link:hover,
.primary-nav__link:focus-visible { color: var(--white); }

.primary-nav__link:hover::after { transform: scaleX(1); }

.primary-nav__link[aria-current="page"] { color: var(--cyan); }

.primary-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  box-shadow: 0 0 12px rgba(25, 245, 198, 0.8);
}

.nav-cta {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

/* --- 移动导航按钮 --- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.16em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.18s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* --- 滚动进度 --- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 400;
  pointer-events: none;
  background: transparent;
}

.scroll-progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--ember));
  box-shadow: 0 0 14px rgba(25, 245, 198, 0.6);
}

/* ---------- 7. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease),
              box-shadow 0.18s var(--ease);
}

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

.btn--primary {
  background: var(--cyan);
  color: #04241C;
  box-shadow: 0 0 0 1px rgba(25, 245, 198, 0.45), 0 14px 34px -16px rgba(25, 245, 198, 0.7);
}

.btn--primary:hover { background: var(--cyan-soft); }

.btn--ghost {
  border-color: var(--line-2);
  color: var(--white);
  background: transparent;
}

.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); background: var(--cyan-a08); }

.btn--ember {
  background: var(--ember);
  color: #1A0600;
  box-shadow: 0 14px 34px -18px rgba(255, 77, 46, 0.8);
}

.btn--ember:hover { background: var(--ember-soft); }

/* ---------- 8. BREADCRUMBS ---------- */
.breadcrumbs {
  padding: 22px 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--line);
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.breadcrumbs a:hover { color: var(--cyan); }

.breadcrumbs [aria-current="page"] { color: var(--cyan-soft); }

/* ---------- 9. 画板 / 章节头 ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 61, 46, 0.58), rgba(11, 42, 32, 0.92));
  border: 1px solid var(--line-1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}

.section-head {
  display: grid;
  gap: 8px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line-1);
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--cyan);
}

.section-index::after {
  content: "";
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-title {
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: -0.005em;
}

.section-lede {
  max-width: 62ch;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- 10. 标签 / 数字 ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.chip--live {
  color: var(--ember-soft);
  border-color: rgba(255, 77, 46, 0.5);
  background: var(--ember-a10);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ---------- 11. 数据表 ---------- */
.data-table {
  width: 100%;
  font-size: 14px;
  border: 1px solid var(--line-1);
  border-radius: var(--radius);
  overflow: hidden;
}

.data-table th {
  padding: 11px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(15, 61, 46, 0.68);
  border-bottom: 1px solid var(--line-2);
}

.data-table td {
  padding: 13px 14px;
  color: var(--white);
  border-bottom: 1px solid var(--line-1);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table tbody tr { transition: background 0.16s var(--ease); }
.data-table tbody tr:hover { background: rgba(25, 245, 198, 0.05); }

/* ---------- 12. 图片容器基础 ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-1);
  border-radius: var(--radius);
  background:
    linear-gradient(140deg, rgba(15, 61, 46, 0.9), rgba(6, 26, 20, 0.95)),
    var(--panel);
}

.img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s var(--ease);
}

.img-frame--wide { aspect-ratio: 21 / 9; }
.img-frame--tall { aspect-ratio: 4 / 5; }
.img-frame--square { aspect-ratio: 1 / 1; }

.img-frame--edge { border-color: var(--line-2); box-shadow: var(--shadow-1); }

/* ---------- 13. 显现 / 筛选 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.is-filtered-out { display: none !important; }

/* [data-filter] 按钮激活态 */
[data-filter].is-active,
[data-filter][aria-pressed="true"] {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-a08);
}

/* 目录锚点当前态 */
[data-anchor-link][aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* ---------- 14. FOOTER ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(64px, 10vw, 128px);
  border-top: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(11, 42, 32, 0.92), rgba(4, 18, 14, 1));
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan) 22%, var(--ember) 78%, transparent);
  opacity: 0.55;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: clamp(32px, 5vw, 56px) 0 22px;
  border-bottom: 1px solid var(--line-1);
}

.footer__brand {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(25, 245, 198, 0.34);
  border-radius: 999px;
  background: var(--cyan-a08);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--cyan-soft);
  white-space: nowrap;
}

.footer__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(25, 245, 198, 0.9);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.7fr;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4vw, 48px) 0;
}

.footer__block { min-width: 0; }

.footer__heading {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__list { display: grid; gap: 2px; }

.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--white);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer__link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.18s var(--ease);
}

.footer__link:hover { color: var(--cyan); }
.footer__link:hover::before { width: 14px; }

.footer__link--sm { font-size: 12px; padding: 4px 0; }

.footer__contact {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.footer__contact-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
}

.footer__contact-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.footer__contact-val {
  color: var(--white);
  overflow-wrap: anywhere;
}

.footer__note {
  max-width: 46ch;
  padding-top: 14px;
  border-top: 1px solid var(--line-1);
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 20px 0 32px;
  border-top: 1px solid var(--line-1);
}

.footer__copy,
.footer__icp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

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

/* ---------- 15. RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__block--contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .nav-bar {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    min-height: 0;
    gap: 10px;
    padding: 10px 0 0;
  }

  .primary-nav {
    display: block;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s var(--ease);
  }

  .primary-nav[data-open="true"] { max-height: 520px; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 14px;
  }

  .primary-nav__link {
    display: block;
    padding: 14px 4px;
    font-size: 15px;
    border-bottom: 1px solid var(--line-1);
  }

  .primary-nav__link::after { display: none; }

  .primary-nav__link[aria-current="page"] {
    background: var(--cyan-a08);
    padding-left: 12px;
  }

  .nav-cta {
    position: static;
    transform: none;
  }

  .nav-cta:hover { transform: none; }

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

@media (max-width: 720px) {
  body { font-size: 15.5px; background-size: 56px 56px; }

  .masthead__kicker { font-size: 9.5px; letter-spacing: 0.26em; }
  .masthead__tagline { font-size: 10px; letter-spacing: 0.18em; }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer__block--contact { grid-column: auto; }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .footer__contact-item { grid-template-columns: 60px minmax(0, 1fr); }

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

@media (max-width: 480px) {
  .nav-cta { padding: 9px 14px; font-size: 12px; letter-spacing: 0.08em; }
  .nav-toggle { padding: 8px 12px; font-size: 11px; }
  .footer__badge { font-size: 10px; letter-spacing: 0.12em; padding: 5px 11px; }
  .data-table th,
  .data-table td { padding: 10px; }
}

/* ---------- 16. 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;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn:hover { transform: none; }
}
