:root {
  --primary: #5b4bff;
  --primary-light: #7c6fff;
  --primary-dark: #3d2ecc;
  --accent: #ff6b9d;
  --accent-light: #ff9ec0;
  --gradient-1: linear-gradient(135deg, #5b4bff 0%, #ff6b9d 100%);
  --gradient-2: linear-gradient(135deg, #3d2ecc 0%, #5b4bff 50%, #7c6fff 100%);
  --gradient-3: linear-gradient(120deg, #5b4bff 0%, #a855f7 50%, #ff6b9d 100%);
  --bg-body: #f5f6fc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-border: rgba(255, 255, 255, 0.5);
  --bg-header: rgba(255, 255, 255, 0.82);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --border-color: rgba(91, 75, 255, 0.12);
  --shadow-sm: 0 2px 8px rgba(91, 75, 255, 0.08);
  --shadow-md: 0 8px 24px rgba(91, 75, 255, 0.12);
  --shadow-lg: 0 16px 48px rgba(91, 75, 255, 0.16);
  --shadow-glow: 0 0 40px rgba(91, 75, 255, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-body: #0d0d1a;
    --bg-card: #16162a;
    --bg-glass: rgba(22, 22, 42, 0.78);
    --bg-glass-border: rgba(91, 75, 255, 0.18);
    --bg-header: rgba(13, 13, 26, 0.85);
    --text-primary: #eaeaf5;
    --text-secondary: #b0b0d0;
    --text-muted: #7070a0;
    --border-color: rgba(91, 75, 255, 0.2);
    --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 0 40px rgba(91, 75, 255, 0.3);
  }
}

*,
*::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: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.8;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition), color var(--transition);
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 10% 5%, rgba(91, 75, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(255, 107, 157, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

::selection {
  background: var(--primary);
  color: #fff;
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 4px;
}

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

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

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

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: relative;
}

nav > a:first-child {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.5px;
  position: relative;
  transition: transform var(--transition);
  white-space: nowrap;
}

nav > a:first-child::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-1);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

nav > a:first-child:hover {
  transform: scale(1.03);
}

nav > a:first-child:hover::after {
  transform: scaleX(1);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

nav ul li a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

nav ul li a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

nav ul li a:hover {
  color: #fff;
  transform: translateY(-1px);
}

nav ul li a:hover::before {
  opacity: 1;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

article > h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.5px;
  padding: 48px 0 8px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeInUp 0.8s ease-out both;
}

article > h1 + p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  padding: 16px 0 32px;
  max-width: 900px;
  animation: fadeInUp 0.8s ease-out 0.1s both;
}

section {
  margin-bottom: 32px;
  padding: 36px 32px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.7s ease-out both;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-1);
  opacity: 0;
  transition: opacity var(--transition);
}

section:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: rgba(91, 75, 255, 0.25);
}

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

section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
  position: relative;
  letter-spacing: -0.3px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 2px;
}

section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 24px 0 10px;
  padding-left: 14px;
  border-left: 4px solid var(--primary);
  line-height: 1.4;
  transition: border-color var(--transition), color var(--transition);
}

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

section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 18px 0 8px;
  padding-left: 12px;
  position: relative;
}

section h4::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-1);
}

section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 12px;
}

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

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

section a::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-1);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

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

section a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

section ul {
  list-style: none;
  padding: 0;
}

section ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color var(--transition), transform var(--transition);
}

section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-1);
  transition: transform var(--transition);
}

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

section ul li:hover::before {
  transform: translateY(-50%) scale(1.4);
}

blockquote {
  margin: 16px 0;
  padding: 20px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

blockquote::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 4rem;
  color: var(--primary);
  opacity: 0.12;
  font-family: Georgia, serif;
  line-height: 1;
}

blockquote:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

blockquote p {
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

#articles article {
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

#articles article::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition);
}

#articles article:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(6px);
  border-color: rgba(91, 75, 255, 0.3);
}

#articles article:hover::before {
  transform: scaleY(1);
}

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

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

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

#articles article p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

#articles article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--primary);
  transition: all var(--transition);
  text-decoration: none;
  margin-top: 8px;
}

#articles article a::after {
  display: none;
}

#articles article a::before {
  content: '→';
  transition: transform var(--transition);
}

#articles article a:hover {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

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

#faq h3 {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 20px 0 8px;
  border-left: 4px solid var(--primary);
  cursor: default;
  transition: all var(--transition);
  font-size: 1rem;
}

#faq h3:hover {
  background: rgba(91, 75, 255, 0.06);
  border-left-color: var(--accent);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

#faq h3 + p {
  padding: 0 18px 16px;
  margin-bottom: 0;
  border-bottom: 1px dashed var(--border-color);
}

#howto h4 {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  margin: 16px 0 8px;
  transition: all var(--transition);
}

#howto h4:hover {
  border-left-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

#howto h4::before {
  display: none;
}

#contact p {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  transition: padding-left var(--transition), color var(--transition);
}

#contact p:hover {
  padding-left: 8px;
  color: var(--primary);
}

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

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

#sitemap ul li,
#links ul li {
  padding: 0;
}

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

#sitemap ul li a,
#links ul li a {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

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

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

#legal h2 {
  font-size: 1.15rem;
  margin-top: 24px;
}

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

footer {
  background: var(--gradient-2);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

footer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

footer p {
  font-size: 0.875rem;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  opacity: 0.85;
  transition: opacity var(--transition);
}

footer p:hover {
  opacity: 1;
}

footer p:first-child {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 10px;
  opacity: 1;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(91, 75, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 40px rgba(91, 75, 255, 0.3);
  }
}

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

@media (max-width: 1024px) {
  nav ul {
    gap: 2px;
  }

  nav ul li a {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  section {
    padding: 28px 24px;
  }
}

@media (max-width: 768px) {
  nav {
    height: auto;
    flex-direction: column;
    padding: 12px 16px;
    gap: 10px;
  }

  nav > a:first-child {
    font-size: 1.2rem;
  }

  nav ul {
    justify-content: center;
    gap: 4px;
  }

  nav ul li a {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  main {
    padding: 0 16px 40px;
  }

  article > h1 {
    padding-top: 28px;
    font-size: 1.5rem;
  }

  article > h1 + p {
    font-size: 0.95rem;
    padding: 12px 0 24px;
  }

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

  section h2 {
    font-size: 1.2rem;
  }

  section h3 {
    font-size: 1.05rem;
  }

  section p {
    font-size: 0.9rem;
  }

  blockquote {
    padding: 16px 18px;
  }

  #articles article {
    padding: 18px;
  }

  #faq h3 {
    padding: 12px 14px;
    font-size: 0.95rem;
  }

  #sitemap ul li a,
  #links ul li a {
    padding: 6px 14px;
    font-size: 0.8rem;
  }

  footer {
    padding: 30px 16px;
  }

  footer p {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  nav ul li a {
    padding: 5px 8px;
    font-size: 0.7rem;
  }

  article > h1 {
    font-size: 1.35rem;
  }

  section {
    padding: 18px 14px;
  }

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

  section h3 {
    font-size: 1rem;
    padding-left: 10px;
  }

  section p {
    font-size: 0.85rem;
    line-height: 1.8;
  }

  blockquote p {
    font-size: 0.85rem;
  }
}

@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,
  footer,
  #sitemap,
  #links {
    display: none;
  }

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

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

  a {
    text-decoration: underline;
    color: #000;
  }
}