/* MayurPay - Advanced Animations & VFX */

/* ==================== CSS VARIABLES ==================== */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-soft: 0 8px 32px rgba(31, 38, 135, 0.15);
  --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==================== PAGE LOAD ANIMATIONS ==================== */
@keyframes pageLoad {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(20px);
    filter: blur(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.page-load {
  animation: pageLoad 0.8s var(--ease-out-expo) forwards;
}

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

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

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

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-up { animation: fadeInUp 0.6s var(--ease-out-expo) forwards; }
.fade-in-down { animation: fadeInDown 0.6s var(--ease-out-expo) forwards; }
.fade-in-left { animation: fadeInLeft 0.6s var(--ease-out-expo) forwards; }
.fade-in-right { animation: fadeInRight 0.6s var(--ease-out-expo) forwards; }
.fade-in-scale { animation: fadeInScale 0.5s var(--ease-out-expo) forwards; }

/* ==================== STAGGER ANIMATIONS ==================== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ==================== FLOATING ANIMATION ==================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  50% {
    transform: translateY(-5px) rotate(0deg);
  }
  75% {
    transform: translateY(-15px) rotate(-1deg);
  }
}

.float {
  animation: float 4s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.5s; }
.float-delay-2 { animation-delay: 1s; }
.float-delay-3 { animation-delay: 1.5s; }

/* ==================== PULSE & GLOW ==================== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 20px 10px rgba(102, 126, 234, 0);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5),
                0 0 20px rgba(102, 126, 234, 0.3),
                0 0 40px rgba(102, 126, 234, 0.1);
  }
  50% {
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.8),
                0 0 40px rgba(102, 126, 234, 0.5),
                0 0 80px rgba(102, 126, 234, 0.3);
  }
}

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

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

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

.shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ==================== ROTATE ANIMATIONS ==================== */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

.spin { animation: spin 1s linear infinite; }
.spin-slow { animation: spin-slow 8s linear infinite; }

/* ==================== BOUNCE ANIMATIONS ==================== */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
    animation-timing-function: var(--ease-bounce);
  }
  50% {
    transform: translateY(-20px);
    animation-timing-function: var(--ease-bounce);
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.bounce { animation: bounce 2s infinite; }
.bounce-in { animation: bounce-in 0.6s var(--ease-bounce) forwards; }

/* ==================== SHAKE ANIMATION ==================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

/* ==================== RIPPLE EFFECT ==================== */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}

/* ==================== GLASS MORPHISM ==================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-soft);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ==================== GRADIENT TEXT ==================== */
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-animated {
  background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c, #667eea);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

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

/* ==================== HOVER EFFECTS ==================== */
.hover-lift {
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
  transition: transform 0.3s var(--ease-out-expo);
}

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

.hover-glow {
  transition: box-shadow 0.3s var(--ease-out-expo);
}

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

.hover-rotate {
  transition: transform 0.5s var(--ease-out-expo);
}

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

/* ==================== 3D CARD EFFECT ==================== */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out-expo);
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
}

/* ==================== NEON EFFECT ==================== */
.neon {
  text-shadow: 
    0 0 5px #667eea,
    0 0 10px #667eea,
    0 0 20px #667eea,
    0 0 40px #667eea;
}

.neon-box {
  box-shadow: 
    0 0 5px rgba(102, 126, 234, 0.5),
    0 0 10px rgba(102, 126, 234, 0.3),
    inset 0 0 10px rgba(102, 126, 234, 0.1);
}

/* ==================== PARTICLE BACKGROUND ==================== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(102, 126, 234, 0.3);
  border-radius: 50%;
  animation: float-particle 15s infinite;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ==================== MORPHING BLOB ==================== */
@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  50% {
    border-radius: 50% 60% 30% 60% / 30% 60% 70% 40%;
  }
  75% {
    border-radius: 60% 40% 60% 30% / 70% 30% 50% 60%;
  }
}

.blob {
  animation: morph 8s ease-in-out infinite;
}

/* ==================== LOADING ANIMATIONS ==================== */
@keyframes loading-dots {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.loading-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-gradient);
  margin: 0 4px;
  animation: loading-dots 0.6s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.1s; }
.loading-dot:nth-child(3) { animation-delay: 0.2s; }

/* ==================== PROGRESS BAR ANIMATION ==================== */
@keyframes progress-fill {
  from {
    width: 0%;
  }
}

.progress-animated {
  animation: progress-fill 1.5s ease-out forwards;
}

/* ==================== FLIP ANIMATION ==================== */
@keyframes flip-in {
  from {
    transform: perspective(400px) rotateY(90deg);
    opacity: 0;
  }
  to {
    transform: perspective(400px) rotateY(0deg);
    opacity: 1;
  }
}

.flip-in {
  animation: flip-in 0.6s var(--ease-out-expo) forwards;
  backface-visibility: hidden;
}

/* ==================== SLIDE ANIMATIONS ==================== */
@keyframes slide-in-bottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slide-out-bottom {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.slide-in-bottom {
  animation: slide-in-bottom 0.5s var(--ease-out-expo) forwards;
}

/* ==================== HEARTBEAT ANIMATION ==================== */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.05);
  }
}

.heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

/* ==================== WAVE ANIMATION ==================== */
@keyframes wave {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  25% {
    transform: translateX(-5px) translateY(-5px);
  }
  50% {
    transform: translateX(0) translateY(-10px);
  }
  75% {
    transform: translateX(5px) translateY(-5px);
  }
}

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

/* ==================== TILT EFFECT ==================== */
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* ==================== SCROLL REVEAL ==================== */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s var(--ease-out-expo);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== PARALLAX EFFECT ==================== */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* ==================== CURSOR FOLLOWER ==================== */
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease-out, width 0.3s, height 0.3s;
  mix-blend-mode: difference;
}

.cursor-follower.hover {
  width: 50px;
  height: 50px;
  background: rgba(102, 126, 234, 0.1);
}

/* ==================== NOTIFICATION ANIMATIONS ==================== */
@keyframes notification-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notification-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.notification-in {
  animation: notification-in 0.4s var(--ease-out-expo) forwards;
}

.notification-out {
  animation: notification-out 0.3s var(--ease-in-out) forwards;
}

/* ==================== MODAL ANIMATIONS ==================== */
@keyframes modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modal-content-in {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-backdrop-in {
  animation: modal-backdrop-in 0.3s ease-out forwards;
}

.modal-content-in {
  animation: modal-content-in 0.4s var(--ease-out-expo) forwards;
}

/* ==================== BUTTON PRESS EFFECT ==================== */
.btn-press {
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn-press:active {
  transform: scale(0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ==================== BORDER ANIMATION ==================== */
@keyframes border-dance {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-border {
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c, #667eea);
  background-size: 300% 100%;
  animation: border-dance 3s ease infinite;
  padding: 2px;
  border-radius: 12px;
}

/* ==================== NUMBER COUNTER ==================== */
@keyframes count-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.count-up {
  animation: count-up 0.5s var(--ease-out-expo) forwards;
}

/* ==================== BLUR REVEAL ==================== */
@keyframes blur-reveal {
  from {
    filter: blur(20px);
    opacity: 0;
  }
  to {
    filter: blur(0);
    opacity: 1;
  }
}

.blur-reveal {
  animation: blur-reveal 0.8s var(--ease-out-expo) forwards;
}

/* ==================== STAGGER LIST ==================== */
.stagger-list > * {
  opacity: 0;
  animation: fadeInUp 0.5s var(--ease-out-expo) forwards;
}

.stagger-list > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-list > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-list > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-list > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-list > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-list > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-list > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-list > *:nth-child(8) { animation-delay: 0.8s; }

/* ==================== RESPONSIVE ANIMATIONS ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== MOBILE OPTIMIZATIONS ==================== */
@media (max-width: 640px) {
  .float {
    animation-duration: 6s;
  }
  
  .card-3d:hover {
    transform: none;
  }
}
