@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

/* ── 全局变量 ── */
:root {
  --red: #ff0000;
  --purple: #8b00ff;
  --dark: #261717;
  --dark2: #1a0f0f;
  --dark3: #0d0808;
  --glass-bg: rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.12);
  --glass-blur: 15px;
  --text-primary: #f0e0e0;
  --text-muted: rgba(240,200,200,0.55);
  --font-mono: 'Share Tech Mono', 'Fira Code', 'Consolas', monospace;
  --nav-h: 64px;
  --transition: 0.22s cubic-bezier(.4,0,.2,1);
  --red-dim: rgba(255,0,0,0.18);
  --purple-dim: rgba(139,0,255,0.18);
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  background: var(--dark3);
  color: var(--text-primary);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
body, .hud-body {
  font-family: var(--font-mono);
  line-height: 1.7;
  background: var(--dark3);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── 滚动偏移（给固定底栏留空） ── */
article[id] { scroll-margin-top: 24px; }
article[id]:last-child { scroll-margin-bottom: var(--nav-h); }

/* ── HUD 根容器 ── */
.hud-root {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(139,0,255,0.28) 0%, transparent 65%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(255,0,0,0.18) 0%, transparent 60%),
    var(--dark3);
  padding-bottom: calc(var(--nav-h) + 32px);
}

/* ── 顶部扫描线装饰 ── */
.hud-scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), var(--purple), transparent);
  z-index: 200;
  opacity: 0.8;
  animation: scanline-pulse 3s ease-in-out infinite;
}
@keyframes scanline-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── 英雄区 ── */
.hero-wrap {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,0,0,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,0,0,0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: grid-drift 20s linear infinite;
}
@keyframes grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(38,23,23,0.82) 0%,
    rgba(139,0,255,0.18) 50%,
    rgba(255,0,0,0.12) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
  padding: 60px 24px 80px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--purple);
  letter-spacing: 0.18em;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  text-shadow:
    0 0 40px rgba(255,0,0,0.6),
    0 0 80px rgba(139,0,255,0.4);
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--red), var(--purple));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 48px;
  line-height: 1.4;
}
.btn-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--transition);
}
.btn-cta:hover { box-shadow: 0 0 32px rgba(255,0,0,0.5), 0 0 64px rgba(139,0,255,0.3); transform: translateY(-2px); }
.btn-cta:hover::before { opacity: 1; }

.btn-ghost {
  display: inline-block;
  padding: 14px 36px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 0;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  min-height: 48px;
  line-height: 1.4;
}
.btn-ghost:hover { border-color: var(--purple); box-shadow: 0 0 20px rgba(139,0,255,0.3); transform: translateY(-2px); }

/* ── 英雄角标装饰 ── */
.hero-corner {
  position: absolute;
  width: 24px; height: 24px;
  z-index: 3;
}
.hero-corner--tl { top: 16px; left: 16px; border-top: 2px solid var(--red); border-left: 2px solid var(--red); }
.hero-corner--tr { top: 16px; right: 16px; border-top: 2px solid var(--purple); border-right: 2px solid var(--purple); }
.hero-corner--bl { bottom: 16px; left: 16px; border-bottom: 2px solid var(--purple); border-left: 2px solid var(--purple); }
.hero-corner--br { bottom: 16px; right: 16px; border-bottom: 2px solid var(--red); border-right: 2px solid var(--red); }

/* ── 主体布局：aside + main ── */
.body-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 0;
  gap: 32px;
  width: 100%;
}

/* ── 侧边栏（左侧） ── */
.side-panel {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 24px;
}
.side-panel-inner {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  padding: 24px 16px;
}
.side-title {
  font-size: 0.7rem;
  color: var(--red);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--red-dim);
}
.side-nav-dl { list-style: none; }
.side-nav-dt { margin-bottom: 4px; }
.side-nav-a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 8px;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  min-height: 40px;
  line-height: 1.6;
}
.side-nav-a:hover {
  color: var(--text-primary);
  border-left-color: var(--purple);
  background: rgba(139,0,255,0.08);
}

.side-stat-block {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--purple-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  text-shadow: 0 0 12px rgba(255,0,0,0.5);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── 主内容区 ── */
.main-content {
  flex: 1;
  min-width: 0;
}
.wrap {
  width: 100%;
}
.content-section {
  /* 正文容器 */
}
.content-article {
  /* 文章内容 */
}

/* ── 正文内容样式 ── */
.content-article h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: #fff;
  margin: 56px 0 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--red-dim);
  position: relative;
  letter-spacing: 0.04em;
}
.content-article h2::before {
  content: '//';
  color: var(--red);
  margin-right: 10px;
  opacity: 0.7;
  font-size: 0.9em;
}

.content-article .subtitle,
.content-article p.subtitle,
.content-article p.subhead,
.content-article p.desc,
.content-article p.lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.content-article p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.content-article h3 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--purple);
  margin: 32px 0 10px;
  letter-spacing: 0.06em;
}

.content-article ul, .content-article ol {
  padding-left: 20px;
  margin-bottom: 18px;
}
.content-article li {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.content-article li::marker { color: var(--red); }

.content-article a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.content-article a:hover { color: var(--red); }

.content-article strong { color: #fff; font-weight: 700; }
.content-article em { color: rgba(255,200,200,0.8); font-style: normal; letter-spacing: 0.04em; }

.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.content-article th {
  background: var(--red-dim);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--glass-border);
}
.content-article td {
  padding: 9px 14px;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}
.content-article tr:hover td { background: rgba(139,0,255,0.07); }

.content-article article {
  padding: 40px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.content-article article:last-child { border-bottom: none; }

/* ── 玻璃卡片（正文内如有卡片） ── */
.content-article .card,
.content-article .glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 0;
  padding: 24px;
  margin-bottom: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.content-article .card:hover,
.content-article .glass-card:hover {
  border-color: rgba(139,0,255,0.4);
  box-shadow: 0 0 24px rgba(139,0,255,0.15);
}

/* ── 底部固定导航条 ── */
.footer-nav-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(26,15,15,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 32px rgba(255,0,0,0.12), 0 -1px 0 rgba(139,0,255,0.18);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-nav {
  width: 100%;
  padding: 0 8px;
}

.nav-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 8px 0 4px;
  list-style: none;
  width: 100%;
}

.nav-dl-item {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: none;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  min-height: 40px;
  letter-spacing: 0.04em;
}
.nav-pill:hover {
  color: #fff;
  background: rgba(139,0,255,0.2);
  border-color: var(--purple);
  box-shadow: 0 0 12px rgba(139,0,255,0.3);
}

.nav-brand-center {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 0 8px;
}
.nav-brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 40px;
}
.nav-logo-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(255,0,0,0.6));
}
.nav-brand-text {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--red);
  text-shadow: 0 0 12px rgba(255,0,0,0.6);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-cta-item {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
}
.nav-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--red), var(--purple));
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  min-height: 40px;
  letter-spacing: 0.06em;
  transition: box-shadow var(--transition), transform var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.nav-cta-btn:hover {
  box-shadow: 0 0 20px rgba(255,0,0,0.5), 0 0 40px rgba(139,0,255,0.3);
  transform: translateY(-1px);
  opacity: 0.92;
}

.footer-copy {
  width: 100%;
  text-align: center;
  padding: 4px 16px 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.copy-text {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(240,200,200,0.3);
  letter-spacing: 0.06em;
}

/* ── 图片通用 ── */
img { max-width: 100%; height: auto; display: block; }

/* ── 滚动条美化 ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark3); }
::-webkit-scrollbar-thumb { background: var(--purple-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,0,255,0.5); }

/* ── 选中文字颜色 ── */
::selection { background: rgba(255,0,0,0.3); color: #fff; }

/* ── 响应式：768px 以下 ── */
@media (max-width: 768px) {
  .body-layout {
    flex-direction: column;
    padding: 24px 16px 0;
    gap: 0;
  }
  .side-panel {
    width: 100%;
    position: static;
    margin-bottom: 24px;
  }
  .side-panel-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px;
  }
  .side-title { width: 100%; margin-bottom: 4px; }
  .side-nav-dl {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    width: 100%;
  }
  .side-nav-dt { margin-bottom: 0; }
  .side-nav-a {
    padding: 6px 10px;
    border-left: none;
    border-bottom: 1px solid transparent;
    min-height: 40px;
    font-size: 0.78rem;
  }
  .side-nav-a:hover { border-bottom-color: var(--purple); background: rgba(139,0,255,0.08); }
  .side-stat-block {
    flex-direction: row;
    gap: 16px;
    width: 100%;
    margin-top: 8px;
    padding-top: 8px;
  }

  .hero-wrap { min-height: 60vh; }
  .hero-content { padding: 40px 16px 80px; }
  .hero-h1 { font-size: clamp(1.6rem, 8vw, 2.5rem); }

  /* 底部导航在移动端收紧 */
  .nav-dl {
    gap: 2px;
    padding: 6px 0 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-pill {
    font-size: 0.65rem;
    padding: 7px 7px;
    min-height: 40px;
  }
  .nav-cta-btn {
    font-size: 0.68rem;
    padding: 7px 12px;
  }
  .copy-text { font-size: 0.6rem; }
}

/* ── 响应式：375px 以下 ── */
@media (max-width: 400px) {
  .hero-h1 { font-size: 1.5rem; }
  .nav-pill { font-size: 0.6rem; padding: 7px 5px; }
  .nav-brand-text { font-size: 0.65rem; }
}

/* ── 超大屏 ── */
@media (min-width: 1400px) {
  .body-layout { max-width: 1400px; }
  .side-panel { width: 260px; }
}
