/* ==========================================================
   球帝看台 · 共享样式表 /assets/site.css
   夜间看台的数据档案室：墨黑底、荧光数据色、等宽数字
   ========================================================== */

/* ---------- 1. 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, dl, dd, figure, blockquote {
  margin: 0;
}

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

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

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

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

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

/* ---------- 2. 设计变量 ---------- */
:root {
  --ink: #0B0E0C;
  --panel: #141A16;
  --line: #1E2620;
  --signal: #B6FF3C;
  --grass: #7ACC2B;
  --amber: #FFA32B;
  --amber-deep: #C96A00;
  --silver: #C9D1CC;
  --muted: #8A948E;
  --paper: #F2F5F1;

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

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --pill: 999px;

  --wrap: 1280px;
  --gutter: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 560px at 84% -10%, rgba(182, 255, 60, 0.08), transparent 62%),
    radial-gradient(820px 460px at 2% 4%, rgba(122, 204, 43, 0.055), transparent 62%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--silver);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  color: var(--paper);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

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

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

::selection {
  background: var(--signal);
  color: var(--ink);
}

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

#main-content { scroll-margin-top: 140px; }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 11px 20px;
  border-radius: var(--pill);
  background: var(--signal);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: top 0.22s var(--ease);
}

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

/* ---------- 5. 通用容器与章节 ---------- */
.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.section { padding: clamp(44px, 7vw, 92px) 0; }
.section--tight { padding: clamp(26px, 4vw, 52px) 0; }

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(22px, 3vw, 38px);
}

.section-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.section-title {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 900;
}

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

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  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);
}

.btn--sm { padding: 10px 18px; font-size: 13px; }

.btn--primary {
  background: var(--signal);
  color: var(--ink);
}

.btn--primary:hover { background: var(--paper); transform: translateY(-1px); }

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

.btn--ghost:hover {
  background: var(--line);
  border-color: var(--grass);
  color: var(--paper);
}

/* ---------- 7. 头部外壳 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 14, 12, 0.94);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header {
    background: rgba(11, 14, 12, 0.82);
    backdrop-filter: blur(14px) saturate(120%);
  }
}

.site-header__inner {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.site-header__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  padding: 18px 0 14px;
}

.header-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.header-note__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(182, 255, 60, 0.14);
}

.masthead {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 0 10px;
  text-align: center;
}

.masthead__name {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.22em;
  padding-left: 0.22em;
  color: var(--paper);
  transition: color 0.2s var(--ease);
}

.masthead:hover .masthead__name,
.masthead:focus-visible .masthead__name { color: var(--signal); }

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

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  color: var(--silver);
  font-size: 13px;
  font-weight: 800;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
              border-color 0.2s var(--ease);
}

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s var(--ease), top 0.22s var(--ease),
              bottom 0.22s var(--ease);
}

.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { bottom: 0; }

.nav-toggle__label { letter-spacing: 0.06em; }

.site-header[data-open="true"] { background: var(--ink); }

.site-header[data-open="true"] .nav-toggle {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}

.site-header[data-open="true"] .nav-toggle__bars::before {
  top: 4px;
  transform: rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle__bars::after {
  bottom: 4px;
  transform: rotate(-45deg);
}

/* ---------- 8. 导航条 ---------- */
.site-header__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.site-header__bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(182, 255, 60, 0.55), transparent);
  opacity: 0.6;
  pointer-events: none;
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

.primary-nav__link {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--pill);
  font-size: 14px;
  font-weight: 700;
  color: var(--silver);
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.primary-nav__link:hover {
  background: var(--line);
  color: var(--paper);
}

.primary-nav__link[aria-current="page"] {
  background: var(--signal);
  color: var(--ink);
  font-weight: 800;
}

.search-hint {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  padding: 8px 16px;
  border: 1px dashed var(--line);
  border-radius: var(--pill);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.search-hint:hover {
  border-color: var(--grass);
  color: var(--silver);
}

.search-hint__label {
  flex: none;
  letter-spacing: 0.12em;
  color: var(--signal);
}

.search-hint__text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 100px);
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--silver);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--signal), var(--grass), transparent);
  opacity: 0.7;
}

.site-footer__inner {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) 0 26px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
  gap: clamp(32px, 5vw, 80px);
}

.footer-brand__name {
  display: inline-block;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: var(--paper);
  transition: color 0.2s var(--ease);
}

.footer-brand__name:hover { color: var(--signal); }

.footer-brand__line {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-brand__note {
  max-width: 34em;
  margin-top: 18px;
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}

.footer-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-facts__item {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.footer-facts__value {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--signal);
}

.footer-facts__label {
  font-size: 12px;
  color: var(--muted);
}

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

.footer-nav__col-title {
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
}

.footer-nav__list {
  display: grid;
  gap: 11px;
}

.footer-nav__link {
  display: inline-block;
  font-size: 14px;
  color: var(--silver);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.footer-nav__link:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(32px, 5vw, 58px);
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink);
}

.footer-contact__item {
  display: grid;
  gap: 9px;
  align-content: start;
  min-width: 0;
}

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

.footer-contact__value {
  font-size: 14px;
  line-height: 1.7;
  color: var(--paper);
  overflow-wrap: anywhere;
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 15px;
  border: 1px dashed var(--line);
  border-radius: var(--pill);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--paper);
  overflow-wrap: anywhere;
  text-align: left;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
              background 0.18s var(--ease);
}

.copy-chip:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.copy-chip[data-copied="true"] {
  border-style: solid;
  border-color: var(--grass);
  background: rgba(122, 204, 43, 0.12);
  color: var(--grass);
}

.footer-service-note {
  margin-top: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--amber);
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-legal {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- 10. 返回顶部与复制提示 ---------- */
.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--signal);
  font-size: 17px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
              visibility 0.28s linear, border-color 0.2s var(--ease);
}

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

.to-top:hover { border-color: var(--signal); }

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  z-index: 120;
  padding: 11px 22px;
  border-radius: var(--pill);
  background: var(--signal);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease),
              visibility 0.24s linear;
}

.copy-toast[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* ---------- 11. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--panel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--silver);
  white-space: nowrap;
}

.tag--signal {
  border-color: rgba(182, 255, 60, 0.42);
  background: rgba(182, 255, 60, 0.1);
  color: var(--signal);
}

.tag--grass {
  border-color: rgba(122, 204, 43, 0.42);
  background: rgba(122, 204, 43, 0.1);
  color: var(--grass);
}

.tag--amber {
  border-color: rgba(255, 163, 43, 0.42);
  background: rgba(255, 163, 43, 0.1);
  color: var(--amber);
}

.tag--muted { color: var(--muted); }

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumb__item:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--line);
}

.breadcrumb__link { color: var(--muted); }

.breadcrumb__link:hover { color: var(--signal); }

.breadcrumb__current { color: var(--silver); }

/* ---------- 13. 长文阅读区 ---------- */
.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.9;
  color: var(--silver);
}

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

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(20px, 2.4vw, 26px);
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 18px;
}

.prose a {
  color: var(--signal);
  border-bottom: 1px solid rgba(182, 255, 60, 0.4);
}

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

.prose ol { list-style: decimal; }

.prose--wide {
  max-width: 74ch;
  font-size: 18px;
}

/* ---------- 14. 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

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

/* ---------- 15. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--panel) 0%, var(--ink) 64%);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(182, 255, 60, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 255, 60, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.8;
}

.media-frame__img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__cap {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: rgba(11, 14, 12, 0.78);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--silver);
}

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

/* ---------- 16. 滚动显现协议 ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease);
}

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

/* ---------- 17. 响应式：平板与移动 ---------- */
@media (max-width: 1024px) {
  .site-header__top {
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 14px 0;
  }

  .header-note { display: none; }
  .header-actions { display: none; }
  .nav-toggle { display: inline-flex; }

  .masthead {
    justify-items: start;
    padding: 0;
    text-align: left;
  }

  .masthead__name {
    font-size: 25px;
    letter-spacing: 0.16em;
    padding-left: 0.16em;
  }

  .masthead__line { text-align: left; }

  .site-header__bar {
    display: block;
    padding: 0;
  }

  .primary-nav {
    display: none;
    padding: 12px 0 6px;
  }

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

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

  .primary-nav__link {
    display: block;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    font-size: 15px;
  }

  .primary-nav__link[aria-current="page"] {
    border-color: var(--signal);
    background: var(--signal);
    color: var(--ink);
  }

  .search-hint {
    display: flex;
    justify-self: auto;
    max-width: none;
    margin: 8px 0 14px;
  }

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

  .footer-main { grid-template-columns: 1fr; }
  .footer-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body { background-attachment: scroll; }

  .grid--2,
  .grid--3 { grid-template-columns: 1fr; }

  .footer-nav {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

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

  .copy-toast {
    left: 18px;
    right: 18px;
    transform: translate(0, 14px);
    text-align: center;
    overflow-wrap: anywhere;
  }

  .copy-toast[data-visible="true"] { transform: translate(0, 0); }
}

/* ---------- 18. 降低动效 ---------- */
@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;
  }

  .js-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .btn--primary:hover { transform: none; }
}
