/* ==========================================================================
   完美体育CN · /assets/site.css
   夜间数据舱共享外壳：reset、变量、中文排版、头部、页脚、通用组件
   ========================================================================== */

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

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

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

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

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

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

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

table { border-collapse: collapse; width: 100%; }

/* ---------- 变量 ---------- */
:root {
  --ink: #0A101C;
  --panel: #101A2B;
  --panel-2: #16223A;
  --plum: #241F3A;
  --cyan: #35E0D0;
  --cyan-deep: #0E6A66;
  --amber: #FFA53C;
  --amber-deep: #8A5A1C;
  --lilac: #8E86C9;
  --line: #223049;
  --grid: #16223A;
  --text: #EFF3FA;
  --text-2: #A7AEC6;

  --league-1: #3FE0A8;
  --league-2: #6C8CFF;
  --league-3: #D46BB0;
  --league-4: #FFB15C;

  --shell: 1440px;
  --gutter: 24px;
  --radius: 2px;
  --pill: 999px;

  --font-cn: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-cn);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(53, 224, 208, .05), rgba(10, 16, 28, 0) 420px),
    var(--ink);
  -webkit-font-smoothing: antialiased;
}

p { margin-block: 0 1em; }
p:last-child { margin-bottom: 0; }

strong, b { font-weight: 700; }

::selection { background: rgba(53, 224, 208, .28); color: var(--text); }

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

/* ---------- 尺度工具类 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 64px; }
.section--tight { padding-block: 40px; }

.display-xl {
  font-size: clamp(44px, 7.4vw, 96px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.02em;
}

.h1 {
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -.02em;
}

.h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
}

.h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.lead {
  font-size: 17px;
  color: var(--text-2);
  max-width: 720px;
}

.index-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lilac);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  font-size: 1.15em;
  letter-spacing: -.01em;
}

.is-num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-2 { color: var(--text-2); }

.hairline {
  height: 1px;
  border: 0;
  background: var(--line);
}

/* ---------- 网格底纹 ---------- */
.grid-field { position: relative; isolation: isolate; }

.grid-field::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .38;
  pointer-events: none;
}

/* ---------- 框景与面板 ---------- */
.frame {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(16, 26, 43, .6);
}

.frame::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 9px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  opacity: .9;
  pointer-events: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel--plum { background: var(--plum); }

.panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.panel__body { padding: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease);
}

.btn--primary { background: var(--cyan); color: #04121A; }
.btn--primary:hover { background: #5CF0E2; }

.btn--ghost {
  border-color: rgba(53, 224, 208, .45);
  background: rgba(53, 224, 208, .06);
  color: var(--cyan);
}
.btn--ghost:hover { background: rgba(53, 224, 208, .16); }

.btn--amber {
  border-color: rgba(255, 165, 60, .5);
  background: rgba(255, 165, 60, .07);
  color: var(--amber);
}
.btn--amber:hover { background: rgba(255, 165, 60, .16); }

.btn--quiet { border-color: var(--line); color: var(--text-2); }
.btn--quiet:hover { border-color: var(--lilac); color: var(--text); }

/* ---------- 标记与识别点 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.4;
  color: var(--text-2);
  background: rgba(22, 34, 58, .5);
}

.tag--cyan { border-color: rgba(53, 224, 208, .45); color: var(--cyan); }
.tag--amber { border-color: rgba(255, 165, 60, .45); color: var(--amber); }
.tag--lilac { border-color: rgba(142, 134, 201, .5); color: var(--lilac); }

.league-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--cyan));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
}

.league-dot--1 { --dot: var(--league-1); }
.league-dot--2 { --dot: var(--league-2); }
.league-dot--3 { --dot: var(--league-3); }
.league-dot--4 { --dot: var(--league-4); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-2);
}

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

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

/* ---------- 栅格骨架 ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.layout-rail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.layout-rail__aside { position: sticky; top: 132px; }

/* ---------- 数据表 ---------- */
.data-table { font-size: 14px; }

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--text-2);
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  height: 36px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(34, 48, 73, .55);
}

.data-table tbody tr:nth-child(even) { background: rgba(22, 34, 58, .35); }
.data-table tbody tr:hover { background: rgba(53, 224, 208, .06); }

.data-table .is-num { text-align: right; }

.empty-state {
  padding: 32px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- 图片容器基础（页面阶段放占位） ---------- */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(53, 224, 208, .14), rgba(10, 16, 28, 0) 60%),
    linear-gradient(135deg, var(--panel) 0%, var(--plum) 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(53, 224, 208, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 224, 208, .07) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--text-2);
  background: linear-gradient(180deg, rgba(10, 16, 28, 0), rgba(10, 16, 28, .92));
}

.media--wide { aspect-ratio: 16 / 9; }
.media--square { aspect-ratio: 1 / 1; }
.media--tall { aspect-ratio: 3 / 4; }
.media--banner { aspect-ratio: 21 / 9; }

/* ---------- 显现动效 ---------- */
html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

html.has-js [data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

/* ---------- 章节索引（页面阶段使用 data-toc） ---------- */
[data-toc] {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line);
}

[data-toc] a {
  padding: 6px 0 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

[data-toc] a:hover { color: var(--text); }

[data-toc] a[aria-current="true"] {
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* ==========================================================================
   头部
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -72px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--cyan);
  color: #04121A;
  font-size: 14px;
  font-weight: 700;
  transition: top .2s var(--ease);
}

.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(10, 16, 28, .97), rgba(10, 16, 28, .88));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* 顶部转播字幕条 */
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px var(--gutter);
  border-bottom: 1px solid rgba(34, 48, 73, .7);
}

.status-strip__live {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
}

.status-strip__text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.4;
  color: var(--text-2);
  white-space: nowrap;
}

.pulse-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  animation: hud-pulse 3s var(--ease) infinite;
}

@keyframes hud-pulse {
  0% { box-shadow: 0 0 0 0 rgba(53, 224, 208, .55); }
  70% { box-shadow: 0 0 0 10px rgba(53, 224, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 224, 208, 0); }
}

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

.utility-nav__link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--text-2);
  transition: color .2s var(--ease);
}

.utility-nav__link:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 悬浮胶囊控制岛 */
.nav-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px var(--gutter);
}

.nav-shell__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(16, 26, 43, .86);
  box-shadow: 0 18px 40px rgba(4, 8, 16, .45);
  transition: padding .28s var(--ease), background-color .28s var(--ease);
}

.site-header[data-compact="true"] .status-strip { display: none; }

.site-header[data-compact="true"] .nav-shell { padding-block: 8px; }

.site-header[data-compact="true"] .nav-shell__inner {
  padding: 5px 14px;
  background: rgba(16, 26, 43, .95);
}

.site-header[data-compact="true"] .brand__sub { display: none; }

.site-header[data-compact="true"] .primary-nav__link {
  padding-block: 7px;
  font-size: 13px;
}

/* 品牌舱标 */
.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: none;
}

.brand__mark {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--text);
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--lilac);
  line-height: 1.2;
}

.brand:hover .brand__mark { color: var(--cyan); }

/* 主导航 */
.primary-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-2);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}

.primary-nav__link:hover {
  color: var(--text);
  background: rgba(53, 224, 208, .08);
}

.primary-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 224, 208, .12);
  box-shadow: inset 0 0 0 1px rgba(53, 224, 208, .42);
}

/* 导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--text-2);
}

.nav-toggle[aria-expanded="true"] {
  color: var(--cyan);
  border-color: rgba(53, 224, 208, .5);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform .24s var(--ease);
}

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

.nav-shell__cta { flex: none; }

/* 阅读进度线 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  position: relative;
  margin-top: 96px;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(36, 31, 58, .85), rgba(10, 16, 28, 0) 62%),
    linear-gradient(180deg, var(--ink), var(--panel));
  color: var(--text);
}

.footer-rule {
  height: 9px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 16px);
  opacity: .85;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 56px var(--gutter) 36px;
}

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }

.brand--footer { flex-direction: row; align-items: baseline; gap: 10px; }

.footer-note {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-2);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.footer-meta__item { display: flex; align-items: baseline; gap: 10px; }

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

.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--lilac);
}

.footer-col__list { display: flex; flex-direction: column; gap: 10px; }

.footer-col__link {
  font-size: 14px;
  color: var(--text-2);
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.footer-col__link:hover { color: var(--cyan); }

.footer-contact { gap: 8px; }

.footer-contact__line {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-2);
  word-break: break-word;
}

.footer-contact__note {
  margin-top: 14px;
  padding-left: 12px;
  border-left: 2px solid var(--amber-deep);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 18px var(--gutter) 32px;
  border-top: 1px solid var(--line);
}

.footer-base__legal,
.footer-base__copy {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-2);
}

.footer-base__copy { font-family: var(--font-mono); letter-spacing: .04em; }

/* 返回顶部 */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 70;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(16, 26, 43, .92);
  color: var(--cyan);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { border-color: rgba(53, 224, 208, .55); }

.to-top__arrow { font-size: 17px; line-height: 1; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1240px) {
  .layout-rail { grid-template-columns: 208px minmax(0, 1fr); }
  .layout-rail__aside--right { display: none; }
}

@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --gutter: 18px; }

  .nav-toggle { display: inline-flex; order: 3; }
  .brand { order: 1; }
  .nav-shell__cta { order: 2; margin-left: auto; }

  .primary-nav {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 70;
    max-height: 70vh;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0D1626;
    box-shadow: 0 28px 56px rgba(4, 8, 16, .65);
  }

  .primary-nav[data-open] { display: block; }

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

  .primary-nav__link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 12px;
    border-radius: var(--radius);
    font-size: 16px;
    border-bottom: 1px solid rgba(34, 48, 73, .7);
    box-shadow: none;
  }

  .primary-nav__list li:last-child .primary-nav__link { border-bottom: 0; }

  .primary-nav__link[aria-current="page"] {
    background: rgba(53, 224, 208, .1);
    box-shadow: inset 2px 0 0 var(--cyan);
  }

  .site-header[data-compact="true"] .primary-nav__link { padding-block: 14px; }

  .layout-rail { grid-template-columns: minmax(0, 1fr); }
  .layout-rail__aside { position: static; }

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

@media (max-width: 760px) {
  html { scroll-padding-top: 104px; }

  .section { padding-block: 48px; }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 44px 28px;
  }

  .footer-col--contact { grid-column: auto; }

  .footer-base { padding-bottom: 88px; }

  .utility-nav__list { gap: 14px; }
}

@media (max-width: 560px) {
  .brand__sub { display: none; }
  .status-strip__text { font-size: 10px; letter-spacing: .08em; }
  .nav-shell__cta { padding: 8px 12px; font-size: 13px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   可访问性：减少动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .pulse-dot { animation: none; }

  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .primary-nav__link,
  .footer-col__link,
  .to-top,
  .skip-link,
  .nav-toggle__bars span {
    transition: none;
  }
}
