:root {
  --color-bg: #ffffff;
  --color-surface: #f8f9fa;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-accent: #25D366;
  --color-accent-hover: #1da851;
  --color-border: #e5e7eb;
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 16px rgba(0,0,0,0.06);
  --spacing-section: clamp(4rem, 8vw, 6.5rem);
  --spacing-container: clamp(1.5rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--spacing-container); }
section { padding: var(--spacing-section) 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 2rem; }
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 4rem; }

h1, h2, h3, h4 { line-height: 1.25; margin-bottom: 0.8em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 2vw, 1.35rem); font-weight: 600; }
p { margin-bottom: 1.2em; color: var(--color-text); }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: #0f0f0f; }

header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
nav ul { display: flex; list-style: none; gap: 1.6rem; }
nav a { font-size: 0.95rem; font-weight: 500; color: var(--color-text-muted); }
nav a:hover, nav a[aria-current="page"] { color: var(--color-accent); }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.8rem; border-radius: var(--radius-md);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid transparent;
}
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(37,211,102,0.25); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }

.card {
  background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 2rem; border: 1px solid var(--color-border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-icon {
  width: 48px; height: 48px; background: #f0fdf4; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; color: var(--color-accent);
}
.card-meta { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 1rem; display: block; }
.card-btn { margin-top: 1rem; display: inline-block; font-size: 0.9rem; font-weight: 600; color: var(--color-accent); }

table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; font-size: 0.95rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { font-weight: 600; background: var(--color-surface); }
tr:hover td { background: rgba(0,0,0,0.015); }

details {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); margin-bottom: 1rem; overflow: hidden;
}
summary {
  padding: 1.2rem; font-weight: 600; cursor: pointer; 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; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 1.2rem 1.2rem; color: var(--color-text-muted); line-height: 1.65; }

.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 1rem; color: var(--color-text); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 3rem 0; margin-top: 2rem; font-size: 0.9rem; color: var(--color-text-muted); }
.copyright { text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); font-size: 0.85rem; }

/* SVG Animations */
@keyframes wave-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.svg-wave path { animation: wave-y 4.5s ease-in-out infinite; }
.svg-wave path:nth-child(2) { animation-delay: 0.7s; }
.svg-wave path:nth-child(3) { animation-delay: 1.4s; }
.svg-wave path:nth-child(4) { animation-delay: 2.1s; }
.svg-wave path:nth-child(5) { animation-delay: 2.8s; }

.svg-draw path, .svg-draw circle, .svg-draw rect {
  stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: draw-line 3.5s ease forwards;
}

@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; }
  .svg-wave path, .svg-draw path { animation: none !important; }
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav ul {
    display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--color-bg); padding: 1.5rem; border-bottom: 1px solid var(--color-border);
  }
  nav ul.is-open { display: flex; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
}
