/* ============================================================
   星空体育 · 共享站点样式 /assets/site.css
   母题：夜航星图 —— 深空蓝底、1px 轨道网格、星芒金节点
   ============================================================ */

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

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

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

ul, ol { list-style: none; }

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

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

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

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

/* ---------- 变量 ---------- */
:root {
  --deep-space: #0A1730;
  --night-blue: #102449;
  --nebula-blue: #1C3D6E;
  --orbit-gray: #6E86A8;
  --stardust: #EEF3FB;
  --mist: #B7C6DC;
  --star-gold: #F3C462;
  --signal-orange: #FF7A3D;
  --aurora: #5BE0D0;
  --void: #050912;

  --grid-line: rgba(110, 134, 168, 0.16);
  --hairline: rgba(110, 134, 168, 0.28);
  --hairline-soft: rgba(110, 134, 168, 0.14);

  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", "SFMono-Regular", "Menlo", "Consolas", monospace;

  --maxw: 1360px;
  --gutter: 48px;
  --baseline: 24px;
  --header-h: 64px;

  --shadow-lift: 0 28px 56px -34px rgba(0, 0, 0, 0.92);
  --shadow-panel: 0 18px 40px -30px rgba(0, 0, 0, 0.8);
}

/* ---------- 基础排版 ---------- */
body {
  background-color: var(--deep-space);
  color: var(--stardust);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  padding-top: var(--header-h);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 精密网格层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to bottom, var(--grid-line) 0 1px, transparent 1px var(--baseline)),
    repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px calc(100% / 12));
  opacity: 0.5;
}

/* 星点层 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 8% 22%, rgba(238, 243, 251, 0.6), transparent 100%),
    radial-gradient(1.4px 1.4px at 27% 9%, rgba(243, 196, 98, 0.7), transparent 100%),
    radial-gradient(1.4px 1.4px at 62% 15%, rgba(238, 243, 251, 0.45), transparent 100%),
    radial-gradient(1.6px 1.6px at 88% 27%, rgba(91, 224, 208, 0.5), transparent 100%),
    radial-gradient(1.4px 1.4px at 45% 68%, rgba(238, 243, 251, 0.35), transparent 100%),
    radial-gradient(1.4px 1.4px at 76% 84%, rgba(243, 196, 98, 0.45), transparent 100%),
    radial-gradient(1.4px 1.4px at 17% 89%, rgba(238, 243, 251, 0.3), transparent 100%),
    radial-gradient(1.4px 1.4px at 94% 62%, rgba(255, 122, 61, 0.4), transparent 100%);
  opacity: 0.85;
}

body.nav-open { overflow: hidden; }

#main-content {
  position: relative;
  z-index: 2;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.32;
}

p { color: var(--mist); }

strong { color: var(--stardust); font-weight: 700; }

/* ---------- 焦点与动效偏好 ---------- */
:focus-visible {
  outline: 2px solid var(--aurora);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 30;
  padding: 12px 20px;
  background: var(--star-gold);
  color: var(--void);
  font-size: 14px;
  letter-spacing: 0.14em;
  transition: top 0.2s ease-out;
}

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

/* ---------- 布局容器 ---------- */
.container {
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: 96px 0;
}

.section--tight { padding: 56px 0; }

.section--void {
  background: var(--deep-space);
  min-height: 160px;
  padding: 120px 0;
}

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

.hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--hairline), rgba(110, 134, 168, 0.04));
  border: 0;
}

/* ---------- 章节体系 ---------- */
.chapter { position: relative; }

.chapter-head {
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--baseline);
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--hairline-soft);
}

.chapter-index {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 46px;
  line-height: 1;
  color: var(--star-gold);
  letter-spacing: 0.02em;
}

.chapter-title {
  font-size: clamp(26px, 3vw, 38px);
  color: var(--stardust);
}

.chapter-note {
  position: absolute;
  left: -64px;
  top: 4px;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--mist);
  opacity: 0.85;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--orbit-gray);
}

.lede {
  font-size: 18px;
  line-height: 2;
  color: var(--mist);
  max-width: 62ch;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 1px solid var(--orbit-gray);
  background: transparent;
  color: var(--stardust);
  font-size: 14px;
  letter-spacing: 0.14em;
  line-height: 1.4;
  transition: background-color 0.28s ease-out, border-color 0.28s ease-out, color 0.28s ease-out, transform 0.28s ease-out;
}

.btn::after {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
  transition: width 0.28s ease-out;
}

.btn:hover {
  border-color: var(--stardust);
  background: rgba(28, 61, 110, 0.55);
}

.btn:hover::after { width: 24px; }

.btn--primary {
  border-color: var(--star-gold);
  color: var(--star-gold);
  background: linear-gradient(120deg, rgba(243, 196, 98, 0.14), rgba(91, 224, 208, 0.06));
}

.btn--primary:hover {
  background: linear-gradient(120deg, rgba(243, 196, 98, 0.24), rgba(91, 224, 208, 0.1));
  border-color: var(--star-gold);
  color: var(--star-gold);
}

.btn--ghost {
  border-color: var(--hairline);
  color: var(--mist);
}

.btn--ghost:hover {
  border-color: var(--aurora);
  color: var(--stardust);
}

/* ---------- 标签与状态 ---------- */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--hairline);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  line-height: 1.7;
}

.tag--done {
  border-color: rgba(243, 196, 98, 0.55);
  color: var(--star-gold);
}

.tag--live {
  border-color: rgba(255, 122, 61, 0.7);
  color: var(--signal-orange);
}

.tag--live::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  background: var(--signal-orange);
  vertical-align: 2px;
}

/* ---------- 面板与卡片 ---------- */
.panel {
  position: relative;
  padding: 32px;
  background: linear-gradient(180deg, var(--night-blue), var(--deep-space));
  border: 1px solid var(--nebula-blue);
  box-shadow: var(--shadow-panel);
}

.card {
  position: relative;
  padding: 28px;
  background: var(--night-blue);
  border: 1px solid var(--hairline);
}

.card--overlap {
  border-color: var(--nebula-blue);
  box-shadow: var(--shadow-lift);
}

/* ---------- 统计数字 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 16px;
  border-left: 1px solid var(--hairline);
}

.stat-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  color: var(--stardust);
  letter-spacing: 0.02em;
}

.stat-label {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--orbit-gray);
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline-soft);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--orbit-gray);
}

.breadcrumb-item a { color: var(--mist); }
.breadcrumb-item a:hover { color: var(--star-gold); }

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 10px;
  color: var(--orbit-gray);
  opacity: 0.6;
}

/* ---------- 长文 ---------- */
.prose {
  max-width: 72ch;
  font-size: 17px;
  line-height: 2.05;
  color: var(--mist);
}

.prose > * + * { margin-top: 1.4em; }

.prose h2 {
  font-size: 24px;
  color: var(--stardust);
  margin-top: 2.2em;
}

.prose h3 {
  font-size: 19px;
  color: var(--star-gold);
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  list-style: disc;
  padding-left: 1.4em;
}

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.6em; }

.prose a {
  color: var(--star-gold);
  border-bottom: 1px solid rgba(243, 196, 98, 0.4);
}

.prose blockquote {
  padding-left: 20px;
  border-left: 1px solid var(--star-gold);
  color: var(--mist);
}

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(160deg, var(--night-blue), var(--void));
  border: 1px solid var(--hairline);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 9, 18, 0.12), rgba(5, 9, 18, 0.72));
}

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

.media-figure { position: relative; }

.media-caption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--orbit-gray);
}

/* ---------- 标签页 ---------- */
.tabs { position: relative; }

.tabs-list {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline);
}

.tab {
  padding: 14px 24px;
  border-bottom: 2px solid transparent;
  color: var(--mist);
  font-size: 14px;
  letter-spacing: 0.14em;
  transition: color 0.25s ease-out, border-color 0.25s ease-out;
}

.tab:hover { color: var(--stardust); }

.tab[aria-selected="true"] {
  color: var(--star-gold);
  border-bottom-color: var(--star-gold);
}

.tabpanel { padding-top: 28px; }

.tabpanel[hidden] { display: none; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 9;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--star-gold), var(--signal-orange) 55%, var(--aurora));
  pointer-events: none;
}

/* ---------- 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* ============================================================
   头部（框架式导航：导航即边框）
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  background: rgba(10, 23, 48, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.header-rail {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: var(--maxw);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--star-gold), rgba(243, 196, 98, 0) 42%, rgba(110, 134, 168, 0.4));
}

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

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--star-gold);
  flex: 0 0 auto;
}

.brand-mark::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--star-gold);
  transform: rotate(45deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(110, 134, 168, 0.3);
  pointer-events: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.18em;
  color: var(--stardust);
}

.brand-tagline {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--mist);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.search-entry {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 168px;
  padding: 7px 16px 7px 14px;
  border-left: 1px solid rgba(110, 134, 168, 0.45);
  transition: background-color 0.28s ease-out, border-color 0.28s ease-out;
}

.search-entry:hover {
  background: rgba(28, 61, 110, 0.5);
  border-left-color: var(--star-gold);
}

.search-entry-label {
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--stardust);
}

.search-entry-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--orbit-gray);
}

.site-nav { position: relative; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  display: block;
  padding: 6px 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--mist);
  transition: color 0.25s ease-out;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--star-gold);
  transition: right 0.3s ease-out;
}

.nav-link:hover { color: var(--stardust); }
.nav-link:hover::after { right: 0; }

.nav-link[aria-current="page"] { color: var(--star-gold); }
.nav-link[aria-current="page"]::after { right: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--hairline);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease-out, top 0.25s ease-out, opacity 0.25s ease-out;
}

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

[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars { background: transparent; }
[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
[data-nav-toggle][aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

/* ---------- 画面垂轨 ---------- */
.frame-rail {
  position: fixed;
  top: var(--header-h);
  bottom: 0;
  width: 1px;
  z-index: 7;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(110, 134, 168, 0.5), rgba(110, 134, 168, 0.06));
}

.frame-rail--left { left: max(0px, calc((100vw - var(--maxw)) / 2)); }
.frame-rail--right { right: max(0px, calc((100vw - var(--maxw)) / 2)); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 3;
  margin-top: 0;
  padding: 72px 0 32px;
  background: var(--void);
  border-top: 1px solid var(--star-gold);
}

.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: 0.16em;
  color: var(--stardust);
}

.footer-brand-line {
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.footer-brand-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--orbit-gray);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 44px;
  padding-top: 40px;
  border-top: 1px solid var(--hairline-soft);
}

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

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--star-gold);
  line-height: 1.8;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.footer-list a {
  font-size: 15px;
  color: var(--mist);
  transition: color 0.25s ease-out, padding-left 0.25s ease-out;
}

.footer-list a:hover {
  color: var(--stardust);
  padding-left: 6px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--mist);
  word-break: break-word;
}

.footer-contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--orbit-gray);
}

.footer-note {
  max-width: 88ch;
  margin-top: 44px;
  padding-left: 20px;
  border-left: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 2;
  color: var(--orbit-gray);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--orbit-gray);
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1200px) {
  :root { --gutter: 36px; }
  .search-entry { min-width: 140px; }
  .nav-list { gap: 20px; }
}

@media (max-width: 1080px) {
  :root { --gutter: 28px; }

  .chapter-note { display: none; }

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

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 9;
    padding: 12px var(--gutter) 32px;
    background: var(--night-blue);
    border-bottom: 1px solid var(--nebula-blue);
    border-top: 1px solid var(--hairline-soft);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

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

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

  .nav-link {
    padding: 15px 0;
    font-size: 16px;
    letter-spacing: 0.18em;
    border-bottom: 1px solid var(--hairline-soft);
  }

  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] { color: var(--star-gold); }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
}

@media (max-width: 860px) {
  body::before { opacity: 0.28; }

  .search-entry { display: none; }

  .section { padding: 72px 0; }
  .section--void { padding: 96px 0; min-height: 140px; }

  .chapter-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .chapter-index { font-size: 36px; }

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

  .frame-rail { display: none; }

  .footer-brand-name { font-size: 26px; }
}

@media (max-width: 600px) {
  :root { --gutter: 20px; }

  body { font-size: 16px; }

  .header-rail { gap: 14px; }

  .brand-tagline { display: none; }

  .brand-name { font-size: 17px; letter-spacing: 0.14em; }

  .nav-toggle-text { display: none; }

  .section { padding: 56px 0; }
  .section--void { padding: 80px 0; min-height: 120px; }

  .panel, .card { padding: 22px; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 动效偏好 ---------- */
@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .scroll-progress { display: none; }
}
