/* ==========================================================================
   爱游戏看台 · 共享外壳样式 /assets/site.css
   设计语言：技术蓝图网格 + 夜间看台灯光 + 编辑部索引卡
   ========================================================================== */

:root {
  --sky-deep: #0B1220;
  --panel: #141F35;
  --panel-deep: #101A2C;
  --paper-white: #F2F5F9;
  --steel: #8B99AD;
  --line: #26334D;
  --cyan: #22D3EE;
  --amber: #F5B24A;
  --stand-red: #FF5A5F;
  --paper: #E9EDF4;

  --accent: #22D3EE;
  --accent-soft: rgba(34, 211, 238, .14);

  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --display: "Roboto Condensed", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;

  --wrap: 1200px;
  --header-h: 112px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (max-width: 1023px) {
  :root { --header-h: 100px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--sky-deep);
  background-image:
    linear-gradient(to right, rgba(38, 51, 77, .5) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 51, 77, .5) 1px, transparent 1px);
  background-size: 64px 64px;
  background-attachment: fixed;
}
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
  color: var(--paper-white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
[hidden] { display: none !important; }

/* ---------- 中文排版基调 ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: .01em;
  color: var(--paper-white);
}
h1 { font-size: clamp(32px, 5.2vw, 64px); }
h2 { font-size: clamp(24px, 3.4vw, 40px); }
h3 { font-size: clamp(19px, 2.1vw, 28px); font-weight: 800; }
h4 { font-size: 20px; font-weight: 800; }

::selection { background: var(--accent); color: #06111F; }

/* ---------- 焦点 / 动效偏好 ---------- */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 布局容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
main { display: block; padding-top: var(--header-h); }
main.bleed-top { padding-top: 0; }
.section { padding-block: clamp(40px, 6vw, 80px); }

.grid { display: grid; gap: clamp(20px, 3vw, 40px); }
.grid-7-3 { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); }
@media (max-width: 900px) {
  .grid-7-3 { grid-template-columns: minmax(0, 1fr); }
}

.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 32px; }

/* ---------- 工具类 ---------- */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  letter-spacing: -.01em;
  font-weight: 600;
}
.muted { color: var(--steel); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  background: rgba(20, 31, 53, .7);
  color: var(--steel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  border-radius: 2px;
}
.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--amber);
  text-transform: uppercase;
}
.index-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  color: var(--steel);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  white-space: nowrap;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 20px;
  margin-bottom: clamp(20px, 3vw, 36px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 { margin-right: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--paper-white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.2;
  transition: background-color .32s var(--ease), border-color .32s var(--ease),
              color .24s var(--ease), transform .2s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--paper-white); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06111F;
  font-weight: 700;
}
.btn-primary:hover { border-color: var(--accent); color: #06111F; filter: brightness(1.08); }
.btn-ghost { background: rgba(20, 31, 53, .6); }
.btn-ghost:hover { background: var(--accent-soft); }

/* ---------- 面板 / 索引卡 ---------- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: clamp(16px, 2.4vw, 28px);
}
.panel::after {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 12px;
  height: 12px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transition: border-color .32s var(--ease);
}

/* ---------- 图片容器（页面阶段放图） ---------- */
.media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--panel-deep);
  background-image:
    linear-gradient(135deg, var(--accent-soft), transparent 62%),
    repeating-linear-gradient(45deg, rgba(38, 51, 77, .55) 0 1px, transparent 1px 12px);
}
.media--square { aspect-ratio: 1 / 1; }
.media--wide { aspect-ratio: 21 / 9; }
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-caption {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--steel);
}
.media-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  background: rgba(11, 18, 32, .82);
  border: 1px solid var(--line);
  color: var(--paper-white);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
}

/* ---------- 正文 ---------- */
.prose {
  max-width: 46em;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(242, 245, 249, .88);
}
.prose > * + * { margin-top: 1.05em; }
.prose h2, .prose h3 { margin-top: 1.8em; margin-bottom: .6em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: color .32s var(--ease); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose code {
  font-family: var(--mono);
  font-size: .92em;
  background: rgba(38, 51, 77, .55);
  padding: 1px 6px;
  border-radius: 2px;
}

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--steel);
}
.crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--line); }
.crumbs a { transition: color .24s var(--ease); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--paper-white); }

/* ---------- 进场显现 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   头部
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .32s var(--ease), border-color .32s var(--ease),
              box-shadow .32s var(--ease), backdrop-filter .32s var(--ease);
}
.site-header.is-solid {
  background-color: rgba(11, 18, 32, .95);
  border-bottom-color: var(--line);
  box-shadow: 0 26px 50px -38px rgba(0, 0, 0, .95);
}
@supports ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
  .site-header.is-solid {
    background-color: rgba(11, 18, 32, .82);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

.skip-link {
  position: absolute;
  left: 14px;
  top: -70px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--amber);
  color: #06111F;
  font-size: 14px;
  font-weight: 700;
  border-radius: 2px;
  transition: top .24s var(--ease);
}
.skip-link:focus { top: 14px; }

/* ---- 主队切换条 ---- */
.header-rail {
  background: rgba(11, 18, 32, .42);
  border-bottom: 1px solid rgba(38, 51, 77, .7);
  font-size: 12px;
}
.rail-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 38px;
  padding-block: 4px;
}
.rail-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--steel);
  white-space: nowrap;
}
.rail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: background-color .32s var(--ease), box-shadow .32s var(--ease);
}

.team-switch { position: relative; }
.team-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 31, 53, .78);
  color: var(--paper-white);
  font-size: 12.5px;
  line-height: 1.3;
  transition: border-color .32s var(--ease), background-color .24s var(--ease);
}
.team-switch-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.team-chip {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: background-color .32s var(--ease), box-shadow .32s var(--ease);
}
.team-switch-name { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--steel);
  transition: transform .24s var(--ease), border-top-color .24s var(--ease);
}
.team-switch-btn[aria-expanded="true"] .team-caret { transform: rotate(180deg); border-top-color: var(--accent); }

.team-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 40;
  min-width: 238px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 28px 56px -30px rgba(0, 0, 0, .95);
}
.team-panel-title {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--steel);
}
.team-list { display: grid; gap: 2px; }
.team-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 2px;
  color: var(--steel);
  font-size: 13px;
  text-align: left;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.team-option:hover { background: rgba(38, 51, 77, .7); color: var(--paper-white); }
.team-option[aria-pressed="true"] { background: var(--accent-soft); color: var(--paper-white); }
.team-swatch {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: var(--sw, var(--accent));
}

.tier-jump { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tier-jump-label {
  margin-right: 4px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--steel);
}
.tier-link {
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--steel);
  font-size: 12px;
  letter-spacing: .05em;
  transition: color .24s var(--ease), border-color .24s var(--ease), background-color .24s var(--ease);
}
.tier-link:hover { color: var(--paper-white); border-color: var(--line); background: rgba(20, 31, 53, .8); }

/* ---- 主导航区 ---- */
.header-main { background: transparent; }
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  min-height: 72px;
  padding-block: 12px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  transition: border-color .32s var(--ease);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid var(--accent);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transition: border-color .32s var(--ease);
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  transition: background-color .32s var(--ease);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: .02em;
  color: var(--paper-white);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.5;
  letter-spacing: .14em;
  color: var(--steel);
}

.site-nav { grid-column: 2; justify-self: center; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-size: 14.5px;
  color: rgba(242, 245, 249, .78);
  transition: color .22s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .26s var(--ease), background-color .32s var(--ease);
}
.nav-list a:hover { color: var(--paper-white); }
.nav-list a:hover::after,
.nav-list a[aria-current="page"]::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--paper-white); font-weight: 500; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-cta { padding: 10px 16px; font-size: 13.5px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(20, 31, 53, .7);
  color: var(--paper-white);
  font-size: 13px;
  transition: border-color .24s var(--ease), background-color .24s var(--ease);
}
.nav-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform .26s var(--ease), opacity .2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5.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(-5.5px) rotate(-45deg); }

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

/* ---- 响应式头部 ---- */
@media (max-width: 1023px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 62px;
    padding-block: 10px;
    gap: 14px;
  }
  .brand-mark { width: 30px; height: 30px; }
  .brand-mark::before { inset: 5px; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 10px; letter-spacing: .1em; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    grid-column: 1 / -1;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 8px clamp(16px, 4vw, 40px) 26px;
    background: rgba(11, 18, 32, .98);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .26s var(--ease), transform .26s var(--ease), visibility .26s var(--ease);
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    padding: 14px 2px;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
    color: rgba(242, 245, 249, .85);
  }
  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] { color: var(--accent); }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 900px) {
  .tier-jump { display: none; }
  .rail-inner { justify-content: space-between; }
}

@media (max-width: 640px) {
  .rail-label { display: none; }
  .rail-inner { gap: 10px; min-height: 34px; }
  .header-cta { padding: 9px 12px; font-size: 12.5px; }
  .nav-toggle-text { display: none; }
  .nav-toggle { padding: 9px 11px; }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  margin-top: clamp(56px, 9vw, 120px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 31, 53, .6) 0%, rgba(11, 18, 32, .96) 70%);
}
.footer-top { padding-block: clamp(40px, 6vw, 72px); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-note {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(242, 245, 249, .72);
  max-width: 34em;
}
.footer-note + .footer-note { margin-top: 8px; }
.footer-note-dim { color: var(--steel); font-size: 12.5px; }

.footer-heading {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--steel);
}
.footer-col ul { display: grid; gap: 2px; }
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14.5px;
  color: rgba(242, 245, 249, .76);
  transition: color .22s var(--ease), padding-left .22s var(--ease);
}
.footer-col a:hover { color: var(--accent); padding-left: 5px; }

.footer-base { border-top: 1px solid var(--line); background: rgba(11, 18, 32, .7); }
.footer-base-inner {
  display: grid;
  gap: 6px;
  padding-block: clamp(20px, 3vw, 30px);
}
.footer-line {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--steel);
  font-family: var(--mono);
  letter-spacing: .02em;
  word-break: break-word;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: rgba(242, 245, 249, .66);
}
.footer-legal > span:first-child {
  padding: 2px 9px;
  border: 1px solid var(--line);
  color: var(--paper-white);
  font-size: 12px;
}
.footer-dot { color: var(--line); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-col a { font-size: 15px; }
}
