/* ============================================
   ENHANCED ANIMATIONS
   ============================================ */

/* Animated Gradient Background */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animated-gradient {
  background: linear-gradient(-45deg, #1a1aff, #4e4eff, #1a1aff, #4e4eff);
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
}

/* Gradient Text Animation */
@keyframes gradient-text {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.gradient-text {
  background: linear-gradient(90deg, #1a1aff, #4e4eff, #1a1aff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-text 3s linear infinite;
  display: inline-block;
}

/* Button Ripple Effect */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
  width: 300px;
  height: 300px;
}

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

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(26, 26, 255, 0.3);
  animation: float-particle 20s infinite ease-in-out;
}

@keyframes float-particle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  25% {
    transform: translate(100px, -100px) scale(1.2);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50px, -200px) scale(0.8);
    opacity: 0.4;
  }
  75% {
    transform: translate(-100px, -50px) scale(1.1);
    opacity: 0.6;
  }
}

/* 3D Tilt Effect */
.tilt-3d {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

/* Glitch Effect */
@keyframes glitch {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
  100% {
    transform: translate(0);
  }
}

.glitch-effect {
  position: relative;
}

.glitch-effect:hover {
  animation: glitch 0.3s infinite;
}

.glitch-effect::before,
.glitch-effect::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-effect::before {
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-effect::after {
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(31px, 9999px, 94px, 0);
  }
  20% {
    clip: rect(54px, 9999px, 66px, 0);
  }
  40% {
    clip: rect(28px, 9999px, 98px, 0);
  }
  60% {
    clip: rect(68px, 9999px, 34px, 0);
  }
  80% {
    clip: rect(45px, 9999px, 78px, 0);
  }
  100% {
    clip: rect(12px, 9999px, 89px, 0);
  }
}

@keyframes glitch-anim2 {
  0% {
    clip: rect(65px, 9999px, 100px, 0);
  }
  20% {
    clip: rect(14px, 9999px, 33px, 0);
  }
  40% {
    clip: rect(88px, 9999px, 15px, 0);
  }
  60% {
    clip: rect(7px, 9999px, 95px, 0);
  }
  80% {
    clip: rect(23px, 9999px, 52px, 0);
  }
  100% {
    clip: rect(76px, 9999px, 41px, 0);
  }
}

/* Wave Animation */
@keyframes wave {
  0% {
    transform: translateX(0) translateZ(0) scaleY(1);
  }
  50% {
    transform: translateX(-25%) translateZ(0) scaleY(0.8);
  }
  100% {
    transform: translateX(-50%) translateZ(0) scaleY(1);
  }
}

.wave-background {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100px;
  background: linear-gradient(90deg, rgba(26, 26, 255, 0.1) 0%, rgba(78, 78, 255, 0.1) 100%);
  animation: wave 10s linear infinite;
  z-index: -1;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

/* Pulse Glow */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(26, 26, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(26, 26, 255, 0.8), 0 0 60px rgba(78, 78, 255, 0.4);
  }
}

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

/* Text Reveal Animation */
@keyframes text-reveal {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.text-reveal {
  animation: text-reveal 1s ease-out forwards;
}

/* Cursor Trail */
.cursor-trail {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease;
}

/* Magnetic Hover Effect */
.magnetic-hover {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Loading Skeleton */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0px,
    #e0e0e0 40px,
    #f0f0f0 80px
  );
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s infinite;
}

[data-theme="dark"] .skeleton {
  background: linear-gradient(
    90deg,
    #2a2a2a 0px,
    #3a3a3a 40px,
    #2a2a2a 80px
  );
  background-size: 200px 100%;
}

/* Scroll Snap */
.scroll-snap {
  scroll-snap-type: y mandatory;
}

.scroll-snap-item {
  scroll-snap-align: start;
}

/* Hover Scale with Shadow */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Rotating Border */
@keyframes rotate-border {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.rotating-border {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
}

.rotating-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #1a1aff, #4e4eff, #1a1aff);
  background-size: 400% 400%;
  border-radius: 10px;
  z-index: -1;
  animation: rotate-border 3s linear infinite, gradient-shift 5s ease infinite;
}

/* Neon Glow */
.neon-glow {
  text-shadow: 
    0 0 5px rgba(26, 26, 255, 0.5),
    0 0 10px rgba(26, 26, 255, 0.5),
    0 0 15px rgba(26, 26, 255, 0.5),
    0 0 20px rgba(26, 26, 255, 0.5);
  animation: neon-pulse 2s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%, 100% {
    text-shadow: 
      0 0 5px rgba(26, 26, 255, 0.5),
      0 0 10px rgba(26, 26, 255, 0.5),
      0 0 15px rgba(26, 26, 255, 0.5),
      0 0 20px rgba(26, 26, 255, 0.5);
  }
  50% {
    text-shadow: 
      0 0 10px rgba(26, 26, 255, 0.8),
      0 0 20px rgba(26, 26, 255, 0.8),
      0 0 30px rgba(26, 26, 255, 0.8),
      0 0 40px rgba(26, 26, 255, 0.8);
  }
}

/* Morphing Blob */
@keyframes morph-blob {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

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

/* Fade In Scale */
@keyframes fade-in-scale {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-scale {
  animation: fade-in-scale 0.6s ease-out forwards;
}

/* Slide In From Sides */
@keyframes slide-in-left {
  0% {
    opacity: 0;
    transform: translateX(-100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  0% {
    opacity: 0;
    transform: translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-left {
  animation: slide-in-left 0.8s ease-out forwards;
}

.slide-in-right {
  animation: slide-in-right 0.8s ease-out forwards;
}

