:root {
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --bg-elev: rgba(255, 255, 255, 0.72);
  --text: #1c1c2b;
  --text-soft: #4a4a63;
  --text-mute: #767690;
  --primary: #6c5ce7;
  --primary-2: #8e7bff;
  --accent: #ff7a59;
  --accent-2: #f6c445;
  --cyan: #4fc3f7;
  --line: rgba(28, 28, 43, 0.1);
  --line-strong: rgba(28, 28, 43, 0.18);
  --shadow-sm: 0 2px 8px rgba(28, 28, 43, 0.06);
  --shadow: 0 10px 30px rgba(28, 28, 43, 0.1);
  --shadow-lg: 0 24px 60px rgba(28, 28, 43, 0.16);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --glass-blur: 16px;
  --header-h: 72px;
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #2d2b55 40%, #4b3f8f 70%, #6c5ce7 100%);
  --grad-accent: linear-gradient(120deg, #6c5ce7 0%, #8e7bff 45%, #4fc3f7 100%);
  --grad-warm: linear-gradient(120deg, #ff7a59 0%, #f6c445 100%);
}

[data-theme="dark"] {
  --bg: #0e0e18;
  --bg-soft: #16162a;
  --bg-elev: rgba(30, 30, 52, 0.66);
  --text: #eef0ff;
  --text-soft: #c2c4de;
  --text-mute: #8b8da8;
  --primary: #8e7bff;
  --primary-2: #a99bff;
  --line: rgba(238, 240, 255, 0.1);
  --line-strong: rgba(238, 240, 255, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --grad-hero: linear-gradient(135deg, #0a0a14 0%, #1a1a2e 45%, #2b2550 75%, #4b3f8f 100%);
}

*,
*::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: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 10% -10%, rgba(108, 92, 231, 0.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(79, 195, 247, 0.12), transparent 55%),
    radial-gradient(800px 600px at 50% 100%, rgba(255, 122, 89, 0.08), transparent 60%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: hidden;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent);
}

ul,
ol {
  margin: 0;
  padding-left: 1.25em;
}

h1, h2, h3, h4 {
  line-height: 1.3;
  margin: 0 0 0.6em;
  font-weight: 800;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(1.7rem, 2.6vw + 1rem, 2.6rem); }
h2 { font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem); }
h3 { font-size: clamp(1.1rem, 0.8vw + 0.95rem, 1.35rem); }

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

strong {
  color: var(--text);
}

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

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

/* ============ 滚动动画 ============ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(108, 92, 231, 0); }
}

@media (prefers-reduced-motion: no-preference) {
  main > section,
  main > nav,
  .hero {
    animation: fadeUp 0.7s var(--ease) both;
  }
  main > section:nth-of-type(2n) { animation-delay: 0.05s; }
  main > section:nth-of-type(3n) { animation-delay: 0.1s; }
  .hero-stats .stat {
    animation: fadeUp 0.6s var(--ease) both;
  }
  .hero-stats .stat:nth-child(1) { animation-delay: 0.1s; }
  .hero-stats .stat:nth-child(2) { animation-delay: 0.2s; }
  .hero-stats .stat:nth-child(3) { animation-delay: 0.3s; }
  .hero-stats .stat:nth-child(4) { animation-delay: 0.4s; }
}

/* ============ 头部 ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid var(--line);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#site-header.scrolled {
  box-shadow: var(--shadow);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand a {
  display: inline-flex;
  border-radius: 12px;
  transition: transform 0.35s var(--ease);
}

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

.brand svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 12px rgba(108, 92, 231, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}

#main-nav {
  flex: 1 1 auto;
  min-width: 0;
}

#main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

#main-nav a {
  display: inline-block;
  padding: 6px 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.3s var(--ease);
}

#main-nav a:hover,
#main-nav a:focus-visible {
  color: var(--primary);
  background: rgba(108, 92, 231, 0.08);
}

#main-nav a:hover::after {
  width: 60%;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#site-search {
  display: flex;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 4px 3px 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

#search-input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  padding: 6px 4px;
  width: 180px;
  outline: none;
  font-family: inherit;
}

#search-input::placeholder {
  color: var(--text-mute);
}

#site-search button {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: var(--grad-accent);
  padding: 7px 16px;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(108, 92, 231, 0.35);
}

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

#theme-toggle:hover,
#menu-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

#menu-toggle {
  display: none;
}

/* ============ 面包屑 ============ */
.breadcrumb {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 0 20px;
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-mute);
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--text-mute);
}

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

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

/* ============ Hero ============ */
.hero {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 0 20px;
}

.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 64px);
  color: #fff;
  background: var(--grad-hero);
  background-size: 180% 180%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.8s var(--ease) both;
  isolation: isolate;
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 20% 20%, rgba(246, 196, 69, 0.28), transparent 42%),
    radial-gradient(circle at 80% 30%, rgba(79, 195, 247, 0.24), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(255, 122, 89, 0.22), transparent 45%);
  z-index: -1;
  animation: floatY 9s ease-in-out infinite;
}

.hero-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10, 10, 20, 0.35));
  z-index: -1;
  pointer-events: none;
}

.hero-slider .slide {
  display: none;
  max-width: 760px;
  animation: fadeUp 0.6s var(--ease) both;
}

.hero-slider .slide.active {
  display: block;
}

.hero-slider h1,
.hero-slider h2 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.5em;
}

.hero-slider p {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.08rem);
  max-width: 68ch;
}

.cta {
  display: inline-block;
  margin-top: 8px;
  padding: 12px 30px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #1a1a2e;
  background: var(--grad-warm);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(255, 122, 89, 0.4);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), filter 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.cta:hover {
  color: #1a1a2e;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 34px rgba(255, 122, 89, 0.5);
}

.cta:hover::after {
  opacity: 1;
  animation: shimmer 1.1s linear infinite;
}

.slider-controls {
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.slider-controls button {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 18px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.slider-controls button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.hero-stats .stat {
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.hero-stats .stat:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.hero-stats .num {
  display: block;
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero-stats .stat > span:last-child {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--text-mute);
}

/* ============ 锚点导航 ============ */
.anchor-nav {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding: 0 20px;
}

.anchor-nav ul {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.anchor-nav a {
  display: inline-block;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

.anchor-nav a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(108, 92, 231, 0.3);
}

/* ============ 内容区块 ============ */
main > section {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: clamp(22px, 3vw, 40px);
  background: var(--bg-elev);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

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

main > section > h2 {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

main > section > h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--grad-accent);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

main > section > h2::after {
  content: "";
  position: absolute;
  left: 72px;
  bottom: 1px;
  width: 200px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

main > section h3 {
  margin-top: 1.6em;
  color: var(--text);
}

main > section h3:first-of-type {
  margin-top: 0.4em;
}

main > section p {
  max-width: 88ch;
}

/* ============ 文章卡片 ============ */
#news article,
#articles article {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  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;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

#news article:hover,
#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(108, 92, 231, 0.35);
}

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

#news article:last-child,
#articles article:last-child {
  margin-bottom: 0;
}

#news article h3,
#articles article h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

#news article h3 a,
#articles article h3 a {
  color: var(--text);
  background-image: linear-gradient(var(--primary), var(--primary));
  background-size: 0 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease), color 0.25s var(--ease);
}

#news article h3 a:hover,
#articles article h3 a:hover {
  color: var(--primary);
  background-size: 100% 2px;
}

#news article time,
#articles article time {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 8px;
}

#articles article > a:last-child {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

#articles article > a:last-child::after {
  content: " →";
  transition: transform 0.25s var(--ease);
  display: inline-block;
}

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

/* ============ 引用 / 评价 ============ */
blockquote {
  position: relative;
  margin: 0 0 16px;
  padding: 20px 24px 20px 56px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote::before {
  content: "“";
  position: absolute;
  left: 18px;
  top: 4px;
  font-size: 3rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  opacity: 0.55;
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

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

#faq details:hover {
  border-color: rgba(108, 92, 231, 0.35);
  box-shadow: var(--shadow);
}

#faq details[open] {
  border-color: var(--primary);
  background: var(--bg-elev);
}

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

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(108, 92, 231, 0.1);
  transition: transform 0.35s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary:hover {
  color: var(--primary);
}

#faq details p {
  margin: 0 0 18px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  animation: fadeIn 0.35s var(--ease) both;
}

/* ============ 教程列表 ============ */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 14px 18px 14px 58px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: var(--grad-accent);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.35);
}

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

/* ============ 联系信息 ============ */
#contact address {
  font-style: normal;
}

#contact address ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

#contact address li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.92rem;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  word-break: break-word;
}

#contact address li::before {
  content: "◆";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.7rem;
}

#contact address li:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ============ 网站地图 & 友链 ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.32);
}

/* ============ 页脚 ============ */
#site-footer {
  margin-top: 56px;
  background: linear-gradient(180deg, transparent, rgba(108, 92, 231, 0.06));
  border-top: 1px solid var(--line);
  position: relative;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 20px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.footer-brand strong {
  display: inline-block;
  font-size: 1.2rem;
  margin-bottom: 10px;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-mute);
  margin: 0;
}

.footer-links h3,
.footer-legal h3 {
  font-size: 0.95rem;
  margin: 0 0 14px;
  color: var(--text);
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after,
.footer-legal h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-warm);
}

.footer-links ul,
.footer-legal ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-links a,
.footer-legal a {
  font-size: 0.88rem;
  color: var(--text-soft);
  display: inline-block;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

.footer-meta p {
  font-size: 0.82rem;
  color: var(--text-mute);
  margin: 0 0 8px;
}

.footer-meta p:last-child {
  margin-bottom: 0;
}

#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: var(--grad-accent);
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 0 10px 26px rgba(108, 92, 231, 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);
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: pulseGlow 2.6s ease-in-out infinite;
}

#back-to-top:hover {
  transform: translateY(-3px) scale(1.04);
}

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .header-inner {
    gap: 14px;
  }
  #search-input {
    width: 140px;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }
  .header-inner {
    justify-content: space-between;
    padding: 10px 16px;
  }
  #menu-toggle {
    display: inline-block;
  }
  #main-nav {
    order: 10;
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s var(--ease), opacity 0.3s var(--ease), margin 0.3s var(--ease);
  }
  #main-nav.open {
    max-height: 640px;
    opacity: 1;
    margin-top: 6px;
  }
  #main-nav ul {
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  #main-nav a {
    display: block;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
  }
  #main-nav a::after {
    display: none;
  }
  .header-tools {
    gap: 8px;
  }
  #site-search {
    order: 5;
    flex-basis: 100%;
    width: 100%;
    margin-top: 6px;
  }
  #search-input {
    width: 100%;
    flex: 1;
  }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }
  .brand-text span {
    display: none;
  }
  .brand svg {
    width: 34px;
    height: 34px;
  }
  .breadcrumb,
  .hero,
  .anchor-nav {
    padding: 0 14px;
  }
  main > section {
    margin: 24px 14px 0;
    padding: 20px 16px;
    border-radius: var(--radius);
  }
  .hero-slider {
    padding: 26px 20px;
    border-radius: var(--radius);
  }
  .hero-slider p {
    font-size: 0.92rem;
  }
  .cta {
    padding: 11px 24px;
    font-size: 0.9rem;
  }
  .hero-stats {
    gap: 10px;
  }
  .hero-stats .stat {
    padding: 14px 10px;
  }
  .hero-stats .stat > span:last-child {
    font-size: 0.74rem;
  }
  .anchor-nav ul {
    padding: 8px;
    gap: 6px;
  }
  .anchor-nav a {
    font-size: 0.78rem;
    padding: 5px 11px;
  }
  #news article,
  #articles article {
    padding: 16px;
  }
  blockquote {
    padding: 16px 18px 16px 46px;
  }
  blockquote::before {
    left: 14px;
    font-size: 2.4rem;
  }
  #contact address ul {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 16px 24px;
  }
  #back-to-top {
    right: 14px;
    bottom: 14px;
    padding: 10px 16px;
    font-size: 0.78rem;
  }
  main > section > h2::after {
    width: 120px;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

/* ============ 无障碍 / 打印 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  #site-header,
  .anchor-nav,
  #back-to-top,
  .slider-controls,
  .header-tools {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}