:root {
  --bg: #0d0d1a;
  --bg-soft: #14142a;
  --bg-card: rgba(255, 255, 255, 0.045);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8e8f4;
  --text-dim: #a8a8c0;
  --text-faint: #7a7a96;
  --brand: #e94560;
  --brand-2: #7b2ff7;
  --brand-3: #0f9bff;
  --accent: #ffb347;
  --grad-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 35%, #0f3460 65%, #533483 100%);
  --grad-brand: linear-gradient(135deg, #e94560 0%, #7b2ff7 100%);
  --grad-line: linear-gradient(90deg, transparent, rgba(233, 69, 96, 0.6), rgba(123, 47, 247, 0.6), transparent);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 0 1px rgba(233, 69, 96, 0.25), 0 10px 40px rgba(233, 69, 96, 0.18);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 68px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fb;
    --bg-soft: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --border: rgba(20, 20, 60, 0.1);
    --border-strong: rgba(20, 20, 60, 0.18);
    --text: #1b1b2f;
    --text-dim: #4a4a66;
    --text-faint: #7a7a96;
    --grad-hero: linear-gradient(135deg, #eef1ff 0%, #e3e8ff 30%, #f6e9ff 60%, #ffe9ef 100%);
    --shadow-sm: 0 2px 8px rgba(30, 30, 80, 0.08);
    --shadow-md: 0 8px 28px rgba(30, 30, 80, 0.1);
    --shadow-lg: 0 18px 50px rgba(30, 30, 80, 0.14);
    --shadow-glow: 0 0 0 1px rgba(233, 69, 96, 0.2), 0 10px 40px rgba(233, 69, 96, 0.12);
    color-scheme: light;
  }
}

*,
*::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: "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.8;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -5%, rgba(123, 47, 247, 0.16), transparent 60%),
    radial-gradient(1000px 500px at 95% 5%, rgba(233, 69, 96, 0.14), transparent 55%),
    radial-gradient(900px 600px at 50% 100%, rgba(15, 155, 255, 0.1), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  animation: pageFade 0.7s var(--ease) both;
}

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

::selection {
  background: rgba(233, 69, 96, 0.35);
  color: #fff;
}

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(--accent);
}

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

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

li {
  margin: 0.35em 0;
}

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

h1 {
  font-size: clamp(1.6rem, 4.2vw, 2.75rem);
  background: linear-gradient(120deg, var(--brand) 0%, #ff8a5c 45%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: 200% auto;
  animation: titleShine 8s linear infinite;
}

@keyframes titleShine {
  to { background-position: 200% center; }
}

h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  position: relative;
  padding-bottom: 0.5em;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: var(--grad-brand);
  box-shadow: 0 0 14px rgba(233, 69, 96, 0.55);
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text);
}

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

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

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 26, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.22);
  animation: headerDrop 0.6s var(--ease) both;
}

@media (prefers-color-scheme: light) {
  header { background: rgba(255, 255, 255, 0.68); }
}

@keyframes headerDrop {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

header > div > a {
  font-size: 1.14rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}

header > div > a::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--grad-brand);
  box-shadow: 0 0 14px rgba(233, 69, 96, 0.7);
  transform: rotate(45deg);
  transition: transform 0.4s var(--ease);
}

header > div > a:hover::before {
  transform: rotate(225deg) scale(1.15);
}

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

header nav a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-dim);
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

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

header nav a:hover {
  color: var(--text);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

header nav a:hover::after {
  width: 40%;
}

/* ---------- Main ---------- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* ---------- Breadcrumb ---------- */
main > nav[aria-label="面包屑导航"] {
  margin: 22px 0 8px;
}

main > nav[aria-label="面包屑导航"] ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text-faint);
}

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

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  color: var(--text-faint);
  opacity: 0.6;
}

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

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

main > nav[aria-label="面包屑导航"] [aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}

/* ---------- Sections ---------- */
main > section {
  margin: 34px 0;
  padding: 30px clamp(18px, 3vw, 38px);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
  animation: riseIn 0.8s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% entry 28%;
}

@supports not (animation-timeline: view()) {
  main > section {
    animation: riseIn 0.8s var(--ease) both;
  }
}

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

main > section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--grad-line);
  opacity: 0.7;
  pointer-events: none;
}

main > section:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

/* ---------- Hero ---------- */
#hero {
  background: var(--grad-hero);
  border: 1px solid var(--border-strong);
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin-top: 18px;
  isolation: isolate;
}

#hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 69, 96, 0.4), transparent 65%);
  filter: blur(40px);
  z-index: -1;
  animation: floatBlob 12s ease-in-out infinite alternate;
}

#hero::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  left: -120px;
  bottom: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 155, 255, 0.35), transparent 65%);
  filter: blur(40px);
  z-index: -1;
  animation: floatBlob 14s ease-in-out infinite alternate-reverse;
  top: auto;
  height: 320px;
  background: radial-gradient(circle, rgba(15, 155, 255, 0.35), transparent 65%);
}

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

#hero p {
  font-size: clamp(0.95rem, 1.6vw, 1.06rem);
  color: var(--text-dim);
  max-width: 78ch;
}

#hero figure {
  margin: 28px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

#hero figure:hover {
  transform: scale(1.012);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(123, 47, 247, 0.25);
}

#hero figure svg {
  width: 100%;
  height: auto;
}

#hero figcaption {
  padding: 12px 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

/* ---------- Lists & Cards inside sections ---------- */
section ul,
section ol {
  color: var(--text-dim);
}

section > h3 + p,
section > h2 + p {
  margin-top: 0.4em;
}

/* ---------- Articles ---------- */
main article,
section article {
  padding: 20px 22px;
  margin: 16px 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

main article::before,
section article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

main article:hover,
section article:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

main article:hover::before,
section article:hover::before {
  opacity: 1;
}

article h3 {
  margin-bottom: 0.3em;
  transition: color 0.3s var(--ease);
}

article:hover h3 {
  color: var(--brand);
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 0;
  position: relative;
}

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

article a:hover::after {
  transform: translateX(5px);
}

/* ---------- Blockquote ---------- */
blockquote {
  margin: 16px 0;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(233, 69, 96, 0.08), rgba(123, 47, 247, 0.08));
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  position: relative;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

blockquote p {
  margin: 0;
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.95rem;
}

/* ---------- Details / FAQ ---------- */
details {
  margin: 12px 0;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

details:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

details[open] {
  box-shadow: var(--shadow-sm);
  border-color: rgba(233, 69, 96, 0.35);
}

summary {
  cursor: pointer;
  padding: 16px 52px 16px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--text);
  list-style: none;
  position: relative;
  transition: color 0.25s var(--ease);
  user-select: none;
}

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

summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  box-shadow: 0 0 0 rgba(233, 69, 96, 0);
}

details[open] summary::after {
  transform: translateY(-50%) rotate(135deg);
  box-shadow: 0 0 18px rgba(233, 69, 96, 0.55);
}

summary:hover {
  color: var(--brand);
}

details p {
  padding: 0 20px 18px;
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-dim);
  animation: fadeSlide 0.4s var(--ease) both;
}

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

/* ---------- Address / Contact ---------- */
address {
  font-style: normal;
  margin: 16px 0;
}

address ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

address li {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

address li:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  color: var(--text);
}

/* ---------- Sitemap / Links ---------- */
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

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

#sitemap a,
#links a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
  text-align: center;
  transition: transform 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  transform: translateY(-3px);
  color: #fff;
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.35);
}

/* ---------- Footer ---------- */
footer {
  margin-top: 60px;
  padding: 48px 24px 28px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.28));
  border-top: 1px solid var(--border);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--grad-line);
}

footer > section {
  max-width: var(--maxw);
  margin: 0 auto 26px;
  padding: 22px clamp(16px, 3vw, 28px);
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

footer > section:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-sm);
}

footer h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5em;
  padding-bottom: 0.4em;
}

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

footer p {
  font-size: 0.88rem;
  color: var(--text-faint);
  margin: 0;
  line-height: 1.75;
}

footer > p {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-faint);
  letter-spacing: 0.03em;
}

/* ---------- Article Sections (bottom) ---------- */
#article-1,
#article-2,
#article-3,
#article-4,
#article-5,
#article-6,
#article-7,
#article-8,
#article-9,
#article-10 {
  margin: 26px 0;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent), var(--brand));
  background-clip: padding-box;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  header > div {
    padding: 10px 18px;
    justify-content: center;
    gap: 10px;
  }

  header nav ul {
    justify-content: center;
  }

  header nav a {
    padding: 6px 11px;
    font-size: 0.85rem;
  }

  main {
    padding: 0 16px 32px;
  }

  main > section {
    padding: 24px 18px;
    border-radius: var(--radius);
    margin: 24px 0;
  }

  #hero {
    padding: 28px 20px;
    border-radius: var(--radius-lg);
  }
}

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

  :root {
    --header-h: 60px;
  }

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

  header nav ul {
    gap: 2px;
  }

  header nav a {
    padding: 5px 9px;
    font-size: 0.78rem;
  }

  main > section {
    padding: 20px 15px;
    border-radius: var(--radius-sm);
  }

  #hero figure {
    margin-top: 20px;
  }

  article,
  main article,
  section article {
    padding: 16px 16px;
  }

  summary {
    padding: 14px 46px 14px 16px;
    font-size: 0.92rem;
  }

  details p {
    padding: 0 16px 16px;
    font-size: 0.88rem;
  }

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

  footer {
    padding: 32px 16px 22px;
  }

  footer > section {
    padding: 18px 16px;
  }
}

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

  h1 {
    animation: none;
    -webkit-text-fill-color: var(--text);
    color: var(--text);
  }
}

/* ---------- Print ---------- */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  header,
  footer,
  #sitemap,
  #links {
    display: none;
  }

  main > section {
    box-shadow: none;
    border: 1px solid #ddd;
    background: #fff;
    animation: none;
  }
}
</style>