:root {
  --brand: #f2b705;
  --brand-dark: #d99e00;
  --brand-light: #ffd54f;
  --accent: #ff6b35;
  --accent-2: #7c3aed;
  --bg: #fefcf5;
  --bg-alt: #fdf6e3;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --surface-glass-strong: rgba(255, 255, 255, 0.88);
  --text: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #7a7a9a;
  --border: rgba(242, 183, 5, 0.18);
  --border-soft: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.09);
  --shadow-lg: 0 16px 48px rgba(26, 26, 46, 0.13);
  --shadow-glow: 0 8px 32px rgba(242, 183, 5, 0.28);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max-width: 1200px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f1a;
    --bg-alt: #16162a;
    --surface: #1c1c30;
    --surface-glass: rgba(28, 28, 48, 0.72);
    --surface-glass-strong: rgba(28, 28, 48, 0.9);
    --text: #eeeef5;
    --text-secondary: #b8b8d0;
    --text-muted: #8888a8;
    --border: rgba(242, 183, 5, 0.22);
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 8px 32px rgba(242, 183, 5, 0.2);
  }
}

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

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(242, 183, 5, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(124, 58, 237, 0.05), transparent);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

::selection {
  background: rgba(242, 183, 5, 0.35);
  color: var(--text);
}

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

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

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

@media (prefers-color-scheme: dark) {
  a {
    color: var(--brand-light);
  }
}

ul,
ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
}

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

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  margin-bottom: 0.75rem;
  color: var(--text);
}

h4 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

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

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

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

/* ===== HEADER / NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface-glass-strong);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

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

header nav > a {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--brand-dark), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
  position: relative;
  transition: transform var(--transition);
}

header nav > a::before {
  content: "●";
  -webkit-text-fill-color: var(--brand);
  color: var(--brand);
  font-size: 0.7em;
  margin-right: 0.3em;
  vertical-align: middle;
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

header nav > a:hover {
  transform: scale(1.04);
}

header nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

header nav ul li a {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

header nav ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: translateX(-50%);
  transition: width var(--transition);
}

header nav ul li a:hover {
  color: var(--text);
  background: rgba(242, 183, 5, 0.1);
  transform: translateY(-1px);
}

header nav ul li a:hover::after {
  width: 60%;
}

/* ===== MAIN ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

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

main > nav[aria-label="面包屑导航"] ol {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

main > nav[aria-label="面包屑导航"] ol li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

main > nav[aria-label="面包屑导航"] ol li:not(:last-child)::after {
  content: "/";
  color: var(--text-muted);
  opacity: 0.5;
}

main > nav[aria-label="面包屑导航"] ol li a {
  color: var(--text-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

main > nav[aria-label="面包屑导航"] ol li a:hover {
  background: rgba(242, 183, 5, 0.12);
  color: var(--brand-dark);
}

/* ===== SECTIONS ===== */
main > section {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  opacity: 0;
  transform: translateY(24px);
  animation: fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

main > section:nth-of-type(1) { animation-delay: 0.05s; }
main > section:nth-of-type(2) { animation-delay: 0.1s; }
main > section:nth-of-type(3) { animation-delay: 0.15s; }
main > section:nth-of-type(4) { animation-delay: 0.2s; }
main > section:nth-of-type(5) { animation-delay: 0.25s; }
main > section:nth-of-type(6) { animation-delay: 0.3s; }
main > section:nth-of-type(7) { animation-delay: 0.35s; }
main > section:nth-of-type(8) { animation-delay: 0.4s; }
main > section:nth-of-type(9) { animation-delay: 0.45s; }
main > section:nth-of-type(10) { animation-delay: 0.5s; }
main > section:nth-of-type(11) { animation-delay: 0.55s; }
main > section:nth-of-type(12) { animation-delay: 0.6s; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > section:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

/* ===== HERO ===== */
#hero {
  position: relative;
  overflow: hidden;
  padding: 3rem 2.5rem;
  background: linear-gradient(135deg, rgba(242, 183, 5, 0.12) 0%, rgba(255, 107, 53, 0.08) 40%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
}

#hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 183, 5, 0.25), transparent 70%);
  pointer-events: none;
  animation: float-orb 8s ease-in-out infinite;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18), transparent 70%);
  pointer-events: none;
  animation: float-orb 10s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.08); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--text) 0%, var(--brand-dark) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1.5rem;
}

#hero p {
  position: relative;
  z-index: 1;
  max-width: 780px;
  font-size: 1.05rem;
  line-height: 1.9;
}

#hero p:last-child {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* ===== CONTENT BLOCKS ===== */
main > section > h3 {
  margin-top: 1.5rem;
}

main > section > h3:first-of-type {
  margin-top: 0;
}

main > section > h3 + p {
  margin-bottom: 1.25rem;
}

/* ===== ARTICLE CARDS ===== */
#articles {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#articles article {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--brand);
  transition: transform var(--transition), box-shadow var(--transition), border-left-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(242, 183, 5, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

#articles article:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--accent);
}

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

#articles article h3 {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

#articles article:hover h3 {
  color: var(--brand-dark);
}

#articles article p {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

#articles article a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-dark);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(242, 183, 5, 0.12);
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

#articles article a::after {
  content: "→";
  transition: transform var(--transition-fast);
}

#articles article a:hover {
  background: var(--brand);
  color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(242, 183, 5, 0.4);
}

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

/* ===== FAQ ===== */
#faq h3 {
  position: relative;
  padding: 1rem 1.25rem 1rem 3rem;
  margin-bottom: 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
}

#faq h3::before {
  content: "?";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  transition: transform var(--transition), box-shadow var(--transition);
}

#faq h3:hover {
  background: rgba(242, 183, 5, 0.1);
  border-color: var(--border);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

#faq h3:hover::before {
  transform: translateY(-50%) rotate(15deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(242, 183, 5, 0.5);
}

#faq h3 + p {
  padding: 0.5rem 1.25rem 1rem 3rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--border);
  margin-left: 1.25rem;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

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

/* ===== LISTS (sitemap & links) ===== */
#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

#sitemap ul li,
#links ul li {
  flex: 0 0 auto;
}

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  transition: all var(--transition-fast);
}

#sitemap ul li a:hover,
#links ul li a:hover {
  color: #1a1a2e;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(242, 183, 5, 0.35);
}

/* ===== CONTACT ===== */
#contact p {
  font-size: 0.95rem;
}

#contact p strong {
  color: var(--brand-dark);
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  margin-top: 2rem;
  padding: 3rem 1.5rem 2rem;
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--surface) 100%);
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--accent-2), var(--brand));
  background-size: 200% 100%;
  animation: gradient-shift 6s linear infinite;
}

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

footer > section {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  transition: box-shadow var(--transition), transform var(--transition);
}

footer > section:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

footer > section h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.5rem;
}

footer > section h2::after {
  width: 36px;
  height: 3px;
}

footer > section p {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-muted);
}

footer > p {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.35rem 0;
}

footer > p:last-child {
  font-size: 0.75rem;
  opacity: 0.7;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  border-radius: 10px;
  border: 2px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  main > section {
    padding: 1.5rem;
    border-radius: var(--radius-md);
  }

  #hero {
    padding: 2rem 1.5rem;
  }

  #hero::before,
  #hero::after {
    width: 300px;
    height: 300px;
  }

  #articles article {
    padding: 1.25rem;
  }
}

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

  header nav {
    padding: 0.6rem 1rem;
    gap: 0.75rem;
  }

  header nav > a {
    font-size: 1.15rem;
  }

  header nav ul {
    gap: 0.1rem;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

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

  header nav ul li a {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  main {
    padding: 1.25rem 1rem 3rem;
  }

  main > section {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  h2::after {
    width: 40px;
    height: 3px;
  }

  #hero {
    padding: 1.75rem 1.25rem;
  }

  #hero p {
    font-size: 0.95rem;
  }

  #articles article {
    padding: 1rem;
    border-left-width: 3px;
  }

  #articles article:hover {
    transform: translateX(3px);
  }

  #faq h3 {
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    font-size: 0.95rem;
  }

  #faq h3::before {
    left: 0.85rem;
    width: 22px;
    height: 22px;
    font-size: 0.72rem;
  }

  #faq h3 + p {
    padding: 0.4rem 1rem 0.85rem 2.75rem;
    margin-left: 0.85rem;
    font-size: 0.9rem;
  }

  #sitemap ul,
  #links ul {
    gap: 0.5rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
  }

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

  footer > section {
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14.5px;
  }

  header nav > a {
    font-size: 1.05rem;
  }

  main {
    padding: 1rem 0.75rem 2.5rem;
  }

  main > section {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  #hero {
    padding: 1.5rem 1rem;
  }

  #hero p:last-child {
    font-size: 0.78rem;
  }

  #articles article h3 {
    font-size: 1.02rem;
  }

  #articles article p {
    font-size: 0.88rem;
  }

  #faq h3 {
    font-size: 0.9rem;
  }

  footer > section h2 {
    font-size: 0.95rem;
  }
}

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

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

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

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

  main > section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}