/* ============================================================
   雷电竞主站 · 共享样式表 /assets/site.css
   带电的竞技仪表盘：深靛蓝底 / 细网格 / 电光青蓝 / 警示琥珀
   ============================================================ */

/* ---------- 0. 设计令牌 ---------- */
:root {
  --ink: #070B1E;
  --panel: #101A3C;
  --grid: #22315E;
  --volt: #00E5FF;
  --volt-soft: #7CF4FF;
  --amber: #FFB020;
  --magenta: #FF4D8D;
  --text: #EAF0FF;
  --muted: #A6B1DE;
  --paper: #F4F7FF;

  --header-h: 64px;
  --shell-w: 1360px;
  --pad: clamp(16px, 4vw, 48px);
  --line: 1px solid var(--grid);
  --t-fast: 180ms ease;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, hr {
  margin: 0;
}
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

/* ---------- 2. 基础排版 ---------- */
body {
  margin: 0;
  min-height: 100vh;
  padding-top: var(--header-h);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 85% -8%, rgba(0, 229, 255, 0.10), transparent 62%),
    radial-gradient(720px 480px at -6% 14%, rgba(255, 77, 141, 0.06), transparent 60%),
    linear-gradient(rgba(34, 49, 94, 0.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 49, 94, 0.34) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}
h1 { font-size: clamp(30px, 4.6vw, 56px); }
h2 { font-size: clamp(24px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 2.2vw, 26px); }
h4 { font-size: 17px; }
p { font-size: 16px; }
strong { color: var(--text); font-weight: 700; }

a {
  color: var(--volt);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--volt-soft); }

:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
}

/* 工具类 */
.display {
  display: block;
  font-size: clamp(34px, 6vw, 88px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  transform: skewX(-4deg);
  transform-origin: left bottom;
}
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--volt { color: var(--volt); }
.eyebrow--amber { color: var(--amber); }
.eyebrow--magenta { color: var(--magenta); }
.text-muted { color: var(--muted); }
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- 3. 跳至主内容 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 10px 18px;
  background: var(--volt);
  color: #00131A;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}
.skip-link:focus { transform: translateY(0); color: #00131A; }

/* ---------- 4. 骨架容器 ---------- */
.shell,
.header-inner,
.footer-inner {
  width: min(100%, var(--shell-w));
  margin-inline: auto;
  padding-inline: var(--pad);
}
@media (min-width: 1000px) {
  .shell { border-inline: var(--line); }
}

#main-content { display: block; }
#main-content:focus { outline: none; }

.section {
  padding-block: clamp(36px, 6vh, 80px);
  border-top: var(--line);
}
.breath { height: clamp(48px, 9vh, 120px); }
.rule { height: 1px; background: var(--grid); border: 0; margin: 0; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 14px;
  border-bottom: var(--line);
  margin-bottom: clamp(20px, 3vw, 36px);
}

/* ---------- 5. 通用组件 ---------- */
.panel {
  background: var(--panel);
  border: var(--line);
  padding: clamp(18px, 2.2vw, 28px);
}

.card {
  display: block;
  background: var(--panel);
  border: var(--line);
  padding: clamp(16px, 2vw, 24px);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast);
}
.card:hover {
  border-color: var(--volt);
  background: #121E45;
  color: inherit;
  transform: translateY(-2px);
}
.card:focus-visible { border-color: var(--volt); }

/* 目录型索引 */
.index-list { display: flex; flex-direction: column; border-top: var(--line); }
.index-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: clamp(12px, 2vw, 28px);
  padding: 16px 6px;
  border-bottom: var(--line);
  color: var(--text);
  text-decoration: none;
  transition: background-color var(--t-fast);
}
.index-item:hover { background: rgba(0, 229, 255, 0.06); color: var(--text); }
.index-no {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--volt);
}
.index-title { font-size: 16px; font-weight: 600; }
.index-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* 关键数字 */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--amber);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* 标签 / 筛选 chip */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.tag-volt { border-color: rgba(0, 229, 255, 0.5); color: var(--volt); }
.tag-amber { border-color: rgba(255, 176, 32, 0.5); color: var(--amber); }
.tag-magenta { border-color: rgba(255, 77, 141, 0.5); color: var(--magenta); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast), background-color var(--t-fast);
}
.chip:hover { border-color: var(--volt); color: var(--volt-soft); }
.chip[aria-pressed="true"] {
  border-color: var(--magenta);
  color: var(--magenta);
  background: rgba(255, 77, 141, 0.10);
}

/* 数据表 */
.data-table {
  width: 100%;
  font-size: 14px;
  border: var(--line);
}
.data-table caption {
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  padding-bottom: 12px;
}
.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: var(--line);
  vertical-align: baseline;
}
.data-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--volt);
  background: rgba(16, 26, 60, 0.72);
}
.data-table tbody tr { transition: background-color var(--t-fast); }
.data-table tbody tr:hover { background: rgba(0, 229, 255, 0.06); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.data-table--paper {
  background: var(--paper);
  color: #0B1230;
}
.data-table--paper th,
.data-table--paper td { border-bottom-color: rgba(34, 49, 94, 0.22); }
.data-table--paper thead th {
  background: rgba(34, 49, 94, 0.08);
  color: #16204A;
}

/* 正文 */
.prose {
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.75;
}
.prose p + p { margin-top: 1.4em; }
.prose h2, .prose h3 { margin-top: 1.6em; margin-bottom: 0.6em; }
.prose a {
  color: var(--volt);
  border-bottom: 1px solid rgba(0, 229, 255, 0.4);
}
.prose a:hover { color: var(--volt-soft); border-bottom-color: var(--volt-soft); }
.prose ul, .prose ol {
  margin-top: 1em;
  padding-left: 1.1em;
  list-style: none;
}
.prose li { position: relative; padding-left: 0.9em; margin-bottom: 0.4em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--volt);
}

/* 行内强调链接 */
.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--volt);
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.link-more:hover { color: var(--volt-soft); border-bottom-color: var(--volt-soft); }
.link-more::after { content: "→"; font-family: var(--font-mono); }

/* 面包屑 */
.breadcrumb {
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
}
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--grid);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--volt); }
.breadcrumb [aria-current="page"] { color: var(--text); }

/* ---------- 6. 媒体容器（页面阶段放置图片） ---------- */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel);
  border: var(--line);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 229, 255, 0.07), transparent 60%);
  pointer-events: none;
}
.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media-caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.72em 1.25em;
  border: var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:hover { border-color: var(--volt); color: var(--volt-soft); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #241600;
}
.btn-primary:hover {
  background: #FFC55A;
  border-color: #FFC55A;
  color: #241600;
}

.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--volt-soft); border-color: var(--volt); }

.btn-sm { padding: 0.55em 1em; font-size: 13px; }

/* ---------- 8. 固定顶栏 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(7, 11, 30, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grid);
  transition: background-color var(--t-fast), box-shadow var(--t-fast);
}
.site-header[data-scrolled] {
  background: rgba(7, 11, 30, 0.97);
  box-shadow: 0 1px 0 0 rgba(0, 229, 255, 0.25), 0 14px 34px -26px rgba(0, 229, 255, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.5vw, 26px);
  height: 100%;
}
@media (min-width: 1000px) {
  .header-inner { border-inline: var(--line); }
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-bolt {
  flex: none;
  width: 13px;
  height: 22px;
  background: linear-gradient(180deg, var(--volt-soft), var(--volt));
  clip-path: polygon(62% 0, 0 58%, 40% 58%, 28% 100%, 100% 38%, 52% 38%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-line {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

/* 导航 */
.site-nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.1vw, 20px);
}
.nav-list li { flex: none; }
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 6px 2px;
  font-size: 13.5px;
  line-height: 1.2;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--t-fast);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-fast);
}
.nav-list a:hover { color: var(--volt-soft); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-list a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--amber);
}

/* 右侧 */
.header-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 7px;
  height: 7px;
  background: var(--volt);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.16);
}
.utility-link {
  padding: 6px 10px;
  border: 1px solid transparent;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.utility-link:hover { color: var(--volt-soft); border-color: var(--grid); }
.header-cta { flex: none; }

/* 菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: var(--line);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  flex: none;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.nav-toggle:hover { border-color: var(--volt); color: var(--volt-soft); }
.nav-bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--t-fast);
}
.nav-bars::before,
.nav-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast), top var(--t-fast);
}
.nav-bars::before { top: -5px; }
.nav-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-bars::after { top: 0; transform: rotate(-45deg); }

/* 滚动进度线 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--volt), var(--amber));
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 10vh, 140px);
  border-top: var(--line);
  background: linear-gradient(180deg, rgba(16, 26, 60, 0.55) 0%, rgba(7, 11, 30, 0) 72%);
}
.footer-inner {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: 26px;
}
@media (min-width: 1000px) {
  .footer-inner { border-inline: var(--line); }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(24px, 3.4vw, 56px);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.footer-blurb {
  max-width: 40ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.footer-col { min-width: 0; }
.footer-title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--volt);
}
.footer-list { display: flex; flex-direction: column; gap: 10px; }
.footer-list a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 14px;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast);
}
.footer-list a:hover {
  color: var(--volt-soft);
  border-bottom-color: var(--volt);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px 30px;
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: 22px;
  border-top: var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer-contact p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--volt);
  padding-top: 2px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 26px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.footer-copy,
.footer-icp { font-size: 12px; }
.footer-icp { color: var(--muted); }

/* ---------- 10. 断点 ---------- */
@media (max-width: 1200px) {
  .status { display: none; }
}
@media (max-width: 1080px) {
  .header-side .utility-link { display: none; }
}
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .header-side { margin-left: auto; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: block;
    flex: none;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 8px var(--pad) 22px;
    background: rgba(10, 16, 38, 0.99);
    border-bottom: var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li { flex: 1 1 auto; }
  .nav-list a {
    display: block;
    padding: 14px 2px;
    border-bottom: var(--line);
    font-size: 16px;
  }
  .nav-list a::after { display: none; }
  .nav-list a[aria-current="page"] { color: var(--volt); }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .brand-tag { display: none; }
  .header-cta { padding: 0.55em 0.85em; font-size: 12.5px; }
  .footer-bottom { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- 11. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .scroll-progress { display: none; }
  .card:hover { transform: none; }
  .btn:active { transform: none; }
}
