:root {
  --brand-primary: #1a73e8;
  --brand-secondary: #7c4dff;
  --brand-accent: #ff6b9d;
  --gradient-hero: linear-gradient(135deg, #1a73e8 0%, #7c4dff 50%, #ff6b9d 100%);
  --gradient-card: linear-gradient(145deg, rgba(26, 115, 232, 0.08), rgba(124, 77, 255, 0.06));
  --gradient-btn: linear-gradient(135deg, #1a73e8, #7c4dff);
  --bg-body: #f0f4fb;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f7f9fd;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.45);
  --text-primary: #1a1f36;
  --text-secondary: #4a5568;
  --text-muted: #8892a6;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(26, 31, 54, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 31, 54, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 31, 54, 0.12);
  --shadow-glow: 0 8px 32px rgba(26, 115, 232, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0d1117;
    --bg-surface: #161b22;
    --bg-surface-alt: #1c2128;
    --bg-glass: rgba(22, 27, 34, 0.78);
    --bg-glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #e6edf3;
    --text-secondary: #b0b8c4;
    --text-muted: #6e7681;
    --border-color: #30363d;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 8px 32px rgba(26, 115, 232, 0.25);
    --gradient-card: linear-gradient(145deg, rgba(26, 115, 232, 0.12), rgba(124, 77, 255, 0.08));
  }
}

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

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

body {
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-primary);
  background-color: var(--bg-body);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(26, 115, 232, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(124, 77, 255, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(255, 107, 157, 0.06), transparent);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* ============ HEADER / BANNER ============ */
header[role="banner"] {
  position: relative;
  background: var(--gradient-hero);
  color: #fff;
  padding: 72px 24px 56px;
  overflow: hidden;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

header[role="banner"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 40%, rgba(255, 255, 255, 0.15), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.1), transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.06), transparent 40%);
  pointer-events: none;
}

header[role="banner"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-body), transparent);
  pointer-events: none;
}

header[role="banner"] > * {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

header[role="banner"] h1 {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

header[role="banner"] > p {
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  line-height: 1.85;
  opacity: 0.92;
  max-width: 780px;
  margin-bottom: 32px;
}

/* ============ NAV ============ */
nav[aria-label="主导航"] {
  margin-top: 8px;
}

nav[aria-label="主导航"] ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  outline: none;
}

/* ============ MAIN LAYOUT ============ */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ============ SECTIONS ============ */
section {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), background-color var(--transition-smooth), border-color var(--transition-smooth);
  opacity: 0;
  transform: translateY(28px);
  animation: sectionReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

section:nth-child(1) { animation-delay: 0.05s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.15s; }
section:nth-child(4) { animation-delay: 0.2s; }
section:nth-child(5) { animation-delay: 0.25s; }
section:nth-child(6) { animation-delay: 0.3s; }
section:nth-child(7) { animation-delay: 0.35s; }
section:nth-child(8) { animation-delay: 0.4s; }
section:nth-child(9) { animation-delay: 0.45s; }
section:nth-child(10) { animation-delay: 0.5s; }

@keyframes sectionReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

section:target {
  box-shadow: 0 0 0 3px var(--brand-primary), var(--shadow-md);
  border-color: var(--brand-primary);
}

/* ============ HEADINGS ============ */
section h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  position: relative;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: var(--gradient-btn);
  border-radius: 4px;
  transition: width var(--transition-smooth);
}

section:hover h2::after {
  width: 88px;
}

section h3 {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  font-weight: 650;
  color: var(--text-primary);
  margin: 28px 0 12px;
  padding-left: 16px;
  border-left: 4px solid var(--brand-primary);
  line-height: 1.45;
  transition: border-color var(--transition-fast);
}

section h3:first-of-type {
  margin-top: 8px;
}

section h3:hover {
  border-left-color: var(--brand-accent);
}

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 20px 0 8px;
}

/* ============ TEXT ============ */
section p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.85;
  font-size: 0.95rem;
}

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

section a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

section a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-btn);
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

section a:hover {
  color: var(--brand-secondary);
}

section a:hover::after {
  width: 100%;
}

/* ============ LISTS ============ */
section ul,
section ol {
  margin: 12px 0 18px;
  padding-left: 0;
  list-style: none;
  counter-reset: list-counter;
}

section ul li,
section ol li {
  position: relative;
  padding: 10px 16px 10px 44px;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.7;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

section ul li::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-btn);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

section ol li {
  counter-increment: list-counter;
}

section ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient-btn);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

section ul li:hover,
section ol li:hover {
  background: var(--bg-surface);
  border-color: var(--brand-primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

/* ============ BLOCKQUOTE ============ */
blockquote {
  position: relative;
  margin: 18px 0;
  padding: 22px 24px 22px 56px;
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-left: 4px solid var(--brand-primary);
  border-radius: var(--radius-md);
  transition: all var(--transition-smooth);
}

blockquote::before {
  content: "\201C";
  position: absolute;
  left: 16px;
  top: 8px;
  font-size: 3rem;
  line-height: 1;
  color: var(--brand-primary);
  opacity: 0.25;
  font-family: Georgia, serif;
}

blockquote:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

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

/* ============ NEWS ARTICLES ============ */
article {
  background: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-btn);
  border-radius: 4px 0 0 4px;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

article:hover {
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--brand-primary);
}

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

article h3 {
  margin-top: 0;
  border-left: none;
  padding-left: 0;
  font-size: 1.08rem;
}

article h3::after {
  display: none;
}

article p {
  font-size: 0.9rem;
  margin-bottom: 8px;
}

article p:first-of-type {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(26, 115, 232, 0.08);
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-primary);
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(26, 115, 232, 0.08);
  transition: all var(--transition-fast);
  text-decoration: none;
}

article a::after {
  display: none;
}

article a:hover {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: translateX(4px);
}

/* ============ FAQ ============ */
#faq h3 {
  cursor: pointer;
  position: relative;
  padding-right: 36px;
  transition: color var(--transition-fast);
}

#faq h3::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand-primary);
  border-bottom: 2px solid var(--brand-primary);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--transition-fast);
}

#faq h3:hover {
  color: var(--brand-primary);
}

#faq h3 + p {
  padding-left: 16px;
  border-left: 2px solid var(--border-color);
  margin-left: 2px;
  transition: all var(--transition-fast);
}

#faq h3:hover + p {
  border-left-color: var(--brand-primary);
}

/* ============ CONTACT ============ */
#contact p {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.93rem;
}

#contact p:last-child {
  border-bottom: none;
}

/* ============ SITEMAP & LINKS ============ */
#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

#sitemap ul li,
#links ul li {
  padding: 10px 16px 10px 36px;
  font-size: 0.88rem;
}

#sitemap ul li::before,
#links ul li::before {
  left: 14px;
  width: 6px;
  height: 6px;
}

/* ============ FOOTER ============ */
footer[role="contentinfo"] {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 32px;
  text-align: center;
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

footer[role="contentinfo"] p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

footer[role="contentinfo"] p:first-child {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
}

footer[role="contentinfo"] a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

footer[role="contentinfo"] a:hover {
  color: var(--brand-secondary);
  text-decoration: underline;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand-primary), var(--brand-secondary));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-secondary);
}

/* ============ SELECTION ============ */
::selection {
  background: rgba(26, 115, 232, 0.2);
  color: var(--text-primary);
}

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

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  header[role="banner"] {
    padding: 56px 20px 44px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  main {
    padding: 36px 18px 48px;
  }

  section {
    padding: 28px 22px;
    border-radius: var(--radius-md);
  }

  nav[aria-label="主导航"] a {
    padding: 6px 13px;
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  header[role="banner"] {
    padding: 44px 16px 36px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  header[role="banner"] h1 {
    font-size: 1.3rem;
  }

  header[role="banner"] > p {
    font-size: 0.88rem;
  }

  nav[aria-label="主导航"] ul {
    gap: 6px;
  }

  nav[aria-label="主导航"] a {
    padding: 5px 11px;
    font-size: 0.75rem;
  }

  main {
    padding: 24px 12px 40px;
  }

  section {
    padding: 22px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
  }

  section h2 {
    font-size: 1.15rem;
    padding-bottom: 10px;
  }

  section h3 {
    font-size: 1rem;
    margin: 22px 0 10px;
    padding-left: 12px;
  }

  section p {
    font-size: 0.9rem;
  }

  section ul li,
  section ol li {
    padding: 8px 12px 8px 38px;
    font-size: 0.87rem;
  }

  blockquote {
    padding: 18px 16px 18px 44px;
  }

  article {
    padding: 18px 16px;
  }

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

  footer[role="contentinfo"] {
    padding: 32px 16px 24px;
  }
}

@media (max-width: 380px) {
  header[role="banner"] h1 {
    font-size: 1.15rem;
  }

  section {
    padding: 18px 12px;
  }

  section h2 {
    font-size: 1.05rem;
  }
}

/* ============ REDUCED MOTION ============ */
@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;
  }

  section {
    opacity: 1;
    transform: none;
  }
}

/* ============ PRINT ============ */
@media print {
  header[role="banner"] {
    background: #fff;
    color: #000;
    box-shadow: none;
  }

  nav[aria-label="主导航"] {
    display: none;
  }

  section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    opacity: 1;
    transform: none;
  }

  footer[role="contentinfo"] {
    border-top: 1px solid #ccc;
  }
}