/* === 车机壁纸 - 动画效果 === */

/* 淡入 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.4s ease both; }

/* 向上滑入 */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp 0.5s ease both; }

/* 缩放进入 */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
.animate-scale-in { animation: scaleIn 0.3s ease both; }

/* 卡片延迟动画 */
.wallpaper-card {
  animation: fadeIn 0.5s ease both;
}

/* 瀑布流模式下的 stagger */
.wallpaper-grid .wallpaper-card:nth-child(1) { animation-delay: 0.02s; }
.wallpaper-grid .wallpaper-card:nth-child(2) { animation-delay: 0.04s; }
.wallpaper-grid .wallpaper-card:nth-child(3) { animation-delay: 0.06s; }
.wallpaper-grid .wallpaper-card:nth-child(4) { animation-delay: 0.08s; }
.wallpaper-grid .wallpaper-card:nth-child(5) { animation-delay: 0.10s; }
.wallpaper-grid .wallpaper-card:nth-child(6) { animation-delay: 0.12s; }
.wallpaper-grid .wallpaper-card:nth-child(7) { animation-delay: 0.14s; }
.wallpaper-grid .wallpaper-card:nth-child(8) { animation-delay: 0.16s; }
.wallpaper-grid .wallpaper-card:nth-child(n+9) { animation-delay: 0.18s; }

/* 滚动驱动动画 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 脉冲加载 */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s ease infinite; }

/* 旋转加载 */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 0.8s linear infinite; }

/* 弹跳 */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.animate-bounce { animation: bounce 0.6s ease infinite; }

/* 下载按钮波纹 */
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* Hover 浮动 */
.hover-float {
  transition: transform var(--transition);
}
.hover-float:hover {
  transform: translateY(-4px);
}

/* 过渡效果 */
.transition-all {
  transition: all var(--transition);
}

/* 低性能设备减少动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
