/* ================================
   WhatsApp 官网共享样式表
   设计系统：紫粉双调 / 玻璃层次 / 圆体亲和
   ================================ */

:root {
  /* 色彩变量 */
  --color-primary: #7c3aed;
  --color-primary-light: #a78bfa;
  --color-secondary: #ec4899;
  --color-accent: #f472b6;
  --color-text-main: #1e293b;
  --color-text-sub: #475569;
  --color-text-muted: #64748b;
  --color-bg-base: #f8fafc;
  --color-surface-glass: rgba(255, 255, 255, 0.65);
  --color-border-glass: rgba(255, 255, 255, 0.5);
  --color-link-hover: #6d28d9;
  
  /* 间距与尺寸 */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* 排版 */
  --font-main: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --text-scale-body: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  --text-scale-h1: clamp(2rem, 1.5rem + 2.5vw, 3.2rem);
  --text-scale-h2: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-scale-h3: clamp(1.2rem, 1rem + 1vw, 1.5rem);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  font-size: var(--text-scale-body);
  line-height: 1.75;
  color: var(--color-text-main);
  background-color: var(--color-bg-base);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ================================
   布局组件
   ================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--text-scale-h2);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: var(--color-text-main);
}

.section-desc {
  font-size: var(--text-scale-body);
  color: var(--color-text-sub);
  max-width: 700px;
  margin: 0 auto;
}

/* 玻璃拟态卡片 */
.glass-panel {
  background: var(--color-surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.08);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  text-decoration: none;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
  filter: brightness(1.05);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary-light);
  color: var(--color-primary);
}

.btn-outline:hover {
  background: rgba(124, 58, 237, 0.08);
}

/* 网格与分屏 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-lg);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  height: 100%;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
  border-radius: 10px;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.8;
}

.feature-title {
  font-size: var(--text-scale-h3);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.feature-text {
  color: var(--color-text-sub);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 表格样式 */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  min-width: 600px;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

th {
  background: #f1f5f9;
  font-weight: 600;
  color: var(--color-text-main);
}

td {
  color: var(--color-text-sub);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #faf5ff;
}

/* 列表与步骤 */
.step-list {
  list-style: none;
  counter-reset: step-counter;
}

.step-list li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.step-list li::before {
  counter-increment: step-counter;
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* FAQ / Details */
.faq-item {
  margin-bottom: var(--space-md);
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: var(--space-md);
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--color-text-sub);
  line-height: 1.75;
}

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  height: 32px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: var(--space-md);
  font-weight: 500;
}

.main-nav a {
  padding: 0.4rem 0;
  position: relative;
}

.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--color-primary);
}

.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  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);
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid #1e293b;
  font-size: 0.9rem;
  color: #64748b;
}

/* ================================
   SVG 动效系统
   ================================ */
.svg-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
}

.progress-ring {
  transform-box: fill-box;
  transform-origin: center;
}

.arc-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s ease;
}

@keyframes arc-draw {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

.animate-arc-1 {
  animation: arc-draw 5s ease-in-out infinite;
  stroke: var(--color-primary);
}

.animate-arc-2 {
  animation: arc-draw 6.5s ease-in-out infinite reverse;
  stroke: var(--color-secondary);
}

.animate-arc-3 {
  animation: arc-draw 7.2s ease-in-out infinite 1s;
  stroke: var(--color-accent);
}

@keyframes gentle-breathe {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

.breathe {
  transform-box: fill-box;
  transform-origin: center;
  animation: gentle-breathe 6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .animate-arc-1, .animate-arc-2, .animate-arc-3, .breathe {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: var(--space-lg) 0;
  }
  .header-inner {
    flex-direction: column;
    height: auto;
    padding: var(--space-sm) 0;
    gap: var(--space-sm);
  }
  .main-nav {
    font-size: 0.9rem;
    gap: var(--space-sm);
  }
}
