/* 全局重置与基础样式 */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #ff6b35;
  --bg: #f0f4f8;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.25);
  --text: #1a1a2e;
  --text-light: #4a4a6a;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --border: rgba(255, 255, 255, 0.3);
  --radius: 20px;
  --transition: 0.3s ease;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-card: rgba(30, 40, 60, 0.7);
    --bg-glass: rgba(20, 30, 50, 0.4);
    --text: #e6edf3;
    --text-light: #8b949e;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --border: rgba(255, 255, 255, 0.08);
    --gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  }
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 70px;
  transition: background var(--transition), color var(--transition);
}

/* 头部导航 */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  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(--border);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: background var(--transition), border var(--transition);
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

header nav ul li a {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 30px;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all var(--transition);
  position: relative;
  background: transparent;
}

header nav ul li a:hover,
header nav ul li a:focus-visible {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

/* 主内容区 */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* 通用section样式 */
section {
  margin: 40px 0;
  padding: 40px 32px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }

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

section:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

/* 标题样式 */
h1 {
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  position: relative;
  display: inline-block;
}

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

h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

p {
  margin-bottom: 12px;
  color: var(--text-light);
  font-size: 1.05rem;
}

/* hero区域特殊处理 */
#hero {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 60px 32px;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}

#hero h1 {
  -webkit-text-fill-color: #fff;
  background: none;
  position: relative;
  z-index: 1;
}

#hero p {
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  z-index: 1;
}

#hero p:last-of-type {
  font-weight: 600;
  font-size: 1.2rem;
  background: rgba(255,255,255,0.15);
  display: inline-block;
  padding: 8px 24px;
  border-radius: 30px;
  backdrop-filter: blur(4px);
  margin-top: 12px;
}

/* 卡片样式 */
article {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  border-radius: 16px;
  margin: 16px 0;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

article:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

/* 列表样式 */
ul, ol {
  padding-left: 24px;
  margin: 12px 0;
  color: var(--text-light);
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* blockquote */
blockquote {
  background: var(--bg-glass);
  backdrop-filter: blur(6px);
  padding: 20px 24px;
  border-radius: 16px;
  border-left: 4px solid var(--primary);
  margin: 16px 0;
  font-style: italic;
  transition: all var(--transition);
}

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

/* details / FAQ */
details {
  background: var(--bg-glass);
  backdrop-filter: blur(6px);
  padding: 16px 20px;
  border-radius: 14px;
  margin: 12px 0;
  border: 1px solid var(--border);
  transition: all var(--transition);
  cursor: pointer;
}

details:hover {
  border-color: var(--primary);
}

details summary {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  outline: none;
}

details[open] summary {
  color: var(--primary);
}

details p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 页脚 */
footer {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-light);
  margin-top: 40px;
}

footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin-bottom: 20px;
}

footer nav ul li a {
  text-decoration: none;
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 20px;
  transition: all var(--transition);
  font-size: 0.95rem;
}

footer nav ul li a:hover {
  color: var(--primary);
  background: rgba(26, 115, 232, 0.1);
}

footer p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

footer ul:last-of-type {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 0;
  margin-top: 16px;
}

footer ul:last-of-type li a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color var(--transition);
}

footer ul:last-of-type li a:hover {
  color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  header nav {
    height: 60px;
    padding: 0 16px;
  }

  header nav ul li a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  main {
    padding: 0 16px 40px;
  }

  section {
    padding: 28px 20px;
    margin: 24px 0;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.2rem;
  }

  p {
    font-size: 0.95rem;
  }

  #hero {
    padding: 40px 20px;
  }

  #hero p:last-of-type {
    font-size: 1rem;
    padding: 6px 16px;
  }

  article {
    padding: 18px;
  }

  footer {
    padding: 30px 16px;
  }
}

@media (max-width: 480px) {
  header nav ul {
    gap: 4px;
  }

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

  h1 {
    font-size: 1.6rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  section {
    padding: 20px 14px;
  }

  #hero p:last-of-type {
    font-size: 0.9rem;
  }
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* 选中文本样式 */
::selection {
  background: var(--primary);
  color: #fff;
}

/* 焦点可见性 */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* 链接通用样式 */
a {
  color: var(--primary);
  transition: color var(--transition);
}

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