/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #0b0f19;
  --color-surface: #111827;
  --color-surface-hover: #1e293b;
  --color-primary: #0ea5e9;
  --color-accent: #00ff9d;
  --color-text: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-border: #334155;
  --color-danger: #ef4444;
  --font-main: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 16px rgba(0, 255, 157, 0.15);
  --spacing-unit: 1rem;
  --container-max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease, opacity 0.2s ease; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; background: transparent; border: none; outline: none; }

/* =========================================
 排版与流体字号
========================================= */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; color: #ffffff; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.2; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-muted); font-size: clamp(0.95rem, 1.1vw, 1.05rem); }
.text-accent { color: var(--color-accent); }
.text-primary { color: var(--color-primary); }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--color-surface); }

/* =========================================
 页头与导航
========================================= */
.header { position: sticky; top: 0; z-index: 100; background: rgba(11, 15, 25, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: 1.5rem; }
.nav a { font-size: 0.95rem; color: var(--color-text-muted); position: relative; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-accent); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 2px; background: var(--color-accent); }
.mobile-toggle { display: none; background: none; cursor: pointer; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--color-text); }

@media (max-width: 768px) {
  .nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; width: 100%; background: var(--color-surface); padding: 1rem; border-bottom: 1px solid var(--color-border); }
  .nav.open { display: flex; }
  .mobile-toggle { display: block; }
}

/* =========================================
 页脚
========================================= */
.footer { background: #080b12; border-top: 1px solid var(--color-border); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 0.8rem; color: var(--color-text); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--color-text-muted); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--color-accent); }
.footer-bottom { text-align: center; color: #64748b; font-size: 0.85rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* =========================================
 按钮与交互组件
========================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0.8rem 1.6rem; border-radius: var(--radius-md); font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.btn-primary { background: var(--color-primary); color: #0f172a; box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3); }
.btn-primary:hover { background: #38bdf8; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4); }
.btn-outline { border: 1px solid var(--color-primary); color: var(--color-primary); background: transparent; }
.btn-outline:hover { background: rgba(14, 165, 233, 0.1); }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.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: 1.5rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.mt-1 { margin-top: 0.5rem; }
.mb-2 { margin-bottom: 2rem; }

/* =========================================
 表格样式
========================================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: #162032; color: var(--color-accent); font-weight: 500; }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.03); }

/* =========================================
 FAQ Details/Summary
========================================= */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  padding: 1.2rem 0; cursor: pointer; font-weight: 500; color: var(--color-text);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; color: var(--color-accent); transition: transform 0.2s ease; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding-bottom: 1.2rem; margin-bottom: 0; line-height: 1.65; }
.faq-item:focus-within summary { color: var(--color-accent); }

/* =========================================
 列表标记定制
========================================= */
.list-custom li { position: relative; padding-left: 1.8rem; margin-bottom: 0.8rem; }
.list-custom li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 8px; height: 8px;
  background: currentColor; border-radius: 2px; transform: rotate(45deg);
}
.step-list li { position: relative; padding-left: 2.5rem; margin-bottom: 1.2rem; }
.step-list li::before {
  content: attr(data-step); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  background: var(--color-primary); color: #0f172a; border-radius: 50%; font-weight: 600; font-size: 0.9rem;
}

/* =========================================
 SVG 动效核心规则
========================================= */
.svg-anim-star { fill: var(--color-accent); opacity: 0.6; }
.svg-anim-star.twinkle-1 { animation: starPulse 4s ease-in-out infinite; }
.svg-anim-star.twinkle-2 { animation: starPulse 5s ease-in-out infinite 1.5s; }
.svg-anim-star.twinkle-3 { animation: starPulse 6s ease-in-out infinite 0.8s; }

.svg-anim-line {
  stroke: var(--color-primary); stroke-width: 1.5; fill: none; pathLength: 1;
  stroke-dasharray: 1; stroke-dashoffset: 0;
}
.svg-anim-line.draw-loop { animation: drawLine 8s linear infinite; }
.svg-anim-line.draw-loop.delay-1 { animation-delay: 2s; }
.svg-anim-line.draw-loop.delay-2 { animation-delay: 4s; }

@keyframes starPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  15%, 85% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .svg-anim-star, .svg-anim-line { animation: none; opacity: 1; }
}

/* =========================================
 界面示意容器
========================================= */
.mockup-window { background: #0f1524; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 1rem; box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.mockup-header { display: flex; gap: 6px; margin-bottom: 1rem; }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.mockup-dot.accent { background: var(--color-primary); }
.mockup-body { display: flex; flex-direction: column; gap: 12px; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; max-width: 80%; font-size: 0.9rem; }
.msg-in { background: #1e293b; align-self: flex-start; }
.msg-out { background: rgba(14, 165, 233, 0.15); color: var(--color-primary); align-self: flex-end; }
.sync-icon { width: 20px; height: 20px; vertical-align: middle; margin-right: 6px; stroke: var(--color-accent); }
