/* ============================================================
   爱游戏看台 · 共享样式表 /assets/site.css
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; }

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; padding: 0; }

ul, ol { list-style: none; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

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

table { border-collapse: collapse; border-spacing: 0; width: 100%; }

:target { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ---------- 2. Tokens ---------- */
:root {
  --arena-900: #060B18;
  --arena-800: #0B1428;
  --panel-700: #16233D;
  --hairline: #24365A;
  --ink: #E8EFFB;
  --ink-muted: #93A6C4;
  --cyan: #2BE3F2;
  --orange: #FF7A2F;
  --green: #4DF08A;
  --steel: #5A6B8C;

  --font-head: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-data: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shell: 1280px;
  --shell-narrow: 860px;
  --gutter: 20px;
  --header-h: 64px;

  --dur-instant: 90ms;
  --dur-fast: 180ms;
  --dur-base: 280ms;
  --dur-slow: 480ms;
  --ease: cubic-bezier(.4, 0, .2, 1);

  --radius: 6px;
  --radius-pill: 999px;
  --shadow-hair: 0 1px 0 rgba(43, 227, 242, .08);
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 40px; } }
@media (max-width: 900px) { :root { --header-h: 56px; } }

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  background-color: var(--arena-900);
  background-image:
    radial-gradient(900px 520px at 78% -10%, rgba(43, 227, 242, .10), transparent 62%),
    radial-gradient(720px 480px at 4% 6%, rgba(255, 122, 47, .07), transparent 60%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.12;
}

p { max-width: 68ch; }

::selection { background: rgba(43, 227, 242, .3); color: #fff; }

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

/* ---------- 4. Utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell-narrow { max-width: var(--shell-narrow); }

.section { padding-block: clamp(48px, 7vw, 96px); }

.section-alt {
  background: var(--arena-800);
  border-block: 1px solid var(--hairline);
}

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

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: #061018;
  font-weight: 700;
  font-size: 14px;
  border-radius: 4px;
  transform: translateY(-180%);
  transition: transform var(--dur-fast) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. Header ---------- */
.arena-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}

.arena-header::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  width: var(--scroll-progress, 0%);
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease);
}

.arena-header[data-scrolled="true"] {
  background: var(--arena-800);
  border-bottom-color: var(--hairline);
}

.arena-header[data-scrolled="true"]::after { opacity: 1; }

.arena-header[data-open="true"] {
  background: var(--arena-900);
  border-bottom-color: var(--hairline);
}

.console-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-height: var(--header-h);
}

/* brand */
.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-height: 44px;
}

.brand-mark {
  width: 12px; height: 12px;
  flex: none;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(43, 227, 242, .12), 0 0 12px rgba(43, 227, 242, .45);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1;
  color: var(--ink);
}

.brand-motto {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* nav */
.primary-nav { display: flex; align-items: center; }

.nav-index {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-index a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}

.nav-index a:hover {
  color: var(--ink);
  background: rgba(43, 227, 242, .07);
}

.nav-index a[aria-current="page"] { color: var(--ink); }

.nav-index a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(43, 227, 242, .7);
}

.nav-num {
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--steel);
  font-variant-numeric: tabular-nums;
}

.nav-index a[aria-current="page"] .nav-num { color: var(--cyan); }

.nav-label { white-space: nowrap; }

.nav-hint { display: none; }

/* telemetry */
.telemetry-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 5px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(22, 35, 61, .55);
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
  max-width: none;
}

.telemetry-key { letter-spacing: .06em; }

.telemetry-value {
  color: var(--green);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.telemetry-time { color: var(--ink); }

.telemetry-divider {
  width: 1px;
  height: 12px;
  background: var(--hairline);
}

.pulse-dot {
  width: 7px; height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(77, 240, 138, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(77, 240, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(77, 240, 138, 0); }
}

/* cta */
.cta-primary {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  background: var(--orange);
  color: #0B1428;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.cta-primary::after {
  content: "→";
  font-family: var(--font-data);
  font-size: 13px;
}

.cta-primary:hover { background: #ff9455; }
.cta-primary:active { transform: translateY(1px); }

/* toggle */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px; height: 44px;
  margin-left: 4px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: rgba(22, 35, 61, .5);
  transition: border-color var(--dur-fast) var(--ease);
}

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

.nav-toggle-bars {
  position: relative;
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  transition: background-color var(--dur-fast) var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: var(--ink);
  transition: transform var(--dur-fast) var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.arena-header[data-open="true"] .nav-toggle-bars { background: transparent; }
.arena-header[data-open="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.arena-header[data-open="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* drawer extras */
.drawer-panel { display: none; }

/* ---------- 6. Footer ---------- */
.arena-footer {
  position: relative;
  background-color: var(--arena-800);
  border-top: 1px solid var(--hairline);
  background-image:
    linear-gradient(to right, rgba(43, 227, 242, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(43, 227, 242, .045) 1px, transparent 1px);
  background-size: 24px 24px;
  padding-block: clamp(40px, 6vw, 72px) 24px;
}

.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 32px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }

.footer-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1;
}

.footer-brand-note {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-muted);
  max-width: 34ch;
}

.footer-signature {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--steel);
}

.footer-col { display: flex; flex-direction: column; gap: 14px; }

.footer-col-title {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}

.footer-list { display: flex; flex-direction: column; gap: 10px; }

.footer-list a {
  display: inline-block;
  min-height: 24px;
  font-size: 14px;
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease);
}

.footer-list a:hover { color: var(--cyan); }

.footer-list-plain li {
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.6;
  word-break: break-word;
}

.footer-legal {
  width: 100%;
  max-width: var(--shell);
  margin: 40px auto 0;
  padding: 20px var(--gutter) 0;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: none;
  font-family: var(--font-data);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.legal-sep { width: 1px; height: 12px; background: var(--hairline); }

.legal-links { display: flex; flex-wrap: wrap; gap: 18px; max-width: none; }

.legal-links a {
  display: inline-block;
  min-height: 24px;
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease);
}

.legal-links a:hover { color: var(--cyan); }

.footer-signature-end {
  width: 100%;
  max-width: var(--shell);
  margin: 20px auto 0;
  padding-inline: var(--gutter);
  opacity: .85;
}

/* ---------- 7. Shared components ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 32px;
}

.eyebrow {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
  max-width: none;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.1;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-data);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-muted);
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--steel);
}

.breadcrumb a { color: var(--ink-muted); transition: color var(--dur-fast) var(--ease); }
.breadcrumb a:hover { color: var(--cyan); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}

.btn-primary { background: var(--orange); color: #0B1428; }
.btn-primary:hover { background: #ff9455; }

.btn-ghost {
  background: rgba(22, 35, 61, .5);
  border-color: var(--hairline);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn:active { transform: translateY(1px); }

.panel {
  background: var(--panel-700);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-flush { padding: 0; overflow: hidden; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}

.tag-live { color: var(--green); border-color: rgba(77, 240, 138, .35); background: rgba(77, 240, 138, .08); }
.tag-orange { color: var(--orange); border-color: rgba(255, 122, 47, .38); background: rgba(255, 122, 47, .08); }
.tag-cyan { color: var(--cyan); border-color: rgba(43, 227, 242, .38); background: rgba(43, 227, 242, .08); }

.stat-grid {
  display: grid;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat-cell {
  background: var(--arena-800);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-value {
  font-family: var(--font-data);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

.stat-key {
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--steel) transparent;
  -webkit-overflow-scrolling: touch;
}

.rail > * {
  flex: 0 0 min(320px, 82vw);
  scroll-snap-align: start;
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: var(--arena-800); }
.rail::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }

/* segmented control */
.segmented { display: flex; flex-direction: column; }

.segmented-track {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: rgba(22, 35, 61, .45);
  overflow-x: auto;
  scrollbar-width: none;
}

.segmented-track::-webkit-scrollbar { display: none; }

.segmented-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  bottom: 4px;
  width: var(--seg-w, 0px);
  transform: translateX(var(--seg-x, 0px));
  background: var(--cyan);
  border-radius: var(--radius-pill);
  transition: transform .22s var(--ease), width .22s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.seg-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color var(--dur-fast) var(--ease);
}

.seg-button:hover { color: var(--ink); }

.seg-button[aria-selected="true"] { color: #061018; }

.seg-panel { padding-top: 28px; }
.seg-panel[hidden] { display: none; }

/* media containers */
.media-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel-700);
  aspect-ratio: 16 / 9;
}

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

.media-frame-tall { aspect-ratio: 4 / 5; }
.media-frame-square { aspect-ratio: 1 / 1; }

/* reveal */
[data-reveal].is-hidden {
  opacity: 0;
  transform: translateY(12px);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease);
}

/* ---------- 8. Responsive ---------- */
@media (min-width: 700px) {
  .footer-shell { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
  .footer-shell { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 901px) {
  .arena-header[data-scrolled="true"] {
    background: rgba(11, 20, 40, .94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
}

@media (max-width: 1180px) {
  .nav-index a { padding: 0 9px; font-size: 13px; }
  .nav-num { display: none; }
}

@media (max-width: 900px) {
  .telemetry-strip { display: none; }
  .cta-primary { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-block { margin-right: auto; }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px var(--gutter) 40px;
    background: var(--arena-900);
    border-top: 1px solid var(--hairline);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--dur-base) var(--ease),
                transform var(--dur-base) var(--ease),
                visibility var(--dur-base) var(--ease);
  }

  .arena-header[data-open="true"] .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-index {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-index a {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-areas:
      "num label"
      ". hint";
    align-items: start;
    gap: 2px 8px;
    min-height: 56px;
    padding: 14px 6px;
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
    font-size: 17px;
  }

  .nav-index a:hover { background: rgba(43, 227, 242, .05); }

  .nav-num {
    display: block;
    grid-area: num;
    padding-top: 4px;
    font-size: 12px;
  }

  .nav-label { grid-area: label; font-weight: 600; color: var(--ink); }

  .nav-hint {
    display: block;
    grid-area: hint;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-muted);
    font-weight: 400;
  }

  .nav-index a[aria-current="page"]::after {
    left: 0;
    right: auto;
    top: 14px;
    bottom: 14px;
    width: 3px;
    height: auto;
    border-radius: 2px;
  }

  .drawer-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--hairline);
  }

  .drawer-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: none;
    font-family: var(--font-data);
    font-size: 13px;
    color: var(--ink-muted);
    font-variant-numeric: tabular-nums;
  }

  .drawer-sep { width: 1px; height: 12px; background: var(--hairline); }

  .drawer-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
    color: var(--cyan);
  }
}

@media (max-width: 900px) {
  body.nav-locked { overflow: hidden; }
}

@media (max-width: 540px) {
  .brand-motto { display: none; }
  .brand-name { font-size: 18px; }
}

/* ---------- 9. Motion preferences ---------- */
@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;
  }

  [data-reveal].is-hidden,
  [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .pulse-dot { animation: none; box-shadow: 0 0 0 3px rgba(77, 240, 138, .18); }
}
