:root {
  --primary: #c2185b;
  --primary-dark: #880e4f;
  --primary-light: #f06292;
  --secondary: #6a1b9a;
  --accent: #ff6f00;
  --bg: #fdf6f8;
  --bg-alt: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);
  --bg-glass-border: rgba(255, 255, 255, 0.5);
  --text: #2d2330;
  --text-soft: #5c5060;
  --text-muted: #8a7d8e;
  --border: rgba(194, 24, 91, 0.12);
  --shadow-sm: 0 2px 8px rgba(136, 14, 79, 0.06);
  --shadow-md: 0 8px 28px rgba(136, 14, 79, 0.1);
  --shadow-lg: 0 18px 48px rgba(136, 14, 79, 0.16);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --gradient-brand: linear-gradient(135deg, #c2185b 0%, #8e24aa 55%, #6a1b9a 100%);
  --gradient-soft: linear-gradient(135deg, rgba(194, 24, 91, 0.08) 0%, rgba(106, 27, 154, 0.08) 100%);
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14101a;
    --bg-alt: #1c1624;
    --bg-glass: rgba(36, 28, 46, 0.6);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text: #f0e8f2;
    --text-soft: #c3b8c9;
    --text-muted: #8f829a;
    --border: rgba(240, 98, 146, 0.16);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
    --gradient-soft: linear-gradient(135deg, rgba(194, 24, 91, 0.16) 0%, rgba(106, 27, 154, 0.16) 100%);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(194, 24, 91, 0.08), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(106, 27, 154, 0.08), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(255, 111, 0, 0.05), transparent 45%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  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-light);
}

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

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

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  position: relative;
  padding-left: 18px;
  margin: 0 0 1.2rem;
}

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

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

h4 {
  font-size: 1.05rem;
  margin: 1.2rem 0 0.5rem;
  color: var(--secondary);
}

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

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

li {
  margin-bottom: 0.5rem;
}

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

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

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--gradient-soft);
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

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

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

header > div > a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}

header > div > a:hover {
  transform: scale(1.04);
  filter: brightness(1.1);
}

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

header nav li {
  margin: 0;
}

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

header nav a:hover,
header nav a:focus-visible {
  background: var(--gradient-brand);
  color: #fff;
  transform: translateY(-2px);
}

/* ============ Breadcrumb ============ */
body > nav[aria-label="面包屑导航"] {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.25rem 0;
}

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

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

body > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--text-muted);
  opacity: 0.6;
}

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

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

section {
  position: relative;
  margin-bottom: 1.75rem;
  padding: 1.9rem 1.75rem;
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
}

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

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

section:nth-of-type(2) { animation-delay: 0.05s; }
section:nth-of-type(3) { animation-delay: 0.1s; }
section:nth-of-type(4) { animation-delay: 0.15s; }
section:nth-of-type(5) { animation-delay: 0.2s; }

/* ============ Hero ============ */
#hero {
  background: var(--gradient-brand);
  color: #fff;
  overflow: hidden;
  padding: 2.6rem 1.9rem;
  border: none;
}

#hero::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 68%);
  top: -160px;
  right: -140px;
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 111, 0, 0.28), transparent 70%);
  bottom: -150px;
  left: -100px;
  pointer-events: none;
}

#hero h1 {
  color: #fff;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

#hero p {
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  z-index: 1;
  font-size: 1.02rem;
}

#hero > p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1.4rem;
}

#hero > p:last-child a {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#hero > p:last-child a:hover {
  background: #fff;
  color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* ============ Figures ============ */
figure {
  margin: 1.6rem 0;
  padding: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

figure:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
}

figure svg {
  width: 100%;
  height: auto;
  display: block;
}

figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.7rem 1rem;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

#hero figcaption {
  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.9);
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* ============ Articles & News ============ */
article {
  position: relative;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  background: var(--bg-alt);
  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);
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-brand);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

article:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(194, 24, 91, 0.28);
}

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

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

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

article p:last-child 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(--border);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

article p:last-child a:hover {
  background: var(--gradient-brand);
  color: #fff;
  transform: translateX(3px);
}

#news article {
  border-left: 4px solid var(--primary);
}

#news article::before {
  display: none;
}

/* ============ Testimonials ============ */
#testimonials blockquote {
  position: relative;
  margin: 0 0 1.1rem;
  padding: 1.3rem 1.5rem 1.1rem 2.6rem;
  background: var(--bg-alt);
  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);
}

#testimonials blockquote::before {
  content: "\201C";
  position: absolute;
  left: 0.75rem;
  top: 0.1rem;
  font-size: 3.2rem;
  line-height: 1;
  font-family: Georgia, serif;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.85;
}

#testimonials blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

#testimonials blockquote p {
  font-style: italic;
  color: var(--text-soft);
  margin-bottom: 0.7rem;
}

#testimonials blockquote footer {
  font-size: 0.86rem;
  color: var(--primary);
  font-weight: 600;
}

/* ============ FAQ ============ */
#faq details {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.8rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#faq details[open] {
  border-color: rgba(194, 24, 91, 0.32);
  box-shadow: var(--shadow-md);
}

#faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.8rem 1rem 1.3rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

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

#faq summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}

#faq details[open] summary::after {
  content: "−";
  transform: translateY(-50%) rotate(180deg);
}

#faq summary:hover {
  background: var(--gradient-soft);
  color: var(--primary);
}

#faq details > p {
  padding: 0 1.3rem 1.1rem;
  margin: 0;
  animation: fadeIn 0.4s var(--ease);
}

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

/* ============ Contact & misc lists ============ */
#contact ul,
#sitemap ul,
#links ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

#contact ul li {
  padding: 0.6rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

#contact ul li:hover {
  transform: translateX(4px);
  border-color: rgba(194, 24, 91, 0.3);
}

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

#sitemap ul li {
  margin: 0;
}

#sitemap ul a {
  display: block;
  padding: 0.5rem 0.9rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.88rem;
  text-align: center;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

#sitemap ul a:hover {
  background: var(--gradient-brand);
  color: #fff;
  transform: translateY(-2px);
}

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

#links ul a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--gradient-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

#links ul a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

/* ============ Footer ============ */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 2.6rem 1.25rem 2rem;
  background: var(--gradient-brand);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

footer > div {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}

footer p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

footer strong {
  color: #fff;
  font-size: 1.1rem;
}

footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  transition: text-decoration-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

footer a:hover {
  color: #ffe082;
  text-decoration-color: #ffe082;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 999px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ============ Selection ============ */
::selection {
  background: rgba(194, 24, 91, 0.85);
  color: #fff;
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  header > div {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  header nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

  header nav ul {
    flex-wrap: nowrap;
    padding-bottom: 0.3rem;
  }

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

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

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

  section {
    padding: 1.35rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.2rem;
  }

  #hero {
    padding: 1.9rem 1.15rem;
  }

  h2 {
    padding-left: 14px;
    margin-bottom: 1rem;
  }

  h2::before {
    width: 5px;
  }

  article {
    padding: 1rem 1.05rem;
  }

  #testimonials blockquote {
    padding: 1.1rem 1.1rem 1rem 2.3rem;
  }

  #faq summary {
    padding: 0.85rem 2.4rem 0.85rem 1rem;
    font-size: 0.95rem;
  }

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

  footer {
    padding: 2rem 1rem 1.6rem;
  }
}

@media (max-width: 380px) {
  header > div > a {
    font-size: 1.15rem;
  }

  #hero > p:last-child {
    flex-direction: column;
    align-items: stretch;
  }

  #hero > p:last-child a {
    text-align: center;
  }
}

/* ============ Motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

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

  section,
  article {
    box-shadow: none;
    border: 1px solid #ccc;
    background: #fff;
    animation: none;
  }
}