/* 
 * 4K Video Downloader - Animations Stylesheet
 * Author: Manus
 * Date: 2025-06-07
 */

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

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-down {
  animation: fadeInDown 0.5s ease forwards;
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-left {
  animation: fadeInLeft 0.5s ease forwards;
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-right {
  animation: fadeInRight 0.5s ease forwards;
}

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

.scale-in {
  animation: scaleIn 0.5s ease forwards;
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 2s infinite;
}

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

.pulse {
  animation: pulse 2s infinite;
}

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

.spin {
  animation: spin 2s linear infinite;
}

/* Shake */
@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.8s ease-in-out;
}

/* Progress Bar */
@keyframes progressBar {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.progress-bar {
  animation: progressBar 2s ease-out forwards;
}

/* Typing */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

.typing {
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #1E88E5;
  animation: 
    typing 3.5s steps(40, end),
    blink 0.75s step-end infinite;
}

/* Slide In */
@keyframes slideIn {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.5s ease forwards;
}

/* Slide Out */
@keyframes slideOut {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(100%);
  }
}

.slide-out {
  animation: slideOut 0.5s ease forwards;
}

/* Rotate */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 2s linear infinite;
}

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

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

/* Highlight */
@keyframes highlight {
  0% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(30, 136, 229, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

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

/* Ripple */
@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

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

.ripple::after {
  content: "";
  display: block;
  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;
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.fade-up {
  transform: translateY(20px);
}

.animate-on-scroll.fade-down {
  transform: translateY(-20px);
}

.animate-on-scroll.fade-left {
  transform: translateX(-20px);
}

.animate-on-scroll.fade-right {
  transform: translateX(20px);
}

.animate-on-scroll.scale {
  transform: scale(0.95);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Staggered Animations */
.stagger-item {
  opacity: 0;
}

.stagger-item:nth-child(1) {
  animation: fadeInUp 0.5s ease forwards 0.1s;
}

.stagger-item:nth-child(2) {
  animation: fadeInUp 0.5s ease forwards 0.2s;
}

.stagger-item:nth-child(3) {
  animation: fadeInUp 0.5s ease forwards 0.3s;
}

.stagger-item:nth-child(4) {
  animation: fadeInUp 0.5s ease forwards 0.4s;
}

.stagger-item:nth-child(5) {
  animation: fadeInUp 0.5s ease forwards 0.5s;
}

.stagger-item:nth-child(6) {
  animation: fadeInUp 0.5s ease forwards 0.6s;
}

/* Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: width 0.3s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 100%;
}

.btn-primary:hover {
  box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
}

.btn-secondary:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Card Hover Effects */
.feature-card,
.pricing-card,
.step {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover,
.pricing-card:hover,
.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Image Hover Effects */
.img-hover {
  transition: transform 0.3s ease;
}

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

/* Link Hover Effects */
.hover-underline {
  position: relative;
}

.hover-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #1E88E5;
  transition: width 0.3s ease;
}

.hover-underline:hover::after {
  width: 100%;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(30, 136, 229, 0.1);
  border-radius: 50%;
  border-top-color: #1E88E5;
  animation: spin 1s linear infinite;
}

/* Progress Bar */
.progress {
  height: 4px;
  background-color: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #1E88E5;
  border-radius: 2px;
  width: 0;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

