/* ===== 关键帧 ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.6; }
  100% { transform: scale(2.5); opacity: 0; }
}

@keyframes matchPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(123,104,238,0.4); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 12px rgba(123,104,238,0); }
}

@keyframes progressFill {
  from { width: 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes countUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes vsFlash {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.95); }
}

/* ===== 页面过渡 ===== */
.page-enter {
  animation: slideInRight var(--duration-slow) var(--ease-out) both;
}

.page-exit {
  animation: slideOutLeft var(--duration-slow) var(--ease-out) both;
}

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

.page-exit-back {
  animation: slideOutRight var(--duration-slow) var(--ease-out) both;
}

/* ===== 通用动画类 ===== */
.animate-fadeIn { animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.animate-fadeInUp { animation: fadeInUp var(--duration-normal) var(--ease-out) both; }
.animate-scaleIn { animation: scaleIn var(--duration-normal) var(--ease-spring) both; }
.animate-bounceIn { animation: bounceIn 0.5s var(--ease-out) both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-matchPulse { animation: matchPulse 1.5s ease-in-out infinite; }

/* 延迟 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== Skeleton骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
