/* ==========================================================================
   YOBO 赛场 — 共享样式 /assets/site.css
   夜间记分牌体系：左侧导航边框 + 顶部状态条 + 连续画布
   ========================================================================== */

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

:root {
  /* 底色层 */
  --ink-900: #05100E;
  --ink-850: #030B09;
  --ink-800: #0B1F1A;
  --ink-700: #12302A;

  /* 线条 */
  --line: #1E3B34;
  --line-cyan: rgba(43, 232, 200, .18);

  /* 强调 */
  --cyan: #2BE8C8;
  --neon: #6BF7A8;
  --orange: #FF8A1E;
  --red: #FF5252;

  /* 浅色分区 */
  --pale: #EDF2F0;
  --pale-ink: #0A1512;

  /* 换幕色域 */
  --wine: #6E1F35;
  --indigo: #2A2350;

  /* 文本 */
  --white: #E6F2EE;
  --text: #C8D6D1;
  --muted: #8AA09A;

  /* 结构 */
  --rail-w: 236px;
  --topbar-h: 38px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;
  --ease: cubic-bezier(.2, .8, .2, 1);

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-900);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--white);
}

p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }

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

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

a { color: var(--cyan); text-decoration: none; }

hr { border: 0; }

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

#main-content { scroll-margin-top: calc(var(--topbar-h) + 16px); }

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 11px 18px;
  background: var(--cyan);
  color: #04140F;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 头部骨架 ---------- */
.site-header {
  position: relative;
  z-index: 90;
}

/* 顶部细状态栏：仅桌面 */
.topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 92;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--ink-850);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
  text-transform: uppercase;
}

.topbar__note {
  margin: 0;
  white-space: nowrap;
  color: var(--muted);
}

.topbar__status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-inline: auto;
  min-width: 0;
}

.topbar__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 2px 10px;
  border: 1px solid rgba(255, 138, 30, .42);
  border-radius: 999px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: .16em;
  white-space: nowrap;
}
.topbar__chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px var(--orange);
  animation: yobo-pulse 2.4s var(--ease) infinite;
}

.topbar__sync {
  color: var(--neon);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topbar__cert {
  color: var(--cyan);
  padding-left: 16px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@keyframes yobo-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* 移动顶栏 */
.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 96;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px var(--gutter);
  background: rgba(5, 16, 14, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ---------- 品牌 ---------- */
.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 7px;
  text-decoration: none;
  color: var(--white);
}

.brand__mark {
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .2em;
  color: var(--white);
  transform: scaleX(.9);
  transform-origin: left center;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .44em;
  color: var(--cyan);
}

.brand--compact {
  flex-direction: row;
  align-items: baseline;
  gap: 9px;
}
.brand--compact .brand__mark { font-size: 21px; }
.brand--compact .brand__sub { letter-spacing: .3em; }

/* ---------- 移动导航按钮 ---------- */
.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: transparent;
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.nav-toggle:hover { border-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: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform .24s var(--ease), top .24s var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8.5px; }

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

.nav-toggle__text { line-height: 1; }

/* ---------- 遮罩 ---------- */
.nav-scrim {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(3, 9, 8, .74);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s var(--ease), visibility 0s linear .28s;
}
.nav-scrim[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity .28s var(--ease), visibility 0s linear 0s;
}

/* ---------- 左侧导航边框 ---------- */
.rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(84vw, 340px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #071613 0%, var(--ink-800) 62%, #06110F 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .32s var(--ease), visibility 0s linear .32s;
}
.rail[data-open="true"] {
  transform: translateX(0);
  visibility: visible;
  transition: transform .32s var(--ease), visibility 0s linear 0s;
}
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 62%;
  background: linear-gradient(180deg, var(--cyan), transparent);
  opacity: .55;
  pointer-events: none;
}

.rail__brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 26px 22px 22px;
  border-bottom: 1px solid var(--line);
}

.rail__note {
  margin: 3px 0 0;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1;
  letter-spacing: .3em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 1px solid var(--line-cyan);
  padding-left: 8px;
  max-height: 132px;
  overflow: hidden;
}

.rail__nav { padding: 12px 0; }

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 13px 22px 13px 28px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--cyan);
  transform: translateY(-50%);
  transition: height .28s var(--ease), box-shadow .28s var(--ease);
}
.nav-link:hover {
  color: var(--white);
  background-color: rgba(43, 232, 200, .05);
}
.nav-link:hover::before { height: 58%; }

.nav-link[aria-current="page"] {
  color: var(--cyan);
  background-color: rgba(43, 232, 200, .07);
  font-weight: 700;
}
.nav-link[aria-current="page"]::before {
  height: 100%;
  box-shadow: 0 0 10px var(--cyan);
}

.rail__foot {
  margin-top: auto;
  padding: 18px 22px 24px;
  border-top: 1px solid var(--line);
}

.rail__meter {
  display: block;
  height: 2px;
  margin-bottom: 11px;
  background: linear-gradient(90deg, var(--cyan), rgba(43, 232, 200, 0));
}

.rail__meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .16em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-cyan);
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { color: var(--cyan); border-color: var(--cyan); }

.btn--sm {
  padding: 7px 13px;
  font-size: 12px;
  letter-spacing: .04em;
}

.btn--solid {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04140F;
  font-weight: 700;
}
.btn--solid:hover {
  background: #57f2d8;
  border-color: #57f2d8;
  color: #04140F;
}

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

/* ---------- 布局容器 ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tint { background: var(--ink-800); }
.section--pale { background: var(--pale); color: var(--pale-ink); }
.section--pale h1,
.section--pale h2,
.section--pale h3 { color: var(--pale-ink); }

/* ---------- 文本组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan);
}

.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(20px, 2.4vw, 27px);
  letter-spacing: -.01em;
}
.prose h3 {
  margin-top: 1.7em;
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--white);
}
.prose ul,
.prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: .45em; }
.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose strong { color: var(--white); font-weight: 700; }

.section--pale .prose { color: #26332F; }
.section--pale .prose h2,
.section--pale .prose h3,
.section--pale .prose strong { color: var(--pale-ink); }
.section--pale .prose a { color: #0E6A5C; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--white); }

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 2.6vw, 32px);
}
.grid--2 { grid-template-columns: minmax(0, 1fr); }
.grid--3 { grid-template-columns: minmax(0, 1fr); }

@media (min-width: 780px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- 面板 ---------- */
.panel {
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel--pale {
  background: var(--pale);
  border-color: #D6E2DD;
  color: var(--pale-ink);
}
.panel--pale h2,
.panel--pale h3 { color: var(--pale-ink); }

/* ---------- 数据数字与状态 ---------- */
.stat-figure {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
  color: var(--neon);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  letter-spacing: .14em;
  white-space: nowrap;
}
.status--live { color: var(--orange); }
.status--final { color: var(--neon); }
.status--alert { color: var(--red); }

/* ---------- 筛选 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 20px;
}

.filter-chip {
  position: relative;
  appearance: none;
  padding: 8px 15px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease);
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--line-cyan);
  background-color: rgba(43, 232, 200, .05);
}
.filter-chip[aria-pressed="true"] {
  color: var(--cyan);
  border-color: var(--cyan);
  background-color: rgba(43, 232, 200, .07);
}
.filter-chip[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -1px;
  height: 2px;
  background: var(--cyan);
}

[data-filter-tag][hidden] { display: none !important; }

/* ---------- 图片容器基础规则 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  isolation: isolate;
}
.media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.62) contrast(1.06) brightness(.86);
  transition: transform .5s var(--ease), filter .5s var(--ease);
}
.media:hover img { transform: scale(1.02); filter: saturate(.72) contrast(1.06) brightness(.92); }

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(43, 232, 200, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 232, 200, .08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(43, 232, 200, .07) 0 1px,
    transparent 1px 4px
  );
  mix-blend-mode: screen;
}

.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }

.media__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- 分隔线 ---------- */
.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line);
}
.rule--cyan { background: linear-gradient(90deg, var(--cyan), rgba(43, 232, 200, 0)); }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: auto;
  padding: clamp(44px, 6vw, 76px) 0 0;
  background: var(--ink-800);
  border-top: 1px solid var(--cyan);
  color: var(--text);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(43, 232, 200, .5);
  pointer-events: none;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  padding-bottom: clamp(32px, 4vw, 52px);
}

.footer__col { min-width: 0; }

.footer__mark {
  display: block;
  margin-bottom: 12px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .18em;
  color: var(--white);
  transform: scaleX(.92);
  transform-origin: left center;
}

.footer__line {
  margin: 0;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.72;
  color: var(--muted);
}

.footer__title {
  margin: 0 0 15px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer__links,
.footer__facts {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1.6;
}

.footer__links a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer__links a:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer__facts li {
  font-size: 13.5px;
  color: var(--muted);
  word-break: break-word;
}

.footer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.footer__note {
  margin: 0;
  max-width: 36ch;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

.footer__copy { margin: 0; }

/* ---------- 工具类 ---------- */
.visually-hidden {
  position: absolute !important;
  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;
}

/* ==========================================================================
   断点
   ========================================================================== */

/* 平板 */
@media (min-width: 720px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 桌面：导航成为页面边框 */
@media (min-width: 1024px) {
  body {
    padding-top: var(--topbar-h);
    padding-left: var(--rail-w);
  }

  .topbar { display: flex; }

  .mobile-bar { display: none; }

  .rail {
    top: var(--topbar-h);
    bottom: auto;
    width: var(--rail-w);
    height: calc(100vh - var(--topbar-h));
    transform: none;
    visibility: visible;
    transition: none;
    border-right: 1px solid var(--line);
  }

  .nav-scrim { display: none; }

  #main-content { scroll-margin-top: 20px; }
}

@media (min-width: 1080px) {
  .footer__grid { grid-template-columns: 1.5fr .9fr 1.2fr 1.15fr; }
}

/* 大屏 */
@media (min-width: 1440px) {
  :root { --rail-w: 264px; }
  .rail__brand { padding: 32px 26px 26px; }
  .nav-link { padding: 14px 26px 14px 32px; font-size: 15.5px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }

  .topbar__chip::before { animation: none; opacity: 1; }
  .media:hover img { transform: none; }
}
