/* ============================================================
   FB赛场 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
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 { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

:root {
  --ink: #05070A;
  --panel: #0B1015;
  --panel-2: #141C24;
  --text: #EAF2EE;
  --muted: #93A2AB;
  --accent: #C6FF3D;
  --data: #2FD4FF;
  --alert: #FF7A2F;
  --tint: #0F2418;
  --line: #22303A;

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

  --container: 1320px;
  --gutter: 24px;
  --header-h: 84px;
  --header-h-compact: 56px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-soft: 0 18px 40px rgba(5, 7, 10, 0.55);
}

html { scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(16px, 0.95rem + 0.2vw, 18px);
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

body.has-nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 7vw, 6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); line-height: 1.28; }
h4 { font-size: 1.05rem; line-height: 1.35; letter-spacing: 0; }

/* ----------------------------- 布局 ----------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 104px); }
.section--tight { padding-block: clamp(28px, 4vw, 56px); }

.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 62ch; margin-bottom: clamp(24px, 3vw, 44px); }
.section-title { margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede { color: var(--muted); font-size: 1.05rem; max-width: 60ch; }
.prose { max-width: 68ch; }
.prose p + p { margin-top: 1.2em; }
.prose h3 { margin-top: 1.6em; margin-bottom: 0.5em; }
.prose ul { margin-top: 0.8em; }
.prose li { position: relative; padding-left: 1.4em; margin-bottom: 0.45em; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 1px; background: var(--accent); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}
.grid--drop > *:nth-child(even) { margin-top: 48px; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* ----------------------------- 头部 ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 7, 10, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-compact { background: rgba(5, 7, 10, 0.96); }

.header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  background: transparent;
}
.header__progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--data));
}

.header__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: min-height 0.32s var(--ease);
}
.site-header.is-compact .header__inner { min-height: var(--header-h-compact); }

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  color: var(--accent);
  background: var(--tint);
  border: 1px solid rgba(198, 255, 61, 0.42);
  border-radius: 2px;
  transform: skewX(-8deg);
}
.site-header.is-compact .brand__mark { width: 34px; height: 34px; font-size: 0.85rem; }
.brand__text { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.brand__name { font-weight: 900; font-size: 1.16rem; letter-spacing: -0.02em; white-space: nowrap; }
.brand__tag {
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  max-width: 140px;
  overflow: hidden;
  transition: opacity 0.28s var(--ease), max-width 0.28s var(--ease), padding 0.28s var(--ease);
}
.site-header.is-compact .brand__tag { opacity: 0; max-width: 0; padding-left: 0; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--panel);
  z-index: 80;
}
.nav-toggle[aria-expanded="true"] { color: var(--accent); border-color: rgba(198, 255, 61, 0.5); }
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; }
.nav-toggle__bars i { display: block; width: 18px; height: 2px; background: currentColor; }
.nav-toggle__label { line-height: 1; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.26s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.32s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--accent); font-weight: 700; }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__aside {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.nav__ghost {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--data);
  border-bottom: 1px solid transparent;
  transition: border-color 0.26s var(--ease);
}
.nav__ghost:hover { border-bottom-color: var(--data); }

/* ----------------------------- 按钮 ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.26s var(--ease), background 0.26s var(--ease), color 0.26s var(--ease), border-color 0.26s var(--ease), box-shadow 0.26s var(--ease);
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(198, 255, 61, 0.22); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn--ghost:hover { transform: translateY(-2px); border-color: rgba(198, 255, 61, 0.55); color: var(--accent); }
.btn--sm { padding: 9px 16px; font-size: 0.83rem; }

/* ----------------------------- 页脚 ----------------------------- */
.site-footer {
  margin-top: clamp(56px, 8vw, 120px);
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--text);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
  padding-block: clamp(40px, 6vw, 72px);
}
.footer__brand { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.footer__mark { font-weight: 900; font-size: 1.3rem; letter-spacing: -0.02em; transform: skewX(-8deg); }
.footer__note { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.footer__contact { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.contact__row { display: flex; gap: 12px; align-items: baseline; font-size: 0.86rem; }
.contact__key {
  flex: none;
  width: 42px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.contact__val { color: var(--muted); word-break: break-word; }
.footer__contact-note { font-size: 0.78rem; color: rgba(147, 162, 171, 0.78); max-width: 34ch; }

.footer__col { display: flex; flex-direction: column; gap: 14px; }
.footer__col-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.footer__list { display: flex; flex-direction: column; gap: 10px; }
.footer__link {
  font-size: 0.94rem;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease);
}
.footer__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px 28px;
  border-top: 1px solid var(--line);
}
.footer__legal { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); letter-spacing: 0.02em; }

/* ----------------------------- 返回顶部 ----------------------------- */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 55;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(11, 16, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s var(--ease), border-color 0.24s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: rgba(198, 255, 61, 0.55); }

/* ----------------------------- 跳转链接 ----------------------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 2px;
  transition: top 0.24s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ----------------------------- 通用组件 ----------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(18px, 2.4vw, 28px);
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(18px, 2.2vw, 26px);
  box-shadow: 0 1px 0 rgba(5, 7, 10, 0.6);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(198, 255, 61, 0.5); box-shadow: var(--shadow-soft); }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__title { font-size: 1.12rem; font-weight: 900; letter-spacing: -0.01em; }
.card__meta { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.04em; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.stat__label { font-size: 0.8rem; color: var(--muted); }
.data-value { font-family: var(--font-mono); font-weight: 700; letter-spacing: -0.02em; color: var(--data); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--muted);
  background: var(--panel-2);
}
.tag--data { color: var(--data); border-color: rgba(47, 212, 255, 0.42); }
.tag--alert { color: var(--alert); border-color: rgba(255, 122, 47, 0.48); }

.divider { height: 1px; border: 0; background: var(--line); margin-block: clamp(24px, 3vw, 44px); }

.link-inline { color: var(--data); border-bottom: 1px solid rgba(47, 212, 255, 0.4); }
.link-inline:hover { color: var(--accent); border-bottom-color: var(--accent); }

.tilt { display: inline-block; transform: skewX(-8deg); transform-origin: left bottom; }

.callout {
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, rgba(198, 255, 61, 0.08), transparent 70%);
  padding: 16px 20px;
  border-radius: 0 2px 2px 0;
}
.callout__title { font-weight: 700; margin-bottom: 6px; }
.callout--alert { border-left-color: var(--alert); background: linear-gradient(90deg, rgba(255, 122, 47, 0.1), transparent 70%); }

/* 面包屑 */
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.breadcrumbs__link { color: var(--muted); }
.breadcrumbs__link:hover { color: var(--accent); }
.breadcrumbs__sep { color: var(--line); }

/* 章节索引 */
.index-nav { display: flex; flex-direction: column; gap: 2px; }
.index-nav__link {
  display: block;
  padding: 8px 10px;
  font-size: 0.88rem;
  color: var(--muted);
  border-left: 2px solid var(--line);
  transition: color 0.24s var(--ease), border-color 0.24s var(--ease), background 0.24s var(--ease);
}
.index-nav__link:hover { color: var(--text); background: var(--panel-2); }
.index-nav__link[aria-current] { color: var(--accent); border-left-color: var(--accent); background: var(--panel-2); }

/* 分栏切换 */
.tabs { border: 1px solid var(--line); border-radius: 3px; background: var(--panel); overflow: hidden; }
.tab {
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  transition: color 0.24s var(--ease), background 0.24s var(--ease);
}
.tab[aria-selected="true"] { color: var(--ink); background: var(--accent); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"]:hover { color: var(--ink); }
.tabpanel { padding: clamp(18px, 2.4vw, 28px); }
.tabpanel[hidden] { display: none !important; }
.tabpanel.is-active { animation: tabIn 0.36s var(--ease) both; }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 技能树式步骤 */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 18px; align-items: flex-start; text-align: left; width: 100%; padding: 16px 0; border-top: 1px solid var(--line); }
.step__index {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--tint);
  border: 1px solid rgba(198, 255, 61, 0.42);
  border-radius: 2px;
}
.step__body { color: var(--muted); font-size: 0.92rem; }
.step:hover .step__index { background: var(--accent); color: var(--ink); }

/* 悬浮数据条 / 移动数据坞 */
.rail {
  display: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.rail__list { display: flex; flex-direction: column; gap: 12px; }
.rail__item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 0.82rem; color: var(--muted); }
.rail--inline { display: block; }
@media (min-width: 1280px) {
  .rail {
    display: block;
    position: fixed;
    right: var(--gutter);
    top: calc(var(--header-h) + 32px);
    width: 232px;
    z-index: 40;
  }
  .rail--inline { position: static; width: auto; box-shadow: none; }
}

.data-dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(11, 16, 21, 0.94);
  border: 1px solid var(--line);
  border-radius: 3px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@media (min-width: 1024px) { .data-dock { display: none; } }

/* 数据表 */
.scroll-x { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { min-width: 560px; font-size: 0.88rem; }
.data-table th,
.data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table thead th { background: var(--panel-2); font-size: 0.76rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.data-table tbody tr:hover { background: rgba(20, 28, 36, 0.6); }
.data-table td + td,
.data-table th + th { border-left: 1px solid var(--line); }

/* 图片容器（页面阶段放入比赛夜景 / 剪影 / 光轨素材） */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(198, 255, 61, 0.16);
  box-shadow: inset 0 0 70px rgba(5, 7, 10, 0.7);
  mix-blend-mode: screen;
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.86) contrast(1.08); }
.img-frame--wide { aspect-ratio: 16 / 9; }
.img-frame--tall { aspect-ratio: 3 / 4; }
.img-frame--square { aspect-ratio: 1 / 1; }
.img-frame__caption {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); }

/* 入场显现 */
.reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity 0.44s var(--ease), transform 0.44s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ----------------------------- 响应式 ----------------------------- */
@media (max-width: 1200px) {
  .nav__list { gap: 18px; }
  .nav__link { font-size: 0.88rem; }
  .nav__aside { padding-left: 16px; gap: 12px; }
  .nav__ghost { display: none; }
}

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

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 70;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 28px;
    padding: calc(var(--header-h-compact) + 40px) var(--gutter) 48px;
    background: linear-gradient(165deg, #05070A 0%, #0B1015 58%, #0F2418 100%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px);
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease), visibility 0.32s var(--ease);
    overflow-y: auto;
  }
  .site-nav[data-open="true"] { opacity: 1; visibility: visible; transform: none; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { display: block; padding: 12px 0; font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__aside {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 22px;
  }
  .nav__ghost { display: block; font-size: 0.95rem; }
  .nav__aside .btn { width: 100%; }

  .grid { gap: 20px; }
  .col-4, .col-5, .col-7, .col-8, .col-9 { grid-column: span 12; }
  .grid--drop > *:nth-child(even) { margin-top: 0; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .footer__brand { grid-column: span 2; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 68px; }
  .brand__tag { display: none; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__brand { grid-column: span 1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .to-top { bottom: 74px; }
  .tab { padding: 11px 14px; font-size: 0.82rem; }
}

/* ----------------------------- 降级 ----------------------------- */
@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; transform: none; }
  .card:hover, .btn:hover { transform: none; }
}
