:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: rgba(30, 30, 50, 0.65);
  --bg-card-hover: rgba(40, 40, 68, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-border: rgba(255, 255, 255, 0.09);
  --text-primary: #eef0f6;
  --text-secondary: #b4b8c8;
  --text-muted: #7a7f94;
  --accent-1: #6c5ce7;
  --accent-2: #a855f7;
  --accent-3: #ec4899;
  --accent-4: #06b6d4;
  --gradient-brand: linear-gradient(135deg, #6c5ce7 0%, #a855f7 45%, #ec4899 100%);
  --gradient-banner: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 30%, #4a1d5e 60%, #1a1a2e 100%);
  --gradient-card: linear-gradient(145deg, rgba(108, 92, 231, 0.12), rgba(236, 72, 153, 0.06));
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 32px rgba(108, 92, 231, 0.25);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1180px;
  --header-height: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-glass-border: rgba(108, 92, 231, 0.15);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4e63;
    --text-muted: #858aa0;
    --gradient-banner: linear-gradient(135deg, #eef0ff 0%, #e8d5f5 30%, #fce4ec 60%, #eef0ff 100%);
    --gradient-card: linear-gradient(145deg, rgba(108, 92, 231, 0.08), rgba(236, 72, 153, 0.04));
    --shadow-sm: 0 2px 8px rgba(108, 92, 231, 0.08);
    --shadow-md: 0 8px 24px rgba(108, 92, 231, 0.12);
    --shadow-lg: 0 16px 48px rgba(108, 92, 231, 0.16);
    --shadow-glow: 0 0 32px rgba(108, 92, 231, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(108, 92, 231, 0.12), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(236, 72, 153, 0.06), transparent);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

ul {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  margin-bottom: 1.25rem;
  position: relative;
  padding-left: 1rem;
}

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

h3 {
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem);
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

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

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

/* ===================== HEADER ===================== */

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--bg-glass-border);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

@media (prefers-color-scheme: light) {
  header {
    background: rgba(245, 245, 250, 0.78);
  }
}

.brand-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem 1.25rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.brand-name {
  font-size: 1.3rem;
  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;
}

.brand-slogan {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

nav[aria-label="主导航"] ul {
  display: flex;
  gap: 0.25rem;
  flex-wrap: nowrap;
  padding-bottom: 2px;
}

nav[aria-label="主导航"] li {
  flex-shrink: 0;
}

nav[aria-label="主导航"] a {
  display: block;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 999px;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

nav[aria-label="主导航"] a:hover,
nav[aria-label="主导航"] a:focus-visible {
  color: #fff;
  background: var(--gradient-brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
  outline: none;
}

/* ===================== MAIN LAYOUT ===================== */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* ===================== BANNER ===================== */

#banner {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(1.5rem, 1rem + 2vw, 3rem);
  border-radius: var(--radius-xl);
  background: var(--gradient-banner);
  background-size: 200% 200%;
  animation: bannerShift 14s ease infinite;
  border: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

#banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(108, 92, 231, 0.35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(236, 72, 153, 0.28), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.12), transparent 60%);
  pointer-events: none;
}

#banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 255, 255, 0.06), transparent 70%);
  pointer-events: none;
}

#banner h1 {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

#banner p {
  position: relative;
  z-index: 1;
  font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem);
  color: var(--text-secondary);
  max-width: 75ch;
  margin-top: 0.5rem;
}

@keyframes bannerShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===================== SECTIONS / CARDS ===================== */

section:not(#banner):not(#copyright):not(#privacy):not(#disclaimer):not(#security):not(#author) {
  position: relative;
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--bg-glass-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

section:not(#banner):not(#copyright):not(#privacy):not(#disclaimer):not(#security):not(#author):hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 92, 231, 0.25);
}

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

section:not(#banner):nth-of-type(2) { animation-delay: 0.05s; }
section:not(#banner):nth-of-type(3) { animation-delay: 0.1s; }
section:not(#banner):nth-of-type(4) { animation-delay: 0.15s; }
section:not(#banner):nth-of-type(5) { animation-delay: 0.2s; }
section:not(#banner):nth-of-type(6) { animation-delay: 0.25s; }
section:not(#banner):nth-of-type(7) { animation-delay: 0.3s; }
section:not(#banner):nth-of-type(8) { animation-delay: 0.35s; }
section:not(#banner):nth-of-type(9) { animation-delay: 0.4s; }

section > h3 {
  margin-top: 1.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-card);
  border-left: 3px solid var(--accent-2);
  transition: background var(--transition-base), transform var(--transition-fast);
}

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

section > h3:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

/* ===================== ARTICLES ===================== */

article {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  margin-bottom: 0.9rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

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

article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(108, 92, 231, 0.3);
  background: var(--bg-card-hover);
}

article h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  transition: color var(--transition-fast);
}

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

article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

article p:last-child {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* ===================== BLOCKQUOTES ===================== */

blockquote {
  position: relative;
  margin: 0 0 1rem;
  padding: 1.25rem 1.5rem 1.25rem 3rem;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  border: 1px solid var(--bg-glass-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

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

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

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

/* ===================== LISTS IN SITEMAP / LINKS ===================== */

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

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: block;
  padding: 0.55rem 0.9rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

#sitemap a::after,
#links a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-brand);
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  background: var(--gradient-brand);
}

/* ===================== CONTACT ===================== */

#contact p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--bg-glass-border);
  font-size: 0.92rem;
}

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

#contact p strong {
  color: var(--accent-2);
}

/* ===================== FAQ ===================== */

#faq h3 {
  cursor: default;
}

#faq p {
  font-size: 0.92rem;
}

/* ===================== FOOTER ===================== */

footer {
  margin-top: 2rem;
  padding: 2.5rem 1.25rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-glass-border);
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  opacity: 0.6;
}

footer section {
  max-width: var(--max-width);
  margin: 0 auto 1.5rem;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
}

footer section:hover {
  transform: none;
  box-shadow: none;
  background: none;
  border-color: transparent;
}

footer h2 {
  font-size: 1.05rem;
  padding-left: 0.85rem;
  margin-bottom: 0.75rem;
}

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

footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

footer > p:last-child {
  max-width: var(--max-width);
  margin: 1.5rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--bg-glass-border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ===================== SCROLLBAR ===================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-2), var(--accent-3));
}

::selection {
  background: rgba(108, 92, 231, 0.4);
  color: #fff;
}

/* ===================== FOCUS VISIBLE ===================== */

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

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
  main {
    padding: 1.5rem 1rem 2.5rem;
    gap: 1.25rem;
  }

  section:not(#banner):not(#copyright):not(#privacy):not(#disclaimer):not(#security):not(#author) {
    padding: 1.25rem;
    border-radius: var(--radius-md);
  }

  #banner {
    border-radius: var(--radius-lg);
  }

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

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

  .brand-bar {
    padding: 0.7rem 1rem 0.4rem;
    flex-direction: column;
    gap: 0.15rem;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-slogan {
    font-size: 0.72rem;
  }

  nav[aria-label="主导航"] {
    padding: 0 1rem 0.5rem;
  }

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

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

  #banner {
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-md);
  }

  section:not(#banner):not(#copyright):not(#privacy):not(#disclaimer):not(#security):not(#author) {
    padding: 1.1rem;
    border-radius: var(--radius-md);
  }

  h2 {
    padding-left: 0.85rem;
  }

  h2::before {
    width: 3px;
  }

  section > h3 {
    padding: 0.55rem 0.85rem;
  }

  article {
    padding: 0.9rem 1rem;
  }

  blockquote {
    padding: 1rem 1.1rem 1rem 2.6rem;
  }

  blockquote::before {
    left: 0.75rem;
    font-size: 2.5rem;
  }

  #sitemap ul,
  #links ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  #sitemap a,
  #links a {
    padding: 0.5rem 0.7rem;
    font-size: 0.82rem;
  }

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

@media (max-width: 380px) {
  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr;
  }
}

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

  #banner {
    animation: none;
  }
}

/* ===================== PRINT ===================== */

@media print {
  header,
  nav,
  footer::before {
    display: none;
  }

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

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