:root {
  --primary: #ff6b9d;
  --primary-dark: #e84d84;
  --primary-light: #ffb3c9;
  --primary-soft: #ffe4ef;
  --accent: #a13a63;
  --accent-2: #7c3aed;
  --gradient-hero: linear-gradient(135deg, #ff6b9d 0%, #ff8fb1 40%, #c084fc 100%);
  --gradient-soft: linear-gradient(135deg, #ffe4ef 0%, #f3e8ff 100%);
  --bg: #fffafc;
  --bg-alt: #fff3f8;
  --card-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --text: #2d1b26;
  --text-soft: #6b5563;
  --text-muted: #9a8894;
  --border: rgba(255, 107, 157, 0.16);
  --shadow-sm: 0 2px 8px rgba(161, 58, 99, 0.08);
  --shadow-md: 0 8px 28px rgba(161, 58, 99, 0.12);
  --shadow-lg: 0 18px 48px rgba(161, 58, 99, 0.18);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --maxw: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ff7fae;
    --primary-dark: #ff5c96;
    --primary-light: #ffa8c5;
    --primary-soft: #3a1f2c;
    --accent: #ffa8c5;
    --accent-2: #b98cff;
    --gradient-hero: linear-gradient(135deg, #b8295f 0%, #7c3aed 55%, #3b1f5c 100%);
    --gradient-soft: linear-gradient(135deg, #2a1620 0%, #241733 100%);
    --bg: #140d12;
    --bg-alt: #1c1319;
    --card-bg: rgba(38, 24, 32, 0.66);
    --glass-border: rgba(255, 168, 197, 0.14);
    --text: #f6e9ef;
    --text-soft: #c9b3bf;
    --text-muted: #8f7a86;
    --border: rgba(255, 168, 197, 0.14);
    --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);
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(
      circle at 12% 8%,
      rgba(255, 107, 157, 0.1),
      transparent 42%
    ),
    radial-gradient(circle at 88% 4%, rgba(192, 132, 252, 0.1), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(255, 179, 201, 0.08), transparent 46%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

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

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

h1 {
  font-size: clamp(1.75rem, 4.2vw, 2.9rem);
  font-weight: 800;
  margin: 0 0 1rem;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700;
  margin: 0 0 1.2rem;
  padding-left: 0.85rem;
  position: relative;
}

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

h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  font-weight: 700;
  margin: 1.8rem 0 0.7rem;
  color: var(--accent);
}

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.45rem;
}

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

blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--gradient-soft);
  color: var(--text-soft);
  font-style: italic;
}

blockquote p:last-child {
  margin-bottom: 0;
}

time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--primary-soft);
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
}

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 252, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition);
}

@media (prefers-color-scheme: dark) {
  header {
    background: rgba(20, 13, 18, 0.72);
  }
}

header > div {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

header a[href*="gdpqzn.com/"] {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  white-space: nowrap;
}

header a[href*="gdpqzn.com/"] svg {
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

header a[href*="gdpqzn.com/"]:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

header nav {
  flex: 1 1 auto;
  min-width: 0;
}

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

header nav li {
  margin: 0;
}

header nav a {
  display: inline-block;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: background var(--transition), color var(--transition),
    transform var(--transition);
}

header nav a:hover {
  color: #fff;
  background: var(--gradient-hero);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

header form[role="search"] {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 1 auto;
}

header form[role="search"] label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

header form[role="search"] input {
  width: 190px;
  padding: 0.5rem 0.9rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition),
    width var(--transition);
}

header form[role="search"] input::placeholder {
  color: var(--text-muted);
}

header form[role="search"] input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.18);
  width: 230px;
}

header form[role="search"] button {
  padding: 0.5rem 1.1rem;
  font-size: 0.88rem;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-hero);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    filter var(--transition);
}

header form[role="search"] button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.05);
}

header form[role="search"] button:active {
  transform: translateY(0);
}

/* ===== MAIN LAYOUT ===== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
}

main > nav[aria-label="面包屑导航"] {
  margin-bottom: 1.2rem;
}

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

main > nav[aria-label="面包屑导航"] li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
}

main > nav[aria-label="面包屑导航"] li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--primary-light);
}

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

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

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

/* ===== SECTIONS ===== */
section {
  margin-bottom: 2.4rem;
  padding: 1.8rem 1.6rem;
  background: var(--card-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition),
    border-color var(--transition);
}

section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 157, 0.28);
}

/* Hero */
section[aria-labelledby="hero-title"] {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  border: none;
  padding: 2.6rem 2rem;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

section[aria-labelledby="hero-title"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at 85% 15%,
      rgba(255, 255, 255, 0.28),
      transparent 45%
    ),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.18), transparent 40%);
  pointer-events: none;
}

section[aria-labelledby="hero-title"] > * {
  position: relative;
  z-index: 1;
}

section[aria-labelledby="hero-title"] h1 {
  background: none;
  -webkit-text-fill-color: #fff;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

section[aria-labelledby="hero-title"] p {
  color: rgba(255, 255, 255, 0.94);
  max-width: 78ch;
}

section[aria-labelledby="hero-title"] figure {
  margin: 1.6rem 0 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition);
}

section[aria-labelledby="hero-title"] figure:hover {
  transform: translateY(-4px);
}

section[aria-labelledby="hero-title"] figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

/* News & article cards */
section#news article,
section#articles article {
  padding: 1.2rem 1.3rem;
  margin-bottom: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition);
}

section#news article:hover,
section#articles article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 157, 0.4);
}

section#news article:last-child,
section#articles article:last-child {
  margin-bottom: 0;
}

section#news h3,
section#articles h3 {
  margin-top: 0;
  color: var(--text);
}

section#articles article a {
  display: inline-block;
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  padding: 0.2rem 0;
  position: relative;
}

section#articles article a::after {
  content: "→";
  margin-left: 0.3rem;
  transition: transform var(--transition);
  display: inline-block;
}

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

/* FAQ */
section#faq details {
  margin-bottom: 0.7rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition),
    background var(--transition);
}

section#faq details[open] {
  border-color: rgba(255, 107, 157, 0.42);
  box-shadow: var(--shadow-sm);
  background: var(--card-bg);
}

section#faq details:hover {
  border-color: rgba(255, 107, 157, 0.34);
}

section#faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
  position: relative;
  padding-right: 1.8rem;
  transition: color var(--transition);
}

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

section#faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  color: var(--primary);
  transition: transform var(--transition);
}

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

section#faq summary:hover {
  color: var(--primary-dark);
}

section#faq details p {
  margin: 0.7rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  animation: fadeSlide 0.35s ease both;
}

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

/* Contact */
section#contact p {
  margin-bottom: 0.55rem;
}

/* Sitemap & links lists */
section[aria-labelledby="sitemap-title"] ul,
section[aria-labelledby="links-title"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  list-style: none;
  padding: 0;
}

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

section[aria-labelledby="sitemap-title"] a,
section[aria-labelledby="links-title"] a {
  display: inline-block;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all var(--transition);
}

section[aria-labelledby="sitemap-title"] a:hover,
section[aria-labelledby="links-title"] a:hover {
  color: #fff;
  background: var(--gradient-hero);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ===== FOOTER ===== */
footer {
  margin-top: 1rem;
  padding: 2.2rem 1.2rem 2.6rem;
  text-align: center;
  background: var(--gradient-soft);
  border-top: 1px solid var(--border);
}

footer p {
  margin: 0.3rem auto;
  font-size: 0.88rem;
  color: var(--text-soft);
  max-width: 720px;
}

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

footer a {
  color: var(--primary-dark);
  font-weight: 500;
}

footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ===== SCROLL ANIMATIONS ===== */
@supports (animation-timeline: view()) {
  section,
  section#news article,
  section#articles article {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  header > div {
    gap: 0.8rem;
  }

  header form[role="search"] input {
    width: 150px;
  }

  header form[role="search"] input:focus {
    width: 180px;
  }

  section {
    padding: 1.5rem 1.3rem;
  }
}

@media (max-width: 820px) {
  header > div {
    padding: 0.6rem 1rem;
  }

  header nav {
    order: 3;
    flex-basis: 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.2rem;
  }

  header nav a {
    white-space: nowrap;
    font-size: 0.85rem;
  }

  section[aria-labelledby="hero-title"] {
    padding: 2rem 1.3rem;
  }

  section[aria-labelledby="hero-title"] figure {
    margin-top: 1.2rem;
  }

  main {
    padding: 1.2rem 1rem 2.4rem;
  }
}

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

  header > div {
    gap: 0.6rem;
  }

  header a[href*="gdpqzn.com/"] span {
    font-size: 1rem;
  }

  header form[role="search"] {
    flex-basis: 100%;
    order: 2;
  }

  header form[role="search"] input,
  header form[role="search"] input:focus {
    width: 100%;
    flex: 1;
  }

  header nav {
    order: 4;
  }

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

  section[aria-labelledby="hero-title"] {
    padding: 1.6rem 1.1rem;
    border-radius: var(--radius-md);
  }

  h2 {
    padding-left: 0.7rem;
  }

  h2::before {
    width: 4px;
  }

  main > nav[aria-label="面包屑导航"] ol {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }

  section#faq details {
    padding: 0.8rem 1rem;
  }

  section[aria-labelledby="sitemap-title"] a,
  section[aria-labelledby="links-title"] a {
    font-size: 0.85rem;
    padding: 0.4rem 0.85rem;
  }

  footer {
    padding: 1.8rem 1rem 2.2rem;
  }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ===== SELECTION ===== */
::selection {
  background: var(--primary);
  color: #fff;
}