/* ============================================================
   博喜体育 · 共享外壳样式 / assets/site.css
   深空蓝黑底 + 面板深蓝分区 + 电光青 / 信号橙 / 荧光绿状态
   ============================================================ */

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

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

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

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

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

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

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

/* ---------- tokens ---------- */
:root {
  --ink: #0B1220;
  --panel: #111C2E;
  --line: #1F2E45;
  --text: #E6EDF5;
  --muted: #9AA9BC;
  --cyan: #22D3EE;
  --orange: #FF8A3D;
  --lime: #7CFF6B;
  --violet: #8B7CF6;
  --paper: #F5F7FA;

  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --rail-w: 236px;
  --topbar-h: 60px;
  --gutter: 24px;
  --radius: 2px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); }
h4 { font-size: 1.05rem; }

p { max-width: 68ch; }

a { transition: color .18s var(--ease); }

code, time, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

::selection { background: rgba(34, 211, 238, .28); color: var(--paper); }

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

#main-content { display: block; min-width: 0; }

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  transform: translateY(-180%);
  padding: 10px 18px;
  background: var(--cyan);
  color: #04121A;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: var(--radius);
  transition: transform .22s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* ============================================================
   侧边轨道头部
   ============================================================ */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 80;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 22px 18px 20px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.site-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(420px 220px at 50% -10%, rgba(34, 211, 238, .14), transparent 72%);
}

.site-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  pointer-events: none;
  opacity: .45;
  background: repeating-linear-gradient(to bottom,
      rgba(34, 211, 238, .55) 0 2px,
      transparent 2px 16px);
}

.rail-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.rail-mark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--text);
}

.rail-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--muted);
  word-break: break-all;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: top .2s var(--ease), transform .2s var(--ease);
}

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

.site-rail[data-open] .nav-toggle-bars::before { top: 4.5px; transform: rotate(45deg); }
.site-rail[data-open] .nav-toggle-bars::after { top: 4.5px; transform: rotate(-45deg); }

.rail-body {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 24px;
}

.rail-tagline {
  max-width: none;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .04em;
}

.rail-nav { margin-top: 16px; }

.rail-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0 9px 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  transition: color .18s var(--ease);
}

.rail-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--line);
  transform: translateY(-50%);
  transition: width .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}

.rail-link:hover { color: var(--text); }
.rail-link:hover::before { width: 11px; background: var(--muted); }

.rail-link[aria-current="page"] {
  color: var(--text);
  font-weight: 500;
}

.rail-link[aria-current="page"]::before {
  width: 14px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, .7);
}

.rail-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: #465872;
  transition: color .2s var(--ease);
}

.rail-link:hover .rail-index { color: var(--muted); }
.rail-link[aria-current="page"] .rail-index { color: var(--cyan); }

.rail-text { letter-spacing: .02em; }

.rail-tail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: var(--orange);
  color: #160B02;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: var(--radius);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}

.rail-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 138, 61, .3);
}

.rail-utility {
  position: relative;
  padding-left: 16px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
}

.rail-utility::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 1px;
  background: var(--line);
}

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

/* ============================================================
   页脚
   ============================================================ */
.site-foot {
  position: relative;
  margin-top: 96px;
  padding-top: 4px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}

.site-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: repeating-linear-gradient(to right,
      var(--cyan) 0 26px,
      transparent 26px 40px,
      var(--line) 40px 66px,
      transparent 66px 80px);
  opacity: .45;
}

.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1.15fr);
  gap: 44px 56px;
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 60px 0 52px;
}

.foot-brand { display: flex; flex-direction: column; gap: 6px; }

.foot-mark {
  max-width: none;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .02em;
}

.foot-sub {
  max-width: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  word-break: break-all;
}

.foot-tagline {
  max-width: none;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: .03em;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.foot-col { min-width: 0; }

.foot-col-title {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .16em;
}

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

.foot-link {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.foot-link:hover { color: var(--text); }

.foot-contact { min-width: 0; }

.foot-contact-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}

.foot-contact-list li {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .02em;
}

.foot-contact-note {
  max-width: 42ch;
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.foot-base { border-top: 1px solid var(--line); }

.foot-base-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding: 18px 0 26px;
}

.foot-copy,
.foot-icp {
  max-width: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              visibility .25s linear, color .18s var(--ease), border-color .18s var(--ease);
}

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

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

/* ============================================================
   通用布局与内容组件
   ============================================================ */
.wrap {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------- 眉标 / 标签 / 说明牌 ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
}

.kicker::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--cyan);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(34, 211, 238, .06);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: .08em;
  white-space: nowrap;
}

.tag--live {
  border-color: rgba(124, 255, 107, .35);
  background: rgba(124, 255, 107, .07);
  color: var(--lime);
}

.tag--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px rgba(124, 255, 107, .9);
}

.tag--round {
  border-color: rgba(255, 138, 61, .35);
  background: rgba(255, 138, 61, .07);
  color: var(--orange);
}

.tag--data {
  border-color: rgba(139, 124, 246, .35);
  background: rgba(139, 124, 246, .07);
  color: var(--violet);
}

.plate {
  position: relative;
  padding: 22px 22px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.plate::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18px;
  width: 34px;
  height: 2px;
  background: var(--cyan);
}

.rule {
  width: 100%;
  height: 1px;
  background: repeating-linear-gradient(to right,
      var(--line) 0 6px,
      transparent 6px 12px);
}

.frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 28, 46, .88), rgba(11, 18, 32, .96));
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--cyan);
  opacity: .65;
}

.frame::before {
  top: -1px;
  left: -1px;
  border-right: 0;
  border-bottom: 0;
}

.frame::after {
  right: -1px;
  bottom: -1px;
  border-top: 0;
  border-left: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .02em;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease);
}

.btn--primary { background: var(--orange); color: #160B02; }
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 138, 61, .3);
}

.btn--accent { background: var(--cyan); color: #04121A; }
.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(34, 211, 238, .28);
}

.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn--quiet { padding: 10px 4px; color: var(--muted); }
.btn--quiet:hover { color: var(--cyan); }

/* ---------- 面包屑 ---------- */
.breadcrumb { margin-top: 28px; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .06em;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: #3A4A61;
}

.breadcrumb-link { color: var(--muted); }
.breadcrumb-link:hover { color: var(--cyan); }
.breadcrumb-current { color: var(--text); }

/* ---------- 图片容器（供页面阶段放置图片） ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, #0E1A2B 0%, #0B1220 100%);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.78) brightness(.9) contrast(1.06);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(31, 46, 69, .38) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 46, 69, .38) 1px, transparent 1px);
  background-size: 44px 44px;
}

.media--21-9 { aspect-ratio: 21 / 9; }
.media--16-9 { aspect-ratio: 16 / 9; }
.media--4-3  { aspect-ratio: 4 / 3; }
.media--1-1  { aspect-ratio: 1 / 1; }

.media__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, .4);
  border-radius: var(--radius);
  background: rgba(11, 18, 32, .82);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .1em;
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .foot-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .foot-contact-note { max-width: 60ch; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .site-rail {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: var(--topbar-h);
    padding: 0 18px;
    background: rgba(11, 18, 32, .94);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 90;
  }

  .site-rail::before,
  .site-rail::after { display: none; }

  .rail-head {
    align-items: center;
    height: 100%;
  }

  .rail-brand {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .rail-mark { font-size: 18px; }
  .rail-sub { font-size: 10px; }
  .nav-toggle { display: inline-flex; }

  .rail-body {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    flex: 0 0 auto;
    max-height: calc(100vh - var(--topbar-h));
    margin-top: 0;
    padding: 20px 18px 26px;
    overflow-y: auto;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }

  .site-rail[data-open] .rail-body { display: flex; }

  .rail-tagline { display: block; }
  .rail-nav { margin-top: 16px; }
  .rail-link { padding: 11px 0 11px 16px; font-size: 15.5px; }
  .rail-tail { margin-top: 24px; padding-top: 0; }
  .rail-cta { width: 100%; padding: 14px 16px; }
  .rail-utility { padding-top: 4px; }

  .site-foot { margin-top: 64px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.78; }

  .wrap { width: calc(100% - 2 * 18px); }

  .grid, .grid--2, .grid--3, .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-inner { width: calc(100% - 2 * 18px); padding: 44px 0 40px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
  .foot-base-inner { width: calc(100% - 2 * 18px); padding: 16px 0 22px; }
  .plate { padding: 18px 18px 20px; }
}

@media (max-width: 420px) {
  .foot-cols { grid-template-columns: minmax(0, 1fr); }
  .rail-sub { display: none; }
  .nav-toggle-text { display: none; }
}

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

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .to-top { transition: none; }
}
