/* ============================================================
   BSPORTS体育 · 共享站点样式 /assets/site.css
   堆叠画板式布局 · 紧凑命令栏 · 深空蓝数据指挥中心
   ============================================================ */

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

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

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

ul, ol { padding: 0; }

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

button { font: inherit; color: inherit; }

a { color: inherit; }

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩 */
  --ink-900: #050B16;
  --ink-800: #0B1B33;
  --ink-700: #123055;
  --accent: #2FE0D4;
  --accent-deep: #1A8F8A;
  --lime: #D8FF4A;
  --sichuan: #C4384A;
  --bamboo: #4C8F6E;
  --warm-a: #FF8A3D;
  --warm-b: #FFC46B;
  --paper: #F2F6FA;
  --muted: #8FA1B5;

  /* 线条与层次 */
  --line: rgba(143, 161, 181, 0.18);
  --line-strong: rgba(143, 161, 181, 0.32);
  --line-accent: rgba(47, 224, 212, 0.22);
  --surface: rgba(18, 48, 85, 0.55);
  --shadow-panel: 0 26px 60px -34px rgba(5, 11, 22, 0.95);

  /* 形状 */
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --r-pill: 999px;

  /* 布局 */
  --shell: 1200px;
  --gutter: 24px;
  --rail-w: 264px;
  --head-h: 74px;

  /* 字体 */
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", "STSong", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-800);
  background-image:
    radial-gradient(circle at 16% -12%, rgba(47, 224, 212, 0.12), transparent 46%),
    radial-gradient(circle at 94% 4%, rgba(196, 56, 74, 0.12), transparent 42%);
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.9;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.3;
  color: var(--paper);
  margin-bottom: 0.6em;
}

h1 { font-size: clamp(2rem, 4.4vw, 3rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.125rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--paper);
  margin-bottom: 0.5em;
}

p { margin-bottom: 1em; }

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

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

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. 通用布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 24px);
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.grid > * { grid-column: span 12; }
.grid--2 > * { grid-column: span 6; }
.grid--3 > * { grid-column: span 4; }
.grid--4 > * { grid-column: span 3; }

/* ---------- 5. 通用组件 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.section-head__idx {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: var(--sichuan);
}

.section-head__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 600;
  color: var(--paper);
}

.section-head__note {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.tickline {
  height: 8px;
  border-radius: 2px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(47, 224, 212, 0.45) 0 1px,
    transparent 1px 13px
  );
  opacity: 0.85;
}
.tickline--red {
  background-image: repeating-linear-gradient(
    90deg,
    rgba(196, 56, 74, 0.6) 0 1px,
    transparent 1px 13px
  );
}

.panel {
  position: relative;
  background: linear-gradient(170deg, rgba(18, 48, 85, 0.92), rgba(11, 27, 51, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

.panel__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--paper);
  margin-bottom: 0.5em;
}

.panel--bevel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(225deg, var(--accent), rgba(47, 224, 212, 0.08));
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--pill-color, var(--line-accent));
  color: var(--pill-color, var(--accent));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-decoration: none;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--ink-900);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -18px rgba(47, 224, 212, 0.85);
}
.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: rgba(47, 224, 212, 0.5);
}
.btn--ghost:hover {
  background: rgba(47, 224, 212, 0.12);
  box-shadow: none;
}
.btn--lime {
  background: var(--lime);
  color: var(--ink-900);
}
.btn--lime:hover {
  box-shadow: 0 18px 34px -18px rgba(216, 255, 74, 0.8);
}
.btn--warm {
  background: linear-gradient(135deg, var(--warm-a), var(--warm-b));
  color: var(--ink-900);
}
.btn--warm:hover {
  box-shadow: 0 18px 34px -18px rgba(255, 138, 61, 0.9);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.crumbs li + li::before {
  content: "／";
  margin-right: 8px;
  color: var(--sichuan);
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.prose {
  max-width: 68ch;
  color: rgba(242, 246, 250, 0.86);
}
.prose p { margin-bottom: 1.1em; }
.prose > :last-child { margin-bottom: 0; }

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat__num {
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
  color: var(--lime);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 图片容器基础规则 */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(18, 48, 85, 0.9), rgba(5, 11, 22, 0.95));
  isolation: isolate;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.34s var(--ease);
}
.media-frame:hover img { transform: scale(1.03); }

.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--4x3 { aspect-ratio: 4 / 3; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--3x4 { aspect-ratio: 3 / 4; }
.media-frame--hero { aspect-ratio: 21 / 9; }

.media-frame--warm::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 138, 61, 0.5), rgba(255, 196, 107, 0.14) 62%, rgba(5, 11, 22, 0.5));
  pointer-events: none;
}

.media-frame__caption {
  position: relative;
  z-index: 2;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px 20px;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: linear-gradient(180deg, rgba(5, 11, 22, 0), rgba(5, 11, 22, 0.86));
}

/* 左侧固定数据栏 */
.rail {
  position: sticky;
  top: calc(var(--head-h) + 20px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 20px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(5, 11, 22, 0.92), rgba(11, 27, 51, 0.9));
  box-shadow: var(--shadow-panel);
}
.rail__title {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.rail__list a:hover {
  color: var(--paper);
  background: rgba(47, 224, 212, 0.08);
}
.rail__list a[aria-current] {
  color: var(--accent);
  background: rgba(47, 224, 212, 0.12);
}

/* 进入视口显现 */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 6. 头部 · 紧凑命令栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 11, 22, 0.94);
  border-bottom: 1px solid var(--line-accent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 500;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--lime);
  color: var(--ink-900);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transform: translate(-50%, -180%);
  transition: transform 0.24s var(--ease);
}
.skip-link:focus {
  transform: translate(-50%, 0);
}

.cmdbar { position: relative; }

.cmdbar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 12px var(--gutter);
}

.scrollbar {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--lime) 58%, var(--sichuan));
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--paper);
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.brand__text { display: block; }
.brand__name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.brand__tag {
  display: block;
  margin-top: 2px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.brand__tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--bamboo);
  box-shadow: 0 0 0 3px rgba(76, 143, 110, 0.24);
  vertical-align: 1px;
}

/* 命令栏导航 */
.cmdnav {
  flex: 1 1 auto;
  min-width: 0;
}
.cmdnav__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  list-style: none;
}
.cmdnav__list li { display: flex; }
.cmdnav__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  color: rgba(242, 246, 250, 0.72);
  font-size: 0.82rem;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cmdnav__list a:hover {
  color: var(--paper);
  background: rgba(47, 224, 212, 0.1);
}
.cmdnav__idx {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--sichuan);
}
.cmdnav__label { display: inline; }
.cmdnav__list a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-900);
  font-weight: 700;
}
.cmdnav__list a[aria-current="page"] .cmdnav__idx { color: rgba(5, 11, 22, 0.66); }

/* 工具区 */
.cmdbar__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.tool {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tool:hover {
  color: var(--paper);
  border-color: rgba(47, 224, 212, 0.5);
  background: rgba(47, 224, 212, 0.08);
}
.tool--key {
  color: var(--lime);
  border-color: rgba(216, 255, 74, 0.42);
}
.tool--key:hover {
  color: var(--ink-900);
  background: var(--lime);
  border-color: var(--lime);
}

/* 菜单按钮 */
.navtoggle {
  display: none;
  place-items: center;
  width: 46px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(47, 224, 212, 0.42);
  border-radius: 14px;
  background: rgba(18, 48, 85, 0.7);
  cursor: pointer;
  flex: 0 0 auto;
}
.navtoggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}
.navtoggle__bars::before,
.navtoggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--paper);
  transition: transform 0.24s var(--ease), top 0.24s var(--ease);
}
.navtoggle__bars::before { top: 0; }
.navtoggle__bars::after { top: 10px; }
.site-head[data-open] .navtoggle__bars::before { top: 5px; transform: rotate(45deg); }
.site-head[data-open] .navtoggle__bars::after { top: 5px; transform: rotate(-45deg); }

/* ---------- 7. 页脚 ---------- */
.site-foot {
  position: relative;
  margin-top: 96px;
  background: linear-gradient(180deg, rgba(5, 11, 22, 0.98), rgba(11, 27, 51, 0.98));
  border-top: 1px solid var(--line-accent);
}
.site-foot::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 6px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(47, 224, 212, 0.42) 0 1px,
    transparent 1px 14px
  );
  opacity: 0.8;
}

.foot__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 60px var(--gutter) 28px;
}

.foot__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) 2fr;
  gap: 44px;
}

.foot__brand { display: block; }

.foot__name {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  margin-bottom: 10px;
}
.foot__tag {
  max-width: 34ch;
  font-size: 0.78rem;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 16px;
}
.foot__contact {
  max-width: 38ch;
  font-size: 0.76rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: rgba(242, 246, 250, 0.72);
}

.foot__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.foot__coltitle {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.foot__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot__links a {
  color: rgba(242, 246, 250, 0.74);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.foot__links a:hover { color: var(--accent); }

.foot__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- 8. 返回顶部 ---------- */
.totop {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid rgba(47, 224, 212, 0.45);
  border-radius: var(--r-pill);
  background: rgba(5, 11, 22, 0.9);
  color: var(--accent);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease), background-color 0.24s var(--ease), color 0.24s var(--ease);
}
.totop.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.totop:hover {
  background: var(--accent);
  color: var(--ink-900);
}
.totop__arrow { font-family: var(--font-mono); line-height: 1; }

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1120px) {
  .cmdbar__tools { display: none; }
}

@media (max-width: 960px) {
  :root { --head-h: 66px; }

  .cmdbar__inner {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 16px;
  }
  .brand { flex: 1 1 auto; }
  .brand__tag { white-space: normal; }
  .navtoggle { display: grid; }

  .cmdnav {
    order: 3;
    flex: 1 0 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease);
  }
  .site-head[data-open] .cmdnav {
    max-height: 78vh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .cmdnav__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 12px 0 8px;
    border-top: 1px solid var(--line-accent);
  }
  .cmdnav__list a {
    justify-content: flex-start;
    padding: 13px 14px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
  }
  .cmdnav__idx { font-size: 0.68rem; }

  .grid { gap: 16px; }
  .grid--3 > *,
  .grid--4 > * { grid-column: span 6; }

  .rail {
    position: static;
    margin-bottom: 8px;
  }

  .foot__top { grid-template-columns: 1fr; gap: 32px; }
  .site-foot { margin-top: 72px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .grid--2 > *,
  .grid--3 > *,
  .grid--4 > * { grid-column: span 12; }

  .panel { padding: 20px 18px; border-radius: var(--radius-md); }

  .foot__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .foot__inner { padding: 44px 18px 24px; }

  .totop { right: 14px; bottom: 14px; padding: 11px 15px; }
}

/* ---------- 10. 动效降级 ---------- */
@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;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .media-frame:hover img { transform: none; }
  .btn:hover { transform: none; box-shadow: none; }
}
