/* Custom animations and effects */
@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

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

@keyframes gradient-flow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.animate-pulse-soft {
  animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-slide-in-up {
  animation: slide-in-up 0.5s ease-out;
}

.animate-gradient-flow {
  animation: gradient-flow 3s ease infinite;
  background-size: 200% 200%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Drag and drop styles */
.drag-over {
  border-color: rgb(96 165 250);
  background-color: rgb(239 246 255 / 0.5);
}

.drag-active {
  border-color: rgb(59 130 246);
  background-color: rgb(219 234 254 / 0.5);
  transform: scale(1.02);
}

/* Progress bar animation */
.progress-bar {
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glass effect */
.glass-effect {
  backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.125);
}

/* Image comparison */
.image-compare {
  position: relative;
  overflow: hidden;
}

.image-compare::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, #06b6d4, #10b981);
  z-index: 10;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Hover effects */
.hover-lift {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Success animation */
@keyframes success-checkmark {
  0% {
    stroke-dasharray: 0 100;
  }
  100% {
    stroke-dasharray: 100 0;
  }
}

.success-checkmark {
  animation: success-checkmark 0.6s ease-in-out;
}

/* Loading spinner */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spin-slow {
  animation: spin-slow 2s linear infinite;
}

/* File size badge */
.file-size-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: white;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Format badge */
.format-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.format-jpeg {
  background-color: rgb(254 243 199);
  color: rgb(154 52 18);
  border: 1px solid rgb(253 230 138);
}

.format-png {
  background-color: rgb(220 252 231);
  color: rgb(22 101 52);
  border: 1px solid rgb(187 247 208);
}

.format-webp {
  background-color: rgb(243 232 255);
  color: rgb(107 33 168);
  border: 1px solid rgb(221 214 254);
}