/* 设计变量与基础重置 */
:root {
  --color-brand: #25D366;
  --color-brand-hover: #1dab52;
  --color-brand-light: #e6f9ef;
  --color-bg: #ffffff;
  --color-surface: #f8f9fb;
  --color-surface-alt: #f1f3f5;
  --color-text: #111827;
  --color-text-secondary: #374151;
  --color-text-muted: #6b7280;
  --color-border: #e2e6ea;
  --color-shadow: rgba(0, 0, 0, 0.06);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 20px var(--color-shadow);
  --font-main: 'PingFang SC', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --space-section: clamp(3rem, 5vw, 6rem);
  --space-block: 2rem;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
  border-radius: 2px;
}

ul, ol {
  list-style: none;
}

/* 排版系统 */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.section-desc {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

section {
  padding: var(--space-section) 0;
}

section.alt-bg {
  background-color: var(--color-surface);
}

/* 导航与页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-brand);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--color-brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.25);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-secondary);
}

.btn-outline:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
  background: var(--color-brand-light);
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--color-brand-light);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-brand);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.data-table th {
  background: var(--color-surface);
  font-weight: 600;
  color: var(--color-text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table td:first-child {
  font-weight: 500;
  white-space: nowrap;
}

/* 步骤与列表 */
.step-list {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.step-item {
  position: relative;
  padding-left: 2.5rem;
  padding-top: 0.5rem;
}

.step-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--color-brand-light);
  color: var(--color-brand);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.list-block ul {
  display: grid;
  gap: 0.85rem;
}

.list-block li {
  padding-left: 1.75rem;
  position: relative;
}

.list-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  background: var(--color-brand);
  border-radius: 50%;
}

/* 新闻卡片 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 0.925rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.link-btn {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-brand);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.link-btn:hover {
  text-decoration: underline;
}

/* 相关阅读 */
.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.related-item {
  padding: 1rem 0;
  border-bottom: 1px dashed var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.related-item span {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.related-item a {
  color: var(--color-brand);
  font-weight: 500;
  white-space: nowrap;
}

/* FAQ */
.faq-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg);
}

.faq-item summary {
  padding: 1.15rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  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.25rem;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform var(--transition-base);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* 页脚 */
.site-footer {
  background: var(--color-surface-alt);
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-col ul {
  display: grid;
  gap: 0.6rem;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.footer-col a:hover {
  color: var(--color-brand);
}

.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: 1.5rem;
}

/* SVG 动效基础 */
.svg-animate {
  width: 100%;
  height: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.draw-line {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 3.5s ease-out forwards;
}

.draw-line:nth-child(2) { animation-delay: 0.4s; }
.draw-line:nth-child(3) { animation-delay: 0.8s; }
.draw-line:nth-child(4) { animation-delay: 1.2s; }
.draw-line:nth-child(5) { animation-delay: 1.6s; }

.float-node {
  animation: nodeFloat 3s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}

.float-node:nth-child(odd) { animation-duration: 3.2s; animation-delay: 0.2s; }
.float-node:nth-child(even) { animation-duration: 2.8s; animation-delay: 0.6s; }

@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes nodeFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .draw-line, .float-node {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .card-grid, .news-grid, .step-list { grid-template-columns: 1fr; }
  .section-header { text-align: left; }
  .header-inner { flex-wrap: wrap; gap: 1rem; }
}
