/* =========================================================
   yabo888赛场 — 共享样式表  /assets/site.css
   夜间赛场 · 堆叠面板 · 粗野主义边框
   ========================================================= */

/* ---------- 1. 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dt, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #07100D;
  --panel: #0D1B16;
  --panel-2: #12291F;
  --field: #1FE0A0;
  --blue: #35A7FF;
  --orange: #FF7A1A;
  --amber: #FFC857;
  --violet: #8B5CF6;
  --text: #E9F4EF;
  --muted: #9AB0A8;
  --line: #2E423A;

  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", "Courier New", monospace;

  --maxw: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --hard-shadow: 6px 6px 0 rgba(0, 0, 0, .55);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  background-color: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

p { font-size: clamp(15px, 1.05vw, 17px); color: var(--text); }
p + p { margin-top: 1.1em; }
strong { font-weight: 800; color: var(--text); }

h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.14;
  color: var(--text);
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
}

.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;
}

#main-content { display: block; scroll-margin-top: 88px; }
#main-content:focus { outline: none; }

.rule {
  height: 2px;
  border: 0;
  background-color: var(--line);
  margin: clamp(24px, 4vw, 48px) 0;
}

/* ---------- 4. 焦点与可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 90;
  display: inline-block;
  padding: 10px 18px;
  background-color: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  border: 2px solid var(--ink);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 10px; }

/* ---------- 5. 容器与网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
  background-color: var(--ink);
}
.section--panel {
  background-color: var(--panel);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.section--raised {
  background-color: var(--panel-2);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.grid-main {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(18px, 2.4vw, 34px);
}
.col-index { grid-column: span 2; }
.col-body  { grid-column: span 8; }
.col-note  { grid-column: span 2; }

.section-head {
  display: flex;
  align-items: flex-end;
  gap: clamp(12px, 1.6vw, 22px);
  flex-wrap: wrap;
  padding-bottom: clamp(14px, 1.8vw, 22px);
  margin-bottom: clamp(26px, 3.4vw, 46px);
  border-bottom: 2px solid var(--line);
}
.section-head__num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  line-height: .84;
  letter-spacing: -.05em;
  color: var(--field);
}
.section-head__title {
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 900;
  letter-spacing: -.02em;
}

/* ---------- 6. 通用元件 ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.label--box {
  border: 1px solid var(--line);
  padding: 4px 9px;
  color: var(--field);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 2px solid var(--line);
  background-color: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .18s var(--ease), border-color .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease),
              box-shadow .18s var(--ease);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .6);
}
.btn--action {
  background-color: var(--orange);
  border-color: var(--orange);
  color: var(--ink);
  font-weight: 800;
}
.btn--action:hover { background-color: #FF9040; border-color: #FF9040; }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--field); color: var(--field); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 18px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.crumbs a { color: var(--muted); text-decoration: none; transition: color .18s var(--ease); }
.crumbs a:hover { color: var(--field); }
.crumbs__sep { color: var(--line); }
.crumbs [aria-current="page"] { color: var(--field); }

/* ---------- 7. 图片容器（供页面阶段放置占位图） ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border: 2px solid var(--line);
  background-color: var(--panel-2);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: linear-gradient(125deg,
    rgba(13, 27, 22, .88) 0%,
    rgba(13, 27, 22, .34) 52%,
    rgba(7, 16, 13, 0) 100%);
}
.media-frame--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(46, 66, 58, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(46, 66, 58, .55) 1px, transparent 1px);
  background-size: 48px 48px;
}
.media-frame--cut { clip-path: polygon(0 0, 100% 0, 100% 86%, 0 100%); }
.ratio-21x9 { aspect-ratio: 21 / 9; }
.ratio-16x9 { aspect-ratio: 16 / 9; }
.ratio-4x3  { aspect-ratio: 4 / 3; }
.ratio-1x1  { aspect-ratio: 1 / 1; }

/* ---------- 8. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background-color: rgba(7, 16, 13, .95);
  border-bottom: 2px solid var(--line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 32px);
  width: 100%;
  max-width: var(--maxw);
  min-height: 68px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.015em;
}
.brand-mark__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background-color: var(--field);
  box-shadow: 0 0 0 3px rgba(31, 224, 160, .18);
}
.brand-mark__name { white-space: nowrap; }
.brand-ver {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 6px;
}

.command-nav { flex: 1 1 auto; min-width: 0; }
.command-nav__list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}
.command-nav__item { display: flex; }
.command-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.command-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background-color: var(--field);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}
.command-nav__link:hover { color: var(--text); }
.command-nav__link:hover::after { transform: scaleX(1); }
.command-nav__link[aria-current="page"] { color: var(--field); font-weight: 700; }
.command-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.command-nav__idx {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  letter-spacing: .08em;
  color: rgba(154, 176, 168, .6);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.port-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.port-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}
.port-link__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .2);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-toggle__bars { display: grid; gap: 3px; width: 16px; }
.nav-toggle__bars i { display: block; height: 2px; background-color: var(--field); }
.nav-toggle__bars i:nth-child(2) { width: 70%; }
.nav-toggle:hover { border-color: var(--field); color: var(--field); }
.site-header[data-open] .nav-toggle { border-color: var(--field); color: var(--field); }
.site-header[data-open] .nav-toggle__bars i:nth-child(2) { width: 100%; }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  background-image: linear-gradient(90deg, var(--field) 0%, var(--blue) 100%);
  pointer-events: none;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  background-color: var(--panel);
  border-top: 2px solid var(--line);
  color: var(--text);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(22px, 3vw, 40px);
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) var(--gutter) clamp(26px, 3vw, 40px);
}
.footer-brand { grid-column: span 4; }
.footer-block { grid-column: span 2; }
.footer-block--contact { grid-column: span 4; }

.footer-brand__note {
  margin-top: 16px;
  max-width: 34ch;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--muted);
}
.footer-brand .label--box { margin-top: 18px; }

.footer-block__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-block__title::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background-color: var(--field);
}

.footer-list { display: grid; gap: 9px; }
.footer-list a {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: var(--field);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}
.footer-list a:hover { color: var(--field); }
.footer-list a:hover::after { transform: scaleX(1); }

.footer-list--plain { gap: 11px; }
.footer-list--plain li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed rgba(46, 66, 58, .9);
  padding-bottom: 6px;
}
.footer-list__k { font-size: 13.5px; color: var(--text); white-space: nowrap; }
.footer-list__v {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
}

.contact-list { display: grid; gap: 12px; }
.contact-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.contact-list__k {
  min-width: 68px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-list__v { font-size: 14px; color: var(--text); word-break: break-all; }
.contact-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 16px var(--gutter) 26px;
  border-top: 2px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.footer-legal__copy { font-size: 12.5px; color: var(--muted); }
.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.footer-legal__links a,
.footer-legal__icp a {
  color: var(--muted);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer-legal__links a:hover,
.footer-legal__icp a:hover { color: var(--field); }
.footer-legal__icp { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; }

.footer-watermark {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 46px);
  height: 40px;
  padding-inline: var(--gutter);
  overflow: hidden;
  border-top: 2px solid var(--line);
  background-image: repeating-linear-gradient(90deg,
    transparent 0 39px,
    rgba(46, 66, 58, .7) 39px 40px);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .22em;
  color: rgba(154, 176, 168, .32);
  white-space: nowrap;
}

/* ---------- 10. 平板 ---------- */
@media (max-width: 1080px) {
  .command-nav__link { padding: 10px 9px; font-size: 13.5px; }
  .command-nav__link::after { left: 9px; right: 9px; }
  .footer-brand { grid-column: span 12; }
  .footer-block { grid-column: span 4; }
  .footer-block--contact { grid-column: span 12; }
}

/* ---------- 11. 移动端 / 折叠命令栏 ---------- */
@media (max-width: 900px) {
  .header-inner { min-height: 58px; gap: 10px; }

  .nav-toggle { display: inline-flex; margin-left: auto; order: 3; }
  .header-actions { order: 2; }

  .command-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 74vh;
    overflow-y: auto;
    padding: 6px var(--gutter) 16px;
    background-color: var(--ink);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    box-shadow: var(--hard-shadow);
  }
  .site-header[data-open] .command-nav { display: block; }

  .command-nav__list { display: block; }
  .command-nav__link {
    width: 100%;
    padding: 14px 0;
    gap: 14px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .command-nav__link::after {
    left: 0;
    right: auto;
    bottom: -1px;
    width: 42px;
  }
  .command-nav__idx { font-size: 11px; }
  .command-nav__item:last-child .command-nav__link { border-bottom: 0; }

  .col-index, .col-body, .col-note { grid-column: span 12; }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: span 2; }
  .footer-block { grid-column: span 1; }
  .footer-block--contact { grid-column: span 2; }
}

@media (max-width: 640px) {
  body { line-height: 1.8; }
  .brand-mark { font-size: 16.5px; gap: 7px; }
  .brand-mark__dot { width: 8px; height: 8px; }
  .brand-ver { display: none; }
  .nav-toggle { padding: 7px 9px; gap: 0; }
  .nav-toggle__text { display: none; }
  .header-actions { gap: 5px; }
  .port-link { padding: 5px 7px; font-size: 11px; border-width: 1px; letter-spacing: .02em; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-block, .footer-block--contact { grid-column: span 1; }
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .footer-watermark { gap: 18px; }
}

/* ---------- 12. 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .btn:hover, .port-link:hover { transform: none; }
}
