:root {
  --primary: #6c5ce7;
  --primary-light: #a29bfe;
  --primary-dark: #4834d4;
  --secondary: #fd79a8;
  --accent: #00cec9;
  --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  --gradient-2: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  --gradient-3: linear-gradient(120deg, #6c5ce7 0%, #00cec9 100%);
  --gradient-hero: linear-gradient(135deg, rgba(108,92,231,0.95) 0%, rgba(162,155,254,0.9) 40%, rgba(253,121,168,0.85) 100%);
  --bg: #f8f9fe;
  --bg-card: #ffffff;
  --bg-glass: rgba(255,255,255,0.7);
  --bg-glass-border: rgba(255,255,255,0.3);
  --text: #2d3436;
  --text-secondary: #636e72;
  --text-light: #b2bec3;
  --border: rgba(108,92,231,0.12);
  --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.18);
  --shadow-glow: 0 0 40px rgba(108,92,231,0.25);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s 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: dark) {
  :root {
    --bg: #0a0a1a;
    --bg-card: #12122a;
    --bg-glass: rgba(18,18,42,0.75);
    --bg-glass-border: rgba(108,92,231,0.2);
    --text: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-light: #6c6c8a;
    --border: rgba(108,92,231,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(108,92,231,0.35);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(108,92,231,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(253,121,168,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0,206,201,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

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

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

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

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

ul, ol {
  list-style: none;
}

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

h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

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

section:hover > h2::after {
  width: 100px;
}

h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

h4 {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
  color: var(--primary-dark);
}

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

strong {
  color: var(--text);
  font-weight: 600;
}

blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 1rem 0;
  font-style: italic;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
}

blockquote p {
  margin-bottom: 0.5rem;
}

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

/* ===== HEADER ===== */
header {
  position: relative;
  background: var(--gradient-hero);
  padding: 4rem 2rem 5rem;
  text-align: center;
  overflow: hidden;
  z-index: 1;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.08) 0%, transparent 40%);
  animation: headerGlow 12s ease-in-out infinite alternate;
  pointer-events: none;
}

header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--bg);
  clip-path: ellipse(70% 100% at 50% 100%);
  pointer-events: none;
}

@keyframes headerGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-5%, -5%) scale(1.1); }
}

header h1 {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.15);
  max-width: 900px;
  margin: 0 auto 1.25rem;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out;
}

header > p {
  color: rgba(255,255,255,0.92);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  line-height: 1.8;
  position: relative;
  z-index: 2;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

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

/* ===== NAV ===== */
nav {
  position: relative;
  z-index: 3;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

nav li a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

nav li a:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-color: rgba(255,255,255,0.35);
}

/* ===== MAIN ===== */
main {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ===== SECTIONS ===== */
section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

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

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

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

section > h2 {
  color: var(--text);
}

section > h3 {
  padding-left: 0.75rem;
  border-left: 3px solid var(--primary-light);
  margin-top: 2rem;
}

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

section ul {
  padding-left: 0;
}

section ul li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), padding-left var(--transition);
}

section ul li:last-child {
  border-bottom: none;
}

section ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 8px;
  height: 8px;
  background: var(--gradient-3);
  border-radius: 50%;
  transition: transform var(--transition), box-shadow var(--transition);
}

section ul li:hover {
  padding-left: 2rem;
  background: rgba(108,92,231,0.03);
}

section ul li:hover::before {
  transform: scale(1.4);
  box-shadow: 0 0 12px rgba(108,92,231,0.4);
}

/* ===== ARTICLE CARDS ===== */
article {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-3);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transition: opacity var(--transition);
}

article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108,92,231,0.25);
}

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

article h3 {
  margin-top: 0;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  transition: color var(--transition);
}

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

article time {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  padding: 0.2rem 0.75rem;
  background: rgba(108,92,231,0.08);
  border-radius: 50px;
  font-weight: 500;
}

article a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
  padding: 0.4rem 0;
  transition: all var(--transition);
}

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

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

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

/* ===== DETAILS / FAQ ===== */
details {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all var(--transition);
}

details[open] {
  box-shadow: var(--shadow-md);
  border-color: rgba(108,92,231,0.25);
}

details:hover {
  border-color: rgba(108,92,231,0.2);
}

summary {
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition), color var(--transition);
  position: relative;
  user-select: none;
}

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

summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition), color var(--transition);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108,92,231,0.08);
  border-radius: 50%;
  line-height: 1;
}

details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
  background: var(--primary);
  color: #fff;
}

summary:hover {
  background: rgba(108,92,231,0.04);
  color: var(--primary);
}

details > p {
  padding: 0 1.5rem 1.25rem;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text-secondary);
  animation: fadeInUp 0.3s ease-out;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  background: var(--gradient-2);
  color: rgba(255,255,255,0.85);
  padding: 3rem 2rem 2rem;
  margin-top: 2rem;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 60% 50% at 10% 0%, rgba(108,92,231,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(253,121,168,0.15) 0%, transparent 60%);
  pointer-events: none;
}

footer > section {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 1.5rem 0;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

footer > section::before {
  display: none;
}

footer > section:hover {
  box-shadow: none;
}

footer h2 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

footer h2::after {
  background: var(--gradient-3);
}

footer p {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  line-height: 1.8;
}

footer ul li {
  color: rgba(255,255,255,0.7);
  border-bottom-color: rgba(255,255,255,0.08);
  font-size: 0.9rem;
}

footer ul li::before {
  background: var(--accent);
}

footer ul li:hover {
  background: rgba(255,255,255,0.04);
}

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

footer a:hover {
  color: #fff;
}

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

#sitemap ul li,
#links ul li {
  border-bottom: none;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-radius: var(--radius-sm);
}

#sitemap ul li::before,
#links ul li::before {
  top: 0.95rem;
}

#links ul li a {
  color: var(--text-secondary);
  font-weight: 500;
}

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

/* ===== SCROLL ANIMATIONS ===== */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section,
article,
details {
  animation: reveal 0.7s ease-out both;
}

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; }
section:nth-child(11) { animation-delay: 0.55s; }
section:nth-child(12) { animation-delay: 0.6s; }
section:nth-child(13) { animation-delay: 0.65s; }
section:nth-child(14) { animation-delay: 0.7s; }
section:nth-child(15) { animation-delay: 0.75s; }

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

details:nth-child(1) { animation-delay: 0.02s; }
details:nth-child(2) { animation-delay: 0.04s; }
details:nth-child(3) { animation-delay: 0.06s; }
details:nth-child(4) { animation-delay: 0.08s; }
details:nth-child(5) { animation-delay: 0.1s; }
details:nth-child(6) { animation-delay: 0.12s; }
details:nth-child(7) { animation-delay: 0.14s; }
details:nth-child(8) { animation-delay: 0.16s; }
details:nth-child(9) { animation-delay: 0.18s; }
details:nth-child(10) { animation-delay: 0.2s; }
details:nth-child(11) { animation-delay: 0.22s; }
details:nth-child(12) { animation-delay: 0.24s; }
details:nth-child(13) { animation-delay: 0.26s; }
details:nth-child(14) { animation-delay: 0.28s; }
details:nth-child(15) { animation-delay: 0.3s; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  header {
    padding: 3rem 1.5rem 4.5rem;
  }

  main {
    padding: 0 1.25rem 2.5rem;
  }

  section {
    padding: 1.75rem;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 60px;
  }

  body {
    font-size: 15px;
  }

  header {
    padding: 2.5rem 1.25rem 4rem;
  }

  header h1 {
    font-size: 1.4rem;
  }

  header > p {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }

  nav ul {
    gap: 0.35rem;
  }

  nav li a {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
  }

  main {
    padding: 0 1rem 2rem;
  }

  section {
    padding: 1.35rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
  }

  section > h3 {
    padding-left: 0.6rem;
    margin-top: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  article {
    padding: 1.15rem;
    border-radius: var(--radius-sm);
  }

  summary {
    padding: 0.9rem 1.15rem;
    font-size: 0.9rem;
  }

  details > p {
    padding: 0 1.15rem 1rem;
    font-size: 0.88rem;
  }

  blockquote {
    padding: 1rem 1.15rem;
    font-size: 0.9rem;
  }

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

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

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  header {
    padding: 2rem 1rem 3.5rem;
  }

  header h1 {
    font-size: 1.2rem;
  }

  header > p {
    font-size: 0.85rem;
    line-height: 1.7;
  }

  nav ul {
    gap: 0.3rem;
  }

  nav li a {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
  }

  main {
    padding: 0 0.75rem 1.5rem;
  }

  section {
    padding: 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
  }

  section ul li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-size: 0.88rem;
  }

  article {
    padding: 1rem;
  }

  summary {
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
  }

  summary::after {
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
  }

  details > p {
    padding: 0 1rem 0.9rem;
    font-size: 0.85rem;
  }

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

  footer h2 {
    font-size: 1rem;
  }

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

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

/* ===== HOVER GLOW EFFECT ===== */
@media (hover: hover) {
  section:hover {
    transform: translateY(-2px);
  }

  header:hover::before {
    animation-play-state: paused;
  }
}

/* ===== FOCUS VISIBLE ===== */
details:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

summary:focus-visible {
  outline: none;
  background: rgba(108,92,231,0.08);
}

/* ===== PRINT ===== */
@media print {
  header {
    background: none;
    color: var(--text);
    padding: 1rem 0;
  }

  header h1 {
    color: var(--text);
  }

  header > p {
    color: var(--text-secondary);
  }

  nav {
    display: none;
  }

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

  footer {
    background: none;
    color: var(--text);
  }

  footer h2,
  footer p,
  footer a {
    color: var(--text);
  }
}