/* ==========================================================================
   亚星看台 · 共享样式表 /assets/site.css
   深夜看台记分屏视觉系统：深空蓝底 + 霓虹青指示 + 珊瑚橙赛事高亮
   ========================================================================== */

/* ---------- 1. RESET ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body { margin: 0; }

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre { margin: 0; }

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

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

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

table { border-collapse: collapse; }

/* ---------- 2. 设计变量 ---------- */
:root {
  --void: #050B18;
  --stand: #0B1830;
  --steel: #1E2E4A;
  --neon: #23F0D4;
  --neon-dim: #0FA99A;
  --coral: #FF6B4A;
  --chalk: #F2F7FF;
  --haze: #93A4C0;
  --turf: #1F6B4A;

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

  --shell: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --rail-h: 48px;
  --nav-h: 58px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础排版与场地底纹 ---------- */
body {
  background-color: var(--void);
  color: var(--chalk);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(118deg, rgba(35, 240, 212, .035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(30, 46, 74, .42) 0 1px, transparent 1px 120px);
}

.site-main {
  position: relative;
  z-index: 1;
}

#main-content { display: block; }

::selection {
  background: var(--neon);
  color: #04211D;
}

/* ---------- 4. 焦点与可访问性 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 400;
  transform: translateY(-180%);
  display: inline-block;
  padding: 10px 18px;
  background: var(--neon);
  color: #04211D;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  border: 2px solid var(--neon);
  transition: transform .18s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------- 5. 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.container--narrow { max-width: 880px; }

.section {
  position: relative;
  padding-block: clamp(40px, 6vw, 84px);
}

.section__title {
  position: relative;
  margin-bottom: 22px;
  padding-bottom: 14px;
  font-size: clamp(24px, 2.8vw, 36px);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: var(--chalk);
}

.section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--neon);
}

.section__lede {
  max-width: 62ch;
  margin-bottom: 28px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--haze);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.split {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .split { grid-template-columns: minmax(220px, 3fr) minmax(0, 8fr); }
}

/* ---------- 6. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  border: 2px solid var(--neon);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s;
}

.btn:hover {
  background: var(--neon);
  color: #04211D;
  box-shadow: 5px 5px 0 rgba(35, 240, 212, .28);
  transform: translate(-1px, -1px);
}

.btn--primary {
  background: var(--coral);
  border-color: var(--coral);
  color: #1A0602;
  box-shadow: 5px 5px 0 rgba(255, 107, 74, .25);
}

.btn--primary:hover {
  background: transparent;
  color: var(--coral);
  box-shadow: 5px 5px 0 rgba(255, 107, 74, .4);
}

.btn--ghost {
  border-color: var(--steel);
  color: var(--chalk);
}

.btn--ghost:hover {
  background: var(--stand);
  border-color: var(--neon);
  color: var(--neon);
  box-shadow: none;
  transform: none;
}

/* ---------- 7. 页头 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(5, 11, 24, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.brand-rail {
  height: var(--rail-h);
  overflow: hidden;
  border-bottom: 1px solid var(--steel);
  transition: height .24s var(--ease), opacity .18s linear;
}

.site-header[data-scrolled="true"] .brand-rail {
  height: 0;
  opacity: 0;
}

.brand-rail__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
  height: var(--rail-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
  color: var(--chalk);
  text-decoration: none;
}

.brand-mark:hover { color: var(--neon); }

.brand-mark__dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--coral);
  transform: rotate(45deg);
}

.brand-mark__name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.brand-mark__net {
  padding-left: 9px;
  border-left: 1px solid var(--steel);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--haze);
}

.brand-tagline {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--neon);
}

.rail-links {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .07em;
}

.rail-link {
  padding: 3px 0;
  color: var(--haze);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}

.rail-link:hover {
  color: var(--chalk);
  border-bottom-color: var(--neon);
}

.rail-link--alert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  color: var(--coral);
  border: 1px solid rgba(255, 107, 74, .5);
  transition: color .15s, border-color .15s, background-color .15s;
}

.rail-link--alert:hover {
  color: var(--coral);
  border-color: var(--coral);
  background: rgba(255, 107, 74, .08);
}

.rail-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--coral);
  border-radius: 50%;
}

.nav-row {
  position: relative;
  background: var(--stand);
  border-bottom: 2px solid var(--steel);
  transition: border-color .2s, box-shadow .2s;
}

.site-header[data-scrolled="true"] .nav-row {
  border-bottom-color: var(--neon);
  box-shadow: 0 18px 34px -24px rgba(0, 0, 0, .95);
}

.nav-row__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gut);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.nav-item { display: flex; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  padding-inline: 15px;
  color: var(--haze);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .07em;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color .15s, background-color .15s, border-color .15s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 13px;
  height: 2px;
  background: var(--neon);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s var(--ease);
}

.nav-link:hover {
  color: var(--chalk);
  background: rgba(5, 11, 24, .85);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link[aria-current="page"] {
  color: var(--chalk);
  background: rgba(35, 240, 212, .07);
  border-left-color: var(--coral);
}

.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-inline: 16px;
  margin-left: auto;
  background: var(--coral);
  border: 2px solid var(--coral);
  color: #1A0602;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(255, 107, 74, .22);
  transition: background-color .15s, color .15s, box-shadow .15s;
}

.nav-cta:hover {
  background: transparent;
  color: var(--coral);
  box-shadow: 4px 4px 0 rgba(255, 107, 74, .45);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  height: 36px;
  padding-inline: 12px;
  background: transparent;
  border: 2px solid var(--steel);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

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

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

.nav-toggle__bars i {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform .18s var(--ease), opacity .12s linear;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) {
  opacity: 0;
}

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

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  z-index: 3;
  pointer-events: none;
}

.scroll-meter__fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--neon);
  box-shadow: 0 0 12px rgba(35, 240, 212, .7);
  transition: width .12s linear;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 104px);
  background: var(--stand);
  border-top: 2px solid var(--neon);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(31, 107, 74, .09) 0 18px, transparent 18px 36px);
}

.footer-inner {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) var(--gut) clamp(22px, 3vw, 34px);
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  grid-template-columns: 1fr;
}

@media (min-width: 1000px) {
  .footer-inner { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
}

.footer-brand {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-brand__mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--chalk);
  text-decoration: none;
}

.footer-brand__mark:hover { color: var(--neon); }

.footer-brand__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--neon);
}

.footer-brand__note {
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.65;
  color: var(--haze);
}

.footer-grid {
  display: grid;
  gap: clamp(24px, 3vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.footer-col__title {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--neon);
}

.footer-col__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22px;
  height: 4px;
  background: var(--steel);
}

.footer-list { display: grid; gap: 6px; }

.footer-link {
  display: inline-block;
  padding: 3px 0 3px 12px;
  border-left: 2px solid var(--steel);
  color: var(--haze);
  font-size: 15px;
  text-decoration: none;
  transition: color .15s, border-color .15s, transform .15s;
}

.footer-link:hover {
  color: var(--chalk);
  border-left-color: var(--neon);
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  gap: 10px;
  font-style: normal;
}

.footer-contact__row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.footer-contact__key {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--haze);
}

.footer-contact__val {
  font-size: 14px;
  line-height: 1.6;
  color: var(--chalk);
  word-break: break-word;
}

.footer-base {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--steel);
  background: var(--void);
}

.footer-base__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 16px var(--gut);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--haze);
}

.footer-icp { color: var(--chalk); }
.footer-copy { margin-left: auto; }

/* ---------- 9. 基础组件 ---------- */
.breadcrumb { padding-top: 22px; }

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--haze);
}

.breadcrumb__list li + li::before {
  content: "/";
  margin-right: 8px;
  color: var(--steel);
}

.breadcrumb__link {
  color: var(--haze);
  text-decoration: none;
  transition: color .15s;
}

.breadcrumb__link:hover { color: var(--neon); }
.breadcrumb__current { color: var(--chalk); }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.7;
  color: var(--chalk);
}

.prose p { margin-bottom: 1.15em; }
.prose p:last-child { margin-bottom: 0; }

.prose h2,
.prose h3 {
  margin: 1.6em 0 .6em;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.prose h2 { font-size: 26px; }
.prose h3 { font-size: 20px; }

.prose a {
  color: var(--neon);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  margin-bottom: 1.15em;
  padding-left: 1.3em;
}

.prose ul li { list-style: square; }
.prose ol li { list-style: decimal; }
.prose li { margin-bottom: .4em; }

.prose strong { color: var(--chalk); font-weight: 700; }

.panel {
  position: relative;
  background: var(--stand);
  border: 2px solid var(--steel);
  padding: clamp(16px, 2.2vw, 26px);
}

.panel--flat { background: var(--void); }
.panel--lift { box-shadow: 8px 8px 0 rgba(0, 0, 0, .5); }
.panel--neon { border-color: var(--neon); }

.rail-line {
  border-left: 2px solid var(--steel);
  padding-left: clamp(14px, 2vw, 24px);
  transition: border-color .15s;
}

.rail-line:hover,
.rail-line:focus-within { border-color: var(--neon); }

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--neon);
}

.label--coral { color: var(--coral); }
.label--muted { color: var(--haze); }

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

.figure--xl { font-size: clamp(46px, 8vw, 92px); font-weight: 700; }
.figure--lg { font-size: clamp(32px, 4.4vw, 56px); font-weight: 700; }
.figure--neon { color: var(--neon); }
.figure--coral { color: var(--coral); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--steel);
  color: var(--haze);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
}

.tag:hover {
  border-color: var(--neon);
  color: var(--neon);
}

.tag--coral {
  border-color: rgba(255, 107, 74, .5);
  color: var(--coral);
}

.tag--coral:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.tag.is-active {
  background: var(--neon);
  border-color: var(--neon);
  color: #04211D;
}

.divider {
  height: 2px;
  margin: clamp(24px, 3.5vw, 44px) 0;
  border: 0;
  background: var(--steel);
}

.turf { position: relative; }

.turf::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    115deg,
    rgba(31, 107, 74, .14) 0 16px,
    rgba(31, 107, 74, 0) 16px 32px
  );
}

/* 图片容器：页面阶段直接放置 <img>，未备图时用 .media__stub 占位 */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(150deg, var(--stand) 0%, var(--void) 72%);
  border: 2px solid var(--steel);
}

.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 14px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--haze);
  background: linear-gradient(0deg, rgba(5, 11, 24, .95) 0%, rgba(5, 11, 24, 0) 100%);
}

.media__stub {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--steel);
}

/* ---------- 10. 排版工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.text-haze { color: var(--haze); }
.text-neon { color: var(--neon); }
.text-coral { color: var(--coral); }
.text-chalk { color: var(--chalk); }

/* ---------- 11. 响应式 ---------- */
@media (max-width: 1100px) {
  .nav-link {
    padding-inline: 11px;
    font-size: 12.5px;
    letter-spacing: .04em;
  }
  .nav-link::after { left: 11px; right: 11px; }
}

@media (max-width: 900px) {
  :root {
    --rail-h: 46px;
    --nav-h: 56px;
  }

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

  .brand-rail__inner { gap: 12px; }
  .brand-tagline { display: none; }
  .rail-links { gap: 12px; }
  .rail-link:not(.rail-link--alert) { display: none; }

  .nav-toggle { display: inline-flex; }
  .nav-cta {
    height: 34px;
    padding-inline: 12px;
    font-size: 12px;
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--stand);
    border-bottom: 2px solid var(--neon);
    transition: max-height .28s var(--ease), visibility .28s linear;
  }

  .site-nav[data-open="true"] {
    max-height: min(76vh, 560px);
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
  }

  .nav-item { display: block; }

  .nav-link {
    height: auto;
    padding: 15px var(--gut);
    font-size: 14px;
    letter-spacing: .06em;
    border-left-width: 4px;
  }

  .nav-link::after { display: none; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }

  .brand-mark__net { display: none; }
  .rail-link--alert { font-size: 11px; padding: 3px 8px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-copy { margin-left: 0; }
  .footer-contact__row { grid-template-columns: 38px minmax(0, 1fr); }
}

/* ---------- 12. 动效降级 ---------- */
@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: 0ms !important;
  }

  .scroll-meter__fill { transition: none; }
}
