:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --accent: #fd79a8;
  --accent-light: #fd79a8;
  --bg-dark: #0a1029;
  --bg-card: rgba(15, 20, 50, 0.72);
  --bg-card-hover: rgba(25, 32, 70, 0.85);
  --bg-glass: rgba(15, 20, 50, 0.55);
  --bg-glass-border: rgba(255, 255, 255, 0.08);
  --text-primary: #e8eaf6;
  --text-secondary: #a4b0d0;
  --text-muted: #6b7a9e;
  --border: rgba(108, 92, 231, 0.18);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-dark: #f0f2f8;
    --bg-card: rgba(255, 255, 255, 0.82);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-border: rgba(108, 92, 231, 0.12);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a8;
    --border: rgba(108, 92, 231, 0.15);
    --shadow: 0 8px 32px rgba(108, 92, 231, 0.1);
    --shadow-hover: 0 16px 48px rgba(108, 92, 231, 0.18);
  }
}

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

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

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(108, 92, 231, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(253, 121, 168, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(72, 52, 212, 0.1), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  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), box-shadow var(--transition);
}

header:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

nav > a:first-child {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition);
}

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

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

nav ul li a {
  display: 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::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: transform var(--transition);
}

nav ul li a:hover {
  color: var(--text-primary);
  background: rgba(108, 92, 231, 0.1);
}

nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin: 48px 0 24px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.7s ease-out both;
}

main > p:first-of-type {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 48px;
  padding: 28px 32px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.7s ease-out 0.1s both;
  position: relative;
  overflow: hidden;
}

main > p:first-of-type::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

section {
  margin-bottom: 40px;
  padding: 32px;
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  animation: fadeInUp 0.6s ease-out both;
  position: relative;
  overflow: hidden;
}

section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

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

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

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

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

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

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-light);
  margin: 24px 0 12px;
  letter-spacing: -0.01em;
  transition: color var(--transition);
}

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

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

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

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

article {
  padding: 24px;
  margin-bottom: 16px;
  background: rgba(108, 92, 231, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  background: rgba(108, 92, 231, 0.1);
  border-color: rgba(108, 92, 231, 0.35);
  transform: translateX(6px);
  box-shadow: 0 4px 20px rgba(108, 92, 231, 0.12);
}

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

article h3 {
  margin-top: 0;
  color: var(--text-primary);
}

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

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

article p a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  padding: 4px 0;
  transition: all var(--transition);
}

article p a::after {
  content: " →";
  transition: transform var(--transition);
  display: inline-block;
}

article p a:hover {
  color: var(--accent);
  letter-spacing: 0.02em;
}

article p a:hover::after {
  transform: translateX(4px);
}

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

section > ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

section > ul li a {
  display: block;
  padding: 12px 18px;
  background: rgba(108, 92, 231, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

section > ul li a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

section > ul li a:hover {
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.3);
}

section > ul li a:hover::before {
  opacity: 1;
}

#faq h3 {
  padding: 18px 20px 8px;
  margin: 16px 0 0;
  background: rgba(108, 92, 231, 0.06);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: default;
  transition: all var(--transition);
  color: var(--text-primary);
  font-size: 1rem;
}

#faq h3::before {
  content: "Q ";
  color: var(--accent);
  font-weight: 800;
  margin-right: 6px;
}

#faq h3 + p {
  padding: 8px 20px 18px;
  margin: 0 0 4px;
  background: rgba(108, 92, 231, 0.03);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition);
}

#faq h3 + p::before {
  content: "A ";
  color: var(--primary-light);
  font-weight: 800;
  margin-right: 6px;
}

#faq h3:hover {
  background: rgba(108, 92, 231, 0.12);
  border-color: rgba(108, 92, 231, 0.3);
}

#faq h3:hover + p {
  background: rgba(108, 92, 231, 0.06);
  border-color: rgba(108, 92, 231, 0.2);
}

#howto h3 {
  padding-left: 16px;
  border-left: 3px solid var(--primary);
  border-radius: 2px;
}

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

#contact p {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

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

#contact p:nth-child(odd) {
  font-weight: 500;
  color: var(--text-primary);
}

footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
  border-top: 1px solid var(--bg-glass-border);
  text-align: center;
}

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

footer a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all var(--transition);
  padding: 2px 4px;
}

footer a:hover {
  color: var(--primary-light);
}

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

@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 (max-width: 900px) {
  nav {
    flex-direction: column;
    height: auto;
    padding: 12px 16px;
    gap: 8px;
  }

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

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

  main {
    padding: 0 16px 60px;
  }

  h1 {
    margin-top: 32px;
  }

  section {
    padding: 24px 18px;
    border-radius: var(--radius);
  }

  section > ul {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }

  article {
    padding: 18px;
  }
}

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

  h1 {
    font-size: 1.5rem;
    margin-top: 24px;
  }

  main > p:first-of-type {
    padding: 20px 18px;
    font-size: 0.95rem;
    border-radius: var(--radius);
  }

  section {
    padding: 20px 14px;
    margin-bottom: 20px;
  }

  h2 {
    font-size: 1.2rem;
  }

  h3 {
    font-size: 1rem;
  }

  p {
    font-size: 0.9rem;
  }

  section > ul {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  section > ul li a {
    padding: 10px 12px;
    font-size: 0.8rem;
  }

  #faq h3 {
    padding: 14px 14px 6px;
    font-size: 0.92rem;
  }

  #faq h3 + p {
    padding: 6px 14px 14px;
    font-size: 0.85rem;
  }

  footer {
    padding: 28px 16px;
  }
}

@media (min-width: 1400px) {
  :root {
    --max-width: 1260px;
  }
}

::selection {
  background: rgba(108, 92, 231, 0.35);
  color: var(--text-primary);
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(108, 92, 231, 0.35);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 92, 231, 0.55);
}

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

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

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

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