/* 设计变量与基础重置 */
:root {
  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-accent: #00f5d4;
  --color-bg: #0b1120;
  --color-surface: #111827;
  --color-surface-elevated: #1f2937;
  --color-border: #374151;
  --color-text: #f3f4f6;
  --color-text-secondary: #9ca3af;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 16px rgba(59, 130, 246, 0.25);
  --font-body: "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, -apple-system, sans-serif;
  --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 排版与间距 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 4rem 0; }
h1, h2, h3, h4 { text-wrap: balance; letter-spacing: -0.02em; font-weight: 700; color: var(--color-text); margin-bottom: 1rem; }
h1 { font-size: clamp(2.25rem, 5vw + 1rem, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); line-height: 1.25; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.1rem, 2vw + 0.25rem, 1.35rem); line-height: 1.3; }
p { margin-bottom: 1rem; color: var(--color-text-secondary); }
strong { color: var(--color-text); font-weight: 600; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--color-accent); }

/* 布局组件 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

/* 导航与页头页脚 */
header { position: sticky; top: 0; z-index: 50; background: rgba(11, 17, 32, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
nav { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; }
.logo { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--color-text); text-decoration: none; }
.logo img { height: 32px; width: auto; }
.nav-links { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--color-text-secondary); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); }

footer { border-top: 1px solid var(--color-border); padding: 3rem 0 2rem; background: var(--color-surface); margin-top: 4rem; }
.footer-content { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-links { display: flex; gap: 1.5rem; list-style: none; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.9rem; color: var(--color-text-secondary); }
.copyright { font-size: 0.85rem; color: #6b7280; margin-top: 1rem; }

/* 按钮样式 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: all var(--transition-base); cursor: pointer; border: none;
  outline-offset: 2px;
}
.btn-primary { background: linear-gradient(135deg, var(--color-primary), #60a5fa); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4); background: linear-gradient(135deg, #60a5fa, var(--color-primary)); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* 卡片通用 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-icon { width: 48px; height: 48px; margin-bottom: 1rem; color: var(--color-primary); }
.card-title { margin-bottom: 0.5rem; font-size: 1.15rem; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-surface-elevated); font-weight: 600; white-space: nowrap; }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* FAQ 样式 */
details { margin-bottom: 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; transition: transform var(--transition-base); }
details[open] summary::after { transform: rotate(45deg); }
details > div { padding: 1rem; color: var(--color-text-secondary); border-top: 1px solid var(--color-border); background: var(--color-bg); }

/* 新闻与链接 */
.news-date { font-size: 0.8rem; color: var(--color-primary); font-weight: 600; margin-bottom: 0.5rem; display: block; }
.related-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.related-item { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem; background: var(--color-surface); border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.related-item span { font-size: 0.9rem; color: var(--color-text-secondary); }

/* 界面示意容器 */
.mockup-window {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
}
.mockup-header { background: var(--color-surface-elevated); padding: 0.75rem 1rem; display: flex; gap: 0.5rem; border-bottom: 1px solid var(--color-border); }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-border); }
.mockup-body { display: flex; height: 320px; }
.mockup-sidebar { width: 35%; border-right: 1px solid var(--color-border); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.mockup-chat { flex: 1; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; justify-content: flex-end; }
.msg { padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.9rem; max-width: 80%; }
.msg-in { background: var(--color-surface-elevated); color: var(--color-text); align-self: flex-start; }
.msg-out { background: var(--color-primary); color: #fff; align-self: flex-end; }

/* SVG 动效核心定义 */
svg.svg-anim { width: 100%; height: auto; max-width: 600px; display: block; margin: 0 auto; }
.star-point { fill: var(--color-accent); opacity: 0.6; }
.connect-line { stroke: var(--color-primary); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-path 5s ease forwards; }
.twinkle-star { animation: star-twinkle 4s ease-in-out infinite; }
.float-group { animation: gentle-float 6s ease-in-out infinite; }
@keyframes star-twinkle { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes draw-path { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes gentle-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .draw-line, .twinkle-star, .float-group { animation: none !important; }
}

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: rgba(59, 130, 246, 0.3); color: #fff; }
