/* ============================================================
   BSPORTS赛事 · 共享外壳样式 /assets/site.css
   指挥台底色 → 珠宝色功能岛 → 纸白阅读面，三层分区
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-950);
  color: var(--paper-100);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-left: var(--rail-w);
}

h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, picture { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }
hr { border: 0; }

/* ---------- 设计令牌 ---------- */
:root {
  /* 基底 */
  --night-950: #040A12;
  --night-900: #071422;
  /* 珠宝色功能岛 */
  --teal-950: #042B2B;
  --indigo-950: #151038;
  --wine-950: #350A18;
  /* 强调 */
  --lime-400: #C8FF3D;
  --lime-200: #E6FFA3;
  --orange-500: #FF7A1A;
  --cyan-400: #44E0D0;
  /* 文字与线 */
  --paper-100: #F1F5EA;
  --slate-400: #8C9CB0;
  --line-600: #23364D;

  /* 字体 */
  --font-display: "Barlow Condensed", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-editorial: "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 字号 */
  --fs-display: clamp(64px, 10vw, 184px);
  --fs-h1: clamp(32px, 4vw, 56px);
  --fs-h2: clamp(24px, 3vw, 38px);
  --fs-h3: clamp(18px, 2vw, 24px);
  --fs-body: 16px;
  --fs-small: 13px;
  --fs-label: 11px;

  /* 尺寸 */
  --rail-w: 232px;
  --dock-h: 58px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 动效 */
  --dur-fast: 140ms;
  --dur-mid: 260ms;
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* 滚动进度（JS 写入 0–1） */
  --read-progress: 0;
}

/* ---------- 焦点 ---------- */
:focus-visible {
  outline: 2px solid var(--lime-400);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-160%);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--lime-400);
  color: var(--night-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 通用排版 ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .01em;
}
h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { line-height: 1.75; }

::selection {
  background: var(--lime-400);
  color: var(--night-950);
}

/* ---------- 工具类 ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(18px, 3.4vw, 56px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.section {
  padding-block: clamp(48px, 7vw, 96px);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

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

.divider {
  height: 1px;
  background: var(--line-600);
  margin-block: clamp(24px, 4vw, 40px);
}

.prose {
  color: var(--paper-100);
  line-height: 1.85;
}
.prose p,
.prose li {
  max-width: 38em;
  font-size: var(--fs-body);
}
.prose h2,
.prose h3 {
  font-family: var(--font-editorial);
  color: var(--paper-100);
  margin-block: 1.4em .6em;
}

/* ---------- 胶囊按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--lime-400);
  border-color: var(--lime-400);
  color: var(--night-950);
}
.btn--primary:hover {
  background: var(--lime-200);
  border-color: var(--lime-200);
}

.btn--accent {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: var(--night-950);
}
.btn--accent:hover {
  background: var(--lime-200);
  border-color: var(--lime-200);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-600);
  color: var(--paper-100);
}
.btn--ghost:hover {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

/* ---------- 标签胶囊 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius-pill);
  background: rgba(7, 20, 34, .72);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--slate-400);
  white-space: nowrap;
}
.pill--live {
  border-color: var(--orange-500);
  color: var(--orange-500);
}
.pill--current {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .1em;
  color: var(--slate-400);
}
.breadcrumbs a {
  color: var(--slate-400);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.breadcrumbs a:hover { color: var(--lime-400); }
.breadcrumbs__sep { color: var(--line-600); }
.breadcrumbs [aria-current="page"] { color: var(--paper-100); }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  isolation: isolate;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-600);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 18% 0%, rgba(68, 224, 208, .16), transparent 62%),
    linear-gradient(160deg, var(--night-900), var(--night-950));
  aspect-ratio: 16 / 9;
}
.media-frame > img,
.media-frame > picture,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(90deg, rgba(68, 224, 208, .22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(200, 255, 61, .12) 1px, transparent 1px);
  background-size: 52px 52px;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame__caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 4px 12px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius-pill);
  background: rgba(4, 10, 18, .82);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .12em;
  color: var(--lime-200);
}

/* ============================================================
   头部：侧边战术轨道
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  background: linear-gradient(180deg, var(--night-900) 0%, var(--night-950) 72%);
  border-right: 1px solid var(--line-600);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image: radial-gradient(rgba(68, 224, 208, .28) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* 阅读进度光轨 */
.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  z-index: 2;
  width: 2px;
  height: calc(var(--read-progress, 0) * 100%);
  background: linear-gradient(180deg, var(--lime-400), var(--cyan-400));
  box-shadow: 0 0 14px rgba(200, 255, 61, .45);
  pointer-events: none;
  transition: height 120ms linear;
}

.header-track {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 26px 0 20px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-600) transparent;
}

/* 品牌 */
.brand-mark {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0 22px 20px;
  color: var(--paper-100);
  text-decoration: none;
}
.brand-mark__glyph {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .34em;
  color: var(--lime-400);
}
.brand-mark__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 23px;
  line-height: 1;
  letter-spacing: .18em;
}
.brand-mark__sub {
  font-size: var(--fs-label);
  letter-spacing: .4em;
  color: var(--slate-400);
}

/* 导航 */
.rail-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-600) transparent;
}
.rail-nav__list {
  display: block;
}
.rail-nav__item {
  display: block;
}
.rail-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 6px;
  padding: 13px 20px 13px 19px;
  border-left: 3px solid transparent;
  color: var(--slate-400);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .08em;
  text-decoration: none;
  transition:
    color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}
.rail-nav__link:hover {
  color: var(--lime-200);
  background: rgba(200, 255, 61, .07);
}
.rail-nav__index {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--cyan-400);
}
.rail-nav__label {
  min-width: 0;
}
.rail-nav__link[aria-current="page"] {
  color: var(--paper-100);
  border-left-color: var(--lime-400);
  background: linear-gradient(90deg, rgba(200, 255, 61, .16), rgba(200, 255, 61, 0) 72%);
}
.rail-nav__link[aria-current="page"] .rail-nav__index {
  color: var(--lime-400);
}

/* 当前轮次灯 */
.header-lamp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 22px 14px;
  padding: 9px 13px;
  border: 1px solid var(--line-600);
  border-radius: var(--radius-pill);
  background: rgba(4, 10, 18, .6);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
  color: var(--slate-400);
}
.header-lamp__dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--orange-500);
  animation: lamp-pulse 1.8s var(--ease) infinite;
}
.header-lamp__text { white-space: nowrap; }
.header-lamp__num {
  font-weight: 700;
  color: var(--lime-400);
  letter-spacing: .04em;
}

@keyframes lamp-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 122, 26, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(255, 122, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, 0); }
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  color: var(--paper-100);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .16em;
  cursor: pointer;
}
.nav-toggle__bars {
  display: grid;
  gap: 5px;
  width: 20px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: var(--lime-400);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav-toggle__text { white-space: nowrap; }
.site-header[data-open] .nav-toggle__bars span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.site-header[data-open] .nav-toggle__bars span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* 底部命令坞 */
.mobile-dock {
  display: none;
  gap: 8px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(4, 10, 18, .95);
  border-top: 1px solid var(--line-600);
  backdrop-filter: blur(10px);
}
.mobile-dock__link {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .12em;
  text-decoration: none;
}
.mobile-dock__link--primary {
  background: var(--lime-400);
  color: var(--night-950);
}
.mobile-dock__link--primary:hover { background: var(--lime-200); }
.mobile-dock__link--ghost {
  border: 1px solid var(--line-600);
  background: var(--night-900);
  color: var(--paper-100);
}
.mobile-dock__link--ghost:hover {
  border-color: var(--lime-400);
  color: var(--lime-400);
}

/* ============================================================
   页脚：靛紫档案区
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 120px);
  padding-top: clamp(40px, 6vw, 76px);
  padding-bottom: clamp(24px, 4vw, 36px);
  background: var(--indigo-950);
  border-top: 1px solid var(--line-600);
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(4, 43, 43, .68), rgba(4, 43, 43, 0) 58%);
}
.site-footer > .container {
  position: relative;
  z-index: 1;
}

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

.footer-brand {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-600);
}
.footer-brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .18em;
  color: var(--paper-100);
}
.footer-brand__sub {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .2em;
  color: var(--slate-400);
}

.footer-col {
  min-width: 0;
}
.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cyan-400);
}
.footer-col__list {
  display: grid;
  gap: 9px;
}
.footer-col__link {
  display: inline-block;
  font-size: 14px;
  color: var(--paper-100);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-col__link:hover {
  color: var(--lime-400);
  border-bottom-color: var(--lime-400);
}
.footer-col__text {
  max-width: 30em;
  font-size: 13px;
  line-height: 1.9;
  color: var(--slate-400);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: clamp(30px, 5vw, 52px);
  padding-top: 20px;
  border-top: 1px solid var(--line-600);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
  color: var(--slate-400);
}
.footer-legal__copy { color: var(--slate-400); }
.footer-legal__note { color: var(--line-600); }

/* ============================================================
   平板：78px 竖排战术轨道
   ============================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  :root { --rail-w: 78px; }

  .header-track {
    padding: 18px 0 14px;
    gap: 12px;
  }

  .brand-mark {
    align-items: center;
    padding: 0 0 16px;
    gap: 8px;
  }
  .brand-mark__glyph {
    font-size: 10px;
    letter-spacing: .12em;
  }
  .brand-mark__word {
    writing-mode: vertical-rl;
    font-size: 13px;
    letter-spacing: .22em;
  }
  .brand-mark__sub { display: none; }

  .rail-nav__link {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 9px;
    padding: 14px 4px;
    border-left-width: 2px;
  }
  .rail-nav__index { font-size: 10px; }
  .rail-nav__label {
    writing-mode: vertical-rl;
    font-size: 12px;
    letter-spacing: .28em;
    line-height: 1;
  }

  .header-lamp {
    justify-content: center;
    margin: 0 8px 10px;
    padding: 8px 4px;
  }
  .header-lamp__text { display: none; }
  .header-lamp__num { font-size: 11px; }

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

/* ============================================================
   移动端：顶部细条 + 底部命令坞
   ============================================================ */
@media (max-width: 767px) {
  :root { --rail-w: 0px; }

  body {
    padding-left: 0;
    padding-bottom: calc(var(--dock-h) + 14px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line-600);
    background: rgba(7, 20, 34, .96);
    backdrop-filter: blur(12px);
  }
  .site-header::before { display: none; }
  .site-header::after {
    top: auto;
    right: auto;
    bottom: -1px;
    left: 0;
    width: calc(var(--read-progress, 0) * 100%);
    height: 2px;
  }

  .header-track {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    overflow: visible;
  }

  .brand-mark {
    flex-direction: row;
    align-items: baseline;
    gap: 7px;
    margin-right: auto;
    padding: 0;
  }
  .brand-mark__glyph { font-size: 10px; letter-spacing: .16em; }
  .brand-mark__word { font-size: 17px; letter-spacing: .14em; }
  .brand-mark__sub { display: none; }

  .header-lamp {
    margin: 0;
    padding: 5px 10px;
    gap: 6px;
    font-size: 10px;
    letter-spacing: .04em;
  }

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

  .rail-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: none;
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    background: var(--night-900);
    border-bottom: 1px solid var(--line-600);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .62);
  }
  .site-header[data-open] .rail-nav { display: block; }

  .rail-nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }
  .rail-nav__link {
    grid-template-columns: 30px 1fr;
    gap: 6px;
    padding: 12px;
    border-left: 0;
    border-radius: 14px;
    background: var(--night-950);
    box-shadow: inset 0 0 0 1px var(--line-600);
    font-size: 16px;
    letter-spacing: .06em;
  }
  .rail-nav__link:hover { background: rgba(200, 255, 61, .08); }
  .rail-nav__link[aria-current="page"] {
    background: rgba(200, 255, 61, .13);
    box-shadow: inset 0 0 0 1px var(--lime-400), inset 3px 0 0 var(--lime-400);
  }

  .mobile-dock { display: flex; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { justify-content: flex-start; }

  .media-frame { border-radius: 16px; }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .header-lamp__dot { animation: none; }
  .site-header::after { transition: none; }
}
