/* 设计变量与基础重置 */
:root {
  --color-bg: #f7faf9;
  --color-surface: #ffffff;
  --color-surface-alt: #edf5f0;
  --color-text: #112b24;
  --color-text-muted: #5a7a6f;
  --color-primary-dark: #0b3d2e;
  --color-primary-mid: #15804a;
  --color-primary-light: #86efac;
  --color-accent: #d9f99d;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(11, 61, 46, 0.06);
  --shadow-hover: 0 8px 32px rgba(11, 61, 46, 0.10);
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: var(--font-main);
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

*, *::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);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 排版系统 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.text-display { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.text-headline { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; font-weight: 600; margin-bottom: var(--space-sm); }
.text-body { font-size: clamp(1rem, 1.2vw + 0.5rem, 1.125rem); color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.section-pad { padding: var(--space-xl) 0; }
.grid-gap { gap: var(--space-md); }

/* 导航与页头 */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(247, 250, 249, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(11, 61, 46, 0.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-weight: 700; font-size: 1.125rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: var(--space-md); }
.nav-link { font-size: 0.95rem; padding: 0.5rem 0; border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-primary-dark); border-color: var(--color-primary-mid); }

/* 按钮组件 */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; border: none; }
.btn-primary { background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-mid) 100%); color: #fff; box-shadow: 0 4px 12px rgba(21, 128, 74, 0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(21, 128, 74, 0.35); }
.btn-outline { background: transparent; border: 2px solid var(--color-primary-dark); color: var(--color-primary-dark); }
.btn-outline:hover { background: rgba(21, 128, 74, 0.05); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; border-radius: var(--radius-sm); }

/* 卡片与网格 */
.card { background: var(--color-surface); border-radius: var(--radius-lg); padding: var(--space-md); box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.update-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-md); }

/* 表格样式 */
.data-table { width: 100%; border-collapse: collapse; margin-top: var(--space-sm); }
.data-table th, .data-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid rgba(11, 61, 46, 0.1); }
.data-table th { font-weight: 600; background: var(--color-surface-alt); }
.data-table tr:last-child td { border-bottom: none; }

/* 表单与交互控件 */
details { background: var(--color-surface); border-radius: var(--radius-md); margin-bottom: var(--space-sm); border: 1px solid rgba(11, 61, 46, 0.08); overflow: hidden; }
summary { padding: var(--space-sm) var(--space-md); cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { padding: 0 var(--space-md) var(--space-sm); color: var(--color-text-muted); line-height: 1.7; }

/* 链接列表 */
.link-list li { margin-bottom: var(--space-xs); display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px dashed rgba(11, 61, 46, 0.1); }
.link-list a:hover { color: var(--color-primary-mid); text-decoration: underline; }

/* 页脚 */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: var(--space-xl) 0 var(--space-lg); margin-top: var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: var(--space-sm); }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--space-md); text-align: center; font-size: 0.875rem; opacity: 0.8; }

/* 响应式适配 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: var(--space-sm) 0; gap: var(--space-sm); }
  .nav-list { flex-wrap: wrap; justify-content: center; }
  .text-display { font-size: 2rem; }
  .section-pad { padding: var(--space-lg) 0; }
}

/* SVG 动效核心规则 */
.svg-anim { width: 100%; height: auto; max-width: 100%; overflow: visible; }
.svg-anim circle, .svg-anim path, .svg-anim line, .svg-anim rect { vector-effect: non-scaling-stroke; }
.anim-ring { animation: draw-ring 6s ease-in-out infinite alternate; }
.anim-arc { animation: draw-arc 8s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate; }
.anim-pulse { animation: soft-pulse 4s ease-in-out infinite alternate; }
.anim-float { animation: gentle-float 5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }

@keyframes draw-ring {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes draw-arc {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes soft-pulse {
  0% { opacity: 0.4; }
  100% { opacity: 0.8; }
}
@keyframes gentle-float {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-6px) rotate(2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .anim-ring, .anim-arc, .anim-pulse, .anim-float { animation: none !important; }
  html { scroll-behavior: auto; }
}
:focus-visible { outline: 3px solid var(--color-primary-light); outline-offset: 2px; border-radius: 4px; }
