/* =========================================================
   乐竞赛场 /assets/site.css
   竞技场深绿基底 + 蓝图网格 + 荧光青柠信号色
   ========================================================= */

:root {
  --arena: #0B1F1A;
  --layer: #0F2A22;
  --layer-2: #123128;
  --grid: #143A2E;
  --signal: #C6FF4A;
  --signal-soft: #E8FFB0;
  --card-red: #FF3B30;
  --card-yellow: #FFD60A;
  --muted: #8FA79E;
  --ink: #F2F7F4;
  --pulse: #2BD9A0;

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 22px;

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

  --shell: 1280px;
  --gutter: 24px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--arena);
  background-image:
    linear-gradient(rgba(20, 58, 46, .45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 58, 46, .45) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5em;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(40px, 6vw, 88px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: 20px; }

p { margin: 0 0 1em; max-width: 38em; }

ul, ol { margin: 0; padding: 0; }

a {
  color: var(--signal);
  text-decoration: none;
  transition: color .15s ease-out, border-color .15s ease-out, background-color .15s ease-out;
}
a:hover { color: var(--signal-soft); }

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

button { font: inherit; color: inherit; }

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

main { display: block; }

.skip-link {
  position: absolute;
  top: 10px;
  left: var(--gutter);
  z-index: 120;
  transform: translateY(-180%);
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--signal);
  color: var(--arena);
  font-size: 14px;
  font-weight: 700;
  transition: transform .16s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--arena);
}

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

.section { padding: 72px 0; }
.section + .section { padding-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 32px;
}
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: 1 / -1; }

.divider {
  height: 1px;
  margin: 40px 0;
  border: 0;
  background: var(--grid);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 排版元件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--signal);
}

.lede {
  max-width: 40em;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.8;
  color: var(--muted);
}

.note {
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--grid);
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease-out, color .16s ease-out, border-color .16s ease-out, transform .16s ease-out;
}
.btn-primary {
  background: var(--signal);
  color: var(--arena);
}
.btn-primary:hover {
  background: var(--signal-soft);
  color: var(--arena);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--grid);
}
.btn-ghost:hover {
  color: var(--signal);
  border-color: var(--signal);
  transform: translateY(-2px);
}

/* ---------- 数据舱 / 面板 ---------- */
.panel {
  padding: 28px;
  border: 1px solid var(--grid);
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, var(--layer-2), var(--layer) 62%);
}
.panel-tight { padding: 18px 20px; border-radius: var(--radius-s); }
.panel-signal { border-color: rgba(198, 255, 74, .45); }

/* ---------- 大数字 ---------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.badge-live { color: var(--pulse); border-color: rgba(43, 217, 160, .45); }
.badge-red { color: var(--card-red); border-color: rgba(255, 59, 48, .45); }
.badge-yellow { color: var(--card-yellow); border-color: rgba(255, 214, 10, .45); }

/* ---------- 数据表 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table caption {
  padding-bottom: 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--grid);
  text-align: left;
  vertical-align: middle;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--muted);
}
.data-table .num,
.data-table td.num,
.data-table th.num {
  font-family: var(--font-mono);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.data-table tbody tr { transition: background-color .15s ease-out; }
.data-table tbody tr:hover { background: var(--layer); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--signal); }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--grid);
}

/* ---------- 图片占位容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--grid);
  border-radius: var(--radius-m);
  background: linear-gradient(150deg, var(--layer-2), var(--arena) 68%);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 72% 22%, rgba(198, 255, 74, .16), transparent 58%);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ratio-wide { aspect-ratio: 16 / 9; }
.ratio-square { aspect-ratio: 1 / 1; }
.ratio-tall { aspect-ratio: 3 / 4; }

/* =========================================================
   头部
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 31, 26, .95);
  border-bottom: 1px solid var(--grid);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.header-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 1px;
  padding: 4px 0;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
}
.brand-mark::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border-radius: 2px;
  background: var(--signal);
  transform: translateY(-1px);
}
.brand-line {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .24em;
  line-height: 1.5;
  color: var(--signal);
}
.brand:hover { color: var(--ink); }
.brand:hover .brand-mark { color: var(--signal-soft); }

.header-status {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  margin: 0 auto 0 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
}
.status-strong { color: var(--signal); font-weight: 600; }
.status-sep { color: var(--grid); }

.pulse-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pulse);
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(43, 217, 160, .55); }
  70% { box-shadow: 0 0 0 9px rgba(43, 217, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 217, 160, 0); }
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.screen-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid rgba(198, 255, 74, .4);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--signal);
  text-decoration: none;
  transition: background-color .16s ease-out, border-color .16s ease-out, color .16s ease-out;
}
.screen-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: currentColor;
}
.screen-tag:hover {
  background: rgba(198, 255, 74, .14);
  border-color: var(--signal);
  color: var(--signal-soft);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--grid);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  cursor: pointer;
  transition: border-color .16s ease-out, color .16s ease-out, background-color .16s ease-out;
}
.nav-toggle:hover { border-color: var(--signal); color: var(--signal); }
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 14px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .16s ease-out, opacity .16s ease-out;
}
.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); }

/* ---------- 命令带导航 ---------- */
.primary-nav {
  position: relative;
  border-top: 1px solid rgba(20, 58, 46, .9);
}
.nav-list {
  display: flex;
  align-items: stretch;
  gap: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-item { display: flex; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 12px 18px 13px;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease-out, background-color .15s ease-out, border-color .15s ease-out;
}
.nav-link:hover {
  color: var(--ink);
  background: var(--layer);
  border-bottom-color: rgba(198, 255, 74, .4);
}
.nav-link[aria-current="page"] {
  color: var(--signal);
  border-bottom-color: var(--signal);
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--signal);
  opacity: .6;
}
.nav-link[aria-current="page"] .nav-index { opacity: 1; }

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--grid);
  background: var(--layer);
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 56px var(--gutter) 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 2.2fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--grid);
}

.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-mark {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--ink);
}
.footer-slogan {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--signal);
}
.footer-tagline {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.footer-col-title {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--muted);
}
.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}
.footer-list a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
}
.footer-list a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 32px;
  padding-top: 28px;
  font-size: 13px;
}
.footer-contact {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  color: var(--ink);
}
.footer-sep { margin: 0 10px; color: var(--grid); }
.footer-address {
  margin: 0;
  max-width: none;
  color: var(--muted);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  max-width: none;
  width: 100%;
  padding-top: 14px;
  border-top: 1px dashed rgba(20, 58, 46, .9);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* =========================================================
   脚本注入元素
   ========================================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pulse), var(--signal));
  transition: width .1s linear;
}

.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--grid);
  border-radius: var(--radius-m);
  background: var(--layer);
  color: var(--signal);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s ease-out, transform .18s ease-out, visibility .18s, border-color .18s ease-out, background-color .18s ease-out, color .18s ease-out;
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--arena);
}
.to-top-arrow {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 920px) {
  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    background: var(--layer);
    border-top: 1px solid var(--grid);
    border-bottom: 1px solid rgba(198, 255, 74, .3);
    transition: max-height .24s var(--ease), visibility .24s;
  }
  .primary-nav[data-open] {
    max-height: 78vh;
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    padding: 6px var(--gutter) 18px;
    overflow: visible;
  }
  .nav-item { display: block; }
  .nav-link {
    display: flex;
    padding: 14px 0 14px 12px;
    border-bottom: 1px solid rgba(20, 58, 46, .85);
    border-left: 2px solid transparent;
    font-size: 15px;
  }
  .nav-link:hover {
    background: transparent;
    border-bottom-color: rgba(20, 58, 46, .85);
  }
  .nav-link[aria-current="page"] {
    border-bottom-color: rgba(20, 58, 46, .85);
    border-left-color: var(--signal);
  }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-12 { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .header-status { display: none; }
  .section { padding: 52px 0; }
  .panel { padding: 20px; }
  .footer-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 640px) {
  .screen-tag { display: none; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .site-footer { margin-top: 64px; }
  .footer-inner { padding-top: 40px; }
  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .footer-meta { flex-direction: column; gap: 12px; }
  .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  .nav-toggle-text { display: none; }
}

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