:root {
  --bg: #0f0f1a;
  --bg-2: #16162a;
  --bg-3: #1e1e38;
  --surface: rgba(30, 30, 56, 0.55);
  --surface-solid: #1b1b32;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef0f8;
  --text-2: #b8bcd4;
  --text-3: #8a8fa8;
  --accent: #ff4d8d;
  --accent-2: #7c5cff;
  --accent-3: #22d3ee;
  --accent-soft: rgba(255, 77, 141, 0.14);
  --grad-banner: linear-gradient(135deg, #2a0a3d 0%, #4a1060 35%, #7c1d6f 65%, #ff4d8d 100%);
  --grad-line: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --blur: 18px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5fb;
    --bg-2: #ffffff;
    --bg-3: #f0eef8;
    --surface: rgba(255, 255, 255, 0.62);
    --surface-solid: #ffffff;
    --border: rgba(20, 16, 40, 0.08);
    --border-strong: rgba(20, 16, 40, 0.16);
    --text: #1a1730;
    --text-2: #4a4763;
    --text-3: #7a7791;
    --accent: #e0256f;
    --accent-2: #6a45f0;
    --accent-3: #0ea5c4;
    --accent-soft: rgba(224, 37, 111, 0.1);
    --grad-banner: linear-gradient(135deg, #ffe3f0 0%, #f3d9ff 40%, #e0d4ff 70%, #ffd3e6 100%);
    --shadow-sm: 0 2px 8px rgba(40, 20, 70, 0.08);
    --shadow-md: 0 10px 30px rgba(40, 20, 70, 0.12);
    --shadow-lg: 0 24px 60px rgba(40, 20, 70, 0.18);
  }
}

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

html {
  scroll-behavior: smooth;
  -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, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% -10%, rgba(124, 92, 255, 0.22), transparent 45%),
    radial-gradient(circle at 88% 0%, rgba(255, 77, 141, 0.18), transparent 42%),
    radial-gradient(circle at 50% 110%, rgba(34, 211, 238, 0.12), transparent 50%);
  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(--accent);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  position: relative;
  padding-bottom: 0.5em;
  margin-bottom: 1em;
}

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

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

h3 + p,
h2 + p {
  color: var(--text-2);
}

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

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

::selection {
  background: var(--accent);
  color: #fff;
}

@keyframes lineFlow {
  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 floatGlow {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate3d(0, -14px, 0) scale(1.05); opacity: 1; }
}

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

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

header nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

header nav > a[href="/"] {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(255, 77, 141, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  white-space: nowrap;
}

header nav > a[href="/"]:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 26px rgba(255, 77, 141, 0.5);
  color: #fff;
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  margin-left: auto;
}

header nav ul li a {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.92rem;
  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:hover,
header nav ul li a:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

/* ============ Layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 3vw, 2rem) 4rem;
}

section {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.7s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 22%;
  scroll-margin-top: 90px;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

section:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}

section:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-lg);
}

/* ============ Hero ============ */
#hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--grad-banner);
  background-size: 180% 180%;
  animation: fadeUp 0.8s var(--ease) both, heroShift 16s ease-in-out infinite;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

#hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%);
  filter: blur(40px);
  animation: floatGlow 9s ease-in-out infinite;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  inset: auto auto -40% -12%;
  width: 50%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 65%);
  filter: blur(50px);
  animation: floatGlow 12s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes heroShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

#hero h1 {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 0.5em;
}

#hero p {
  position: relative;
  z-index: 1;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.98rem, 1.6vw, 1.1rem);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

@media (prefers-color-scheme: light) {
  #hero h1 {
    color: #2a0a3d;
    text-shadow: none;
  }
  #hero p {
    color: #4a2a5a;
    text-shadow: none;
  }
}

/* ============ Breadcrumb ============ */
nav[aria-label="面包屑"] {
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  display: inline-block;
  max-width: 100%;
}

nav[aria-label="面包屑"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

nav[aria-label="面包屑"] ol li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

nav[aria-label="面包屑"] ol li + li::before {
  content: "/";
  color: var(--text-3);
  opacity: 0.6;
}

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

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

/* ============ Article cards ============ */
article {
  position: relative;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: var(--surface-solid);
  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;
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--grad-line);
  background-size: 100% 200%;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

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

article:hover::before {
  opacity: 1;
}

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

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

article p {
  margin-bottom: 0.5em;
  font-size: 0.95rem;
}

article p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-3);
  letter-spacing: 0.02em;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

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

article a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateX(2px);
}

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

/* ============ FAQ ============ */
#faq h3 {
  position: relative;
  padding: 0.85rem 1.1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  cursor: default;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}

#faq h3::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.6rem;
  font-size: 0.8rem;
  font-weight: 800;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  vertical-align: middle;
}

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

#faq h3 + p {
  padding: 0 1.1rem 0.4rem 1.1rem;
  margin-bottom: 1.1rem;
  border-left: 2px solid var(--border-strong);
  margin-left: 0.7rem;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ============ HowTo ============ */
#howto h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent);
  margin-bottom: 0.4em;
}

#howto h3::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--grad-line);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

#howto p {
  padding-left: 1.6rem;
  border-left: 1px dashed var(--border-strong);
  margin-left: 0.3rem;
  padding-bottom: 0.4rem;
}

/* ============ Contact ============ */
#contact p {
  font-size: 0.97rem;
}

#contact h3 {
  color: var(--accent-2);
}

/* ============ Sitemap / Links lists ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
}

#sitemap ul li a,
#links ul li a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}

#sitemap ul li a::before {
  content: "▸ ";
  color: var(--accent);
  font-weight: 700;
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ============ Legal / Meta ============ */
#legal h2,
#meta-info h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-top: 1.4rem;
}

#legal h2:first-child,
#meta-info h2:first-child {
  margin-top: 0;
}

#meta-info p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  font-size: 0.9rem;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: clamp(1.6rem, 4vw, 2.6rem) clamp(1rem, 3vw, 2rem);
  text-align: center;
  background: var(--surface);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  border-top: 1px solid var(--border);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(320px, 60%);
  height: 2px;
  background: var(--grad-line);
  background-size: 200% 100%;
  animation: lineFlow 6s linear infinite;
  border-radius: 2px;
}

footer p {
  margin: 0.3rem 0;
  font-size: 0.88rem;
  color: var(--text-3);
}

footer p:first-child {
  color: var(--text-2);
  font-weight: 600;
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  header nav {
    padding: 0.6rem 1rem;
  }
  header nav ul {
    width: 100%;
    margin-left: 0;
    gap: 0.1rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.2rem;
  }
  header nav ul::-webkit-scrollbar {
    display: none;
  }
  header nav ul li a {
    white-space: nowrap;
    font-size: 0.86rem;
    padding: 0.35rem 0.6rem;
  }
  section {
    border-radius: var(--radius);
  }
  #hero {
    border-radius: var(--radius);
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }
  main {
    padding: 0.8rem 0.8rem 2.5rem;
  }
  section {
    padding: 1rem;
    margin-bottom: 1.6rem;
  }
  h2::after {
    width: 46px;
    height: 3px;
  }
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
  article {
    padding: 0.9rem;
  }
  nav[aria-label="面包屑"] {
    display: block;
    border-radius: var(--radius-sm);
  }
  #hero {
    padding: 1.6rem 1.2rem;
  }
}

/* ============ Motion & Accessibility ============ */
@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;
  }
  section {
    animation: none;
    opacity: 1;
  }
}

@supports not (backdrop-filter: blur(1px)) {
  header,
  section,
  nav[aria-label="面包屑"],
  footer {
    background: var(--surface-solid);
  }
}

@media print {
  header,
  footer,
  nav[aria-label="面包屑"] {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
  section {
    box-shadow: none;
    border: 1px solid #ccc;
    animation: none;
  }
}