:root {
  --bg: #0f0f1a;
  --bg-alt: #16162a;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.12);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --text: #eef0f6;
  --text-soft: #b6bcd0;
  --text-muted: #8a90a8;
  --accent: #ff6b9d;
  --accent-2: #7b6cf6;
  --accent-3: #4fd1c5;
  --gradient: linear-gradient(135deg, #ff6b9d 0%, #7b6cf6 55%, #4fd1c5 100%);
  --gradient-soft: linear-gradient(135deg, rgba(255, 107, 157, 0.18), rgba(123, 108, 246, 0.18));
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.28);
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 107, 157, 0.16), transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(123, 108, 246, 0.18), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(79, 209, 197, 0.1), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

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

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

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

ul, ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.1rem;
  position: relative;
  padding-left: 1.1rem;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 5px;
  border-radius: 6px;
  background: var(--gradient);
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  margin: 1.6rem 0 0.7rem;
  color: var(--text);
}

p {
  color: var(--text-soft);
  margin-bottom: 1rem;
}

/* ---------- Header / Nav ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 26, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
}

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

header nav > a {
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

header nav > a:hover {
  filter: brightness(1.2);
}

header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
}

header nav ul li a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

header nav ul li a:hover {
  background: var(--surface-hover);
  color: var(--text);
  transform: translateY(-2px);
}

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

main > section {
  margin-bottom: 2.5rem;
  padding: 2rem clamp(1.1rem, 3vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-soft);
  animation: fadeUp 0.8s var(--ease) both;
}

main > section:nth-child(even) {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
}

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

/* ---------- 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;
  font-size: 0.85rem;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑"] ol li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: var(--text-muted);
}

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

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

/* ---------- Hero ---------- */
#hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 107, 157, 0.22), rgba(123, 108, 246, 0.22) 55%, rgba(79, 209, 197, 0.18)) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.2rem, 4vw, 3rem);
}

#hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -120px;
  top: -140px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 26px) scale(1.08); }
}

#hero h1 {
  -webkit-text-fill-color: var(--text);
  background: none;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
}

#hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 78ch;
  font-size: 1.02rem;
}

#hero p a {
  display: inline-block;
  margin: 0.4rem 0.3rem 0 0;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

#hero p a:first-child {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(255, 107, 157, 0.35);
}

#hero p a:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  color: #fff;
}

/* ---------- Cards: articles ---------- */
#news article {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

#news article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

#news article:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
  box-shadow: var(--shadow);
  border-color: rgba(255, 255, 255, 0.28);
}

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

#news article h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

#news article h3::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 0.6rem;
  border-radius: 3px;
  background: var(--gradient);
  transition: width 0.4s var(--ease);
}

#news article:hover h3::after {
  width: 80px;
}

#news article p {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
}

#news article p:nth-of-type(1) {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

#news article p a {
  display: inline-block;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  background: var(--gradient-soft);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

#news article p a:hover {
  transform: translateX(4px);
  background: var(--gradient);
  color: #fff;
}

/* ---------- Lists & steps ---------- */
#howto ol {
  counter-reset: step;
  display: grid;
  gap: 0.85rem;
  margin: 1rem 0 1.5rem;
}

#howto ol li {
  counter-increment: step;
  position: relative;
  padding: 1rem 1.2rem 1rem 3.6rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(123, 108, 246, 0.4);
}

#howto ol li:hover {
  transform: translateX(6px);
  background: var(--surface-hover);
}

/* ---------- Contact & sitemap lists ---------- */
#contact ul,
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 1.4rem;
}

#contact ul li,
#sitemap ul li,
#links ul li {
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-soft);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover,
#sitemap ul li:hover,
#links ul li:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.3);
}

#contact ul li {
  border-left: 3px solid var(--accent-2);
}

#sitemap ul li a,
#links ul li a {
  font-weight: 500;
}

/* ---------- FAQ ---------- */
#faq h3 {
  padding: 0.9rem 1.2rem;
  background: var(--gradient-soft);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin: 1.2rem 0 0;
  font-size: 1rem;
  cursor: default;
  transition: background 0.3s var(--ease);
}

#faq h3:hover {
  background: rgba(255, 255, 255, 0.14);
}

#faq h3 + p {
  margin: 0 0 0.2rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.94rem;
}

/* ---------- Footer ---------- */
footer {
  background: linear-gradient(180deg, rgba(15, 15, 26, 0.4), rgba(10, 10, 20, 0.95));
  border-top: 1px solid var(--glass-border);
  margin-top: 2rem;
}

footer section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

footer h2 {
  font-size: 1.05rem;
  padding-left: 0.9rem;
  margin: 1.4rem 0 0.6rem;
}

footer h2::before {
  width: 4px;
}

footer p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer p:last-child {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Scroll reveal (CSS-only, progressive) ---------- */
@media (prefers-reduced-motion: no-preference) {
  main > section {
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  header nav {
    flex-direction: column;
    align-items: flex-start;
  }

  header nav ul {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
  }

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

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

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

@media (max-width: 520px) {
  body {
    font-size: 15px;
  }

  h2 {
    padding-left: 0.85rem;
  }

  #hero p a {
    display: block;
    text-align: center;
    margin-right: 0;
  }

  #news article {
    padding: 1.1rem 1rem;
  }

  #howto ol li {
    padding: 0.9rem 0.9rem 0.9rem 3.1rem;
  }

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

/* ---------- Light mode ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fb;
    --bg-alt: #ffffff;
    --surface: rgba(255, 255, 255, 0.72);
    --surface-hover: rgba(255, 255, 255, 0.95);
    --glass: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(20, 20, 50, 0.1);
    --text: #1a1a2e;
    --text-soft: #444a63;
    --text-muted: #6b7189;
    --shadow: 0 18px 50px rgba(60, 60, 120, 0.16);
    --shadow-soft: 0 8px 24px rgba(60, 60, 120, 0.1);
    --gradient-soft: linear-gradient(135deg, rgba(255, 107, 157, 0.12), rgba(123, 108, 246, 0.12));
  }

  body::before {
    background:
      radial-gradient(circle at 12% 8%, rgba(255, 107, 157, 0.12), transparent 42%),
      radial-gradient(circle at 88% 12%, rgba(123, 108, 246, 0.14), transparent 45%),
      radial-gradient(circle at 50% 100%, rgba(79, 209, 197, 0.1), transparent 55%);
  }

  header {
    background: rgba(255, 255, 255, 0.75);
  }

  #hero {
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.2), rgba(123, 108, 246, 0.2) 55%, rgba(79, 209, 197, 0.16)) !important;
  }

  #hero h1 {
    -webkit-text-fill-color: #1a1a2e;
  }

  #hero p {
    color: #2a2a44;
  }

  #hero p a {
    color: #1a1a2e;
    background: rgba(255, 255, 255, 0.7);
  }

  #hero p a:first-child {
    color: #fff;
    background: var(--gradient);
  }

  footer {
    background: linear-gradient(180deg, rgba(245, 246, 251, 0.4), rgba(235, 237, 246, 0.95));
  }
}