/* Enhanced Animations and Visual Effects */

/* Pulse glow effect */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px hsl(25, 95%, 53% / 0.3);
  }
  50% {
    box-shadow: 0 0 40px hsl(25, 95%, 53% / 0.6), 0 0 60px hsl(25, 95%, 53% / 0.3);
  }
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Gradient text animation - optimized */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text-animated {
  background: linear-gradient(90deg, hsl(25, 95%, 53%), hsl(45, 95%, 55%), hsl(195, 75%, 35%), hsl(25, 95%, 53%));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 5s ease infinite;
  will-change: background-position;
}

/* Floating animation - optimized for performance */
@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-20px) rotate(2deg);
  }
  66% {
    transform: translateY(10px) rotate(-2deg);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
  will-change: transform;
}

/* Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  .float-animation,
  .pulse-glow,
  .gradient-text-animated,
  .spin-slow {
    animation: none;
  }
}

/* Spin animation */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin-slow {
  animation: spin 20s linear infinite;
}

/* Bounce in animation */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(50px);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Slide in from sides */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
  animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover lift effect */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.hover-lift:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.25);
}

/* Glow on hover */
.glow-on-hover {
  transition: box-shadow 0.3s, transform 0.3s;
}

.glow-on-hover:hover {
  box-shadow: 0 0 30px hsl(25, 95%, 53% / 0.5), 0 0 60px hsl(25, 95%, 53% / 0.3);
  transform: scale(1.05);
}

/* Magnetic effect */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text reveal animation */
@keyframes textReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0% 0);
  }
}

.text-reveal {
  animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card flip effect */
.card-flip {
  perspective: 1000px;
}

.card-flip-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
  transform: rotateY(5deg);
}

/* Shine effect */
@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s;
}

.shine-effect:hover::after {
  animation: shine 0.6s;
}

/* Gradient border animation */
@keyframes borderGlow {
  0%, 100% {
    border-color: hsl(25, 95%, 53% / 0.3);
    box-shadow: 0 0 20px hsl(25, 95%, 53% / 0.2);
  }
  50% {
    border-color: hsl(25, 95%, 53% / 0.6);
    box-shadow: 0 0 40px hsl(25, 95%, 53% / 0.4);
  }
}

.border-glow {
  animation: borderGlow 3s ease-in-out infinite;
}

/* Loading spinner */
@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(249, 115, 22, 0.1);
  border-top-color: hsl(25, 95%, 53%);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

/* Particle effect background */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: hsl(25, 95%, 53% / 0.3);
  border-radius: 50%;
  animation: particleFloat 15s infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) scale(1);
    opacity: 0;
  }
}

/* Smooth page transitions */
.page-transition {
  animation: fadeIn 0.5s ease-in-out;
}

/* Interactive input focus */
.input-enhanced:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 4px hsl(25, 95%, 53% / 0.1), 0 8px 24px -4px hsl(25, 95%, 53% / 0.2);
}

/* 3D card effect */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s;
}

.card-3d:hover {
  transform: rotateX(5deg) rotateY(5deg);
}

/* Neon glow effect */
.neon-glow {
  text-shadow: 
    0 0 10px hsl(25, 95%, 53%),
    0 0 20px hsl(25, 95%, 53%),
    0 0 30px hsl(25, 95%, 53%);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Morphing gradient */
@keyframes morphGradient {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.morph-gradient {
  background: var(--gradient-primary);
  animation: morphGradient 8s ease-in-out infinite;
}

/* Input glow effect */
.input-glow .input {
  box-shadow: 0 0 0 4px hsl(25, 95%, 53% / 0.1), 0 8px 24px -4px hsl(25, 95%, 53% / 0.2);
  border-color: hsl(25, 95%, 53%);
}

/* Ripple effect */
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced product card */
.product-card-enhanced {
  position: relative;
  overflow: hidden;
}

.product-card-enhanced::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(249, 115, 22, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.product-card-enhanced:hover::after {
  opacity: 1;
}

/* Badge pulse */
.badge-pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Gradient border animation */
.gradient-border {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--gradient-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderGlow 3s ease-in-out infinite;
}

