/* 设计变量与基础设定 */
:root {
  --color-primary: #7c3aed;
  --color-primary-light: #a78bfa;
  --color-secondary: #ec4899;
  --color-secondary-light: #f472b6;
  --color-bg: #f5f3ff;
  --color-surface: rgba(255, 255, 255, 0.78);
  --color-surface-solid: #ffffff;
  --color-text-main: #1e1b4b;
  --color-text-body: #334155;
  --color-text-muted: #64748b;
  --color-border: rgba(124, 58, 237, 0.12);
  --color-shadow: rgba(124, 58, 237, 0.15);
  
  --font-main: 'PingFang SC', 'Noto Sans SC', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 10px 40px var(--color-shadow);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-max: 1180px;
  --spacing-section: clamp(3rem, 6vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text-body);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: var(--transition-base); }
ul, ol { list-style: none; }

/* 排版系统 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.5rem; }
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  color: var(--color-text-main);
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: balance;
  letter-spacing: -0.02em;
}
.section-desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-muted);
  margin-bottom: 2.5rem;
  max-width: 680px;
  line-height: 1.8;
}
.content-block { padding: var(--spacing-section) 0; }

/* 页头与导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand img { height: 36px; width: auto; }
.brand-name { font-size: 1.15rem; font-weight: 600; color: var(--color-text-main); }
nav ul { display: flex; gap: 2rem; }
nav a { font-size: 0.95rem; color: var(--color-text-body); font-weight: 500; padding: 0.4rem 0; position: relative; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-primary); }
nav a[aria-current="page"]::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--color-primary); border-radius: 2px;
}
@media (max-width: 768px) {
  nav ul { gap: 1.25rem; font-size: 0.9rem; }
  .brand-name { display: none; }
}

/* 页脚 */
.site-footer {
  background: var(--color-surface-solid);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 1rem; color: var(--color-text-main); margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--color-text-muted); padding: 0.3rem 0; font-size: 0.95rem; }
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom { text-align: center; color: var(--color-text-muted); font-size: 0.85rem; border-top: 1px solid var(--color-border); padding-top: 1.5rem; }

/* 通用组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
  border: none; outline: none;
}
.btn:focus-visible { outline: 3px solid var(--color-secondary-light); outline-offset: 3px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff; box-shadow: 0 6px 20px rgba(124, 58, 237, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35); }
.btn-outline {
  background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary);
}
.btn-outline:hover { background: rgba(124, 58, 237, 0.06); }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.9rem; }

/* 玻璃卡片 */
.glass-card {
  background: var(--color-surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.glass-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(124, 58, 237, 0.18); }

/* 特性网格 */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.feature-item { display: flex; flex-direction: column; gap: 1rem; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.1)); display: grid; place-items: center; }
.feature-icon svg { width: 26px; height: 26px; stroke: var(--color-primary); stroke-width: 1.8; }
.feature-title { font-size: 1.15rem; font-weight: 600; color: var(--color-text-main); }
.feature-text { font-size: 0.95rem; color: var(--color-text-body); line-height: 1.7; }

/* 表格样式 */
.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface-solid); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-card); }
.data-table th, .data-table td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
.data-table th { background: rgba(124, 58, 237, 0.05); color: var(--color-text-main); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.table-wrapper { overflow-x: auto; }

/* FAQ 样式 */
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
details {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem; transition: var(--transition-base);
}
details[open] { background: rgba(255, 255, 255, 0.9); border-color: var(--color-primary-light); }
summary { cursor: pointer; font-weight: 600; color: var(--color-text-main); list-style: none; position: relative; padding-right: 1.5rem; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--color-primary); font-weight: 700; transition: transform var(--transition-base);
}
details[open] summary::after { content: '−'; }
details p { margin-top: 0.8rem; color: var(--color-text-body); font-size: 0.95rem; line-height: 1.75; }

/* 新闻卡片 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.news-card { display: flex; flex-direction: column; }
.news-date { font-size: 0.8rem; color: var(--color-secondary); margin-bottom: 0.5rem; font-weight: 500; }
.news-title { font-size: 1.05rem; font-weight: 600; color: var(--color-text-main); margin-bottom: 0.6rem; }
.news-excerpt { font-size: 0.9rem; color: var(--color-text-muted); margin-bottom: 1rem; flex-grow: 1; line-height: 1.65; }
.link-group { display: flex; flex-direction: column; gap: 0.75rem; }
.link-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--color-surface); border-radius: var(--radius-sm); transition: var(--transition-base); }
.link-item:hover { background: rgba(124, 58, 237, 0.05); transform: translateX(4px); }
.link-item svg { width: 18px; height: 18px; stroke: var(--color-primary); stroke-width: 2; flex-shrink: 0; }
.link-text { font-size: 0.95rem; color: var(--color-text-body); }

/* 接口示意容器 */
.interface-mockup {
  background: var(--color-surface-solid); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); overflow: hidden; border: 1px solid var(--color-border);
  aspect-ratio: 16/9; max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 240px 1fr;
}
.mock-sidebar { background: #f8fafc; border-right: 1px solid var(--color-border); padding: 1rem; }
.mock-chat { display: flex; flex-direction: column; padding: 1.5rem; background: #ffffff; }
.mock-header { height: 56px; border-bottom: 1px solid var(--color-border); display: flex; align-items: center; padding: 0 1rem; font-weight: 600; color: var(--color-text-main); }
.mock-area { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--color-text-muted); gap: 0.5rem; }
.mock-input { height: 44px; background: #f1f5f9; border-radius: 22px; margin-top: 1rem; width: 80%; }

/* SVG 动效基础 */
.svg-progress { width: 100%; max-width: 320px; margin: 0 auto; }
.stroke-anim {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke var(--transition-base);
}
.stroke-anim.secondary { stroke: var(--color-secondary); }
.draw-infinite { animation: drawArc 8s ease-in-out infinite alternate; }
.pulse-ring { animation: pulseScale 6s ease-in-out infinite; transform-origin: center; }
.float-slow { animation: floatY 7s ease-in-out infinite alternate; }

@keyframes drawArc {
  0%, 10% { stroke-dashoffset: 0; opacity: 0.6; }
  40%, 60% { stroke-dashoffset: 1; opacity: 1; }
  90%, 100% { stroke-dashoffset: 0; opacity: 0.6; }
}
@keyframes pulseScale {
  0%, 100% { transform: scale(0.96); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* 响应式调整 */
@media (max-width: 900px) {
  .interface-mockup { grid-template-columns: 1fr; }
  .mock-sidebar { display: none; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; gap: 0.75rem; }
}

/* 减少动态效果偏好 */
@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;
  }
  .draw-infinite, .pulse-ring, .float-slow { animation: none; }
}
