:root {
  --c-bg: #140A2E;
  --c-bg2: #1F1233;
  --c-bg3: #2A1D42;
  --c-panel: #F5F2F7;
  --c-text: #F0EAF5;
  --c-muted: #B7A8C7;
  --c-gold: #F5C04A;
  --c-orange: #FF7A3C;
  --c-cyan: #3FD0D8;
  --c-purple: #A44DFF;
  --c-green: #4CAF50;
  --c-border: rgba(245, 240, 245, 0.14);
  --c-border-strong: rgba(245, 240, 245, 0.28);
  --font-head: 'Noto Sans SC', 'Montserrat', 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-body: 'Noto Serif SC', 'Source Serif Pro', Georgia, 'Songti SC', 'STSong', 'SimSun', serif;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 8px 32px rgba(20, 10, 46, 0.45);
}

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

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

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 88% -10%, rgba(164, 77, 255, 0.16), transparent 60%),
    radial-gradient(800px 480px at 8% 108%, rgba(63, 208, 216, 0.10), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

a {
  color: var(--c-cyan);
  text-decoration: none;
}

a:hover {
  color: var(--c-gold);
}

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

ul, ol {
  list-style: none;
}

button {
  font-family: var(--font-head);
}

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

::selection {
  background: var(--c-purple);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--c-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--c-bg3);
  border-radius: 8px;
}

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

#main-content {
  scroll-margin-top: 120px;
}

/* ===== 跳转链接 ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--c-gold);
  color: #140A2E;
  padding: 10px 22px;
  border-radius: 0 0 12px 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  outline: none;
}

/* ===== 头部 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(20, 10, 46, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--c-border);
}

.hdr-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--c-gold), var(--c-orange), var(--c-purple));
  border-radius: 0 3px 3px 0;
  z-index: 20;
  transition: width 0.08s linear;
}

.hdr-inner {
  width: min(1280px, calc(100% - 40px));
  margin-inline: auto;
}

.hdr-top {
  position: relative;
  z-index: 1010;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.hdr-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--c-text);
  text-decoration: none;
  flex-shrink: 0;
}

.hdr-brand:hover {
  color: var(--c-text);
}

.hdr-icon {
  display: block;
  filter: drop-shadow(0 0 8px rgba(245, 192, 74, 0.35));
}

.hdr-brand-name {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--c-gold), var(--c-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hdr-desc {
  flex: 1;
  min-width: 200px;
  margin: 0;
  text-align: right;
  color: var(--c-muted);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  background: var(--c-bg2);
  border: 1px solid var(--c-border-strong);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-toggle:hover {
  border-color: var(--c-cyan);
  box-shadow: 0 0 18px rgba(63, 208, 216, 0.2);
}

.nav-toggle-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-line:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hdr-nav {
  border-top: 1px solid var(--c-border);
  padding: 12px 0;
}

.nav-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border);
  background: rgba(31, 18, 51, 0.6);
  color: var(--c-text);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.nav-chip:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(63, 208, 216, 0.15);
}

.nav-chip[aria-current="page"] {
  background: linear-gradient(135deg, var(--c-gold), var(--c-orange));
  color: #1A1030;
  border-color: transparent;
  font-weight: 900;
  box-shadow: 0 6px 24px rgba(255, 122, 60, 0.35);
}

/* ===== 页脚 ===== */
.site-footer {
  background:
    radial-gradient(120% 160% at 80% 0%, rgba(164, 77, 255, 0.14), transparent 50%),
    #0E0820;
  border-top: 1px solid var(--c-border);
  padding-top: 64px;
  margin-top: 40px;
}

.ftr-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.2fr;
  gap: 48px;
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding-bottom: 48px;
}

.ftr-brand-name {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  background: linear-gradient(120deg, var(--c-gold), var(--c-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ftr-desc {
  color: var(--c-muted);
  font-size: 14px;
  line-height: 1.8;
  max-width: 360px;
  margin-bottom: 16px;
}

.ftr-icp {
  display: inline-block;
  color: var(--c-muted);
  font-size: 13px;
  font-family: var(--font-head);
  padding: 4px 10px;
  border: 1px solid var(--c-border);
  border-radius: 6px;
}

.ftr-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.ftr-list {
  display: grid;
  gap: 8px;
}

.ftr-list a {
  color: var(--c-muted);
  font-size: 14px;
  transition: color 0.3s ease, padding-left 0.3s ease;
}

.ftr-list a:hover {
  color: var(--c-cyan);
  padding-left: 6px;
}

.ftr-contact-list {
  display: grid;
  gap: 12px;
}

.ftr-contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
}

.ftr-contact-label {
  flex-shrink: 0;
  min-width: 72px;
  color: var(--c-gold);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
}

.ftr-contact-label::after {
  content: "：";
}

.ftr-contact-value {
  color: var(--c-muted);
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.ftr-contact-value:hover {
  color: var(--c-cyan);
}

.ftr-bottom {
  border-top: 1px solid var(--c-border);
  padding: 20px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
}

.ftr-note,
.ftr-copy {
  color: var(--c-muted);
  font-size: 13px;
  margin: 0;
}

/* ===== 页面容器 ===== */
.page-wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 32px 0 72px;
}

.page-head {
  padding: 40px 0 28px;
}

.page-title {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.page-sub {
  color: var(--c-muted);
  font-size: 18px;
  max-width: 640px;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
}

.lead {
  font-size: 18px;
  line-height: 1.8;
  color: var(--c-muted);
  max-width: 720px;
  margin-bottom: 24px;
}

/* ===== 面包屑 ===== */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  padding: 20px 0 0;
  font-family: var(--font-head);
  font-size: 13px;
  color: var(--c-muted);
}

.crumb li + li::before {
  content: "/";
  margin: 0 10px;
  color: var(--c-purple);
}

.crumb a {
  color: var(--c-muted);
  transition: color 0.2s ease;
}

.crumb a:hover {
  color: var(--c-gold);
}

.crumb [aria-current="page"] {
  color: var(--c-text);
  font-weight: 700;
}

/* ===== 章节系统 ===== */
.sec {
  padding: 56px 0;
}

.sec-band {
  background: var(--c-bg2);
  border-block: 1px solid var(--c-border);
}

.chapter {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 24px;
  align-items: start;
  margin-bottom: 24px;
}

.chapter-no {
  grid-row: span 2;
  font-family: var(--font-head);
  font-size: 64px;
  font-weight: 900;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--c-purple);
}

.chapter-title {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 900;
  margin: 4px 0 0;
}

.chapter-desc {
  color: var(--c-muted);
  max-width: 640px;
  font-size: 15px;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-gold {
  background: linear-gradient(135deg, var(--c-gold), #FFB84D);
  color: #1A1030;
  box-shadow: 0 8px 24px rgba(245, 192, 74, 0.28);
}

.btn-gold:hover {
  color: #1A1030;
  box-shadow: 0 10px 32px rgba(245, 192, 74, 0.42);
  transform: translateY(-2px);
}

.btn-orange {
  background: linear-gradient(135deg, var(--c-orange), #FF5A5A);
  color: #1A1030;
  box-shadow: 0 8px 24px rgba(255, 122, 60, 0.3);
}

.btn-orange:hover {
  color: #1A1030;
  box-shadow: 0 10px 32px rgba(255, 122, 60, 0.42);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-text);
}

.btn-ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
  transform: translateY(-2px);
}

/* ===== 卡片与网格 ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--c-bg2), rgba(31, 18, 51, 0.6));
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 20% 0%, rgba(164, 77, 255, 0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 192, 74, 0.5);
  box-shadow: 0 16px 40px rgba(164, 77, 255, 0.16);
}

.card:hover::before {
  opacity: 1;
}

.card-glow {
  border-color: rgba(245, 192, 74, 0.4);
}

.notice {
  background: linear-gradient(90deg, rgba(76, 175, 80, 0.18), rgba(76, 175, 80, 0.06));
  border: 1px solid rgba(76, 175, 80, 0.45);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 14px;
  color: var(--c-text);
  max-width: 720px;
}

/* ===== 数据组件 ===== */
.data-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-strip-item {
  flex: 1 1 160px;
  background: var(--c-bg2);
  padding: 20px 24px;
  text-align: center;
}

.stat {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
  color: var(--c-gold);
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 6px;
  color: var(--c-muted);
  font-size: 13px;
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== 标签页 ===== */
.tabs {
  margin: 28px 0;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border-strong);
  background: var(--c-bg2);
  color: var(--c-muted);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  border-color: var(--c-cyan);
  color: var(--c-cyan);
}

.tab-btn.is-active {
  background: linear-gradient(135deg, var(--c-purple), var(--c-cyan));
  border-color: transparent;
  color: #0F071F;
  font-weight: 900;
  box-shadow: 0 6px 20px rgba(164, 77, 255, 0.35);
}

.tab-panel {
  display: none;
  margin-top: 24px;
}

.tab-panel.is-active {
  display: block;
  animation: tabFadeIn 0.4s ease;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 图片占位 ===== */
.img-frame {
  position: relative;
  background: var(--c-bg2);
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.img-frame[data-ratio="wide"] {
  aspect-ratio: 16 / 9;
}

.img-frame[data-ratio="square"] {
  aspect-ratio: 1 / 1;
}

.img-frame[data-ratio="portrait"] {
  aspect-ratio: 3 / 4;
}

.img-frame::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--c-muted);
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.img-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== 渐现与状态 ===== */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal][data-reveal-delay="1"] {
  transition-delay: 0.1s;
}

[data-reveal][data-reveal-delay="2"] {
  transition-delay: 0.2s;
}

[data-reveal][data-reveal-delay="3"] {
  transition-delay: 0.3s;
}

[data-reveal][data-reveal-delay="4"] {
  transition-delay: 0.4s;
}

body.nav-open {
  overflow: hidden;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .hdr-nav {
    display: none;
    border-top: none;
    padding: 0;
  }

  .hdr-nav[data-open] {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1005;
    background: linear-gradient(160deg, #140A2E 0%, #1F1233 60%, #2A1D42 100%);
    padding: 118px 28px 40px;
    overflow-y: auto;
  }

  .hdr-nav[data-open] .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hdr-nav[data-open] .nav-chip {
    justify-content: center;
    padding: 16px 24px;
    font-size: 18px;
    border-radius: var(--radius-md);
  }

  .hdr-nav[data-open] .nav-chip:hover {
    transform: none;
  }

  .ftr-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (min-width: 901px) {
  .hdr-nav[data-open] {
    position: static;
    padding: 12px 0;
    background: none;
  }
}

@media (max-width: 560px) {
  .hdr-desc {
    order: 3;
    flex-basis: 100%;
    text-align: left;
    font-size: 12px;
  }

  .hdr-brand-name {
    font-size: 20px;
  }

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

  .split-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .chapter-no {
    font-size: 48px;
  }

  .chapter-title {
    font-size: 22px;
  }

  .page-title {
    font-size: 34px;
  }

  .ftr-bottom {
    flex-direction: column;
    text-align: center;
    padding: 20px 24px;
  }
}

@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;
  }

  .js-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hdr-progress {
    transition: none;
  }
}
