:root {
  --deep-space: #0A1E3C;
  --ocean: #123B6E;
  --electric: #00E5FF;
  --neon: #9D4EDD;
  --gold: #D4AF37;
  --champagne: #F7E7A8;
  --silver: #E6E9EF;
  --ink: #1A1D24;
  --white: #FFFFFF;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --sidebar-w: 280px;
  --radius: 16px;
  --ease: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

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

html {
  background-color: var(--deep-space);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.85;
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255, 255, 255, 0.28) 0, transparent 100%),
    radial-gradient(1px 1px at 28% 64%, rgba(255, 255, 255, 0.16) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 42% 30%, rgba(0, 229, 255, 0.35) 0, transparent 100%),
    radial-gradient(1px 1px at 57% 76%, rgba(255, 255, 255, 0.18) 0, transparent 100%),
    radial-gradient(1px 1px at 71% 12%, rgba(212, 175, 55, 0.32) 0, transparent 100%),
    radial-gradient(1.5px 1.5px at 86% 52%, rgba(157, 78, 221, 0.28) 0, transparent 100%),
    linear-gradient(135deg, #0A1E3C 0%, #07182F 48%, #0B1F40 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  background:
    linear-gradient(var(--gold), var(--gold)) left top / 42px 2px,
    linear-gradient(var(--gold), var(--gold)) left top / 2px 42px,
    linear-gradient(var(--gold), var(--gold)) right top / 42px 2px,
    linear-gradient(var(--gold), var(--gold)) right top / 2px 42px,
    linear-gradient(var(--gold), var(--gold)) left bottom / 42px 2px,
    linear-gradient(var(--gold), var(--gold)) left bottom / 2px 42px,
    linear-gradient(var(--gold), var(--gold)) right bottom / 42px 2px,
    linear-gradient(var(--gold), var(--gold)) right bottom / 2px 42px;
  background-repeat: no-repeat;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-sans);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--white);
}

p {
  margin: 0 0 1.2em;
}

a {
  color: var(--electric);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--champagne);
}

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

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

/* 主内容与侧边栏关系 */
#main-content,
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 65vh;
}

/* 通用容器与布局 */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 32px;
  padding-right: 32px;
  width: 100%;
}

.section {
  padding: 72px 0;
}

.grid {
  display: grid;
  gap: 32px;
}

.grid-col-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-col-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.4;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #B8962E);
  color: var(--ink);
  border-color: rgba(246, 225, 158, 0.42);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--champagne), var(--gold));
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 7px 24px rgba(212, 175, 55, 0.4);
}

.btn-cyan {
  background: transparent;
  border-color: var(--electric);
  color: var(--electric);
}

.btn-cyan:hover {
  background: rgba(0, 229, 255, 0.12);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--champagne);
  color: var(--champagne);
}

.btn-block {
  width: 100%;
  display: flex;
}

/* 标签 */
.badge {
  display: inline-block;
  padding: 5px 14px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 100px;
  border: 1px solid transparent;
  background: rgba(157, 78, 221, 0.15);
  border-color: rgba(157, 78, 221, 0.5);
  color: #D8B5F0;
}

.badge-cyan {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.5);
  color: var(--electric);
}

.badge-gold {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.45);
  color: var(--champagne);
}

/* 卡片 */
.card {
  background: linear-gradient(155deg, rgba(18, 59, 110, 0.5), rgba(10, 30, 60, 0.6));
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: rgba(157, 78, 221, 0.45);
  transform: translateY(-4px);
}

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
  color: var(--electric);
}

.breadcrumb a:hover {
  color: var(--champagne);
}

.breadcrumb [aria-current] {
  color: var(--white);
}

/* Hero 首屏 */
.hero {
  position: relative;
  min-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 0;
}

.hero-title {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  margin-bottom: 18px;
  max-width: 14em;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.75);
  max-width: 44em;
  margin-bottom: 32px;
}

/* 章节预览 */
.chapter-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 40px 0 0;
}

.preview-card {
  display: block;
  padding: 22px;
  background: rgba(18, 59, 110, 0.4);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-left: 3px solid var(--gold);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.preview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(157, 78, 221, 0.6);
  border-left-color: var(--electric);
  background: rgba(18, 59, 110, 0.6);
}

.preview-index {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--electric);
}

.preview-card h4 {
  margin: 8px 0 4px;
}

/* 图片容器 */
.img-frame {
  position: relative;
  min-height: 200px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(18, 59, 110, 0.65), rgba(10, 30, 60, 0.45));
  border: 1px solid rgba(0, 229, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-frame::before {
  content: attr(data-label);
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 数据数字 */
.stat-num {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1;
  color: var(--gold);
}

/* 目录 */
.toc {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  border-left: 2px solid rgba(212, 175, 55, 0.3);
  font-family: var(--font-sans);
}

.toc li {
  margin: 2px 0;
}

.toc a {
  display: block;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a:hover {
  color: var(--electric);
}

.toc a[aria-current="true"] {
  color: var(--champagne);
  border-left-color: var(--gold);
}

/* ===================== 头部 ===================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 30, 60, 0.98), rgba(7, 22, 41, 0.98));
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.skip-link {
  position: fixed;
  top: -64px;
  left: 16px;
  z-index: 1003;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.25s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--electric);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--electric) 0%, var(--neon) 50%, var(--gold) 100%);
  z-index: 1002;
  pointer-events: none;
}

.mobile-bar {
  display: none;
}

.brand-inline {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: 0.03em;
  color: var(--white);
  text-decoration: none;
}

.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 0 0;
}

.site-nav .brand {
  margin: 16px 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-symbol {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 229, 255, 0.85);
  border-radius: 6px;
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.28);
}

.brand-symbol::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 1px;
  background: rgba(212, 175, 55, 0.55);
}

.brand-symbol::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 100%;
  background: rgba(157, 78, 221, 0.5);
}

.brand-core {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--electric);
  box-shadow: 0 0 6px var(--electric);
  z-index: 1;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--white);
}

.brand-en {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(230, 233, 239, 0.55);
  line-height: 1.2;
}

.nav-primary {
  flex: 1;
  margin-top: 48px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: block;
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: rgba(230, 233, 239, 0.82);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-link:hover {
  color: var(--electric);
  border-left-color: var(--electric);
  background: rgba(0, 229, 255, 0.06);
}

.nav-link[aria-current="page"] {
  color: var(--champagne);
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), transparent 70%);
}

.nav-footer {
  margin-top: auto;
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.version-tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--electric);
  border: 1px solid rgba(0, 229, 255, 0.4);
  padding: 3px 10px;
  border-radius: 3px;
  background: rgba(0, 229, 255, 0.06);
  margin-bottom: 14px;
}

.nav-note {
  font-family: var(--font-serif);
  font-size: 12px;
  color: rgba(230, 233, 239, 0.5);
  margin: 12px 0 0;
  letter-spacing: 0.06em;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
}

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

[aria-expanded="true"] .toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

[aria-expanded="true"] .toggle-bar:nth-child(2) {
  opacity: 0;
}

[aria-expanded="true"] .toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 返回顶部 */
.scroll-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), rgba(212, 175, 55, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.scroll-top:hover {
  background: var(--champagne);
  transform: translateY(-3px);
}

.scroll-top[hidden] {
  display: none;
}

/* ===================== 页脚 ===================== */
.site-footer {
  margin-left: var(--sidebar-w);
  background: var(--ink);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 56px 0 24px;
  color: var(--silver);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
}

.footer-brand .brand {
  margin-bottom: 16px;
}

.foot-brand:hover .brand-symbol {
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.footer-tagline {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--champagne);
  margin-bottom: 12px;
}

.footer-trust {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.85;
  color: rgba(230, 233, 239, 0.62);
  margin-bottom: 0;
  max-width: 40ch;
}

.footer-h {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links a {
  color: rgba(230, 233, 239, 0.75);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--electric);
  transform: translateX(4px);
}

.footer-contact p {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.8;
  color: rgba(230, 233, 239, 0.75);
  margin: 0 0 6px;
}

.footer-bottom {
  max-width: 1240px;
  margin: 40px auto 0;
  padding: 20px 48px 0;
  border-top: 1px solid rgba(230, 233, 239, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: rgba(230, 233, 239, 0.5);
}

.footer-bottom a {
  color: rgba(230, 233, 239, 0.6);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--electric);
}

/* ===================== 响应式 ===================== */
@media (min-width: 1024px) and (max-width: 1180px) {
  :root {
    --sidebar-w: 252px;
  }

  .footer-grid {
    padding: 0 32px;
    gap: 28px;
  }
}

@media (max-width: 1023px) {
  #main-content,
  .main-content,
  .site-footer {
    margin-left: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 16px;
    background: linear-gradient(180deg, rgba(10, 30, 60, 0.98), rgba(7, 22, 41, 0.98));
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    background: linear-gradient(180deg, rgba(7, 22, 41, 0.98), rgba(10, 30, 60, 0.99));
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 16px 0 0;
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .site-nav[data-open] {
    max-height: 92vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav .brand {
    display: none;
  }

  .nav-primary {
    margin-top: 0;
  }

  .nav-list {
    padding: 0 16px;
  }

  .nav-link {
    font-size: 16px;
    padding: 14px 16px;
  }

  .nav-footer {
    margin-top: 20px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .scroll-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    padding: 0 24px;
  }

  .footer-bottom {
    padding: 16px 24px 0;
    justify-content: center;
  }

  .grid-col-3,
  .grid-col-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 56px 0;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .grid-col-3,
  .grid-col-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 0 20px;
  }

  .footer-bottom {
    padding: 16px 20px 0;
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: 44px 0;
  }

  .hero {
    min-height: auto;
    padding: 48px 0;
  }
}

/* ===================== 动效偏好 ===================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
