/* ==========================================================================
   B体育赛场 · 共享样式表 /assets/site.css
   深夜战术室：侧边品牌轨道 + 双层信息导航 + 纸张叠层面板
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }

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

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

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

/* ---------- 2. 设计令牌 ---------- */
:root {
  --pitch: #0A2A1F;
  --stand: #0F3A2A;
  --line: #1C5C42;
  --heat: #FF5E1A;
  --heat-dark: #B33B0D;
  --signal: #F5D90A;
  --white: #EAF2EE;
  --mist: #7C9C8C;
  --ink: #04110B;
  --cyan: #35C7B8;

  --rail: 264px;
  --edge: 2px;

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

  --progress: 0%;
}

/* ---------- 3. 中文排版与页面底色 ---------- */
body {
  min-height: 100vh;
  background-color: var(--pitch);
  background-image:
    radial-gradient(120% 78% at 92% -12%, rgba(255, 94, 26, .16), transparent 62%),
    radial-gradient(96% 72% at -6% 104%, rgba(53, 199, 184, .10), transparent 64%),
    repeating-linear-gradient(0deg, rgba(234, 242, 238, .035) 0 1px, transparent 1px 68px);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  letter-spacing: .01em;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.015em;
}

::selection { background: var(--heat); color: #170700; }

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

#main-content { display: block; }

/* ---------- 4. 容器与区块 ---------- */
.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.section { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.section--narrow { max-width: 760px; margin-inline: auto; }
.section--wide { max-width: none; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .75rem 1.25rem;
  padding-bottom: .9rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  border-bottom: var(--edge) solid var(--line);
}

.section-index {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1;
  color: var(--heat);
}

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid--asym { grid-template-columns: 1fr; }

@media (min-width: 900px) {
  .grid--asym { grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr); }
}

/* ---------- 5. 面板、标签与数据 ---------- */
.panel {
  position: relative;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--stand);
  border: var(--edge) solid var(--line);
  box-shadow: 6px 6px 0 rgba(4, 17, 11, .65);
}

.panel--cut {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .65rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}

.panel-body { display: block; }

.label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mist);
}

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

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  line-height: 1.65;
  color: #D7E6DF;
}

.meta {
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--mist);
}

.chip-list { display: flex; flex-wrap: wrap; gap: .5rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  background: rgba(28, 92, 66, .25);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--white);
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.chip:hover { border-color: var(--heat); color: var(--signal); }

.chip[aria-pressed="true"] {
  background: var(--heat);
  border-color: var(--heat);
  color: #170700;
  font-weight: 700;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.data-table caption {
  padding-bottom: .6rem;
  text-align: left;
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--mist);
}

.data-table th,
.data-table td {
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.data-table thead th {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--mist);
  border-bottom: var(--edge) solid var(--line);
}

.data-table tbody tr:hover { background: rgba(255, 94, 26, .08); }
.data-table td.num { color: var(--signal); }

/* ---------- 6. 状态灯 ---------- */
.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
  animation: dot-pulse 2.4s ease-out infinite;
}

.status-dot--live { background: var(--signal); }
.status-dot--watch { background: var(--heat); animation-duration: 3.4s; }
.status-dot--fixed { background: var(--cyan); animation: none; }

@keyframes dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 217, 10, .55); }
  70% { box-shadow: 0 0 0 8px rgba(245, 217, 10, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 217, 10, 0); }
}

.status-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  font-size: .82rem;
  color: var(--mist);
}

.status-list li { display: flex; align-items: center; gap: .5rem; }

/* ---------- 7. 长文与面包屑 ---------- */
.prose { max-width: 70ch; line-height: 1.8; }
.prose p + p { margin-top: 1rem; }
.prose h2 { margin-top: 2rem; font-size: clamp(1.4rem, 3vw, 2rem); }
.prose h3 { margin-top: 1.5rem; font-size: 1.15rem; font-weight: 700; }
.prose ul { margin-top: 1rem; }
.prose li { position: relative; margin-top: .5rem; padding-left: 1.4rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 8px;
  height: 2px;
  background: var(--heat);
}
.prose strong { color: var(--signal); font-weight: 700; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--mist);
}

.breadcrumbs li { display: flex; align-items: center; gap: .5rem; }
.breadcrumbs li + li::before { content: "/"; color: var(--line); }
.breadcrumbs a:hover { color: var(--signal); }

/* ---------- 8. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: var(--edge) solid var(--line);
  background: linear-gradient(160deg, #0C3325, var(--ink));
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 17, 11, 0) 45%, rgba(4, 17, 11, .78) 100%),
    repeating-linear-gradient(0deg, rgba(234, 242, 238, .05) 0 1px, transparent 1px 4px);
}

.media-frame--plain::after { display: none; }
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.1rem;
  border: var(--edge) solid transparent;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: center;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.btn-primary {
  background: var(--heat);
  color: #170700;
  box-shadow: 4px 4px 0 rgba(4, 17, 11, .9);
}

.btn-primary:hover { background: var(--signal); transform: translate(-1px, -1px); }
.btn-primary:active { background: var(--heat-dark); transform: none; }

.btn-ghost {
  border-color: var(--line);
  background: rgba(28, 92, 66, .18);
  color: var(--white);
}

.btn-ghost:hover { border-color: var(--heat); color: var(--signal); }
.btn-ghost:active { background: rgba(179, 59, 13, .25); }

/* ---------- 10. 页头 / 侧边品牌轨道 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, #04110B 0%, #07211A 100%);
  border-bottom: var(--edge) solid var(--line);
  color: var(--white);
}

.skip-link {
  position: absolute;
  left: .75rem;
  top: -4rem;
  z-index: 99;
  padding: .6rem 1rem;
  background: var(--signal);
  color: var(--ink);
  border: var(--edge) solid var(--ink);
  font-weight: 700;
  font-size: .85rem;
  transition: top .18s ease;
}

.skip-link:focus { top: .75rem; }

.rail-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem clamp(1rem, 5vw, 1.5rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  background: var(--heat);
  color: var(--ink);
  border: var(--edge) solid var(--ink);
  box-shadow: 3px 3px 0 rgba(4, 17, 11, .9);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1;
  transform: skewX(-8deg);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; }

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.brand-tag {
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--mist);
}

.rail-status {
  display: none;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mist);
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--edge) * -1);
  height: 3px;
  overflow: hidden;
  background: rgba(28, 92, 66, .6);
}

.read-progress-fill {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--heat), var(--signal));
  transition: width .1s linear;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
  padding: .5rem .7rem;
  border: var(--edge) solid var(--line);
  background: rgba(28, 92, 66, .3);
  color: var(--white);
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.nav-toggle:hover { border-color: var(--heat); color: var(--signal); }

.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 12px;
  flex: 0 0 auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease, top .22s ease;
}

.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { top: 9px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 5px; transform: rotate(-45deg); }

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
}

.site-nav {
  display: none;
  background: #051710;
  border-top: 1px solid var(--line);
}

.site-nav[data-open] { display: block; animation: nav-drop .22s ease; }

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.nav-list { display: flex; flex-direction: column; }

.nav-list a {
  position: relative;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .95rem clamp(1rem, 5vw, 1.5rem);
  border-bottom: 1px solid rgba(28, 92, 66, .75);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--white);
  transition: background .18s ease, color .18s ease;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  color: var(--mist);
}

.nav-list a:hover { background: rgba(255, 94, 26, .12); color: var(--signal); }

.nav-list a[aria-current="page"] {
  background: rgba(255, 94, 26, .14);
  color: var(--signal);
}

.nav-list a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--heat);
}

.rail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding: 1rem clamp(1rem, 5vw, 1.5rem) 1.25rem;
}

.rail-actions .btn { flex: 1 1 auto; }

/* 移动端压缩态 */
@media (max-width: 1023px) {
  .site-header[data-compact] .brand-tag { display: none; }
  .site-header[data-compact] .rail-brand { padding-block: .55rem; }
  .site-header[data-compact] .brand-mark { width: 2.1rem; height: 2.1rem; font-size: 1.1rem; }
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(2rem, 6vw, 4rem);
  background: linear-gradient(180deg, #061A12, var(--ink) 62%);
  border-top: var(--edge) solid var(--line);
  color: var(--white);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  opacity: .8;
  background: repeating-linear-gradient(115deg, var(--heat) 0 14px, transparent 14px 28px);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -.01em;
}

.footer-tag { margin-top: .35rem; font-size: .85rem; color: var(--mist); }

.footer-status {
  display: grid;
  gap: .5rem;
  margin-top: 1.1rem;
  font-size: .82rem;
  color: var(--mist);
}

.footer-status li { display: flex; align-items: center; gap: .55rem; }

.footer-title {
  margin-bottom: .9rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-links { display: grid; gap: .5rem; }

.footer-links a {
  display: inline-block;
  padding: .15rem 0;
  font-size: .95rem;
  color: #D7E6DF;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}

.footer-links a:hover { color: var(--signal); border-color: var(--heat); }
.footer-links a[aria-current="page"] { color: var(--signal); }

.contact-list { display: grid; gap: .8rem; font-size: .9rem; }
.contact-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.contact-list .num { color: var(--white); }

.copy-btn {
  padding: .15rem .5rem;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--mist);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.copy-btn:hover { color: var(--signal); border-color: var(--heat); }

.copy-btn[data-copied] {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
}

.footer-note {
  margin-top: 1rem;
  padding-left: .75rem;
  border-left: var(--edge) solid var(--line);
  font-size: .78rem;
  line-height: 1.7;
  color: var(--mist);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--mist);
}

/* ---------- 12. 标签页组件 ---------- */
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-bottom: .6rem;
  border-bottom: var(--edge) solid var(--line);
}

.tab-btn {
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  background: rgba(28, 92, 66, .2);
  font-size: .85rem;
  letter-spacing: .04em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.tab-btn:hover { border-color: var(--heat); color: var(--signal); }

.tab-btn[aria-selected="true"] {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  font-weight: 700;
}

.tab-panel { padding-top: 1.25rem; }
.tab-panel[hidden] { display: none; }

/* ---------- 13. 显现动效 ---------- */
html.js-on [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}

html.js-on [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 桌面：侧边导览轨道 ---------- */
@media (min-width: 1024px) {
  body { padding-left: var(--rail); }

  .site-header {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--rail);
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 2vw, 1.75rem) 1.15rem 1.15rem;
    border-right: var(--edge) solid var(--line);
    border-bottom: 0;
    overflow-y: auto;
  }

  .rail-brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 0 1.25rem;
    border-bottom: var(--edge) solid var(--line);
  }

  .brand { flex-direction: column; align-items: flex-start; gap: .75rem; }

  .brand-mark { width: 3rem; height: 3rem; font-size: 1.6rem; }

  .brand-name { font-size: 1.25rem; }
  .brand-tag { font-size: .72rem; }

  .rail-status { display: flex; }

  .nav-toggle { display: none; }

  .site-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    border-top: 0;
    background: none;
    animation: none;
  }

  .nav-list { margin-top: 1.25rem; }

  .nav-list a {
    padding: .62rem .5rem;
    gap: .5rem;
    border-bottom: 1px solid rgba(28, 92, 66, .6);
    font-size: .95rem;
  }

  .nav-list a:hover { background: rgba(255, 94, 26, .1); }

  .rail-actions {
    flex-direction: column;
    margin-top: auto;
    padding: 1.25rem 0 0;
    border-top: var(--edge) solid var(--line);
  }

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

  .read-progress {
    position: fixed;
    left: calc(var(--rail) - 3px);
    top: 0;
    bottom: 0;
    right: auto;
    width: 3px;
    height: auto;
    background: rgba(28, 92, 66, .55);
    z-index: 61;
  }

  .read-progress-fill {
    width: 100%;
    height: var(--progress, 0%);
    background: linear-gradient(180deg, var(--heat), var(--signal));
    transition: height .1s linear;
  }
}

/* ---------- 15. 平板与桌面页脚分栏 ---------- */
@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (min-width: 1080px) {
  .footer-inner { grid-template-columns: 1.3fr 1fr 1.3fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- 16. 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  html.js-on [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
