:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-elevated: #22223b;
  --bg-glass: rgba(34, 34, 59, 0.55);
  --bg-glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f0f0f5;
  --text-secondary: #b8b8cc;
  --text-muted: #8888a0;
  --accent-primary: #ff6b9d;
  --accent-secondary: #7c5cff;
  --accent-tertiary: #00d4aa;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 40%, #4a1d6e 70%, #1a1a2e 100%);
  --gradient-accent: linear-gradient(135deg, #ff6b9d 0%, #7c5cff 100%);
  --gradient-card: linear-gradient(145deg, rgba(34, 34, 59, 0.7), rgba(26, 26, 46, 0.5));
  --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 30px rgba(124, 92, 255, 0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1200px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f5f5fa;
    --bg-secondary: #ffffff;
    --bg-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-border: rgba(0, 0, 0, 0.08);
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8888a0;
    --gradient-hero: linear-gradient(135deg, #e8e0f5 0%, #f0e6ff 40%, #ffe6f0 70%, #e8e0f5 100%);
    --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.8), rgba(245, 245, 250, 0.6));
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 24px 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, 255, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-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;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  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 at 20% 0%, rgba(124, 92, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(255, 107, 157, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

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

ul, ol {
  list-style: none;
}

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

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

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

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}

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

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

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--bg-glass-border);
}

.topbar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar span:first-child::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-tertiary);
  box-shadow: 0 0 8px var(--accent-tertiary);
  animation: pulse 2s ease-in-out infinite;
}

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

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

nav a {
  position: relative;
  display: inline-block;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: transform var(--transition-smooth);
}

nav a:hover {
  color: var(--text-primary);
  background: rgba(124, 92, 255, 0.1);
}

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

section {
  margin-top: 48px;
  padding: 40px;
  background: var(--gradient-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transition: box-shadow var(--transition-smooth), border-color var(--transition-smooth), transform var(--transition-smooth);
}

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(n+6) { animation-delay: 0.3s; }

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

section:hover {
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

#hero {
  margin-top: 40px;
  padding: 64px 48px;
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: var(--radius-xl);
}

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

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

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.1); }
}

#hero h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#hero p {
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 16px;
}

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

h2 {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 20px;
  padding-bottom: 14px;
  position: relative;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
  transition: width var(--transition-smooth);
}

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

h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color var(--transition-fast);
}

h3::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gradient-accent);
  box-shadow: 0 0 8px rgba(124, 92, 255, 0.6);
}

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

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

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

article {
  padding: 24px 28px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  transition: transform var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

article:hover {
  transform: translateY(-4px);
  background: rgba(124, 92, 255, 0.06);
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: var(--shadow-md);
}

article h3 {
  margin-top: 0;
}

article p {
  font-size: 0.9rem;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 50px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

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

article a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
  opacity: 0.95;
}

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

#faq h3 {
  margin-top: 24px;
  padding: 14px 18px;
  background: rgba(124, 92, 255, 0.08);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.05rem;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

#faq h3:hover {
  background: rgba(124, 92, 255, 0.14);
  border-left-color: var(--accent-primary);
  transform: translateX(4px);
}

#faq h3::before {
  display: none;
}

#faq p {
  padding: 0 18px;
  margin-top: 8px;
}

#sitemap ul,
#links ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

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

#sitemap li a::before,
#links li a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--gradient-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform var(--transition-smooth);
}

#sitemap li a:hover,
#links li a:hover {
  color: var(--text-primary);
  background: rgba(124, 92, 255, 0.1);
  border-color: rgba(124, 92, 255, 0.3);
  transform: translateX(4px);
}

#sitemap li a:hover::before,
#links li a:hover::before {
  transform: scaleY(1);
}

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

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

#legal h2 {
  margin-top: 32px;
  font-size: 1.25rem;
}

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

#meta p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: 48px 24px;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--bg-glass-border);
}

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

footer p:first-child {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

@media (max-width: 1024px) {
  main {
    padding: 0 20px 60px;
  }

  section {
    padding: 32px 28px;
    margin-top: 36px;
  }

  #hero {
    padding: 48px 32px;
  }
}

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

  html {
    scroll-padding-top: 100px;
  }

  .topbar {
    padding: 6px 16px;
    font-size: 0.72rem;
    flex-direction: column;
    gap: 2px;
    text-align: center;
  }

  nav {
    padding: 0 12px;
    gap: 0;
  }

  nav a {
    padding: 10px 12px;
    font-size: 0.82rem;
  }

  main {
    padding: 0 16px 48px;
  }

  section {
    margin-top: 28px;
    padding: 24px 20px;
    border-radius: var(--radius-md);
  }

  #hero {
    margin-top: 24px;
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }

  #hero h1 {
    margin-bottom: 18px;
  }

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

  h2 {
    font-size: 1.3rem;
    margin-bottom: 16px;
  }

  h3 {
    font-size: 1.05rem;
    margin-top: 22px;
  }

  p {
    font-size: 0.9rem;
  }

  article {
    padding: 18px 20px;
  }

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

  #contact p {
    flex-direction: column;
    gap: 2px;
  }

  footer {
    padding: 36px 16px;
  }
}

@media (max-width: 480px) {
  .topbar span:last-child {
    display: none;
  }

  nav a {
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  section {
    padding: 20px 16px;
  }

  #hero {
    padding: 28px 18px;
  }

  #hero h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

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

  #sitemap ul,
  #links ul {
    grid-template-columns: 1fr 1fr;
  }

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

  #faq p {
    padding: 0 14px;
  }
}

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

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

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

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

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

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