/* ============================================================
   B体育登录 · 共享样式 /assets/site.css
   夜场黑底 + 荧光绿状态 + 复古砖红章节色带
   ============================================================ */

:root {
  --ink: #0A0C0A;
  --iron: #1A1512;
  --cream: #F3E9D6;
  --lime: #B8FF3C;
  --blue: #38CFFF;
  --orange: #FF6A2B;
  --brick: #C0432B;
  --stone: #7C8A7A;
  --deep: #0E1A22;

  --rail-w: 76px;
  --topbar-h: 58px;

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

  --line: rgba(243, 233, 214, .14);
  --line-strong: rgba(243, 233, 214, .28);
  --muted: rgba(243, 233, 214, .68);
  --radius: 14px;
  --shadow-hard: 8px 8px 0 rgba(0, 0, 0, .45);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 3px; }

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

h1, h2, h3, h4 { font-weight: 900; line-height: 1.1; letter-spacing: -.01em; }
p { color: var(--muted); }
code, kbd, samp, .mono { font-family: var(--font-mono); }

::selection { background: var(--lime); color: #0A0C0A; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 10px);
  z-index: 200;
  transform: translateY(-180%);
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--lime);
  color: #0A0C0A;
  font-size: 14px;
  font-weight: 800;
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- 页面外壳 ---------- */
.site-header { position: relative; z-index: 60; }

/* ---------- 左侧轨道 ---------- */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px 6px 12px;
  background: linear-gradient(180deg, var(--deep) 0%, var(--ink) 52%, var(--iron) 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }

.rail__progress {
  position: absolute;
  top: 0;
  right: -1px;
  width: 3px;
  height: 0;
  background: var(--lime);
  border-radius: 0 0 0 3px;
  box-shadow: 0 0 14px rgba(184, 255, 60, .65);
  transition: height .1s linear;
}

.rail__nav { flex: 1 1 auto; display: flex; width: 100%; justify-content: center; }
.nav-list { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.nav-list__item { width: 100%; }

.nav-link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 2px;
  border-radius: 8px;
  color: var(--stone);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav-link__ico {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  color: var(--stone);
  transition: color .18s var(--ease);
}
.nav-link__txt {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  line-height: 1;
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--cream); background: rgba(243, 233, 214, .08); }
.nav-link:hover .nav-link__ico { color: var(--blue); }
.nav-link[aria-current="page"] { color: var(--cream); }
.nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(184, 255, 60, .6);
}
.nav-link[aria-current="page"] .nav-link__ico { color: var(--lime); }

.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.rail__ver {
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--stone);
  text-align: center;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
  transition: transform .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn--lime { background: var(--lime); color: #0A0C0A; border-color: var(--lime); }
.btn--lime:hover { box-shadow: 0 0 22px rgba(184, 255, 60, .45); }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--cream); background: rgba(243, 233, 214, .08); }
.btn--orange { background: var(--orange); color: #0A0C0A; border-color: var(--orange); }
.btn--orange:hover { box-shadow: 0 0 22px rgba(255, 106, 43, .5); }

.rail__cta {
  width: 100%;
  padding: 9px 4px;
  border-radius: 10px;
  font-size: 11px;
  letter-spacing: 0;
  text-align: center;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  color: var(--cream);
  font-size: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s linear, border-color .2s var(--ease), color .2s var(--ease);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- 品牌锁定 ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--cream);
  letter-spacing: .02em;
}
.brand__name { font-size: 16px; line-height: 1; }
.brand__bar {
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
  transition: width .24s var(--ease);
}
.brand:hover .brand__bar,
.brand:focus-visible .brand__bar { width: 34px; }
.brand--rail { flex-direction: column; gap: 7px; }
.brand--rail .brand__name { font-size: 15px; }
.brand--footer { margin-bottom: 4px; }
.brand--bar { gap: 7px; }

/* ---------- 移动端顶栏 ---------- */
.mobilebar { display: none; }
.mobilebar__meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stone);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line-strong);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.nav-toggle:hover { border-color: var(--lime); }
.nav-toggle__lines {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color .2s var(--ease);
}
.nav-toggle__lines::before,
.nav-toggle__lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .24s var(--ease), top .24s var(--ease);
}
.nav-toggle__lines::before { top: -6px; }
.nav-toggle__lines::after { top: 6px; }
.site-header[data-open] .nav-toggle__lines { background: transparent; }
.site-header[data-open] .nav-toggle__lines::before { top: 0; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__lines::after { top: 0; transform: rotate(-45deg); }

.rail-scrim {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(6, 8, 6, .74);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s var(--ease), visibility .24s linear;
}
.site-header[data-open] .rail-scrim { opacity: 1; visibility: visible; }

/* ---------- 章节组件 ---------- */
.chapter { margin-bottom: 64px; }
.chapter__band {
  width: 100%;
  max-width: 180px;
  height: 6px;
  border-radius: 2px;
  background: var(--brick);
}
.chapter__num {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--brick);
}
.chapter__title {
  margin-top: 8px;
  font-size: clamp(28px, 4.4vw, 48px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--cream);
}
.chapter__lede {
  max-width: 60ch;
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

/* ---------- 正文 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(243, 233, 214, .84);
}
.prose p { color: inherit; }
.prose p + p { margin-top: 1em; }
.prose h2 {
  margin: 2em 0 .6em;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--cream);
}
.prose h3 { margin: 1.6em 0 .5em; font-size: 20px; color: var(--cream); }
.prose ul { margin: 1em 0; }
.prose li { position: relative; padding-left: 18px; margin-top: .5em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
}
.prose a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue); }
.prose strong { color: var(--cream); font-weight: 800; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin: 0 9px;
  color: rgba(124, 138, 122, .55);
}
.breadcrumb a { color: var(--stone); }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--cream); }

/* ---------- 栅格 ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.tag--lime { border-color: rgba(184, 255, 60, .5); color: var(--lime); }
.tag--blue { border-color: rgba(56, 207, 255, .5); color: var(--blue); }
.tag--orange { border-color: rgba(255, 106, 43, .5); color: var(--orange); }

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--deep), var(--iron));
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
.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[data-empty]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(184, 255, 60, .07) 0 12px, transparent 12px 24px);
}
.media-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(243, 233, 214, .9);
  background: linear-gradient(transparent, rgba(10, 12, 10, .9));
}

/* ---------- 显现 ---------- */
.site-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s cubic-bezier(.2, .7, .3, 1);
}
.site-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 88px;
  padding: 56px 24px 28px;
  background: var(--iron);
  border-top: 3px solid var(--brick);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.15fr;
  gap: 32px;
  max-width: 1180px;
  margin-inline: auto;
}
.footer__col--brand { display: flex; flex-direction: column; }
.footer__note {
  max-width: 22ch;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(243, 233, 214, .62);
}
.footer__title {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
  color: var(--cream);
}
.footer__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--lime);
}
.footer__list li + li { margin-top: 10px; }
.footer__list a {
  font-size: 14px;
  color: rgba(243, 233, 214, .72);
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}
.footer__list a:hover { color: var(--lime); padding-left: 4px; }
.footer__list--contact li { margin-top: 9px; }
.contact-line {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(243, 233, 214, .78);
  word-break: break-all;
}
.footer__service {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--stone);
}
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  max-width: 1180px;
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--stone);
}
.footer__legal a { color: var(--stone); transition: color .16s var(--ease); }
.footer__legal a:hover { color: var(--cream); }
.footer__icp { font-family: var(--font-mono); letter-spacing: .02em; }

/* ============================================================
   平板
   ============================================================ */
@media (max-width: 1023px) {
  :root { --rail-w: 0px; }

  body { padding-left: 0; padding-top: var(--topbar-h); }

  .skip-link { left: 12px; }

  .mobilebar {
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    z-index: 80;
    padding: 0 16px;
    background: rgba(10, 12, 10, .95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .rail {
    width: min(304px, 86vw);
    align-items: stretch;
    gap: 18px;
    padding: 20px 18px 104px;
    transform: translateX(-104%);
    transition: transform .28s var(--ease);
    border-right: 1px solid rgba(184, 255, 60, .35);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .6);
  }
  .site-header[data-open] .rail { transform: translateX(0); }

  .brand--rail { display: none; }
  .rail__progress { display: none; }

  .rail__nav { justify-content: flex-start; }
  .nav-list { align-items: stretch; gap: 4px; }
  .nav-list__item { width: 100%; }
  .nav-link {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 12px;
  }
  .nav-link__ico { font-size: 12px; }
  .nav-link__txt {
    writing-mode: horizontal-tb;
    font-size: 19px;
    letter-spacing: .06em;
    line-height: 1.2;
  }
  .nav-link[aria-current="page"] { background: rgba(184, 255, 60, .12); }
  .nav-link[aria-current="page"]::before { left: 0; top: 12px; bottom: 12px; width: 3px; }

  .rail__foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    gap: 0;
    padding: 14px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--iron);
    border-top: 1px solid rgba(184, 255, 60, .35);
  }
  .rail__ver { display: none; }
  .rail__cta {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 15px;
    letter-spacing: .04em;
  }
  .to-top { display: none; }

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

/* ============================================================
   手机
   ============================================================ */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container { padding-inline: 18px; }
  .chapter { margin-bottom: 48px; }
  .chapter__lede { font-size: 16px; }
  .grid, .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { margin-top: 64px; padding: 44px 18px 24px; }
  .footer__legal { margin-top: 32px; gap: 10px 18px; }
}

/* ============================================================
   动效偏好
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .site-js [data-reveal] { opacity: 1; transform: none; }
  .rail { transition: none; }
}
