/* =========================================================
   YT赛场 · 全站共享样式 /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, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ---------- 2. Tokens ---------- */
:root {
  --carbon: #08110E;
  --surface: #0F241D;
  --panel: #173A2F;
  --wine: #4A1330;
  --indigo: #1E1B45;
  --lime: #C7F250;
  --orange: #FF8B3D;
  --text: #F1F6F2;
  --muted: #9BB0A6;
  --line: #24443A;
  --line-soft: rgba(36, 68, 58, .6);
  --on-accent: #E8FBC0;

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

  --max: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 138px;

  --fs-1: clamp(2.2rem, 5.6vw, 3.6rem);
  --fs-2: clamp(1.85rem, 4.4vw, 2.75rem);
  --fs-3: clamp(1.5rem, 3.2vw, 2rem);
  --fs-4: clamp(1.2rem, 2.4vw, 1.5rem);
  --fs-5: 1.0625rem;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --shadow-soft: 0 1px 0 rgba(199, 242, 80, .05), 0 22px 48px -34px rgba(0, 0, 0, .95);
}

/* ---------- 3. Base ---------- */
html { scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .012em;
  background-color: var(--carbon);
  background-image:
    radial-gradient(1100px 560px at 82% -12%, rgba(199, 242, 80, .10), transparent 62%),
    radial-gradient(880px 520px at 4% 6%, rgba(30, 27, 69, .60), transparent 68%),
    linear-gradient(rgba(36, 68, 58, .22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 68, 58, .22) 1px, transparent 1px);
  background-size: auto, auto, 88px 88px, 88px 88px;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
}
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; letter-spacing: -.012em; }
h1 { font-size: var(--fs-1); }
h2 { font-size: var(--fs-2); }
h3 { font-size: var(--fs-3); }
h4 { font-size: var(--fs-4); }
p { line-height: 1.78; }
strong { color: var(--lime); font-weight: 700; }

/* ---------- 4. Layout helpers ---------- */
.wrap { width: min(var(--max), 100% - (2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: clamp(34px, 5.6vw, 70px); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.grid--split { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lime);
}
.section-head {
  display: grid;
  gap: 8px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
}
.section-head__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--orange);
}
.section-head__title { font-size: var(--fs-3); }
.section-head__lede { max-width: 60ch; color: var(--muted); font-size: 15px; }

.band {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  background: var(--surface);
}
.band--wine { background: linear-gradient(118deg, var(--wine), #260A1A 72%); border-color: #6B2347; }
.band--indigo { background: linear-gradient(118deg, var(--indigo), #0C0B22 72%); border-color: #3A3470; }
.band--panel { background: var(--panel); border-color: var(--line); }

.panel {
  padding: clamp(16px, 2vw, 26px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.aside-note {
  padding-left: 12px;
  border-left: 2px solid var(--orange);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- 5. Buttons & states ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn--primary { background: var(--lime); border-color: var(--lime); color: #0A1410; }
.btn--primary:hover { background: var(--on-accent); transform: translateY(-1px); }
.btn--ghost { background: rgba(23, 58, 47, .55); color: var(--text); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
[data-fav][aria-pressed="true"] {
  background: rgba(199, 242, 80, .16);
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- 6. Header ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -70px;
  z-index: 90;
  padding: 10px 16px;
  background: var(--lime);
  color: #0A1410;
  font-size: 13px;
  font-weight: 700;
  border-radius: 2px;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 10px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(8, 17, 14, .99), rgba(15, 36, 29, .96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  transition: box-shadow .24s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 1); }

/* 刷新提示带 */
.refresh-band {
  background: linear-gradient(90deg, rgba(30, 27, 69, .85), rgba(74, 19, 48, .55));
  border-bottom: 1px solid var(--line);
}
.refresh-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  width: min(var(--max), 100% - (2 * var(--gutter)));
  margin-inline: auto;
  padding: 5px 0;
}
.refresh-band__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--muted);
  transition: color .18s var(--ease);
}
.refresh-band__toggle:hover { color: var(--text); }
.refresh-band__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(199, 242, 80, .55); }
  70% { box-shadow: 0 0 0 10px rgba(199, 242, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(199, 242, 80, 0); }
}
.refresh-band__text { font-family: var(--font-mono); letter-spacing: .04em; }
.refresh-band__hint {
  color: var(--lime);
  border-bottom: 1px dashed rgba(199, 242, 80, .5);
}
.refresh-band__note {
  flex: 1 1 280px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* 主体三段式 */
.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  width: min(var(--max), 100% - (2 * var(--gutter)));
  margin-inline: auto;
  min-height: 66px;
  padding-block: 10px;
}
.header-brand { display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--lime);
  color: #0A1410;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  clip-path: polygon(0 0, 100% 0, 100% 74%, 76% 100%, 0 100%);
}
.brand__text { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.brand__name { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.brand__tag { font-size: 11.5px; color: var(--muted); letter-spacing: .06em; }
.brand--footer .brand__mark { width: 34px; height: 34px; font-size: 13px; }
.brand--footer .brand__name { font-size: 17px; }
.brand:hover .brand__mark { background: var(--on-accent); }

.lang-switch {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .04em;
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.lang-switch:hover { color: var(--lime); border-color: var(--lime); }
.lang-switch[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: #0A1410; }

.header-nav { justify-self: end; }
.nav-list { display: flex; align-items: center; gap: clamp(6px, 1.3vw, 20px); }
.nav-list__item { display: flex; }
.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  transition: color .18s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 3px;
  height: 2px;
  background: var(--lime);
  transition: right .22s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { right: 0; }
.nav-link[aria-current="page"] { color: var(--lime); }
.nav-link[aria-current="page"]::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.fav-btn:hover { border-color: var(--lime); color: var(--lime); }
.fav-btn__icon { color: var(--orange); font-size: 10px; line-height: 1; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.nav-toggle:hover { border-color: var(--lime); color: var(--lime); }
.nav-toggle__icon { position: relative; display: block; width: 16px; height: 10px; }
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
}
.nav-toggle__icon::before { top: 0; }
.nav-toggle__icon::after { bottom: 0; }

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .12s linear;
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 100px);
  background: linear-gradient(180deg, var(--surface), var(--carbon));
  border-top: 1px solid var(--line);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--wine), var(--indigo) 45%, var(--lime));
  opacity: .8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: clamp(20px, 3vw, 44px);
  width: min(var(--max), 100% - (2 * var(--gutter)));
  margin-inline: auto;
  padding: clamp(38px, 5vw, 66px) 0;
}
.footer-col { min-width: 0; }
.footer-col__title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lime);
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list a {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.footer-list a:hover { color: var(--text); border-bottom-color: var(--lime); }
.footer-list__plain { font-size: 14px; color: var(--muted); }
.footer-list--contact { gap: 14px; }
.footer-contact__key {
  display: block;
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}
.footer-contact__val {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  word-break: break-word;
}
.footer-contact__val--text { font-family: var(--font-sans); font-size: 14px; line-height: 1.6; }
.footer-note {
  margin-top: 14px;
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}
.footer-legal {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  padding: 9px 15px;
  border: 1px solid var(--lime);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lime);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.footer-cta:hover { background: var(--lime); color: #0A1410; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(var(--max), 100% - (2 * var(--gutter)));
  margin-inline: auto;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line);
}
.footer-bottom__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}
.footer-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 8. Float dock ---------- */
.float-dock {
  position: fixed;
  right: clamp(12px, 2vw, 26px);
  bottom: clamp(12px, 2vw, 26px);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(15, 36, 29, .95);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.dock-btn:hover { border-color: var(--lime); color: var(--lime); }
.dock-btn--top {
  font-family: var(--font-mono);
  opacity: .3;
  pointer-events: none;
  transform: translateY(6px);
}
.dock-btn--top.is-armed { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 9. Page primitives ---------- */
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li:not(:first-child)::before { content: "/"; margin-inline: 8px; color: #3A5B4E; }
.crumbs a:hover { color: var(--lime); }
.crumbs [aria-current="page"] { color: var(--text); }

.prose { max-width: 68ch; color: #DCE7E0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--fs-4); margin-top: 1.7em; color: var(--text); }
.prose h3 { font-size: var(--fs-5); font-weight: 700; margin-top: 1.4em; }
.prose li { position: relative; padding-left: 18px; margin-top: .5em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .68em;
  width: 7px;
  height: 2px;
  background: var(--orange);
}

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 4.4vw, 3rem);
  line-height: 1;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 12px; letter-spacing: .12em; color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(199, 242, 80, .35);
  border-radius: 2px;
  background: rgba(199, 242, 80, .12);
  color: var(--on-accent);
  font-size: 12px;
}

.index-list { border-top: 1px solid var(--line); }
.index-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.index-item__main { min-width: 0; }
.index-item__title { font-size: 17px; font-weight: 700; }
.index-item__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, rgba(36, 68, 58, .55) 0 1px, transparent 1px 12px);
}
.media-frame > img,
.media-frame > svg { width: 100%; height: 100%; object-fit: cover; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(8, 17, 14, .78));
  pointer-events: none;
}
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 16px);
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.toc__list { display: flex; flex-direction: column; gap: 10px; }
.toc__link {
  display: block;
  font-size: 13px;
  color: var(--muted);
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.toc__link:hover { color: var(--text); }
.toc__link[aria-current="true"] { color: var(--lime); transform: translateX(4px); }

/* ---------- 10. Reveal & motion ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 11. Responsive ---------- */
@media (max-width: 1100px) {
  .nav-list { gap: 10px; }
  .nav-link { font-size: 13px; }
  .brand__tag { display: none; }
}
@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .grid--split { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 900px) {
  :root { --header-h: 108px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; }
  .nav-toggle { display: inline-flex; }
  .header-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 5;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: linear-gradient(180deg, rgba(15, 36, 29, .99), rgba(8, 17, 14, .99));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 26px 40px -30px rgba(0, 0, 0, 1);
    transition: max-height .28s var(--ease), visibility .28s var(--ease);
  }
  .header-nav[data-open] {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    visibility: visible;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; }
  .nav-list__item { display: block; }
  .nav-link {
    display: block;
    padding: 14px var(--gutter);
    font-size: 15px;
    border-bottom: 1px solid var(--line-soft);
  }
  .nav-link::after { bottom: 0; }
  .nav-link[aria-current="page"] { background: rgba(199, 242, 80, .07); }
  .nav-link[aria-current="page"]::after { right: 0; }
  .refresh-band__note { border-left: 0; padding-left: 0; flex-basis: 100%; }
}
@media (max-width: 620px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); padding: 32px 0; }
  .footer-bottom { padding: 18px 0 96px; }
  .index-item { grid-template-columns: minmax(0, 1fr); }
  .fav-btn__label { display: none; }
  .fav-btn { padding: 9px 11px; }
  .footer-actions .fav-btn__label { display: inline; }
  .footer-actions { width: 100%; }
}
@media (max-width: 420px) {
  .lang-switch { padding: 6px 8px; font-size: 11.5px; }
  .brand__mark { width: 34px; height: 34px; font-size: 13px; }
  .brand__name { font-size: 17px; }
}

/* ---------- 12. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .dock-btn--top { opacity: 1; pointer-events: auto; transform: none; }
}
