:root {
  --primary: #7c3aed;
  --primary-2: #a855f7;
  --primary-3: #ec4899;
  --primary-4: #06b6d4;
  --bg: #f7f5ff;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --border: rgba(124, 58, 237, 0.14);
  --text: #1f1b2e;
  --text-2: #4b4560;
  --text-3: #7a7391;
  --shadow-sm: 0 2px 8px rgba(60, 40, 120, 0.06);
  --shadow-md: 0 10px 30px rgba(60, 40, 120, 0.10);
  --shadow-lg: 0 24px 60px rgba(60, 40, 120, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --grad-hero: linear-gradient(135deg, #7c3aed 0%, #a855f7 38%, #ec4899 72%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.10), rgba(236, 72, 153, 0.08), rgba(6, 182, 212, 0.10));
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0b18;
    --bg-2: #14101f;
    --surface: rgba(30, 24, 46, 0.62);
    --surface-solid: #1a1528;
    --border: rgba(168, 85, 247, 0.22);
    --text: #f2eeff;
    --text-2: #cfc7e6;
    --text-3: #9a92b5;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
    --grad-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(236, 72, 153, 0.16), rgba(6, 182, 212, 0.18));
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 8% -8%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(800px 460px at 96% 4%, rgba(236, 72, 153, 0.14), transparent 62%),
    radial-gradient(760px 520px at 50% 108%, rgba(6, 182, 212, 0.12), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg,
video {
  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(--primary-3);
}

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

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

h1 {
  font-size: clamp(1.75rem, 4.2vw, 3rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  position: relative;
  padding-bottom: 0.55em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: var(--grad-hero);
  background-size: 200% 100%;
  animation: underlineFlow 6s linear infinite;
}

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

h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--grad-hero);
  vertical-align: middle;
  transform: translateY(-2px);
}

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

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

li {
  margin-bottom: 0.5em;
  color: var(--text-2);
}

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

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

@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: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(168, 85, 247, 0); }
}

/* ============ Header / Nav ============ */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  background: var(--grad-hero);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 8s ease infinite;
  transition: transform 0.3s var(--ease);
}

header nav > a:hover {
  transform: scale(1.04);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav ul li {
  margin: 0;
}

header nav ul li a {
  position: relative;
  display: inline-block;
  padding: 0.45rem 0.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: 999px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

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

header nav ul li a:hover,
header nav ul li a:focus-visible {
  color: var(--primary);
  background: rgba(124, 58, 237, 0.08);
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
}

main > section {
  margin-bottom: 2.25rem;
  padding: 2rem;
  background: var(--surface);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.8s var(--ease) both;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(168, 85, 247, 0.32);
}

main > section:nth-of-type(1) { animation-delay: 0.02s; }
main > section:nth-of-type(2) { animation-delay: 0.06s; }
main > section:nth-of-type(3) { animation-delay: 0.10s; }
main > section:nth-of-type(4) { animation-delay: 0.14s; }
main > section:nth-of-type(5) { animation-delay: 0.18s; }
main > section:nth-of-type(6) { animation-delay: 0.22s; }
main > section:nth-of-type(7) { animation-delay: 0.26s; }
main > section:nth-of-type(8) { animation-delay: 0.30s; }
main > section:nth-of-type(9) { animation-delay: 0.34s; }
main > section:nth-of-type(10) { animation-delay: 0.38s; }
main > section:nth-of-type(11) { animation-delay: 0.42s; }
main > section:nth-of-type(12) { animation-delay: 0.46s; }
main > section:nth-of-type(13) { animation-delay: 0.50s; }
main > section:nth-of-type(14) { animation-delay: 0.54s; }
main > section:nth-of-type(15) { animation-delay: 0.58s; }

/* ============ Breadcrumb ============ */
main > nav[aria-label="面包屑"] {
  margin-bottom: 1.5rem;
}

main > nav[aria-label="面包屑"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: var(--text-3);
  background: var(--surface);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑"] li {
  margin: 0;
  color: var(--text-3);
}

main > nav[aria-label="面包屑"] li + li::before {
  content: "›";
  margin-right: 0.4rem;
  color: var(--primary-2);
  font-weight: 700;
}

main > nav[aria-label="面包屑"] a {
  color: var(--text-2);
}

main > nav[aria-label="面包屑"] a:hover {
  color: var(--primary);
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius-xl);
  background: var(--grad-hero);
  background-size: 220% 220%;
  animation: fadeUp 0.9s var(--ease) both, shimmer 14s ease infinite;
  border: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 12% 12%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(500px 260px at 88% 88%, rgba(255, 255, 255, 0.18), transparent 62%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  filter: blur(6px);
  animation: floaty 7s ease-in-out infinite;
  pointer-events: none;
}

#hero h1 {
  position: relative;
  color: #fff;
  text-shadow: 0 4px 24px rgba(40, 10, 80, 0.35);
  margin-bottom: 0.8rem;
}

#hero p {
  position: relative;
  color: rgba(255, 255, 255, 0.94);
  max-width: 78ch;
  text-shadow: 0 2px 12px rgba(40, 10, 80, 0.25);
}

#hero a {
  position: relative;
  display: inline-block;
  margin: 0.5rem 0.75rem 0.5rem 0;
  padding: 0.75rem 1.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#hero a:first-of-type {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

#hero a:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(40, 10, 80, 0.35);
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

#hero a:first-of-type:hover {
  background: #fff;
  color: var(--primary-3);
}

/* ============ News list ============ */
#news ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

#news li {
  position: relative;
  margin: 0;
  padding: 0.85rem 1.1rem 0.85rem 1.4rem;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news li::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad-hero);
  transform: translateY(-50%);
}

#news li:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(168, 85, 247, 0.4);
}

#news strong {
  display: inline-block;
  margin-right: 0.6rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.8rem;
  color: #fff;
  background: var(--grad-hero);
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ============ Articles ============ */
#articles {
  display: block;
}

#articles > article {
  position: relative;
  margin: 0 0 1.1rem;
  padding: 1.4rem 1.5rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  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;
}

#articles > article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-hero);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}

#articles > article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(168, 85, 247, 0.36);
}

#articles > article:hover::before {
  transform: scaleY(1);
}

#articles article h3 {
  margin-bottom: 0.4rem;
}

#articles article h3::before {
  display: none;
}

#articles article p {
  margin-bottom: 0.5rem;
  font-size: 0.94rem;
}

#articles article p:first-of-type {
  display: inline-block;
  padding: 0.1rem 0.65rem;
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(124, 58, 237, 0.10);
  border-radius: 999px;
  font-weight: 600;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

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

#articles article a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

/* ============ FAQ ============ */
#faq h3 {
  margin-top: 1.6rem;
  padding: 0.9rem 1.1rem;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3::before {
  display: none;
}

#faq h3:hover {
  transform: translateX(4px);
  border-color: var(--primary-2);
}

#faq h3 + p {
  padding: 0 1.1rem;
  animation: fadeIn 0.5s var(--ease) both;
}

/* ============ HowTo ============ */
#howto h3 {
  margin-top: 1.5rem;
}

#howto p {
  padding-left: 0.2rem;
}

#howto h3 + p {
  position: relative;
  padding: 0.9rem 1.1rem;
  background: var(--surface-solid);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ============ Contact ============ */
#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

#contact li {
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#contact li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ============ Sitemap & Links ============ */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap li a,
#links li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap li a:hover,
#links li a:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--grad-hero);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 3rem 1.5rem 2rem;
  background: var(--surface);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid var(--border);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-hero);
  background-size: 200% 100%;
  animation: shimmer 8s linear infinite;
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 1.5rem;
  padding: 1.5rem 1.6rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

footer > section:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

footer h2 {
  font-size: 1.1rem;
  padding-bottom: 0.4em;
}

footer h2::after {
  width: 40px;
  height: 3px;
}

footer p {
  font-size: 0.88rem;
  color: var(--text-3);
  margin-bottom: 0.6em;
}

footer > p {
  max-width: var(--maxw);
  margin: 1.5rem auto 0;
  padding-top: 1.2rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
  border-top: 1px solid var(--border);
}

/* ============ Responsive ============ */
@media (max-width: 992px) {
  main {
    padding: 1.25rem 1.1rem 3rem;
  }

  main > section {
    padding: 1.6rem;
    border-radius: var(--radius-md);
  }

  #hero {
    border-radius: var(--radius-lg);
  }

  header nav {
    padding: 0.7rem 1.1rem;
  }

  header nav ul {
    gap: 0.15rem;
  }

  header nav ul li a {
    padding: 0.4rem 0.65rem;
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  header nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  header nav > a {
    text-align: center;
  }

  header nav ul {
    justify-content: center;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  header nav ul::-webkit-scrollbar {
    display: none;
  }

  header nav ul li a {
    white-space: nowrap;
  }

  main {
    padding: 1rem 0.85rem 2.5rem;
  }

  main > section {
    padding: 1.25rem 1.1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
  }

  #hero {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-lg);
  }

  #hero a {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0.6rem 0;
  }

  #articles > article {
    padding: 1.1rem 1.15rem;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 2rem 0.85rem 1.5rem;
  }

  footer > section {
    padding: 1.2rem 1.1rem;
    border-radius: var(--radius-md);
  }
}

@media (max-width: 420px) {
  h2::after {
    width: 48px;
    height: 3px;
  }

  main > nav[aria-label="面包屑"] ol {
    font-size: 0.78rem;
    padding: 0.5rem 0.8rem;
  }
}

/* ============ Motion preferences ============ */
@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;
  }
}

/* ============ Print ============ */
@media print {
  header,
  footer,
  #hero a {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}