/* Club Everywhere - Custom Animations */
/* Performance-optimized animations for nightlife app */

/* Page transitions */
.animate-fade-in-up {
  animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-fade-out-down {
  animation: fadeOutDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-slide-out-left {
  animation: slideOutLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal animations */
.animate-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.animate-scale-out {
  animation: scaleOut 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button interactions */
.animate-press {
  animation: press 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Micro-interactions */
.animate-bounce-gentle {
  animation: bounceGentle 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

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

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

/* Loading states */
.animate-skeleton {
  animation: skeleton 1.5s ease-in-out infinite;
}

.animate-success-check {
  animation: successCheck 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-error-shake {
  animation: errorShake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Stagger animations */
.animate-stagger-1 { animation-delay: 0.05s; }
.animate-stagger-2 { animation-delay: 0.1s; }
.animate-stagger-3 { animation-delay: 0.15s; }
.animate-stagger-4 { animation-delay: 0.2s; }
.animate-stagger-5 { animation-delay: 0.25s; }
.animate-stagger-6 { animation-delay: 0.3s; }

/* Keyframe definitions */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

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

@keyframes press {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.98);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes bounceGentle {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-4px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(4px);
  }
}

@keyframes glow {
  from {
    box-shadow: 0 0 5px rgba(217, 42, 47, 0.5);
  }
  to {
    box-shadow: 0 0 20px rgba(217, 42, 47, 0.8);
  }
}

@keyframes pulseGentle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes skeleton {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes successCheck {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes errorShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .animate-fade-in-up,
  .animate-fade-out-down,
  .animate-slide-in-right,
  .animate-slide-out-left,
  .animate-scale-in,
  .animate-scale-out,
  .animate-fade-in,
  .animate-bounce-gentle,
  .animate-shake,
  .animate-glow,
  .animate-pulse-gentle,
  .animate-skeleton,
  .animate-success-check,
  .animate-error-shake {
    animation: none;
  }
  
  .animate-hover-lift:hover {
    transform: none;
    box-shadow: none;
  }
}

/* Performance optimizations */
.animate-fade-in-up,
.animate-slide-in-right,
.animate-scale-in {
  will-change: transform, opacity;
}

.animate-hover-lift {
  will-change: transform, box-shadow;
}

/* Brand-specific animations */
.brand-pulse {
  animation: brandPulse 2s ease-in-out infinite;
}

@keyframes brandPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217, 42, 47, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(217, 42, 47, 0);
  }
}

/* Loading spinner enhancements */
.spinner-enhanced {
  animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

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

/* Card entrance animations */
.card-entrance {
  animation: cardEntrance 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* List item stagger animation */
.list-item {
  animation: listItemEnter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

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