/* ===========================================================
   奔驰宝马电玩城 · 夜场仪表盘
   /assets/site.css — 共享样式（reset / 变量 / 头部 / 页脚 / 组件）
   =========================================================== */

/* ---------- 1. reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h, 72px) + 18px);
}
body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, figure, figcaption, blockquote, dl, dd, table, th, td, fieldset, legend {
  margin: 0; padding: 0;
}
ol, ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
table { border-collapse: collapse; border-spacing: 0; width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 2px; }

/* ---------- 2. tokens ---------- */
:root {
  /* 夜场仪表盘色板 */
  --ink:      #06080D;
  --panel:    #0F1626;
  --raise:    #1A2338;
  --read:     #F4F7FC;
  --silver:   #C3CAD8;
  --red:      #E4032E;
  --blue:     #3D74FF;
  --blue-lt:  #7FA3FF;
  --gold:     #D9A83C;
  --green:    #14D6A0;
  --mute:     #6B7488;

  /* 字体栈（全部本地，无远程加载） */
  --font-display: "Oswald", "Archivo Narrow", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-data: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  /* 尺度 */
  --shell: 1280px;
  --gutter: 24px;
  --head-h: 72px;
  --dur: 240ms;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --line: 1px solid var(--raise);
}

/* ---------- 3. base ---------- */
body {
  background-color: var(--ink);
  color: var(--silver);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* 极淡横向扫描线，只作材质，不覆盖文字语义 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(244, 247, 252, .022) 0 1px, transparent 1px 4px);
}

/* ---------- 4. 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--read);
  letter-spacing: -0.02em;
  line-height: 1.22;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 5.2vw, 60px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 20px; line-height: 1.35; }
h4 { font-size: 17px; }
strong, b { color: var(--read); font-weight: 600; }
small { font-size: 13px; color: var(--mute); }

.mono,
.readout-value,
.nav-idx,
.foot-idx,
.section-idx,
.section-note,
.stat-v,
.foot-legal {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
}

.accent-red  { color: var(--red); }
.accent-blue { color: var(--blue-lt); }
.accent-gold { color: var(--gold); }
.accent-live { color: var(--green); }

.prose { font-size: 16px; line-height: 1.8; }
.prose p { max-width: 680px; }
.prose p + p { margin-top: 16px; }
.prose h2, .prose h3 { margin-top: 36px; margin-bottom: 12px; }
.prose ul, .prose ol { margin-top: 14px; display: grid; gap: 8px; }
.prose li { max-width: 680px; padding-left: 20px; position: relative; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px; top: .78em;
  width: 8px; height: 1px;
  background: var(--mute);
}
.prose a { color: var(--blue-lt); border-bottom: 1px solid rgba(127, 163, 255, .35); }
.prose a:hover { color: var(--read); border-bottom-color: var(--gold); }

/* ---------- 5. 布局骨架 ---------- */
.main { display: block; }
.shell {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.page-gap { padding-block: clamp(36px, 7vw, 96px); }
.slash-rule {
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--raise) 0 14px, transparent 14px 22px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}
.grid-12 > * { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .col-3  { grid-column: span 3; }
  .col-4  { grid-column: span 4; }
  .col-5  { grid-column: span 5; }
  .col-6  { grid-column: span 6; }
  .col-7  { grid-column: span 7; }
  .col-8  { grid-column: span 8; }
  .col-9  { grid-column: span 9; }
  .col-12 { grid-column: 1 / -1; }
  .col-side { grid-column: 10 / span 3; }
  .col-main { grid-column: 2 / span 7; }
}

/* ---------- 6. skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--gold);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 7. 按钮 ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  border: 1px solid transparent;
  border-radius: 2px;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn-sm { padding: 10px 16px; font-size: 13px; }

.btn-primary { color: #FFFFFF; z-index: 0; }
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  transition: background-color var(--dur) var(--ease);
}
.btn-primary:hover::before { background: #FF1B45; }

.btn-ghost {
  border-color: var(--raise);
  color: var(--silver);
  background-color: transparent;
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--read);
  background-color: rgba(61, 116, 255, .1);
}

/* ---------- 8. 头部：紧凑命令栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 90;
  background-color: var(--ink);
  border-bottom: 1px solid var(--raise);
}
.site-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 200% at 6% -70%, rgba(61, 116, 255, .17), transparent 58%),
    radial-gradient(90% 180% at 94% -90%, rgba(228, 3, 46, .13), transparent 62%);
}
.head-rail {
  position: relative;
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: clamp(10px, 1.5vw, 26px);
  min-height: var(--head-h);
  padding: 10px 0;
  transition: min-height var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.site-head[data-condensed] .head-rail { min-height: 56px; padding: 6px 0; }

/* 品牌 */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; flex: none;
  background-image:
    linear-gradient(90deg, transparent 0 46%, var(--ink) 46% 54%, transparent 54%),
    linear-gradient(118deg, var(--red) 0 50%, var(--blue) 50% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
  transition: width var(--dur) var(--ease), height var(--dur) var(--ease);
}
.site-head[data-condensed] .brand-mark { width: 28px; height: 28px; }
.brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--read);
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-data);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .16em;
  color: var(--mute);
  white-space: nowrap;
  transition: opacity var(--dur) var(--ease);
}
.site-head[data-condensed] .brand-sub { opacity: 0; }

/* 导航 */
.primary-nav { min-width: 0; }
.nav-list { display: flex; align-items: center; justify-content: center; gap: 2px; }
.nav-list > li { flex: none; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 8px;
  border-radius: 2px;
  transition: background-color var(--dur) var(--ease);
}
.nav-idx {
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--mute);
  transition: color var(--dur) var(--ease);
}
.nav-label {
  font-size: 14px;
  color: var(--silver);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.nav-link:hover { background-color: var(--raise); }
.nav-link:hover .nav-label { color: var(--read); }
.nav-link[aria-current="page"] .nav-label { color: var(--read); font-weight: 600; }
.nav-link[aria-current="page"] .nav-idx { color: var(--gold); }
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 1px;
  height: 2px;
  background-color: var(--gold);
}

/* 状态区 */
.head-status {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.3vw, 20px);
  padding-left: clamp(10px, 1.3vw, 20px);
  border-left: var(--line);
}
.stat { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat-k { font-size: 11px; letter-spacing: .04em; color: var(--mute); }
.stat-v { font-size: 13px; color: var(--read); }
.stat-v--live { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.stat-v--live::before {
  content: "";
  width: 6px; height: 6px; flex: none;
  border-radius: 50%;
  background-color: var(--green);
  box-shadow: 0 0 8px rgba(20, 214, 160, .8);
}

.head-cta { display: flex; align-items: center; }

/* 移动索引按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--raise);
  border-radius: 2px;
  color: var(--silver);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--blue); color: var(--read); }
.nav-toggle[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }
.nav-toggle-bars { position: relative; display: block; width: 16px; height: 10px; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background-color: currentColor;
}
.nav-toggle-bars::before { top: 0; }
.nav-toggle-bars::after { bottom: 0; }
.nav-toggle-label { font-family: var(--font-data); font-size: 12px; letter-spacing: .08em; }

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background-color: var(--raise);
  overflow: hidden;
  pointer-events: none;
}
.read-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  background-image: linear-gradient(90deg, var(--blue) 0%, var(--blue-lt) 55%, var(--gold) 100%);
}

/* 头部响应式 */
@media (max-width: 1400px) {
  .stat--hours { display: none; }
}
@media (max-width: 1250px) {
  .brand-sub { display: none; }
  .nav-link { padding: 8px 6px; }
  .nav-link[aria-current="page"]::after { left: 6px; right: 6px; }
}
@media (max-width: 1080px) {
  :root { --head-h: 64px; }
  .head-rail {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    min-height: 64px;
  }
  .head-status { display: none; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background-color: var(--panel);
    border-top: 1px solid var(--raise);
    border-bottom: 1px solid var(--raise);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height var(--dur) var(--ease), visibility var(--dur) var(--ease);
  }
  .primary-nav[data-open] {
    max-height: min(74vh, 540px);
    overflow-y: auto;
    visibility: visible;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2px;
    padding: 10px clamp(16px, 4vw, 28px) 18px;
  }
  .nav-link { padding: 13px 12px; justify-content: flex-start; gap: 12px; }
  .nav-label { font-size: 15px; }
  .nav-link[aria-current="page"]::after {
    left: 0; right: auto; top: 9px; bottom: 9px;
    width: 3px; height: auto;
  }
}

/* ---------- 9. 页脚 ---------- */
.site-foot {
  position: relative;
  background-color: var(--panel);
  border-top: 1px solid var(--raise);
}
.foot-inner {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(40px, 6vw, 68px) 0 clamp(26px, 4vw, 44px);
}
.foot-brand { display: flex; flex-direction: column; gap: 14px; max-width: 340px; }
.foot-mark {
  width: 32px; height: 32px;
  background-image: linear-gradient(118deg, var(--gold) 0 50%, var(--blue) 50% 100%);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}
.foot-brand-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--read);
}
.foot-brand-line { font-size: 14px; line-height: 1.75; color: var(--mute); }

.foot-index {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 40px);
}
.foot-col-title {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--mute);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--raise);
}
.foot-list { display: grid; gap: 2px; }
.foot-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 8px 7px 10px;
  font-size: 14px;
  color: var(--silver);
  border-left: 2px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.foot-link:hover { color: var(--read); border-left-color: var(--gold); }
.foot-idx { font-size: 11px; letter-spacing: .06em; color: var(--mute); }

.foot-rule {
  height: 1px;
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  background-image: linear-gradient(90deg, var(--gold) 0%, rgba(217, 168, 60, .2) 52%, transparent 100%);
  opacity: .75;
}
.foot-base {
  width: min(var(--shell), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: 24px 0 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px 36px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--mute);
}
.foot-contact { color: var(--silver); }
.foot-legal { font-size: 12px; letter-spacing: .02em; color: var(--mute); }
.foot-note { color: var(--mute); }

@media (max-width: 900px) {
  .foot-inner { grid-template-columns: 1fr; gap: 36px; }
  .foot-brand { max-width: none; }
}
@media (max-width: 620px) {
  .foot-index { grid-template-columns: 1fr; gap: 26px; }
}

/* ---------- 10. 章节索引组件 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--raise);
}
.section-idx {
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--mute);
  transition: color var(--dur) var(--ease);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 28px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--silver);
  transition: color var(--dur) var(--ease);
}
.section-note {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mute);
}
.section-head.is-active .section-title { color: var(--read); }
.section-head.is-active .section-idx { color: var(--gold); }

/* ---------- 11. 容器与卡片 ---------- */
.panel {
  position: relative;
  background-color: var(--panel);
  border: 1px solid var(--raise);
  border-radius: 2px;
  padding: clamp(18px, 2.4vw, 28px);
}
.panel--cut { clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
.panel--flush { padding: 0; }

/* ---------- 12. chip / badge ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  font-size: 13px;
  color: var(--silver);
  background-color: var(--raise);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.chip:hover { color: var(--read); border-color: var(--mute); }
.chip[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--read);
  background-color: rgba(61, 116, 255, .14);
}
.chip-idx { font-family: var(--font-data); font-size: 11px; letter-spacing: .06em; color: var(--mute); }
.chip[aria-pressed="true"] .chip-idx { color: var(--blue-lt); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--silver);
  background-color: var(--panel);
  border: 1px solid var(--raise);
  border-radius: 2px;
  white-space: nowrap;
}
.badge--live { color: var(--green); border-color: rgba(20, 214, 160, .36); }
.badge--hot  { color: var(--red);   border-color: rgba(228, 3, 46, .42); }
.badge--gold { color: var(--gold);  border-color: rgba(217, 168, 60, .42); }

/* ---------- 13. 面包屑 ---------- */
.crumbs { font-size: 13px; color: var(--mute); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--mute); opacity: .55; }
.crumbs a { color: var(--blue-lt); }
.crumbs a:hover { color: var(--read); }
.crumbs [aria-current="page"] { color: var(--silver); }

/* ---------- 14. 读数组件 ---------- */
.readout { display: flex; flex-direction: column; gap: 6px; }
.readout-value {
  font-size: clamp(44px, 7vw, 120px);
  font-weight: 600;
  line-height: .95;
  letter-spacing: -0.03em;
  color: var(--read);
}
.readout-unit {
  font-size: .32em;
  letter-spacing: .08em;
  color: var(--mute);
  margin-left: .22em;
}
.readout-label {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--mute);
  text-transform: uppercase;
}

/* ---------- 15. 数据表 ---------- */
.data-table { width: 100%; font-size: 14px; }
.data-table th {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--gold);
  text-align: left;
  padding: 10px 12px;
  background-color: var(--panel);
  border-bottom: 1px solid var(--raise);
  white-space: nowrap;
}
.data-table td {
  padding: 12px;
  color: var(--silver);
  border-bottom: 1px solid var(--raise);
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr { transition: background-color var(--dur) var(--ease); }
.data-table tbody tr:hover { background-color: rgba(61, 116, 255, .06); }

/* ---------- 16. 响应式图片容器 ---------- */
.figure {
  position: relative;
  margin: 0;
  background-color: var(--panel);
  border: 1px solid var(--raise);
  border-radius: 2px;
  overflow: hidden;
}
.figure-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-image: linear-gradient(152deg, var(--raise) 0%, var(--panel) 55%, var(--ink) 100%);
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(180deg, rgba(244, 247, 252, .03) 0 1px, transparent 1px 5px);
}
.figure-frame img { width: 100%; height: 100%; object-fit: cover; }
.figure-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--mute);
}
.figure--wide .figure-frame { aspect-ratio: 21 / 9; }
.figure--square .figure-frame { aspect-ratio: 1 / 1; }
.figure--tall .figure-frame { aspect-ratio: 4 / 5; }
.figure-cap {
  margin-top: 10px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--mute);
}

/* ---------- 17. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .read-progress-fill { transition: none !important; }
}
