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

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

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

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

@keyframes spinOut {
  from { transform: rotate(0deg); opacity: 1; }
  to { transform: rotate(360deg); opacity: 0; }
}

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

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

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

@keyframes fadeRotateOut {
  from { opacity: 1; transform: rotate(0deg); }
  to { opacity: 0; transform: rotate(360deg); }
}

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

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

@keyframes fadeOutDiagonal {
  from { opacity: 1; transform: translate(0, 0); }
  to { opacity: 0; transform: translate(100%, 100%); }
}

@keyframes fadeOutSpiral {
  from { opacity: 1; transform: rotate(0deg) scale(1); }
  to { opacity: 0; transform: rotate(720deg) scale(0); }
}

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

/* New simple fade in keyframe */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.8; }
}

/* New animation for floating effect (up 2px, down 2px) - Must combine with centering transform */
@keyframes floatVertical {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-2px); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* New animation for floating effect (2px up, 2px down past original point) */
@keyframes floatSlow {
    0% { transform: translateY(2px); } /* Start 2px DOWN from origin */
    50% { transform: translateY(-2px); } /* Move 2px UP past origin */
    100% { transform: translateY(2px); } /* Return to 2px DOWN from origin */
}

/* New pulse animation for slideshow pause button */
@keyframes pulseExpand {
    /* Keep the pulse fully inside the button by only scaling slightly */
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
}

/* NEW: Vertical float 5px */
@keyframes floatVertical5px {
    /* Reduced total travel to ~3px (±1.5px from center) */
    0% { transform: translateY(1.5px); }
    50% { transform: translateY(-1.5px); }
    100% { transform: translateY(1.5px); }
}

/* NEW: Image pulse using box shadow */
@keyframes pulseImage {
    /* Reduced glow radius and spread by 50% */
    0% { box-shadow: 0 0 0px 0px rgba(var(--primary-color-rgb), 0.5); }
    50% { box-shadow: 0 0 10px 2.5px rgba(var(--primary-color-rgb), 1); }
    100% { box-shadow: 0 0 0px 0px rgba(var(--primary-color-rgb), 0.5); }
}

/* NEW: subtle horizontal edge pulse for glow on hover (left/right depth effect) */
@keyframes sideGlowPulse {
    0% {
        transform: translateX(-2.5px) scaleX(1.02);
    }
    50% {
        transform: translateX(2.5px) scaleX(1.025);
    }
    100% {
        transform: translateX(-2.5px) scaleX(1.02);
    }
}

.closing {
  animation-duration: 0.5s;
  animation-fill-mode: forwards;
}

.closing-slideUp { animation-name: slideUp; }
.closing-slideDown { animation-name: slideDown; }
.closing-fadeOut { animation-name: fadeOut; }
.closing-zoomOut { animation-name: zoomOut; }
.closing-spinOut { animation-name: spinOut; }

/* Idle carousel line entrance animation */
@keyframes idleLineIn {
  0%   { opacity: 0; transform: translateY(8px); }
  60%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

.category-idle-carousel.idle-line-in {
  animation: idleLineIn 0.9s ease-out;
}

/* Per-letter idle animation helpers for front-page Hollywood text */
.idle-char {
  display: inline-block;
  opacity: 0;
  will-change: transform, opacity;
}

/* Variant 1: gentle rise with fade-in */
.idle-char.variant-1 {
  animation: idleCharRise 0.7s ease-out forwards;
}

/* Variant 2: drop-in from above */
.idle-char.variant-2 {
  animation: idleCharDrop 0.7s ease-out forwards;
}

/* Variant 3: small rotation swing */
.idle-char.variant-3 {
  animation: idleCharSwing 0.7s ease-out forwards;
}

/* Variant 4: pop scale */
.idle-char.variant-4 {
  animation: idleCharPop 0.7s ease-out forwards;
}

@keyframes idleCharRise {
  0%   { transform: translateY(12px); opacity: 0; }
  60%  { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes idleCharDrop {
  0%   { transform: translateY(-14px); opacity: 0; }
  60%  { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes idleCharSwing {
  0%   { transform: rotate(-12deg) translateY(-6px); opacity: 0; }
  50%  { transform: rotate(6deg) translateY(2px); opacity: 1; }
  100% { transform: rotate(0deg) translateY(0); opacity: 1; }
}

@keyframes idleCharPop {
  0%   { transform: scale(0.4); opacity: 0; }
  55%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Fullscreen slideshow blurred background fade-in */
@keyframes fsBgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}