/* ===== KEYFRAME ANIMATIONS ===== */

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

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

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

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

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

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

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

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* ===== ANIMATION UTILITIES ===== */

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out;
}

.animate-slideInUp {
  animation: slideInUp 0.3s ease-in-out;
}

.animate-slideInDown {
  animation: slideInDown 0.3s ease-in-out;
}

.animate-slideInLeft {
  animation: slideInLeft 0.3s ease-in-out;
}

.animate-slideInRight {
  animation: slideInRight 0.3s ease-in-out;
}

.animate-scaleIn {
  animation: scaleIn 0.3s ease-in-out;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* ===== HOVER ANIMATIONS ===== */

.hover-lift {
  transition: var(--transition-transform);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale {
  transition: var(--transition-transform);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-color-shift {
  transition: var(--transition-color);
}

.hover-color-shift:hover {
  color: var(--color-primary);
}

.hover-glow {
  transition: var(--transition-shadow);
}

.hover-glow:hover {
  box-shadow: var(--shadow-card-hover);
}

/* ===== LOADING SKELETON ===== */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-secondary) 0%,
    var(--color-bg-tertiary) 50%,
    var(--color-bg-secondary) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

.skeleton-card {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 1rem;
  margin: var(--spacing-sm) 0;
  border-radius: var(--radius-md);
}

.skeleton-text-sm {
  height: 0.75rem;
}

.skeleton-text-lg {
  height: 1.25rem;
}

/* ===== TRANSITION HELPERS ===== */

.transition-all {
  transition: var(--transition-default);
}

.transition-transform {
  transition: var(--transition-transform);
}

.transition-color {
  transition: var(--transition-color);
}

.transition-opacity {
  transition: var(--transition-opacity);
}

.transition-shadow {
  transition: var(--transition-shadow);
}

/* ===== PAGE LOAD ANIMATION ===== */

.page-enter {
  animation: fadeIn 0.3s ease-in-out;
}

.page-exit {
  animation: fadeIn 0.3s ease-in-out reverse;
}

/* ===== STAGGERED ANIMATION ===== */

.stagger-item {
  opacity: 0;
  animation: slideInUp 0.3s ease-in-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.05s; }
.stagger-item:nth-child(2) { animation-delay: 0.1s; }
.stagger-item:nth-child(3) { animation-delay: 0.15s; }
.stagger-item:nth-child(4) { animation-delay: 0.2s; }
.stagger-item:nth-child(5) { animation-delay: 0.25s; }
.stagger-item:nth-child(n+6) { animation-delay: 0.3s; }

/* ===== ERROR/SUCCESS ANIMATIONS ===== */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.animate-shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 50;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.success-icon {
  animation: checkmark 0.5s ease-in-out forwards;
}
