/* === 设计变量 === */
:root {
  --color-bg: #F7F8FA;
  --color-surface: #FFFFFF;
  --color-text: #1A1B1E;
  --color-text-secondary: #5F6368;
  --color-border: #E2E5E9;
  --color-accent: #25D366;
  --color-accent-hover: #1EBE57;
  --color-accent-light: rgba(37, 211, 102, 0.12);
  --font-main: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.09);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); max-width: 65ch; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
section { padding: var(--space-xxl) 0; }
.section-sub { color: var(--color-text-secondary); font-size: 1.05rem; margin-bottom: var(--space-lg); max-width: 50ch; }

/* === 页头与页脚 === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: var(--space-md); }
.nav a { padding: 6px 0; border-bottom: 2px solid transparent; font-size: 0.95rem; color: var(--color-text-secondary); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--color-text); border-color: var(--color-accent); }
.footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-lg) 0; margin-top: var(--space-xl); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-md); font-size: 0.9rem; color: var(--color-text-secondary); }
.footer-links a { margin-left: var(--space-sm); }
.footer-links a:hover { color: var(--color-accent); }

/* === 按钮与组件 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-md); font-weight: 500; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; border: none; font-size: 1rem;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  padding: var(--space-md); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr)); gap: var(--space-lg); align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--space-md); }

/* === 表格 === */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: var(--space-md) 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--color-surface); min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-accent-light); }

/* === FAQ (Details/Summary) === */
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.faq-summary {
  padding: 16px 20px; cursor: pointer; font-weight: 500; display: flex; justify-content: space-between; align-items: center;
  list-style: none; user-select: none;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s ease; flex-shrink: 0; margin-left: 12px; }
details[open] .faq-summary::after { transform: rotate(45deg); }
.faq-summary:hover { color: var(--color-accent); }
.faq-content { padding: 0 20px 16px; color: var(--color-text-secondary); line-height: 1.6; }

/* === SVG 动效 === */
.wave-svg { width: 100%; height: auto; overflow: visible; }
.wave-path {
  fill: none; stroke: var(--color-accent); stroke-width: 2.5; stroke-linecap: round;
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
}
@keyframes wave-drift {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-8px); opacity: 1; }
}
@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  20%, 100% { stroke-dashoffset: 0; }
}
.anim-wave-1 { animation: wave-drift 7s ease-in-out infinite; }
.anim-wave-2 { animation: wave-drift 8.5s ease-in-out infinite -3s; }
.anim-wave-3 { animation: wave-drift 6s ease-in-out infinite -5s; }
.anim-draw { animation: draw-stroke 6s ease-out infinite alternate; }

/* 减少动态效果偏好 */
@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;
  }
  .anim-wave-1, .anim-wave-2, .anim-wave-3, .anim-draw { animation: none !important; }
}

/* === 响应式调整 === */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  section { padding: var(--space-xl) 0; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links a { margin: 0 var(--space-xs); }
}
