/* =========== Animations =========== */

/* Float Animations */
@keyframes float-up-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes float-left-right {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(20px);
  }
}

@keyframes float-diagonal {
  0%, 100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-15px, -15px);
  }
}

@keyframes float-circle {
  0% {
    transform: rotate(0) translateX(10px) rotate(0);
  }
  100% {
    transform: rotate(360deg) translateX(10px) rotate(-360deg);
  }
}

@keyframes float-zigzag {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(15px, -15px);
  }
  50% {
    transform: translate(0, -30px);
  }
  75% {
    transform: translate(-15px, -15px);
  }
}

/* Typing Animation */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: var(--deep-purple); }
}

/* Fade Animations */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale Animations */
@keyframes scaleIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* Rotate Animations */
@keyframes rotateIn {
  0% {
    opacity: 0;
    transform: rotate(45deg);
  }
  100% {
    opacity: 1;
    transform: rotate(0);
  }
}

/* Shake Animation */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(72, 61, 139, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(72, 61, 139, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(72, 61, 139, 0);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-20px);
  }
  60% {
    transform: translateY(-10px);
  }
}

/* Ripple Animation */
@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(72, 61, 139, 0.3),
                0 0 0 1px rgba(72, 61, 139, 0.3),
                0 0 0 2px rgba(72, 61, 139, 0.3),
                0 0 0 3px rgba(72, 61, 139, 0.3);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(72, 61, 139, 0.3),
                0 0 0 2px rgba(72, 61, 139, 0.3),
                0 0 0 3px rgba(72, 61, 139, 0.3),
                0 0 0 4px rgba(72, 61, 139, 0);
  }
}

/* Glow Animation */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(72, 61, 139, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(72, 61, 139, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(72, 61, 139, 0.5);
  }
}

/* Particle Animation */
.particles-container {
  opacity: 0.5;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background-color: var(--light-purple);
  opacity: 0.4;
  animation: float-particle 20s linear infinite;
}

@keyframes float-particle {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-500px) translateX(100px);
    opacity: 0;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
}

.fade-in-left {
  animation: fadeInLeft 1s ease-out forwards;
}

.fade-in-right {
  animation: fadeInRight 1s ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
}

.fade-in-down {
  animation: fadeInDown 1s ease-out forwards;
}

.scale-in {
  animation: scaleIn 0.8s ease-out forwards;
}

.rotate-in {
  animation: rotateIn 0.8s ease-out forwards;
}

.bounce {
  animation: bounce 2s infinite;
}

.pulse {
  animation: pulse 2s infinite;
}

.shake {
  animation: shake 0.5s ease-in-out;
}

.ripple {
  animation: ripple 1.5s linear infinite;
}

.glow {
  animation: glow 2s infinite;
}

/* Animation Delays */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-700 {
  animation-delay: 0.7s;
}

.delay-800 {
  animation-delay: 0.8s;
}

.delay-900 {
  animation-delay: 0.9s;
}

.delay-1000 {
  animation-delay: 1s;
}

/* Transition Classes */
.transition-fast {
  transition: all 0.3s ease;
}

.transition-medium {
  transition: all 0.5s ease;
}

.transition-slow {
  transition: all 0.8s ease;
}

/* Appear on Scroll Animations */
[data-scroll] {
  opacity: 0;
  transition: opacity 1s, transform 1s;
}

[data-scroll="fade-up"] {
  transform: translateY(50px);
}

[data-scroll="fade-down"] {
  transform: translateY(-50px);
}

[data-scroll="fade-left"] {
  transform: translateX(-50px);
}

[data-scroll="fade-right"] {
  transform: translateX(50px);
}

[data-scroll="scale"] {
  transform: scale(0.9);
}

[data-scroll="rotate"] {
  transform: rotate(15deg);
}

[data-scroll].in-view {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1) rotate(0);
}

/* Typing Effect */
.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid var(--deep-purple);
  width: 0;
  animation: 
    typing 3.5s steps(40, end) forwards,
    blink-caret 0.75s step-end infinite;
}

/* Hover Effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-shadow {
  transition: box-shadow 0.3s ease;
}

.hover-shadow:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Underline Animation */
.underline-animation {
  position: relative;
}

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--deep-purple);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
