/* ==========================================================================
   B体育登录入 / 共享基础样式 / 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, h6,
p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

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

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

a { color: inherit; }

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

/* ---------- 变量 ---------- */
:root {
  --void: #061426;
  --blueprint: #0B2239;
  --grid: #1E5A7A;
  --cyan: #37D6E8;
  --orange: #FF6A2A;
  --amber: #FFB15A;
  --paper: #E8F1F5;
  --mist: #94A9B8;
  --steel: #2A4356;
  --mint: #59D6A7;

  --text: #dae8ef;
  --text-soft: #b6cad7;

  --rail-w: clamp(248px, 20vw, 288px);
  --gutter: clamp(18px, 3.4vw, 48px);
  --maxw: 1240px;
  --hair: 1px solid var(--steel);

  --font-display: "Noto Sans SC", "Source Han Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "DIN Alternate", Rajdhani, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--void);
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(30, 90, 122, 0.34), transparent 62%),
    radial-gradient(900px 520px at 4% 108%, rgba(55, 214, 232, 0.09), transparent 62%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.012em;
  color: var(--paper);
}

h1 { font-size: clamp(2.1rem, 4.4vw, 4.15rem); }
h2 { font-size: clamp(1.62rem, 2.9vw, 2.6rem); }
h3 { font-size: clamp(1.16rem, 1.7vw, 1.5rem); font-weight: 800; }
h4 { font-size: clamp(1rem, 1.2vw, 1.16rem); font-weight: 700; }

p { color: var(--text-soft); }

a {
  color: var(--cyan);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover { color: var(--amber); }

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

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

/* ---------- 工具类 ---------- */
.mono {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  line-height: 1.82;
  color: var(--text-soft);
  max-width: 62ch;
}

.stack > * + * { margin-top: var(--stack-gap, 22px); }

.rule {
  height: 1px;
  border: 0;
  margin: clamp(24px, 4vw, 46px) 0;
  background: linear-gradient(90deg, var(--grid), rgba(30, 90, 122, 0.1) 65%, transparent);
}

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  color: #0a1420;
  background: var(--orange);
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:hover { color: #0a1420; }

.skip-link:focus {
  transform: translateY(0);
  outline-color: var(--paper);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn--primary {
  color: #12100c;
  background: var(--orange);
  border-color: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
}

.btn--primary:hover {
  color: #12100c;
  background: #ff8349;
  border-color: #ff8349;
}

.btn--ghost {
  color: var(--paper);
  background: rgba(55, 214, 232, 0.06);
  border-color: var(--steel);
}

.btn--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  background: rgba(55, 214, 232, 0.12);
}

.btn--sm {
  padding: 10px 16px;
  font-size: 13.5px;
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(55, 214, 232, 0.08);
  border: 1px solid var(--steel);
  border-radius: 2px;
}

.tag--live {
  color: #08130f;
  background: var(--mint);
  border-color: var(--mint);
}

.tag--warm {
  color: #20120a;
  background: var(--amber);
  border-color: var(--amber);
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 0;
  margin: 0 0 18px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
  list-style: none;
}

.crumbs li { display: inline-flex; align-items: center; gap: 8px; }

.crumbs a {
  color: var(--mist);
  text-decoration: none;
  transition: color 0.16s ease;
}

.crumbs a:hover { color: var(--cyan); }

.crumbs li + li::before {
  content: "/";
  color: var(--grid);
}

/* ---------- 分区标题 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 20px;
  padding-bottom: 13px;
  margin-bottom: clamp(20px, 3vw, 34px);
  border-bottom: var(--hair);
}

.section-head__title { font-size: clamp(1.35rem, 2.2vw, 2rem); }

.section-head__meta {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ---------- 蓝图面板 ---------- */
.blueprint-panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 32px);
  background:
    repeating-linear-gradient(0deg, rgba(30, 90, 122, 0.14) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(30, 90, 122, 0.14) 0 1px, transparent 1px 32px),
    linear-gradient(160deg, rgba(11, 34, 57, 0.94), rgba(6, 20, 38, 0.94));
  border: var(--hair);
  border-radius: 2px;
}

.blueprint-panel::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--grid);
  border-right: 1px solid var(--grid);
  pointer-events: none;
}

/* ---------- 图片容器基础 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: var(--hair);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(30, 90, 122, 0.38), rgba(6, 20, 38, 0.92)),
    repeating-linear-gradient(0deg, rgba(30, 90, 122, 0.22) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, rgba(30, 90, 122, 0.22) 0 1px, transparent 1px 28px);
}

.media-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.06);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(205deg, rgba(255, 106, 42, 0.16), transparent 56%);
}

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

/* ==========================================================================
   命令栏（页头）
   ========================================================================== */
.cmd-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    repeating-linear-gradient(90deg, rgba(30, 90, 122, 0.24) 0 1px, transparent 1px 26px),
    linear-gradient(186deg, #0B2239 0%, #071b31 46%, #061426 100%);
  border-right: var(--hair);
  box-shadow: 1px 0 0 rgba(55, 214, 232, 0.06), 20px 0 48px -34px rgba(0, 0, 0, 0.92);
}

.cmd-rail::before {
  content: "";
  flex: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--amber) 32%, var(--cyan));
}

.rail-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 24px 22px 20px;
  border-bottom: var(--hair);
}

.rail-mark {
  align-self: flex-start;
  padding: 4px 9px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--void);
  background: var(--cyan);
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 8px) 100%, 0 100%);
}

.rail-brand-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
}

.rail-brand-name:hover { color: var(--cyan); text-decoration: none; }

.rail-brand-line {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}

.rail-utility {
  margin-top: 4px;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--mist);
  border-top: 1px dashed rgba(42, 67, 86, 0.95);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0 10px;
}

.rail-link {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mist);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.rail-link:hover {
  color: var(--paper);
  background: rgba(55, 214, 232, 0.07);
  text-decoration: none;
}

.rail-link:hover .rail-idx { color: var(--cyan); }

.rail-link[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(255, 106, 42, 0.18), rgba(255, 106, 42, 0) 72%);
}

.rail-link[aria-current="page"] .rail-idx { color: var(--orange); }

.rail-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(55, 214, 232, 0.16);
}

.rail-idx {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--grid);
  transition: color 0.18s ease;
}

.rail-label { font-weight: 500; letter-spacing: 0.02em; }

.rail-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(55, 214, 232, 0.08);
  border: var(--hair);
  border-radius: 2px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.rail-toggle:hover { color: var(--cyan); border-color: var(--cyan); }

.rail-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.rail-toggle__bars::before,
.rail-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
}

.rail-toggle__bars::before { top: -5px; }
.rail-toggle__bars::after { top: 5px; }

.rail-toggle__text { line-height: 1; }

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding: 18px 22px 24px;
  border-top: var(--hair);
}

.rail-foot .btn { width: 100%; }

.rail-foot-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.rail-foot-note::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(89, 214, 167, 0.18);
}

/* ---------- 桌面端为固定命令栏让位 ---------- */
@media (min-width: 961px) {
  body { padding-left: var(--rail-w); }
  .rail-toggle { display: none; }
}

/* ==========================================================================
   图纸标题栏（页脚）
   ========================================================================== */
.site-foot {
  position: relative;
  overflow: hidden;
  margin-top: clamp(56px, 9vw, 128px);
  padding-bottom: 0;
  font-size: 14px;
  line-height: 1.72;
  color: var(--mist);
  border-top: 1px solid var(--grid);
  background:
    repeating-linear-gradient(0deg, rgba(30, 90, 122, 0.2) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(30, 90, 122, 0.2) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, #08192c 0%, #050f1c 100%);
}

.site-foot::after {
  content: "N2Z7";
  position: absolute;
  right: -12px;
  bottom: 38px;
  font-family: var(--font-num);
  font-size: clamp(64px, 12vw, 168px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: rgba(30, 90, 122, 0.22);
  pointer-events: none;
  user-select: none;
}

.foot-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(24px, 3vw, 46px) clamp(20px, 3vw, 40px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(34px, 5vw, 64px) var(--gutter) 0;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.foot-mark {
  padding: 4px 9px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--void);
  background: var(--orange);
  clip-path: polygon(0 0, 100% 0, 100% 68%, calc(100% - 8px) 100%, 0 100%);
}

.foot-brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.2;
  color: var(--paper);
}

.foot-brand-line {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.13em;
  color: var(--cyan);
}

.foot-title {
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  border-bottom: 1px solid rgba(42, 67, 86, 0.95);
}

.foot-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 18px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color 0.16s ease;
}

.foot-links a::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--grid);
  transition: width 0.16s ease, background-color 0.16s ease;
}

.foot-links a:hover { color: var(--paper); text-decoration: none; }

.foot-links a:hover::before {
  width: 15px;
  background: var(--orange);
}

.foot-meta {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.foot-meta li {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-soft);
  word-break: break-word;
}

.foot-meta .mono {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--cyan);
}

.foot-note {
  margin-top: 14px;
  padding-top: 10px;
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--mist);
  border-top: 1px dashed rgba(42, 67, 86, 0.95);
}

.foot-bar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(26px, 4vw, 48px);
  padding: 16px var(--gutter) 24px;
  border-top: 1px solid rgba(42, 67, 86, 0.95);
  font-family: var(--font-num);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.foot-year { color: var(--mist); }

.foot-legal-line { color: var(--paper); }

/* ==========================================================================
   脚本注入组件
   ========================================================================== */
.scroll-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 150;
  height: 2px;
  pointer-events: none;
  background: rgba(42, 67, 86, 0.65);
}

.scroll-meter[hidden] { display: none; }

.scroll-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--amber) 45%, var(--cyan));
  transition: width 0.12s linear;
}

.to-top {
  position: fixed;
  right: clamp(14px, 2.4vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-size: 18px;
  line-height: 1;
  color: var(--cyan);
  background: var(--blueprint);
  border: var(--hair);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s,
              color 0.2s ease, border-color 0.2s ease;
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

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

/* ==========================================================================
   响应式：平板 / 手机
   ========================================================================== */
@media (max-width: 1100px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  body { padding-left: 0; }

  .cmd-rail {
    position: sticky;
    top: 0;
    inset: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 14px;
    width: 100%;
    padding: 10px var(--gutter);
    overflow: visible;
    border-right: 0;
    border-bottom: var(--hair);
    box-shadow: 0 16px 36px -28px rgba(0, 0, 0, 0.95);
  }

  .cmd-rail::before { display: none; }

  .rail-head {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0;
    border-bottom: 0;
  }

  .rail-mark { display: none; }

  .rail-brand-name {
    font-size: 1.06rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .rail-brand-line,
  .rail-utility { display: none; }

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

  .rail-nav {
    display: none;
    grid-column: 1 / -1;
    gap: 0;
    max-height: min(66vh, 520px);
    padding: 10px 0 6px;
    margin-top: 2px;
    overflow-y: auto;
    border-top: var(--hair);
  }

  .cmd-rail[data-open="true"] .rail-nav { display: flex; }

  .rail-link {
    grid-template-columns: 30px minmax(0, 1fr);
    padding: 12px 4px;
    border-left-width: 2px;
  }

  .rail-link[aria-current="page"]::after { right: 4px; }

  .rail-foot {
    display: none;
    grid-column: 1 / -1;
    margin-top: 0;
    padding: 12px 0 16px;
    border-top: 1px dashed var(--steel);
  }

  .cmd-rail[data-open="true"] .rail-foot { display: flex; }

  .rail-foot .btn { width: auto; align-self: flex-start; }

  .site-foot { margin-top: clamp(40px, 8vw, 72px); }
}

@media (max-width: 620px) {
  .foot-grid { grid-template-columns: 1fr; }
  .foot-brand { grid-column: auto; }
  .foot-links { grid-template-columns: 1fr; }
  .foot-bar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-foot::after { font-size: 84px; bottom: 10px; }
  .media-frame { aspect-ratio: 4 / 3; }
  .media-frame--wide { aspect-ratio: 16 / 9; }
  .media-frame--square { aspect-ratio: 1 / 1; }
}

/* ---------- 减少动态偏好 ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .to-top { transform: none; }
  .btn:hover { transform: none; }
  .skip-link { transition: none; }
}

/* ---------- 打印 ---------- */
@media print {
  .cmd-rail,
  .to-top,
  .scroll-meter { display: none !important; }

  body {
    padding-left: 0;
    color: #0b1a28;
    background: #fff;
  }
}
