/* ============================================
   Animation Utilities
   ============================================ */

/* Fade in animations */
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in animation */
.scale-in {
  animation: scaleIn 0.3s ease-out forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slide up animation */
.slide-up {
  animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Typing cursor blink */
.cursor-blink {
  animation: cursorBlink 1s step-end infinite;
}

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

/* Smooth color transition */
.color-transition {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Hover lift effect */
.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(88, 166, 255, 0.4);
  }
}

/* Success flash */
.success-flash {
  animation: successFlash 0.6s ease-out;
}

@keyframes successFlash {
  0% {
    background-color: rgba(63, 185, 80, 0.3);
  }
  100% {
    background-color: transparent;
  }
}

/* Shake animation for errors */
.shake {
  animation: shake 0.5s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Bounce animation */
.bounce {
  animation: bounce 0.5s ease-out;
}

@keyframes bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Expand animation for new terminal button */
.expand-vertical {
  animation: expandVertical 0.3s ease-out forwards;
}

@keyframes expandVertical {
  from {
    max-height: 140px;
  }
  to {
    max-height: 200px;
  }
}

/* Text reveal animation */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  animation: textReveal 0.5s ease-out forwards;
}

@keyframes textReveal {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Stagger children animation */
.stagger-children > * {
  opacity: 0;
  animation: fadeIn 0.4s ease-out 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; }

/* Progress bar fill */
.progress-fill {
  animation: progressFill 1s ease-out forwards;
}

@keyframes progressFill {
  from {
    width: 0%;
  }
}

/* Minimize animation */
.minimize {
  animation: minimize 0.3s ease-in forwards;
}

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

/* Maximize animation */
.maximize {
  animation: maximize 0.3s ease-out forwards;
}

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

/* Cursor movement easing */
.cursor-move {
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              top 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Line appear animation */
.line-appear {
  animation: lineAppear 0.3s ease-out forwards;
}

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

/* Badge pulse for status changes */
.badge-pulse {
  animation: badgePulse 0.5s ease-out;
}

@keyframes badgePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Delayed animations */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-1000 { animation-delay: 1000ms; }
.delay-1500 { animation-delay: 1500ms; }
.delay-2000 { animation-delay: 2000ms; }
