/* ═══════════════════════════════════════════════
   Chrome 安全下载站 - 全局样式
   ═══════════════════════════════════════════════ */

/* ── CSS 变量 ── */
:root {
  /* 色彩 */
  --bg-primary: #f6fffe;
  --bg-secondary: #f0fdf4;
  --bg-card: #ffffff;
  --color-forest: #059669;
  --color-emerald: #34d399;
  --color-text-primary: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #d1fae5;
  --color-border-hover: #a7f3d0;
  --color-tip-bg: #ecfdf5;
  --color-tip-border: #a7f3d0;

  /* 渐变 */
  --gradient-hero: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 100%);
  --gradient-btn: linear-gradient(135deg, #059669, #10b981);
  --gradient-cta: linear-gradient(135deg, #059669 0%, #10b981 100%);

  /* 阴影 */
  --shadow-card: 0 4px 20px rgba(5, 150, 105, 0.06);
  --shadow-card-hover: 0 8px 30px rgba(5, 150, 105, 0.12);
  --shadow-nav: 0 2px 12px rgba(5, 150, 105, 0.08);
  --shadow-btn-hover: 0 4px 16px rgba(5, 150, 105, 0.3);

  /* 间距 */
  --section-pad-y: 80px;
  --section-pad-y-mobile: 48px;
  --card-radius: 20px;
  --btn-radius: 12px;
  --max-width: 1200px;
  --grid-gap: 24px;

  /* 字体 */
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-en: "Inter", "SF Pro Display", -apple-system, sans-serif;
}

/* ── 重置 ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  color: var(--color-text-primary);
  background: var(--bg-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── 叶脉底纹 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(52, 211, 153, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 500px 300px at 80% 90%, rgba(5, 150, 105, 0.025) 0%, transparent 70%),
    radial-gradient(ellipse 400px 600px at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ── 排版 ── */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  color: var(--color-text-secondary);
  font-size: 1rem;
}

a {
  color: var(--color-forest);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── 布局工具类 ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}

.section-bg-primary { background: var(--bg-primary); }
.section-bg-secondary { background: var(--bg-secondary); }
.section-bg-hero { background: var(--gradient-hero); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  color: var(--color-forest);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
}

/* ── 进入动效 ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Spin 动画 ── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── 脉动动画 ── */
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ── 响应式 ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --section-pad-y: var(--section-pad-y-mobile);
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }

  .grid-3,
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 16px;
  }
}
