/* ==========================================================================
   YABO赛事 · 共享外壳 (/assets/site.css)
   深夜看台 / 玻璃层 + 实色层 / 等宽档案索引
   ========================================================================== */

:root {
  --ink-900: #07111F;
  --ink-800: #0D1F33;
  --ink-700: #12283F;
  --sync: #6FE7DD;
  --replay: #F2B35C;
  --pulse: #FF6B4A;
  --paper: #F3EBDD;
  --mist: #E6EEF5;
  --slate: #7E93A6;
  --line: #2A3B4D;
  --steel: #A9C3CF;

  --rail-w: 216px;
  --edge: 18px;

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

  --glass: rgba(9, 22, 38, 0.86);
  --doc-shadow: 0 16px 34px -24px rgba(0, 0, 0, 0.95);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

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

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

body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image:
    radial-gradient(1100px 560px at 84% -8%, rgba(111, 231, 221, 0.08), transparent 62%),
    radial-gradient(900px 520px at 6% 108%, rgba(242, 179, 92, 0.07), transparent 60%);
  background-attachment: fixed;
  color: var(--mist);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--mist);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; }

button { font: inherit; color: inherit; }

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

/* ---------- 通用工具 ---------- */
.container {
  width: min(100% - (var(--edge) * 2), 1180px);
  margin-inline: auto;
}

.mono { font-family: var(--font-mono); letter-spacing: 0.06em; }

.prose {
  max-width: 66ch;
  color: rgba(230, 238, 245, 0.86);
  line-height: 1.85;
}
.prose > * + * { margin-top: 1.1em; }

.grid { display: grid; gap: 20px; }

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 10px 18px;
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.22s var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: none; }

/* ---------- 头部：移动优先的顶部条 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.28s ease;
}
.site-header[data-scrolled] { box-shadow: var(--doc-shadow); }

.site-header__rail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--edge);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-right: auto;
  text-decoration: none;
  color: var(--mist);
}
.brand__mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--paper);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--slate);
}
.brand__tag { display: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(13, 31, 51, 0.82);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--sync); color: var(--sync); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle__bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.24s var(--ease), opacity 0.24s ease;
}
.site-header[data-open] .nav-toggle__bars span:first-child { transform: translateY(4.5px) rotate(45deg); }
.site-header[data-open] .nav-toggle__bars span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- 导航：移动抽屉 ---------- */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: min(340px, 88vw);
  padding: 70px 20px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(9, 22, 38, 0.97);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--line);
  transform: translateX(103%);
  visibility: hidden;
  transition: transform 0.34s var(--ease), visibility 0.34s var(--ease);
}
.site-header[data-open] .site-nav {
  transform: none;
  visibility: visible;
}

.site-nav__list { display: flex; flex-direction: column; }

.site-nav__item { border-bottom: 1px solid rgba(42, 59, 77, 0.55); }
.site-nav__item:first-child { border-top: 1px solid rgba(42, 59, 77, 0.55); }

.site-nav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 13px;
  border-left: 2px solid transparent;
  color: rgba(230, 238, 245, 0.74);
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.site-nav__link:hover {
  color: var(--paper);
  background: rgba(111, 231, 221, 0.06);
}
.site-nav__link[aria-current="page"] {
  color: var(--paper);
  border-left-color: var(--sync);
  background: linear-gradient(90deg, rgba(111, 231, 221, 0.16), rgba(111, 231, 221, 0));
}
.site-nav__link[aria-current="page"] .site-nav__index { color: var(--sync); }

.site-nav__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--slate);
  transition: color 0.2s ease;
}
.site-nav__label { letter-spacing: 0.02em; }

.site-nav__cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.site-nav__cta .btn { width: 100%; }

.site-nav__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

/* ---------- 状态点 ---------- */
.status-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--slate);
}
.status-dot--sync {
  background: var(--sync);
  box-shadow: 0 0 0 3px rgba(111, 231, 221, 0.16);
  animation: dot-breathe 3.6s ease-in-out infinite;
}
.status-dot--replay {
  background: var(--replay);
  box-shadow: 0 0 0 3px rgba(242, 179, 92, 0.16);
}
@keyframes dot-breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- 轨道尾部（桌面） ---------- */
.rail-foot { display: none; }

.rail-progress {
  position: relative;
  height: 2px;
  margin-bottom: 14px;
  background: var(--line);
  overflow: hidden;
}
.rail-progress__bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--sync), var(--replay));
  transition: width 0.12s linear;
}
.rail-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: color 0.2s ease;
}
.rail-top:hover { color: var(--sync); }
.rail-top__arrow { font-size: 13px; }
.rail-icp {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: rgba(126, 147, 166, 0.72);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn--sync {
  background: var(--sync);
  color: #04121a;
}
.btn--sync:hover { background: #93f2e9; transform: translateY(-1px); }

.btn--amber {
  background: rgba(242, 179, 92, 0.09);
  border-color: rgba(242, 179, 92, 0.48);
  color: var(--replay);
}
.btn--amber:hover { background: rgba(242, 179, 92, 0.18); transform: translateY(-1px); }

.btn--ghost {
  background: rgba(13, 31, 51, 0.7);
  border-color: var(--line);
  color: var(--mist);
}
.btn--ghost:hover { border-color: var(--steel); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.breadcrumb__link {
  color: var(--steel);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.breadcrumb__link:hover { color: var(--sync); border-bottom-color: var(--sync); }
.breadcrumb__sep { color: var(--line); }

/* ---------- 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(160deg, var(--ink-800), var(--ink-900));
  isolation: isolate;
}
.media-frame img,
.media-frame > picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(230, 238, 245, 0.05), inset 0 36px 70px -58px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--screen { aspect-ratio: 16 / 10; background: var(--ink-800); }
.media-frame--portrait { aspect-ratio: 4 / 5; }
.media-frame--paper { background: var(--paper); border-color: rgba(42, 59, 77, 0.35); }

.media-caption {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--slate);
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 64px;
  padding: 40px 0 26px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(13, 31, 51, 0.5), rgba(5, 12, 22, 0.95) 68%);
}

.footer-tape {
  height: 12px;
  margin-bottom: 32px;
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 16px);
  opacity: 0.9;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer-brand__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--replay);
}
.footer-brand__name {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-decoration: none;
}
.footer-brand__name:hover { color: var(--sync); }
.footer-brand__domain {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--slate);
}
.footer-brand__note {
  max-width: 46ch;
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid rgba(242, 179, 92, 0.7);
  font-size: 13px;
  line-height: 1.95;
  color: rgba(169, 195, 207, 0.8);
}

.footer-col__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel);
}
.footer-col__title::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--replay);
}
.footer-col__title--sub { margin-top: 26px; }

.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.footer-contact__key {
  min-width: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--slate);
}
.footer-contact__val {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--mist);
  overflow-wrap: anywhere;
}
.footer-contact__val--text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.75;
  color: rgba(230, 238, 245, 0.86);
}

.copy-btn {
  padding: 3px 8px;
  border: 1px solid rgba(111, 231, 221, 0.32);
  border-radius: 2px;
  background: rgba(111, 231, 221, 0.1);
  color: var(--sync);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.copy-btn:hover { background: rgba(111, 231, 221, 0.2); }
.copy-btn[data-copied="true"] {
  border-color: rgba(242, 179, 92, 0.6);
  background: rgba(242, 179, 92, 0.14);
  color: var(--replay);
}

.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: rgba(230, 238, 245, 0.76);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links__link::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--line);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.footer-links__link:hover { color: var(--paper); }
.footer-links__link:hover::before { background: var(--sync); transform: translateX(2px); }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--slate);
}
.footer-legal__copy { margin-left: auto; }

/* ==========================================================================
   平板 ≥ 720px
   ========================================================================== */
@media (min-width: 720px) {
  :root { --edge: 26px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .grid--split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel { padding: 26px; }
}

/* ==========================================================================
   桌面 ≥ 1024px：侧边轨道
   ========================================================================== */
@media (min-width: 1024px) {
  :root { --edge: 32px; }

  html { scroll-padding-top: 28px; }

  body { padding-left: var(--rail-w); }

  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--rail-w);
    border-bottom: 0;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(9, 22, 38, 0.94), rgba(7, 17, 31, 0.9));
  }
  .site-header[data-scrolled] {
    box-shadow: 14px 0 40px -28px rgba(0, 0, 0, 0.98);
  }

  .site-header__rail {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    height: 100%;
    padding: 26px 18px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-right: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
  .brand__mark { font-size: 27px; letter-spacing: 0.12em; }
  .brand__sub { font-size: 10px; letter-spacing: 0.3em; }
  .brand__tag {
    display: block;
    max-width: 100%;
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.8;
    letter-spacing: 0.14em;
    color: var(--slate);
  }

  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    inset: auto;
    width: auto;
    height: auto;
    flex: 1 1 auto;
    padding: 0;
    margin-top: 20px;
    overflow: visible;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: 0;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .site-nav__link { padding: 10px 8px 10px 12px; }
  .site-nav__link[aria-current="page"] { border-left-color: var(--sync); }
  .site-nav__label { font-size: 14px; }

  .site-nav__cta { margin-top: auto; padding-top: 16px; }

  .rail-foot { display: block; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
}

/* ==========================================================================
   移动抽屉打开时的滚动锁
   ========================================================================== */
@media (max-width: 1023px) {
  .is-nav-open { overflow: hidden; }
}

/* ==========================================================================
   降低动效
   ========================================================================== */
@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;
  }
  .status-dot--sync { animation: none; }
  .rail-progress__bar { transition: none; }
}
