/* =========================================================
   必一赛场 BSPORTS PULSE · 共享样式
   /assets/site.css
   夜间赛场指挥中心：深墨绿近单色 + 荧光青 + 亮橙脉冲
   ========================================================= */

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

* { margin: 0; }

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

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

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

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

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

a { color: var(--cyan-300); }

[hidden] { display: none !important; }

::selection { background: var(--cyan-400); color: var(--ink-950); }

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

/* ---------- 2. 变量 ---------- */
:root {
  --ink-950: #071511;
  --ink-900: #0B1F1A;
  --ink-800: #102A23;
  --ink-700: #16362D;
  --line: #1F4A3E;
  --cyan-400: #4FF0C8;
  --cyan-300: #8FF7DE;
  --orange-500: #FF9A3C;
  --paper: #EAF5F0;
  --muted: #9FBDB3;

  --rail-w: 204px;
  --pad-left: 248px;
  --pad-top: 96px;

  --shell: 1220px;
  --r-pill: 999px;
  --r-card: 6px;

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

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 正文与排版 ---------- */
body {
  min-height: 100vh;
  padding-left: var(--pad-left);
  padding-top: var(--pad-top);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--paper);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 640px at 88% -10%, rgba(79, 240, 200, .10), transparent 62%),
    radial-gradient(760px 420px at -6% 42%, rgba(255, 154, 60, .05), transparent 70%),
    linear-gradient(180deg, var(--ink-900) 0%, var(--ink-950) 100%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--paper);
}

h1 { font-size: clamp(46px, 7.6vw, 118px); letter-spacing: -0.045em; line-height: 0.96; }
h2 { font-size: clamp(30px, 3.6vw, 46px); }
h3 { font-size: clamp(20px, 2vw, 26px); }

p { max-width: 74ch; }

strong { font-weight: 700; color: var(--paper); }

code, kbd, samp { font-family: var(--font-mono); }

#main-content { display: block; scroll-margin-top: 120px; }

/* ---------- 4. 通用工具 ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(18px, 3.2vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(79, 240, 200, .07);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--cyan-300);
  white-space: nowrap;
}

.index-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: .02em;
  color: rgba(79, 240, 200, .42);
}

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  transition: background .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease);
}

.btn:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-300);
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: #1A0D02;
  font-weight: 800;
}

.btn--primary:hover {
  background: #FFB166;
  border-color: #FFB166;
  color: #1A0D02;
}

.btn--ghost {
  background: rgba(79, 240, 200, .08);
  border-color: rgba(79, 240, 200, .38);
  color: var(--cyan-300);
}

/* ---------- 6. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan-300); }

.breadcrumb-sep { color: var(--line); }

.breadcrumb [aria-current="page"] { color: var(--cyan-400); }

/* ---------- 7. 通用容器与网格 ---------- */
.panel {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--ink-800);
  box-shadow: 5px 5px 0 rgba(22, 54, 45, .9), 10px 10px 0 rgba(16, 42, 35, .55);
}

.grid-cards {
  display: grid;
  gap: clamp(16px, 2.4vw, 26px);
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
}

.grid-split {
  display: grid;
  gap: clamp(22px, 3.4vw, 48px);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: start;
}

/* ---------- 8. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 4px;
  background-color: var(--ink-800);
  background-image:
    linear-gradient(rgba(79, 240, 200, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 240, 200, .07) 1px, transparent 1px);
  background-size: 34px 34px;
}

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

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, rgba(7, 21, 17, .04) 0%, rgba(7, 21, 17, .58) 100%);
  pointer-events: none;
}

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

/* ---------- 9. 章节与入场（JS 协议） ---------- */
[data-chapter] { --chapter-accent: var(--line); }

[data-chapter].is-active { --chapter-accent: var(--cyan-400); }

body.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

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

[data-reveal] {
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

/* ---------- 10. 头部 ---------- */
.site-head {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--cyan-400);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  pointer-events: auto;
  transform: translateY(-180%);
  transition: transform .22s var(--ease);
}

.skip-link:focus-visible { transform: none; }

/* 左侧垂直悬浮胶囊 */
.head-rail {
  position: absolute;
  top: 22px;
  left: 22px;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(16, 42, 35, .96) 0%, rgba(11, 31, 26, .97) 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(79, 240, 200, .09);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--paper);
}

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

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--paper);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--muted);
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--cyan-400);
  border-radius: 9px;
  background: rgba(79, 240, 200, .06);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-top: 2px solid var(--cyan-400);
  border-bottom: 2px solid var(--orange-500);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: var(--cyan-300);
}

.brand--stack .brand-name { font-size: 19px; }

/* 导航 */
.site-nav { display: block; }

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  counter-reset: nav;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}

.nav-link::before {
  counter-increment: nav;
  content: "0" counter(nav);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--cyan-400);
  opacity: .65;
}

.nav-link:hover {
  color: var(--paper);
  background: rgba(79, 240, 200, .07);
  border-color: var(--line);
}

.nav-link[aria-current="page"] {
  color: var(--ink-950);
  font-weight: 700;
  background: var(--cyan-400);
  border-color: transparent;
}

.nav-link[aria-current="page"]::before {
  color: var(--ink-950);
  opacity: .7;
}

/* 移动导航按钮（桌面隐藏） */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(79, 240, 200, .09);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}

.nav-toggle-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}

.nav-toggle-icon span {
  display: block;
  height: 1.5px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:first-child {
  transform: translateY(2.25px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon span:last-child {
  transform: translateY(-2.25px) rotate(-45deg);
}

/* 右上工具岛 */
.head-tools {
  position: absolute;
  top: 22px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.head-tools .search-field { width: 248px; }

.search-field::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -7px;
  border: 1.5px solid var(--cyan-400);
  border-radius: 50%;
  opacity: .85;
  pointer-events: none;
}

.search-field::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  margin-top: 4px;
  width: 6px;
  height: 1.5px;
  background: var(--cyan-400);
  transform: rotate(45deg);
  transform-origin: left center;
  opacity: .85;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(16, 42, 35, .92);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: .02em;
  outline: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}

.search-input::placeholder { color: rgba(159, 189, 179, .75); }

.search-input:focus-visible {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(79, 240, 200, .18);
}

.pulse-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(16, 42, 35, .92);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  color: var(--paper);
  white-space: nowrap;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan-400);
  animation: pulse-ring 2.6s var(--ease) infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(79, 240, 200, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(79, 240, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 240, 200, 0); }
}

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(31, 74, 62, .55);
}

.read-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan-400) 0%, var(--cyan-300) 55%, var(--orange-500) 100%);
  transform: scaleY(0);
  transform-origin: top center;
}

/* ---------- 11. 页脚 ---------- */
.site-foot {
  margin-top: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--line);
  background: var(--ink-950);
  padding: clamp(38px, 5.6vw, 72px) 0 clamp(22px, 3vw, 34px);
}

.foot-stack {
  display: grid;
  gap: clamp(14px, 2vw, 22px);
  grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
  align-items: start;
}

.foot-sheet {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--ink-800);
  box-shadow: 5px 5px 0 rgba(22, 54, 45, .85), 10px 10px 0 rgba(16, 42, 35, .5);
}

.foot-sheet--lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: linear-gradient(180deg, var(--ink-700) 0%, var(--ink-800) 100%);
}

.foot-lede {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 30ch;
}

.search-field--foot { width: 100%; }

.search-field--foot .search-input { height: 38px; font-size: 13px; }

.pulse-tag--quiet {
  height: 30px;
  padding: 0 12px;
  font-size: 11.5px;
  background: rgba(7, 21, 17, .6);
}

.foot-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

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

.foot-link {
  display: inline-block;
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .22s var(--ease), transform .22s var(--ease);
}

.foot-link:hover {
  color: var(--cyan-300);
  transform: translateX(3px);
}

.foot-list--meta { gap: 12px; }

.foot-list--meta li {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--paper);
}

.foot-key {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.foot-val { word-break: break-word; }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 26px;
  margin-top: clamp(28px, 4vw, 50px);
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

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

.foot-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--muted);
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1180px) {
  .foot-stack { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  :root {
    --pad-left: 0px;
    --pad-top: 148px;
  }

  body { padding-left: 0; }

  .head-rail {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    border-radius: 22px;
  }

  .brand-sub { display: none; }
  .brand-name { font-size: 17px; }

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

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(16, 42, 35, .99) 0%, rgba(11, 31, 26, .99) 100%);
    box-shadow: 0 26px 52px rgba(0, 0, 0, .55);
  }

  .site-head[data-open] .site-nav { display: block; }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .nav-link {
    font-size: 13.5px;
    padding: 8px 14px;
    background: rgba(7, 21, 17, .55);
    border-color: var(--line);
  }

  .head-tools {
    top: 82px;
    left: 12px;
    right: 12px;
    gap: 8px;
  }

  .head-tools .search-field {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .pulse-tag { flex: 0 0 auto; padding: 0 13px; font-size: 12px; }
}

@media (max-width: 900px) {
  .grid-split { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .foot-stack { grid-template-columns: 1fr; }
  .foot-base { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 560px) {
  :root { --pad-top: 140px; }

  .head-tools .pulse-tag { display: none; }

  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 16px; }

  .grid-cards { grid-template-columns: 1fr; }
  .foot-sheet { padding: 18px 16px; }
  .foot-sheet { box-shadow: 4px 4px 0 rgba(22, 54, 45, .85); }
}

/* ---------- 13. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .pulse-dot { animation: none; box-shadow: 0 0 0 3px rgba(79, 240, 200, .22); }

  body.js-ready [data-reveal] { opacity: 1; transform: none; }

  .read-progress-bar { transition: none; }
}
