/* ========== 增强动效 ========== */

/* Hero 区域入场动画 */
@keyframes heroTitleIn {
  0% { opacity: 0; transform: translateY(-30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heroSubtitleIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes heroBtnIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* Feature 卡片悬浮呼吸动效 */
@keyframes featureFloat1 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes featureFloat2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes featureFloat3 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* 下载按钮脉冲 */
@keyframes downloadPulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* 下载区域背景光晕 */
@keyframes downloadGlow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.02); }
}

/* Logo 呼吸光效 */
@keyframes logoBreath {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(37, 211, 102, 0.3)); }
  50% { filter: drop-shadow(0 0 8px rgba(37, 211, 102, 0.6)); }
}

/* Hero 标题自动入场 (不用 JS) */
.hero__title.fade-in {
  animation: heroTitleIn 0.8s var(--ease-out) 0.1s both;
}
.hero__subtitle.fade-in {
  animation: heroSubtitleIn 0.7s var(--ease-out) 0.3s both;
}
.btn--hero.fade-in {
  animation: heroBtnIn 0.6s var(--ease-out) 0.5s both;
}

/* 下载按钮脉冲 */
.btn--download {
  animation: downloadPulse 2.5s ease-in-out infinite;
}
.btn--download:hover {
  animation: none;
}

/* Logo 呼吸光效 */
.header__logo-icon {
  animation: logoBreath 3s ease-in-out infinite;
}

/* 下载区域背景光晕 */
.download::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 211, 102, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  animation: downloadGlow 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Fade-in Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* 下载按钮组 */
.download__btn-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn--platform {
  min-width: 180px;
}

@media (max-width: 600px) {
  .btn--platform {
    width: 100%;
    max-width: 260px;
  }
}


/* Hero 统计数据 */
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  opacity: 0;
  transform: translateY(10px);
}

.hero__stats.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

.hero__stat-icon {
  font-size: 14px;
}

.hero__stat-num {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  font-variant-numeric: tabular-nums;
}

.hero__stat-label {
  font-weight: 400;
}

.hero__stat-sep {
  color: rgba(255, 255, 255, 0.2);
}

/* ---------- Responsive: Tablet (768px - 1199px) ---------- */
@media (max-width: 1199px) {
  .hero__title {
    font-size: 44px;
  }

  .hero__subtitle {
    font-size: 18px;
  }

  .features__grid,
  .guide__steps {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .container {
    padding: 0 var(--spacing-lg);
  }

  .features,
  .download,
  .guide {
  position: relative;

    padding: 64px 0;
  }
}

/* ---------- 无障碍: 减少动画偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* 仅禁用 CSS transition，不影响 Canvas 粒子和关键动效 */
}

/* ---------- Responsive: Mobile (< 768px) ---------- */
@media (max-width: 767px) {
  .hero__title {
    font-size: 36px;
    letter-spacing: 1px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  /* P2-修复: 缩小光晕尺寸，避免超小屏裁剪 */
  .hero::before {
    width: 300px;
    height: 300px;
  }

  .btn--hero,
  .btn--download {
    width: 100%;
    max-width: 320px;
  }

  .features__title {
    font-size: 24px;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .guide__steps {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .feature-card {
    width: 100%;
  }

  .download__title,
  .guide__title {
    font-size: 24px;
  }

  .features,
  .download,
  .guide {
  position: relative;

    padding: 48px 0;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  .header__link span {
    display: none;
  }
}

/* ---------- 粒子 Canvas ---------- */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* =====================================================
   滚动条美化（全局，替代系统默认滚动条）
   ===================================================== */

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* Chrome / Edge / Safari */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:active {
  background: rgba(38, 165, 228, 0.6);
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}