:root {
  --bg: #0f1020;
  --bg-soft: #16182e;
  --card: rgba(255, 255, 255, 0.06);
  --card-solid: #1a1c33;
  --border: rgba(255, 255, 255, 0.12);
  --text: #e8e9f3;
  --text-soft: #a9adc7;
  --text-dim: #7c81a0;
  --primary: #7c5cff;
  --primary-2: #4dd6c1;
  --accent: #ff7ab6;
  --grad: linear-gradient(135deg, #7c5cff 0%, #4dd6c1 55%, #ff7ab6 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.22), rgba(77, 214, 193, 0.14) 60%, rgba(255, 122, 182, 0.18));
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --radius: 20px;
  --radius-sm: 14px;
  --blur: saturate(160%) blur(18px);
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #eceef8;
    --card: rgba(255, 255, 255, 0.72);
    --card-solid: #ffffff;
    --border: rgba(20, 22, 50, 0.1);
    --text: #171a2e;
    --text-soft: #4a4f70;
    --text-dim: #7a7f9c;
    --primary: #5b3df0;
    --primary-2: #17a893;
    --accent: #e04a90;
    --grad: linear-gradient(135deg, #5b3df0 0%, #17a893 55%, #e04a90 100%);
    --grad-soft: linear-gradient(135deg, rgba(91, 61, 240, 0.12), rgba(23, 168, 147, 0.1) 60%, rgba(224, 74, 144, 0.12));
    --shadow: 0 18px 44px rgba(30, 34, 80, 0.14);
    --shadow-sm: 0 8px 22px rgba(30, 34, 80, 0.1);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 8% -10%, rgba(124, 92, 255, 0.26), transparent 60%),
    radial-gradient(900px 520px at 96% 4%, rgba(77, 214, 193, 0.18), transparent 62%),
    radial-gradient(900px 620px at 50% 110%, rgba(255, 122, 182, 0.14), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

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

h1 {
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  letter-spacing: 0.015em;
}

h2 {
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  position: relative;
  padding-left: 18px;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 6px;
  background: var(--grad);
  box-shadow: 0 0 18px rgba(124, 92, 255, 0.55);
}

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

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

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

li {
  margin-bottom: 0.5em;
}

li::marker {
  color: var(--primary-2);
}

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

blockquote {
  margin: 0 0 1.2em;
  padding: 18px 22px;
  border-left: 4px solid transparent;
  border-image: var(--grad) 1;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

blockquote:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

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

/* ============ Header ============ */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 16, 32, 0.55);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 6px 26px rgba(30, 34, 80, 0.08);
  }
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

header > div > a {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  position: relative;
  transition: filter 0.35s var(--ease), transform 0.35s var(--ease);
}

header > div > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

header > div > a:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

header > div > a:hover::after {
  transform: scaleX(1);
}

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

nav[aria-label="主导航"] ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
}

nav[aria-label="主导航"] li {
  margin: 0;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 7px 13px;
  font-size: 0.92rem;
  color: var(--text-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: var(--text);
  background: var(--grad-soft);
  border-color: var(--border);
  transform: translateY(-2px);
}

/* ============ Main layout ============ */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 22px 70px;
}

/* ============ Breadcrumb ============ */

nav[aria-label="面包屑导航"] {
  margin-bottom: 26px;
}

nav[aria-label="面包屑导航"] ol {
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.86rem;
  color: var(--text-dim);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

nav[aria-label="面包屑导航"] li + li::before {
  content: "›";
  color: var(--primary-2);
  font-weight: 700;
}

nav[aria-label="面包屑导航"] a {
  color: var(--text-soft);
}

nav[aria-label="面包屑导航"] a:hover {
  color: var(--accent);
}

/* ============ Sections as glass cards ============ */

main > section {
  position: relative;
  margin-bottom: 30px;
  padding: 34px clamp(20px, 3.6vw, 44px);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  animation: rise 0.7s var(--ease) both;
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease), border-color 0.45s var(--ease);
}

main > section::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.9;
}

main > section:hover {
  box-shadow: var(--shadow);
  border-color: rgba(124, 92, 255, 0.32);
  transform: translateY(-3px);
}

main > section:nth-of-type(1) { animation-delay: 0.05s; }
main > section:nth-of-type(2) { animation-delay: 0.1s; }
main > section:nth-of-type(3) { animation-delay: 0.15s; }
main > section:nth-of-type(4) { animation-delay: 0.2s; }
main > section:nth-of-type(5) { animation-delay: 0.25s; }
main > section:nth-of-type(6) { animation-delay: 0.3s; }

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

/* ============ Hero ============ */

section[aria-labelledby="hero-title"] {
  overflow: hidden;
  background:
    var(--grad-soft),
    var(--card);
  border-color: rgba(124, 92, 255, 0.3);
  padding-top: clamp(34px, 5vw, 58px);
  padding-bottom: clamp(34px, 5vw, 58px);
}

section[aria-labelledby="hero-title"]::before {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  top: -200px;
  right: -140px;
  border-radius: 50%;
  background: var(--grad);
  filter: blur(90px);
  opacity: 0.34;
  pointer-events: none;
  animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-26px, 30px, 0) scale(1.12); }
}

section[aria-labelledby="hero-title"] h1 {
  position: relative;
  z-index: 1;
  max-width: 20em;
}

section[aria-labelledby="hero-title"] h1::after {
  content: "";
  display: block;
  width: 92px;
  height: 5px;
  margin-top: 20px;
  border-radius: 5px;
  background: var(--grad);
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.6);
}

section[aria-labelledby="hero-title"] p {
  position: relative;
  z-index: 1;
  max-width: 62em;
  font-size: 1.02rem;
  color: var(--text-soft);
}

section[aria-labelledby="hero-title"] p:first-of-type {
  font-size: 1.06rem;
  color: var(--text);
  opacity: 0.94;
}

/* ============ Articles ============ */

#articles > p {
  margin-bottom: 26px;
}

#articles article {
  position: relative;
  margin: 0 0 20px;
  padding: 24px clamp(18px, 2.6vw, 28px);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

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

#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(77, 214, 193, 0.4);
}

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

#articles article h3 {
  margin-bottom: 8px;
  transition: color 0.3s var(--ease);
}

#articles article:hover h3 {
  color: var(--primary-2);
}

#articles article p {
  margin-bottom: 8px;
  font-size: 0.96rem;
}

#articles article p:nth-of-type(1) {
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

#articles article p:nth-of-type(2) {
  color: var(--text-soft);
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--grad-soft);
  color: var(--primary-2);
  transition: transform 0.3s var(--ease), color 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: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 92, 255, 0.28);
}

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

/* ============ News list ============ */

section[aria-labelledby="news-title"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

section[aria-labelledby="news-title"] li {
  margin: 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}

section[aria-labelledby="news-title"] li:hover {
  transform: translateX(6px);
  border-color: rgba(77, 214, 193, 0.42);
  background: var(--grad-soft);
}

section[aria-labelledby="news-title"] li strong {
  display: inline-block;
  margin-right: 6px;
  color: var(--primary-2);
  font-weight: 700;
}

/* ============ HowTo ordered flow ============ */

#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  display: grid;
  gap: 12px;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  margin: 0;
  padding: 14px 18px 14px 58px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: rgba(124, 92, 255, 0.42);
}

/* ============ FAQ ============ */

#faq h3 {
  position: relative;
  margin-top: 26px;
  padding: 14px 18px 14px 46px;
  font-size: 1.04rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  cursor: default;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.38);
}

#faq h3:hover {
  color: var(--primary-2);
  border-color: rgba(77, 214, 193, 0.42);
  transform: translateX(4px);
}

#faq h3 + p {
  margin-top: -4px;
  padding: 4px 4px 0 46px;
  font-size: 0.96rem;
}

/* ============ Contact ============ */

address {
  font-style: normal;
  display: grid;
  gap: 10px;
  margin: 0 0 1.4em;
  padding: 22px clamp(18px, 3vw, 28px);
  border-radius: var(--radius-sm);
  background: var(--grad-soft);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}

address p {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 0.96rem;
}

address p::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.62em;
  border-radius: 50%;
  background: var(--grad);
  flex: 0 0 auto;
  box-shadow: 0 0 10px rgba(124, 92, 255, 0.6);
}

/* ============ Sitemap ============ */

section[aria-labelledby="sitemap-title"] ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

section[aria-labelledby="sitemap-title"] li {
  margin: 0;
}

section[aria-labelledby="sitemap-title"] a {
  display: inline-block;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: var(--text-soft);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

section[aria-labelledby="sitemap-title"] a:hover {
  color: #fff;
  background: var(--grad);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(124, 92, 255, 0.34);
}

/* ============ Legal ============ */

section[aria-labelledby="legal-title"] h3 {
  margin-top: 22px;
  padding-left: 14px;
  border-left: 3px solid var(--primary-2);
}

/* ============ Footer ============ */

footer {
  position: relative;
  margin-top: 10px;
  padding: 38px 22px 46px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(124, 92, 255, 0.1));
}

footer p {
  margin: 0 auto 8px;
  max-width: 900px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

footer p:first-child {
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.04em;
}

/* ============ Scrollbar ============ */

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--grad);
  background-clip: padding-box;
}

::selection {
  background: rgba(124, 92, 255, 0.4);
  color: #fff;
}

/* ============ Responsive ============ */

@media (max-width: 900px) {
  header > div {
    padding: 12px 18px;
    gap: 14px;
  }

  nav[aria-label="主导航"] ul {
    gap: 2px 4px;
  }

  nav[aria-label="主导航"] a {
    padding: 6px 10px;
    font-size: 0.86rem;
  }

  main {
    padding: 26px 16px 56px;
  }

  main > section {
    padding: 28px 20px;
    border-radius: 18px;
    margin-bottom: 24px;
  }

  main > section:hover {
    transform: none;
  }
}

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

  header > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
  }

  header > div > a {
    font-size: 1.16rem;
  }

  nav[aria-label="主导航"] {
    width: 100%;
  }

  nav[aria-label="主导航"] ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav[aria-label="主导航"] ul::-webkit-scrollbar {
    display: none;
  }

  nav[aria-label="主导航"] a {
    white-space: nowrap;
    font-size: 0.84rem;
  }

  h2 {
    padding-left: 14px;
  }

  h2::before {
    width: 4px;
  }

  main > section {
    padding: 24px 16px;
    border-radius: 16px;
  }

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

  section[aria-labelledby="hero-title"]::before {
    width: 300px;
    height: 300px;
    top: -140px;
    right: -110px;
    filter: blur(70px);
  }

  #faq h3 {
    padding: 12px 14px 12px 42px;
    font-size: 0.98rem;
  }

  #faq h3 + p {
    padding-left: 14px;
  }

  #howto ol li {
    padding: 12px 14px 12px 52px;
  }

  #howto ol li::before {
    left: 12px;
    width: 26px;
    height: 26px;
    font-size: 0.8rem;
  }

  blockquote {
    padding: 14px 16px;
  }

  nav[aria-label="面包屑导航"] ol {
    border-radius: 16px;
    font-size: 0.8rem;
  }

  footer {
    padding: 30px 16px 40px;
  }
}

/* ============ Reduced motion ============ */

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

/* ============ Print ============ */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  header,
  footer,
  nav[aria-label="面包屑导航"] {
    display: none;
  }

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