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

/* Animation variables */
:root {
  --animation-duration-fast: 0.2s;
  --animation-duration-normal: 0.3s;
  --animation-duration-slow: 0.5s;
  --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Keyframe animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@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 zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    transform: translate3d(0, -30px, 0);
  }
  70% {
    transform: translate3d(0, -15px, 0);
  }
  90% {
    transform: translate3d(0, -4px, 0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-pink-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-pink-glow), 0 0 30px var(--accent-pink-glow);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* Animation utility classes */
.animate-fade-in {
  animation: fadeIn var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-out {
  animation: fadeOut var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-up {
  animation: fadeInUp var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-down {
  animation: fadeInDown var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-left {
  animation: fadeInLeft var(--animation-duration-normal) var(--animation-easing);
}

.animate-fade-in-right {
  animation: fadeInRight var(--animation-duration-normal) var(--animation-easing);
}

.animate-zoom-in {
  animation: zoomIn var(--animation-duration-normal) var(--animation-easing);
}

.animate-zoom-out {
  animation: zoomOut var(--animation-duration-normal) var(--animation-easing);
}

.animate-slide-in-up {
  animation: slideInUp var(--animation-duration-normal) var(--animation-easing);
}

.animate-slide-in-down {
  animation: slideInDown var(--animation-duration-normal) var(--animation-easing);
}

.animate-slide-in-left {
  animation: slideInLeft var(--animation-duration-normal) var(--animation-easing);
}

.animate-slide-in-right {
  animation: slideInRight var(--animation-duration-normal) var(--animation-easing);
}

.animate-bounce {
  animation: bounce 1s var(--animation-easing);
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-shake {
  animation: shake 0.5s var(--animation-easing);
}

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

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

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

.animate-slide-up {
  animation: fadeInUp var(--animation-duration-normal) var(--animation-easing);
}

.animate-gradient {
  background: linear-gradient(-45deg, var(--accent-pink), var(--accent-pink-hover), var(--accent-pink), var(--accent-pink-hover));
  background-size: 400% 400%;
  animation: gradient 3s ease infinite;
}

/* Hover animations */
.hover-lift {
  transition: transform var(--animation-duration-fast) var(--animation-easing);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

.hover-scale {
  transition: transform var(--animation-duration-fast) var(--animation-easing);
}

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

.hover-glow {
  transition: box-shadow var(--animation-duration-normal) var(--animation-easing);
}

.hover-glow:hover {
  box-shadow: 0 0 20px var(--accent-pink-glow);
}

.hover-rotate {
  transition: transform var(--animation-duration-normal) var(--animation-easing);
}

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

/* Hover effects for data-hover attributes */
[data-hover="tilt"] {
  transition: transform var(--animation-duration-normal) var(--animation-easing);
}

[data-hover="glow"] {
  transition: all var(--animation-duration-normal) var(--animation-easing);
}

[data-hover="scale"] {
  transition: transform var(--animation-duration-fast) var(--animation-easing);
}

[data-hover="rotate"] {
  transition: transform var(--animation-duration-normal) var(--animation-easing);
}

/* Active hover states */
.hover-active-glow {
  box-shadow: 0 0 30px var(--accent-pink-glow) !important;
  transform: translateY(-2px) !important;
}

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

.hover-active-rotate {
  transform: rotate(5deg) !important;
}

.hover-active-tilt {
  transform: perspective(1000px) rotateX(10deg) rotateY(10deg) !important;
}

/* Scroll animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all var(--animation-duration-slow) var(--animation-easing);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all var(--animation-duration-slow) var(--animation-easing);
}

.scroll-reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all var(--animation-duration-slow) var(--animation-easing);
}

.scroll-reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--animation-duration-slow) var(--animation-easing);
}

.scroll-reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Loading animations */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-pink);
  animation: loading-dots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loading-dots {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loading-wave {
  display: inline-flex;
  gap: 2px;
}

.loading-wave span {
  width: 4px;
  height: 20px;
  background: var(--accent-pink);
  animation: loading-wave 1.2s ease-in-out infinite;
}

.loading-wave span:nth-child(1) { animation-delay: -1.1s; }
.loading-wave span:nth-child(2) { animation-delay: -1.0s; }
.loading-wave span:nth-child(3) { animation-delay: -0.9s; }
.loading-wave span:nth-child(4) { animation-delay: -0.8s; }
.loading-wave span:nth-child(5) { animation-delay: -0.7s; }

@keyframes loading-wave {
  0%, 40%, 100% {
    transform: scaleY(0.4);
  }
  20% {
    transform: scaleY(1);
  }
}

/* Text animations */
.text-glow {
  color: var(--accent-pink);
  text-shadow: 0 0 10px var(--accent-pink-glow);
  animation: text-glow 2s ease-in-out infinite alternate;
}

@keyframes text-glow {
  from {
    text-shadow: 0 0 10px var(--accent-pink-glow);
  }
  to {
    text-shadow: 0 0 20px var(--accent-pink-glow), 0 0 30px var(--accent-pink-glow);
  }
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--accent-pink);
  white-space: nowrap;
  animation: typewriter 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Stagger animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp var(--animation-duration-normal) var(--animation-easing) forwards;
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.will-change-auto {
  will-change: auto;
}

/* GPU acceleration */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}