:root {
  --brand: #7c3aed;
  --brand-2: #a855f7;
  --brand-3: #ec4899;
  --accent: #facc15;
  --accent-2: #22d3ee;
  --bg: #f6f4ff;
  --bg-soft: #ffffff;
  --bg-muted: #f0ecfb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(124, 58, 237, 0.14);
  --border-strong: rgba(124, 58, 237, 0.28);
  --text: #1e1830;
  --text-soft: #4a4360;
  --text-muted: #6f6887;
  --shadow-sm: 0 2px 10px rgba(76, 42, 150, 0.08);
  --shadow-md: 0 12px 32px rgba(76, 42, 150, 0.12);
  --shadow-lg: 0 24px 60px rgba(76, 42, 150, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1180px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0f0b1a;
  --bg-soft: #171226;
  --bg-muted: #1d1730;
  --surface: rgba(30, 24, 48, 0.66);
  --surface-strong: rgba(36, 28, 58, 0.9);
  --border: rgba(168, 85, 247, 0.2);
  --border-strong: rgba(168, 85, 247, 0.4);
  --text: #f3efff;
  --text-soft: #cfc6e8;
  --text-muted: #a79ec4;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.78;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, rgba(124, 58, 237, 0.18), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(236, 72, 153, 0.14), transparent 55%),
    radial-gradient(800px 600px at 50% 110%, rgba(34, 211, 238, 0.12), transparent 60%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover {
  color: var(--brand-3);
}

html[data-theme="dark"] a {
  color: var(--brand-2);
}

html[data-theme="dark"] a:hover {
  color: var(--accent-2);
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--text);
  font-weight: 800;
}

h1 {
  font-size: clamp(1.8rem, 4.4vw, 2.9rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
}

h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.35rem);
  color: var(--text);
}

p {
  margin: 0 0 1em;
  color: var(--text-soft);
}

ul, ol {
  margin: 0 0 1.2em;
  padding-left: 1.4em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

strong {
  color: var(--text);
  font-weight: 700;
}

blockquote {
  margin: 1.2em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--brand-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin: 0;
  color: var(--text-soft);
  font-style: italic;
}

time {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

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

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

#site-header.is-scrolled {
  box-shadow: var(--shadow-md);
  background: var(--surface-strong);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  flex-shrink: 0;
}

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

.brand svg {
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

.brand-text {
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

html[data-theme="dark"] .brand-text {
  background: linear-gradient(120deg, var(--brand-2), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
}

nav[aria-label="主导航"] {
  flex: 1 1 auto;
  min-width: 0;
}

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

.nav-list li {
  margin: 0;
}

.nav-list a {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-list a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  transform: translateY(-2px);
}

.site-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.site-search input[type="search"] {
  width: 180px;
  max-width: 40vw;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  transition: box-shadow 0.25s var(--ease), width 0.3s var(--ease), border-color 0.25s var(--ease);
}

.site-search input[type="search"]::placeholder {
  color: var(--text-muted);
}

.site-search input[type="search"]:focus {
  outline: none;
  width: 220px;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.18);
}

.site-search button {
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.3);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}

.site-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.42);
  filter: brightness(1.06);
}

#menu-toggle,
#theme-toggle {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease);
}

#menu-toggle {
  display: none;
}

#menu-toggle:hover,
#theme-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(120deg, var(--brand), var(--brand-2));
  transform: translateY(-2px);
}

/* ============ Layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 60px;
}

main > section {
  margin: 0 0 34px;
  padding: 34px clamp(18px, 3vw, 40px);
  background: var(--surface);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* ============ Hero ============ */
#hero {
  position: relative;
  margin-top: 28px;
  padding: clamp(34px, 5vw, 64px) clamp(20px, 4vw, 56px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(124, 58, 237, 0.55), transparent 62%),
    radial-gradient(760px 420px at 92% 12%, rgba(236, 72, 153, 0.45), transparent 60%),
    radial-gradient(700px 480px at 60% 110%, rgba(34, 211, 238, 0.4), transparent 62%),
    linear-gradient(135deg, #2a1259 0%, #4c1d95 45%, #831843 100%);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.5), transparent 68%);
  filter: blur(20px);
  animation: floatOrb 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-24px, 26px, 0) scale(1.08); }
}

#hero > * {
  position: relative;
  z-index: 1;
}

#hero h1 {
  color: #fff;
  max-width: 20ch;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

.hero-lead {
  max-width: 68ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 30px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

.btn-primary {
  color: #2a1259;
  background: linear-gradient(120deg, #facc15, #fbbf24 50%, #f59e0b);
  box-shadow: 0 12px 30px rgba(250, 204, 21, 0.42);
}

.btn-primary:hover {
  color: #2a1259;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 18px 40px rgba(250, 204, 21, 0.55);
}

.btn-secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.stat {
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-align: center;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.stat-num {
  display: block;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ============ Breadcrumb ============ */
#breadcrumb {
  margin: 0 0 26px;
  padding: 0 6px;
}

#breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

#breadcrumb li + li::before {
  content: "›";
  color: var(--brand-2);
  font-weight: 700;
}

#breadcrumb a {
  color: var(--text-muted);
}

#breadcrumb a:hover {
  color: var(--brand);
}

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

/* ============ Timeline ============ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 18px 0 26px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3), var(--accent-2));
  opacity: 0.5;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 34px;
  margin: 0;
  color: var(--text-soft);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.timeline li:hover::before {
  transform: scale(1.25);
  box-shadow: 0 0 0 7px rgba(124, 58, 237, 0.22);
}

.timeline strong {
  color: var(--brand);
  margin-right: 6px;
}

html[data-theme="dark"] .timeline strong {
  color: var(--brand-2);
}

/* ============ Articles / News cards ============ */
#news article,
#articles article {
  position: relative;
  margin: 0 0 16px;
  padding: 22px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--brand-3));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#news article:hover::before,
#articles article:hover::before {
  opacity: 1;
}

#news article h3,
#articles article h3 {
  margin-bottom: 0.35em;
  transition: color 0.3s var(--ease);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--brand);
}

html[data-theme="dark"] #news article:hover h3,
html[data-theme="dark"] #articles article:hover h3 {
  color: var(--brand-2);
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
  border: 1px solid var(--border-strong);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#articles article a::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

#articles article a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.32);
}

#articles article a:hover::after {
  transform: translateX(4px);
}

/* ============ FAQ ============ */
#faq details {
  margin: 0 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

#faq details[open] {
  border-color: var(--brand-2);
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.16);
}

#faq summary {
  cursor: pointer;
  padding: 16px 48px 16px 20px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text);
  position: relative;
  list-style: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
  color: var(--brand);
  background: rgba(124, 58, 237, 0.05);
}

html[data-theme="dark"] #faq summary:hover {
  color: var(--brand-2);
  background: rgba(168, 85, 247, 0.08);
}

#faq details p {
  margin: 0;
  padding: 4px 20px 20px;
  color: var(--text-soft);
  animation: fadeSlide 0.35s var(--ease);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Contact / lists in sections ============ */
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

#contact ul {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

#sitemap ul {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

#links ul {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

#contact li,
#sitemap li,
#links li {
  margin: 0;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#sitemap li,
#links li {
  padding: 0;
  background: transparent;
  border: none;
}

#sitemap li a,
#links li a {
  display: block;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap li a:hover,
#links li a:hover {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.3);
}

#contact li:hover {
  transform: translateY(-2px);
  background: var(--bg-soft);
  border-color: var(--border-strong);
}

/* ============ HowTo ordered list ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 16px 20px 16px 62px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

#howto ol li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#howto ul li {
  padding-left: 4px;
}

/* ============ Footer ============ */
#site-footer {
  position: relative;
  margin-top: 40px;
  padding: 48px 20px 30px;
  color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(700px 320px at 12% 0%, rgba(124, 58, 237, 0.5), transparent 60%),
    radial-gradient(600px 320px at 88% 10%, rgba(236, 72, 153, 0.34), transparent 62%),
    linear-gradient(150deg, #1b0f38 0%, #2a1259 50%, #3b0f3a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3), var(--accent-2), var(--accent));
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr;
  gap: 30px;
  align-items: start;
}

.footer-brand p,
.footer-contact p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.footer-brand strong {
  color: #fff;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}

.footer-links a:hover {
  color: #2a1259;
  background: var(--accent);
  border-color: transparent;
  transform: translateY(-2px);
}

.copyright {
  grid-column: 1 / -1;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ============ Back to top ============ */
#back-to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(120deg, var(--brand), var(--brand-3));
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.55);
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-links {
    grid-column: 1 / -1;
  }
  .site-search input[type="search"] {
    width: 150px;
  }
  .site-search input[type="search"]:focus {
    width: 180px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    gap: 10px;
  }
  #menu-toggle {
    display: inline-flex;
    order: 3;
    margin-left: auto;
  }
  #theme-toggle {
    order: 4;
  }
  nav[aria-label="主导航"] {
    order: 5;
    flex-basis: 100%;
    display: none;
  }
  nav[aria-label="主导航"].is-open {
    display: block;
    animation: fadeSlide 0.3s var(--ease);
  }
  .nav-list {
    flex-direction: column;
    gap: 4px;
    padding: 8px 0 4px;
  }
  .nav-list a {
    display: block;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    font-size: 0.94rem;
  }
  .site-search {
    order: 2;
    flex: 1 1 100%;
  }
  .site-search input[type="search"] {
    width: 100%;
    max-width: none;
  }
  .site-search input[type="search"]:focus {
    width: 100%;
  }
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  main {
    padding: 0 14px 44px;
  }
  main > section {
    padding: 26px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 22px;
  }
  #hero {
    margin-top: 18px;
    padding: 30px 20px;
    border-radius: var(--radius-lg);
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  .stat {
    padding: 14px 10px;
  }
  .stat-label {
    font-size: 0.76rem;
  }
  #news article,
  #articles article {
    padding: 18px;
  }
  #faq summary {
    padding: 14px 44px 14px 16px;
    font-size: 0.94rem;
  }
  #faq details p {
    padding: 2px 16px 16px;
  }
  #howto ol li {
    padding: 14px 16px 14px 56px;
  }
  #howto ol li::before {
    left: 12px;
    top: 14px;
    width: 28px;
    height: 28px;
    font-size: 0.84rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 0.8rem;
  }
  h2 {
    padding-left: 14px;
  }
  h2::before {
    width: 5px;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .brand-text {
    font-size: 0.98rem;
  }
}

/* ============ Print ============ */
@media print {
  #site-header,
  #back-to-top,
  .hero-actions,
  .footer-links,
  .site-search {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section,
  #hero {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
  }
  #hero h1,
  .hero-lead {
    color: #000;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}