:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #12121f;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-glass: rgba(18, 18, 31, 0.72);
  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b85;
  --accent-primary: #7c5cfc;
  --accent-secondary: #00d4aa;
  --accent-tertiary: #ff6b9d;
  --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #00d4aa 50%, #ff6b9d 100%);
  --accent-gradient-2: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 92, 252, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(124, 92, 252, 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
  --max-width: 1200px;
  --header-height: 72px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --bg-glass: rgba(255, 255, 255, 0.78);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(124, 92, 252, 0.25);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(124, 92, 252, 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-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(124, 92, 252, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0, 212, 170, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(255, 107, 157, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

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

::selection {
  background: rgba(124, 92, 252, 0.35);
  color: #fff;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(124, 92, 252, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 92, 252, 0.5);
}

header[role="banner"] {
  position: relative;
  z-index: 10;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--accent-gradient-2);
  overflow: hidden;
  isolation: isolate;
}

header[role="banner"]::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 92, 252, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(0, 212, 170, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(255, 107, 157, 0.2) 0%, transparent 60%);
  z-index: -1;
  animation: bannerPulse 8s ease-in-out infinite alternate;
}

header[role="banner"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px);
  z-index: -1;
  pointer-events: none;
}

@keyframes bannerPulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}

header[role="banner"] h1 {
  max-width: var(--max-width);
  margin: 0 auto 1rem;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(124, 92, 252, 0.4), 0 0 60px rgba(0, 212, 170, 0.15);
  animation: fadeInUp 0.8s ease-out both;
}

header[role="banner"] > p {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  line-height: 1.8;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

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

nav[aria-label="主导航"] {
  max-width: var(--max-width);
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

nav[aria-label="主导航"] ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

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

nav[aria-label="主导航"] a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

nav[aria-label="主导航"] a:hover {
  color: #ffffff;
  background: rgba(124, 92, 252, 0.35);
  border-color: rgba(124, 92, 252, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 252, 0.3);
}

nav[aria-label="主导航"] a:active {
  transform: translateY(0);
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}

main > section {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
  animation: sectionReveal 0.7s ease-out both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

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

@supports not (animation-timeline: view()) {
  main > section {
    animation: fadeInUp 0.7s ease-out both;
  }
}

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

main > section h2 {
  position: relative;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  color: var(--text-primary);
}

main > section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

main > section:hover h2::after {
  width: 80px;
}

main > section h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
  font-weight: 600;
}

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

main > section p {
  margin-bottom: 0.85rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

main > section ul,
main > section ol {
  margin: 0.75rem 0 1rem;
  padding-left: 0;
}

main > section ul li,
main > section ol li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

main > section ul li::before {
  content: '';
  position: absolute;
  left: 0.25rem;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px rgba(124, 92, 252, 0.5);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

main > section ul li:hover::before {
  transform: scale(1.5);
  box-shadow: 0 0 14px rgba(124, 92, 252, 0.8);
}

main > section ul li:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

main > section ol {
  counter-reset: item;
}

main > section ol li {
  counter-increment: item;
  padding-left: 2.5rem;
}

main > section ol li::before {
  content: counter(item);
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.65rem;
  height: 1.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

main > section ol li:hover::before {
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(124, 92, 252, 0.5);
}

main > section ol li:hover {
  color: var(--text-primary);
  transform: translateX(4px);
}

#news article,
#articles article {
  position: relative;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
  overflow: hidden;
}

#news article::before,
#articles article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

#news article:hover,
#articles article:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

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

#news article h3,
#articles article h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  transition: color var(--transition-fast);
}

#news article:hover h3,
#articles article:hover h3 {
  color: var(--accent-primary);
}

#news article p,
#articles article p {
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
}

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

#news article a,
#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-secondary);
  transition: gap var(--transition-fast), color var(--transition-fast);
}

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

#news article a:hover,
#articles article a:hover {
  color: var(--accent-primary);
  gap: 0.6rem;
}

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

blockquote {
  position: relative;
  margin: 1rem 0;
  padding: 1.25rem 1.5rem 1.25rem 2.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-smooth);
}

blockquote::before {
  content: '"';
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  font-size: 2.5rem;
  line-height: 1;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.6;
}

blockquote:hover {
  border-color: var(--border-glow);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

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

#faq details {
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-smooth);
}

#faq details[open] {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-sm), var(--shadow-glow);
}

#faq details:hover {
  background: var(--bg-card-hover);
}

#faq summary {
  position: relative;
  padding: 1rem 1.25rem;
  padding-right: 3rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  list-style: none;
  user-select: none;
  transition: color var(--transition-fast);
}

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

#faq summary::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--accent-primary);
  transition: transform var(--transition-smooth), color var(--transition-fast);
}

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

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

#faq details p {
  padding: 0 1.25rem 1.25rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  animation: faqOpen 0.3s ease-out both;
}

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

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

#sitemap ul li,
#links ul li {
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

#sitemap ul li::before,
#links ul li::before {
  display: none;
}

#sitemap ul li:hover,
#links ul li:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#sitemap ul li a,
#links ul li a {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

#sitemap ul li:hover a,
#links ul li:hover a {
  color: var(--accent-primary);
}

#legal h2 {
  margin-top: 1.5rem;
}

#legal h2:first-of-type {
  margin-top: 0;
}

footer[role="contentinfo"] {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

footer[role="contentinfo"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.6;
}

footer[role="contentinfo"] p {
  max-width: var(--max-width);
  margin: 0 auto 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.7;
}

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

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

  header[role="banner"] {
    padding: 2rem 1rem 1.5rem;
  }

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

  header[role="banner"] > p {
    font-size: 0.85rem;
    line-height: 1.7;
  }

  nav[aria-label="主导航"] ul {
    gap: 0.35rem;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

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

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

  main {
    padding: 0 0.75rem 2rem;
  }

  main > section {
    margin-top: 1.25rem;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
  }

  main > section h2 {
    font-size: 1.25rem;
  }

  main > section h3 {
    font-size: 1.05rem;
  }

  main > section p {
    font-size: 0.875rem;
  }

  main > section ul li,
  main > section ol li {
    font-size: 0.875rem;
  }

  #news article,
  #articles article {
    padding: 1rem;
    border-radius: var(--radius-sm);
  }

  #news article h3,
  #articles article h3 {
    font-size: 0.95rem;
  }

  blockquote {
    padding: 1rem 1rem 1rem 2rem;
  }

  blockquote::before {
    font-size: 2rem;
    left: 0.5rem;
    top: 0.35rem;
  }

  #faq summary {
    padding: 0.85rem 1rem;
    padding-right: 2.5rem;
    font-size: 0.875rem;
  }

  #faq summary::after {
    right: 1rem;
  }

  #faq details p {
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
  }

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

  #sitemap ul li,
  #links ul li {
    padding: 0.4rem 0.6rem;
  }

  footer[role="contentinfo"] {
    padding: 1.5rem 1rem;
  }
}

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

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

  main > section {
    padding: 1rem 0.75rem;
  }
}

@media (min-width: 1024px) {
  main > section {
    padding: 2.5rem 2.5rem;
  }
}

@media (hover: none) {
  main > section:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  #news article:hover,
  #articles article:hover {
    transform: none;
  }

  blockquote:hover {
    transform: none;
  }
}

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

@media print {
  header[role="banner"]::before,
  header[role="banner"]::after,
  body::before {
    display: none;
  }

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

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