/* 设计变量 */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-accent: #f97316;
  --color-accent-hover: #ea580c;
  --color-midnight: #0f172a;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --space-section: clamp(3rem, 6vw, 5rem);
  --space-container: clamp(1rem, 4vw, 2rem);
}

/* 基础重置 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 排版 */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; color: var(--color-text-muted); }
.mono { font-family: var(--font-mono); font-size: 0.875em; letter-spacing: 0.02em; }

/* 布局容器 */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-container); }
.grid-auto { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .grid-auto.cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-auto.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid-auto.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* 导航 */
.header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); 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: 0.75rem; font-weight: 700; font-size: 1.125rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: none; gap: 1.5rem; }
@media (min-width: 768px) { .nav-list { display: flex; } }
.nav-link { padding: 0.5rem 0; font-weight: 500; color: var(--color-text-muted); transition: color 0.2s; position: relative; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-text); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 2px; background: var(--color-accent); border-radius: 2px; }
.mobile-menu-btn { display: block; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }

/* 组件 */
.section { padding: var(--space-section) 0; }
.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; transition: all 0.2s ease; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-text); background: var(--color-bg); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.icon-box { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: #fff7ed; border-radius: var(--radius-sm); color: var(--color-accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text); white-space: nowrap; }
td { color: var(--color-text-muted); }
tr:last-child td { border-bottom: none; }
details { border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: 0.75rem; overflow: hidden; background: var(--color-surface); }
summary { padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; user-select: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] .faq-body { padding: 0 1.25rem 1rem; }
.faq-body p { margin-bottom: 0; }

/* 焦点样式 */
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }

/* SVG 动效 */
.svg-animate { width: 100%; height: auto; max-width: 600px; margin: 0 auto; }
.float-slow { animation: float 6s ease-in-out infinite; }
.float-medium { animation: float 8s ease-in-out infinite; }
.float-fast { animation: float 5s ease-in-out infinite; }
.stroke-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawStroke 3s ease forwards; }
.pulse-dot { animation: pulseDot 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drawStroke { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes pulseDot { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }
@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; } }

/* 页脚 */
.footer { background: var(--color-midnight); color: #cbd5e1; padding: 3rem 0 2rem; margin-top: var(--space-section); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand p { color: #94a3b8; font-size: 0.875rem; margin-top: 0.5rem; }
.footer-title { color: #fff; font-weight: 600; margin-bottom: 1rem; font-size: 0.95rem; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #94a3b8; transition: color 0.2s; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; margin-top: 2rem; padding-top: 1.5rem; text-align: center; font-size: 0.8rem; color: #64748b; }
