/* ============================================================
   animations.css - 动效系统
   网站：kidshoeshop.com
   生成：建站AI · 2026-10-13
   ============================================================ */

/* ===== 1. 页面加载动效 ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-enter {
  animation: fadeInUp var(--duration-slow) var(--ease-out);
}

/* ===== 2. 滚动触发动效 ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

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

/* ===== 3. 悬停动效 ===== */
.hover-lift {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--duration-normal) var(--ease-spring);
}
.hover-scale:hover {
  transform: scale(1.03);
}

/* ===== 4. 聚焦动效 ===== */
.focus-ring {
  transition: box-shadow var(--duration-fast) var(--ease-out);
}
.focus-ring:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

/* ===== 5. 加载骨架屏动画 ===== */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== 6. 光点闪烁动画 ===== */
@keyframes light-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes light-pulse {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* ===== 7. 旋转加载 ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ===== 8. 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
  }

  .light-blink,
  .light-pulse {
    animation: none;
    opacity: 0.5;
  }
}

/* ===== 9. 交互反馈 ===== */
.click-feedback {
  transition: transform var(--duration-fast) var(--ease-spring);
}
.click-feedback:active {
  transform: scale(0.97);
}
