/* =========================================
   Mvision Cinemas – mv-animations.css
   Animation Definitions
   ========================================= */

/* Keyframe Animations */
@keyframes mv-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mv-fade-in-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes mv-fade-in-left {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mv-fade-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes mv-scale-in {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes mv-type-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes mv-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

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

@keyframes mv-pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(212,168,67,0.2); }
  50% { box-shadow: 0 0 28px rgba(212,168,67,0.5); }
}

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

@keyframes mv-film-reel {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes mv-text-reveal {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }
  to {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }
}

@keyframes mv-counter-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes mv-slide-in-bottom {
  from { transform: translateY(60px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes mv-particle-drift {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.6; }
  100% { transform: translate(var(--x), var(--y)) rotate(360deg); opacity: 0; }
}

/* Applied Animation Classes */

.mv-anim-fade-in {
  animation: mv-fade-in 0.6s ease both;
}

.mv-anim-fade-in-up {
  animation: mv-fade-in-up 0.7s ease both;
}

.mv-anim-scale-in {
  animation: mv-scale-in 0.5s ease both;
}

.mv-anim-float {
  animation: mv-float 4s ease-in-out infinite;
}

.mv-anim-pulse-glow {
  animation: mv-pulse-glow 2.5s ease-in-out infinite;
}

.mv-anim-shimmer {
  background: linear-gradient(
    90deg,
    var(--mv-gold) 0%,
    var(--mv-gold-light) 50%,
    var(--mv-gold) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: mv-shimmer 3s linear infinite;
}

/* Hero Title Reveal */
.mv-hero-title-reveal {
  overflow: hidden;
}

.mv-hero-title-reveal .mv-word {
  display: inline-block;
  animation: mv-fade-in-up 0.7s ease both;
}

.mv-hero-title-reveal .mv-word:nth-child(1) { animation-delay: 0.1s; }
.mv-hero-title-reveal .mv-word:nth-child(2) { animation-delay: 0.2s; }
.mv-hero-title-reveal .mv-word:nth-child(3) { animation-delay: 0.3s; }
.mv-hero-title-reveal .mv-word:nth-child(4) { animation-delay: 0.4s; }
.mv-hero-title-reveal .mv-word:nth-child(5) { animation-delay: 0.5s; }

/* Stagger children */
.mv-stagger > *:nth-child(1) { animation-delay: 0.05s; }
.mv-stagger > *:nth-child(2) { animation-delay: 0.15s; }
.mv-stagger > *:nth-child(3) { animation-delay: 0.25s; }
.mv-stagger > *:nth-child(4) { animation-delay: 0.35s; }
.mv-stagger > *:nth-child(5) { animation-delay: 0.45s; }
.mv-stagger > *:nth-child(6) { animation-delay: 0.55s; }

/* Quiz Option Hover Effects */
.mv-quiz-option {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mv-quiz-option:hover:not(:disabled) {
  transform: translateX(6px);
}

/* Card Hover Glow */
.mv-glow-hover {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.mv-glow-hover:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(212,168,67,0.15);
  transform: translateY(-4px);
}

/* Film Strip Decoration */
.mv-film-strip-decor {
  position: absolute;
  top: 0;
  right: -40px;
  width: 120px;
  height: 100%;
  opacity: 0.04;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 20px,
    rgba(255,255,255,0.6) 20px,
    rgba(255,255,255,0.6) 32px
  );
  pointer-events: none;
}

/* Particle Background */
.mv-particle-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.mv-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--mv-gold);
  border-radius: 50%;
  animation: mv-particle-drift linear infinite;
}

/* Loading Spinner */
.mv-loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(212,168,67,0.2);
  border-top-color: var(--mv-gold);
  border-radius: 50%;
  animation: mv-spin-slow 0.8s linear infinite;
}

/* Text Cursor Blink */
.mv-cursor-blink::after {
  content: '|';
  color: var(--mv-gold);
  animation: mv-type-cursor 1s step-end infinite;
  margin-left: 2px;
}

/* Gradient Text */
.mv-gradient-text {
  background: linear-gradient(135deg, var(--mv-gold) 0%, var(--mv-gold-light) 50%, var(--mv-burgundy-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hover Scale */
.mv-hover-scale {
  transition: transform 0.3s ease;
}

.mv-hover-scale:hover { transform: scale(1.04); }

/* Poster Glow Effect */
.mv-poster-glow {
  transition: all 0.4s ease;
}

.mv-poster-glow:hover {
  box-shadow: 0 0 30px rgba(212,168,67,0.25), 0 16px 48px rgba(0,0,0,0.6);
}

/* Delayed Animation Utilities */
.mv-delay-100 { animation-delay: 0.1s; }
.mv-delay-200 { animation-delay: 0.2s; }
.mv-delay-300 { animation-delay: 0.3s; }
.mv-delay-400 { animation-delay: 0.4s; }
.mv-delay-500 { animation-delay: 0.5s; }
.mv-delay-600 { animation-delay: 0.6s; }
.mv-delay-700 { animation-delay: 0.7s; }
.mv-delay-800 { animation-delay: 0.8s; }

/* Section Entrance */
.mv-entrance-section {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.mv-entrance-section.mv-entered {
  opacity: 1;
  transform: translateY(0);
}

/* Gold Line Animate */
.mv-gold-line-anim {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mv-gold), transparent);
  background-size: 200% 100%;
  animation: mv-shimmer 2.5s linear infinite;
}

/* Result Stars */
.mv-star-anim {
  display: inline-block;
  animation: mv-scale-in 0.4s ease both;
}

.mv-star-anim:nth-child(1) { animation-delay: 0.1s; }
.mv-star-anim:nth-child(2) { animation-delay: 0.2s; }
.mv-star-anim:nth-child(3) { animation-delay: 0.3s; }
.mv-star-anim:nth-child(4) { animation-delay: 0.4s; }
.mv-star-anim:nth-child(5) { animation-delay: 0.5s; }

/* Page Transition */
.mv-page-transition {
  animation: mv-fade-in 0.5s ease both;
}

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