/* ==========================================================================
   WORLD CUP CHRONICLES - Animations & Motion Effects
   ========================================================================== */

/* Fade-in for view switching */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade {
  animation: fadeIn 0.4s ease forwards;
}

/* Slide in from right for toasts */
@keyframes slideInRight {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.animate-slide-in {
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Radar pulse for mission target pins */
@keyframes radarPulse {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Football traversing the globe in Home Hero background */
@keyframes ballTraverse {
  0% {
    transform: translate(-10vw, 40vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translate(110vw, 15vh) rotate(1440deg) scale(1.1);
    opacity: 0;
  }
}

.animated-world-ball {
  position: absolute;
  width: 42px;
  height: 42px;
  font-size: 38px;
  pointer-events: none;
  z-index: 1;
  animation: ballTraverse 16s infinite linear;
}

/* Passport Visa Stamp Impression */
@keyframes stampThud {
  0% {
    transform: scale(3) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: scale(0.95) rotate(-3deg);
    opacity: 1;
  }
  80% {
    transform: scale(1.05) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(-3deg);
    opacity: 1;
  }
}

.stamped .stamp-seal {
  animation: stampThud 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Card 3D Flip */
.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 10px;
}

.flip-card-back {
  transform: rotateY(180deg);
}
