/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(79, 70, 229, 0.5); }
  50% { box-shadow: 0 0 20px rgba(79, 70, 229, 0.8); }
}

/* Animation utility classes */
.animate-fade-in { animation: fadeIn 0.6s ease-out; }
.animate-slide-up { animation: slideUp 0.6s ease-out; }
.animate-slide-down { animation: slideDown 0.6s ease-out; }
.animate-slide-left { animation: slideLeft 0.6s ease-out; }
.animate-slide-right { animation: slideRight 0.6s ease-out; }
.animate-scale-in { animation: scaleIn 0.5s ease-out; }
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; opacity: 0; animation-fill-mode: forwards; }
.delay-200 { animation-delay: 0.2s; opacity: 0; animation-fill-mode: forwards; }
.delay-300 { animation-delay: 0.3s; opacity: 0; animation-fill-mode: forwards; }
.delay-400 { animation-delay: 0.4s; opacity: 0; animation-fill-mode: forwards; }
.delay-500 { animation-delay: 0.5s; opacity: 0; animation-fill-mode: forwards; }

/* Scroll animations (added via JS) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

/* Loader */
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(79, 70, 229, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Notification toast */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 14px 22px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  min-width: 280px;
  max-width: 400px;
  animation: slideLeft 0.4s ease-out;
}

.toast.hide {
  animation: slideLeft 0.4s ease-out reverse;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i { font-size: 20px; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-content { flex: 1; }
.toast-title { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.toast-message { font-size: 13px; color: var(--text-light); }

.toast-close {
  color: var(--text-lighter);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
}

/* Page transition */
.page-transition {
  animation: fadeIn 0.4s ease-out;
}
