/* =========================================
   设计变量 (Design Tokens)
   ========================================= */
:root {
  /* 品牌色彩体系 - 浅色编辑风 + 克制中性灰阶 */
  --color-brand-primary: #25D366;       /* WhatsApp Green */
  --color-brand-dark: #075E54;          /* Deep Teal */
  --color-brand-accent: #DCF8C6;        /* Chat Bubble Light */
  
  /* 中性灰阶 (Grayscale) */
  --color-bg-body: #FFFFFF;
  --color-bg-secondary: #F9FAFB;
  --color-bg-card: #FFFFFF;
  
  --color-text-main: #1A1A1A;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --color-border-light: #E5E7EB;
  --color-border-strong: #D1D5DB;

  /* 字体搭配：衬线标题 + 无衬线正文 */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-serif: 'Playfair Display', "Noto Serif SC", Georgia, "Times New Roman", serif;

  /* 间距与尺寸 */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);

  /* 布局最大宽度 */
  --max-width: 1200px;
}

/* =========================================
   基础重置与排版 (Typography & Reset)
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-main);
  margin-top: 0;
  text-wrap: balance;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 全局容器 */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

@media (min-width: 768px) {
  .container {
    padding-left: calc(var(--space-lg) * 1.5);
    padding-right: calc(var(--space-lg) * 1.5);
  }
}

/* 流体字号 */
.text-hero-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
}

.text-section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-md);
}

/* =========================================
   布局辅助 (Layout Helpers)
   ========================================= */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-auto-fill {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-padding {
  padding-top: var(--space-xxl);
  padding-bottom: var(--space-xxl);
}

.bg-gray {
  background-color: var(--color-bg-secondary);
}

/* =========================================
   导航与页头 (Header & Nav)
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-md) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-main);
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.main-nav ul {
  display: none;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .main-nav ul {
    display: flex;
  }
}

.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: var(--space-sm) 0;
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-text-main);
}

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-brand-primary);
}

/* =========================================
   按钮 (Buttons)
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-brand-primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-primary:hover {
  background-color: #20BD5A;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-main);
  border: 1px solid var(--color-border-strong);
}

.btn-secondary:hover {
  border-color: var(--color-text-main);
  background-color: #F3F4F6;
}

/* =========================================
   核心组件 (Components)
   ========================================= */

/* 卡片 */
.card {
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-border-strong);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-md);
  color: var(--color-brand-primary);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* 链接列表 */
.link-list li {
  margin-bottom: var(--space-sm);
  padding-left: 1.25rem;
  position: relative;
}

.link-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--color-brand-primary);
  border-radius: 50%;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  white-space: nowrap;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  background-color: var(--color-bg-secondary);
  font-weight: 600;
  color: var(--color-text-main);
}

td {
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--color-border-light);
}

.faq-item summary {
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  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.5rem;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

/* 动态卡片 */
.article-card {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.article-content {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  display: block;
}

.article-card h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.article-card p {
  font-size: 0.95rem;
  flex-grow: 1;
}

.article-link {
  color: var(--color-brand-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 下载区块 */
.download-box {
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
}

.download-info {
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.install-steps {
  display: grid;
  gap: var(--space-md);
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  text-align: left;
}

.step-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.step-number {
  background-color: var(--color-brand-primary);
  color: #FFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* 页脚 */
.site-footer {
  background-color: #111827;
  color: #D1D5DB;
  padding: var(--space-xxl) 0 var(--space-lg);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: #FFFFFF;
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: var(--space-lg);
  text-align: center;
  color: #6B7280;
  font-size: 0.85rem;
}

/* =========================================
   SVG 动效 (Animations)
   ========================================= */

/* 同心轨道呼吸 */
.orbit-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 500px;
  margin: 0 auto;
}

.orbit-circle {
  fill: none;
  stroke-linecap: round;
}

.orbit-1 {
  animation: orbit-spin 12s linear infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.orbit-2 {
  animation: orbit-spin 18s linear infinite reverse;
  transform-origin: center;
  transform-box: fill-box;
}

.orbit-3 {
  animation: orbit-pulse 8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.center-core {
  animation: core-glow 6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit-pulse {
  0%, 100% { opacity: 0.3; stroke-width: 2px; transform: scale(0.98); }
  50% { opacity: 0.8; stroke-width: 4px; transform: scale(1.02); }
}

@keyframes core-glow {
  0%, 100% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* 描边绘制动效 */
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: path-draw 4s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes path-draw {
  0% { stroke-dashoffset: 1; stroke-width: 1px; }
  50% { stroke-width: 2px; }
  100% { stroke-dashoffset: 0; stroke-width: 2px; }
}

/* 减少动态效果 */
@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;
  }
}
