/* =========================================================
   YABO888VIP 主站 · 共享站点样式 /assets/site.css
   夜间赛事指挥台：深钴蓝网格底 + 侧边轨道 + 等宽数字信号
   ========================================================= */

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

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

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

ul, ol { list-style: none; }

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

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

a { color: inherit; }

/* ---------- tokens ---------- */
:root {
  --ink: #06162F;
  --ink-2: #0B2350;
  --line: #1C3A6A;
  --cyan: #22D3EE;
  --cyan-soft: #5BE5F7;
  --orange: #FF7A1A;
  --mint: #3DDC97;
  --violet: #8B5CF6;
  --amber: #FFD166;
  --white: #E8F0FF;
  --muted: #93A4C3;
  --rail-w: 264px;

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

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --rail-w: 232px; }
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(28, 58, 106, 0.55) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(28, 58, 106, 0.34) 0 1px, transparent 1px 100%);
  background-size: clamp(64px, 7vw, 96px) clamp(64px, 7vw, 96px);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1 { font-size: clamp(38px, 5.4vw, 84px); line-height: 1.02; }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 1.9vw, 24px); letter-spacing: -0.02em; }

p { max-width: 68ch; }

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

::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

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

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: #04182B;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline-offset: 2px;
}

/* ---------- header shell ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  background: var(--ink);
}

.rail {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 20px 20px;
  background: rgba(6, 22, 47, 0.97);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: var(--white);
}

.rail-brand__mark {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--white);
}

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

.rail-brand__tag {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  line-height: 1.5;
}

.badge-version {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--violet);
  border: 1px solid rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.1);
  border-radius: 1px;
  white-space: nowrap;
}

/* ---------- mobile toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}

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

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 16px;
  height: 12px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

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

/* ---------- navigation ---------- */
.site-nav {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.site-nav__label {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--muted);
  text-transform: uppercase;
  max-width: none;
}

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

.nav-item { display: block; }

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease), background 0.16s var(--ease);
}

.nav-link:hover {
  color: var(--white);
  border-left-color: var(--line);
  background: rgba(28, 58, 106, 0.45);
}

.nav-link[aria-current="page"] {
  color: var(--white);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.16), transparent 72%);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--line);
  transition: color 0.16s var(--ease);
}

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

.nav-text { font-weight: 600; }

/* ---------- rail foot ---------- */
.rail-foot {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  max-width: none;
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.16);
  animation: dot-breathe 2.8s ease-in-out infinite;
}

@keyframes dot-breathe {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ---------- scroll progress ---------- */
.rail-progress {
  position: absolute;
  top: 0;
  right: 0;
  width: 2px;
  height: 100%;
  background: rgba(28, 58, 106, 0.65);
  overflow: hidden;
  pointer-events: none;
}

.rail-progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--cyan), var(--violet));
  transform-origin: top center;
  transform: scaleY(var(--progress, 0));
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease), transform 0.14s var(--ease);
}

.btn--primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04182B;
}

.btn--primary:hover { background: var(--cyan-soft); border-color: var(--cyan-soft); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--white);
}

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

.btn--block { width: 100%; }

/* ---------- layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3.2vw, 48px);
}

.site-main { display: block; }

.page-head {
  padding-block: clamp(30px, 4vw, 56px) clamp(18px, 2vw, 28px);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
}

.panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(18px, 2.4vw, 32px);
}

.rule {
  height: 1px;
  border: 0;
  background: var(--line);
  margin: 0;
}

/* ---------- labels & badges ---------- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cyan);
  max-width: none;
}

.section-label::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan);
}

.tag-mono {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.badge--hot { color: var(--orange); border-color: rgba(255, 122, 26, 0.5); background: rgba(255, 122, 26, 0.08); }
.badge--mint { color: var(--mint); border-color: rgba(61, 220, 151, 0.5); background: rgba(61, 220, 151, 0.08); }
.badge--violet { color: var(--violet); border-color: rgba(139, 92, 246, 0.5); background: rgba(139, 92, 246, 0.08); }

.annotation-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--muted);
  max-width: none;
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  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; transition: color 0.16s var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--white); }

/* ---------- media frames (页面阶段放图片) ---------- */
.figure-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    repeating-linear-gradient(180deg, rgba(28, 58, 106, 0.35) 0 1px, transparent 1px 9px),
    var(--ink-2);
  aspect-ratio: 16 / 9;
  width: 100%;
}

.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(6, 22, 47, 0.34) 0 1px, transparent 1px 4px),
    linear-gradient(120deg, rgba(34, 211, 238, 0.08), transparent 55%);
}

.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--tall { aspect-ratio: 3 / 4; }
.figure-frame--square { aspect-ratio: 1 / 1; }
.figure-frame--plate { aspect-ratio: 4 / 5; border-left: 3px solid var(--cyan); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: linear-gradient(180deg, rgba(11, 35, 80, 0.6), rgba(6, 22, 47, 0.96));
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 26px);
  pointer-events: none;
}

.footer-inner {
  max-width: 1320px;
  margin-inline: auto;
  padding: clamp(34px, 4.6vw, 62px) clamp(18px, 3.4vw, 48px) 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

.footer-brand__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(21px, 2.3vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--white);
  max-width: none;
}

.footer-brand__summary {
  margin-top: 12px;
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-brand__meta {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mint);
  max-width: none;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 40px);
}

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

.footer-col__title {
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  max-width: none;
}

.footer-links { display: flex; flex-direction: column; gap: 9px; }

.footer-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.16s var(--ease);
}

.footer-link::before {
  content: "";
  width: 10px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  transform: translateY(-4px);
  opacity: 0.65;
}

.footer-link:hover { color: var(--cyan); }

.footer-contact {
  margin-top: clamp(26px, 3.6vw, 44px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 28px;
}

.footer-contact__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-contact__value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  overflow-wrap: anywhere;
}

.footer-contact__value--addr {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.6;
  color: var(--white);
}

.footer-bottom {
  margin-top: clamp(22px, 3vw, 34px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 22px;
}

.footer-bottom__copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.footer-legal__item {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.footer-legal .footer-link { font-size: 12px; color: var(--muted); }
.footer-legal .footer-link::before { width: 7px; }
.footer-legal .footer-link:hover { color: var(--cyan); }

/* ---------- mobile / tablet ---------- */
@media (max-width: 1023px) {
  body {
    padding-left: 0;
    font-size: 16px;
  }

  .site-header {
    position: sticky;
    top: 0;
    bottom: auto;
    left: auto;
    width: 100%;
    background: var(--ink-2);
  }

  .rail {
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--ink-2);
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .badge-version { display: none; }

  .nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 4;
  }

  .rail-brand { position: relative; z-index: 4; }
  .rail-brand__mark { font-size: 18px; }
  .rail-brand__tag { font-size: 10px; letter-spacing: 0.1em; }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 2;
    width: min(332px, 84vw);
    padding: 74px 18px 22px;
    background: var(--ink-2);
    border-right: 1px solid var(--line);
    box-shadow: 24px 0 60px rgba(3, 10, 24, 0.6);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-104%);
    transition: transform 0.24s var(--ease);
  }

  .site-nav[data-open="true"] { transform: translateX(0); }

  .site-nav__label { margin-top: 2px; }
  .nav-link { font-size: 16px; padding-block: 11px; }

  .rail-progress {
    top: auto;
    bottom: -1px;
    right: auto;
    left: 0;
    width: 100%;
    height: 2px;
  }

  .rail-progress__bar {
    transform-origin: left center;
    transform: scaleX(var(--progress, 0));
    background: linear-gradient(90deg, var(--cyan), var(--orange));
  }

  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .nav-toggle__text { display: none; }
}

/* ---------- motion preference ---------- */
@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;
    scroll-behavior: auto !important;
  }

  .dot { opacity: 1; }
}
