/* ===================================
   Keyframe Animations
   =================================== */

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

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

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.4s; }
.fade-in-up:nth-child(5) { animation-delay: 0.5s; }
.fade-in-up:nth-child(6) { animation-delay: 0.6s; }
.fade-in-up:nth-child(7) { animation-delay: 0.7s; }
.fade-in-up:nth-child(8) { animation-delay: 0.8s; }

/* Intro Bright Glow Animation */
@keyframes introBrightGlow {
    0% {
        text-shadow: 0 0 40px rgba(255, 255, 255, 0.8),
                     0 0 80px rgba(255, 255, 255, 0.6),
                     0 0 120px rgba(255, 255, 255, 0.4),
                     0 4px 30px rgba(0, 0, 0, 0.9);
        filter: brightness(1);
    }
    100% {
        text-shadow: 0 0 60px rgba(255, 255, 255, 1),
                     0 0 100px rgba(255, 255, 255, 0.8),
                     0 0 140px rgba(255, 255, 255, 0.6),
                     0 4px 40px rgba(0, 0, 0, 1);
        filter: brightness(1.2);
    }
}

/* Intro Glow Animation */
@keyframes introGlow {
    0% {
        text-shadow: 0 0 30px rgba(132, 24, 24, 0.8),
                     0 0 60px rgba(132, 24, 24, 0.5),
                     0 4px 20px rgba(0, 0, 0, 0.8);
    }
    100% {
        text-shadow: 0 0 40px rgba(132, 24, 24, 1),
                     0 0 80px rgba(132, 24, 24, 0.7),
                     0 4px 25px rgba(0, 0, 0, 0.9);
    }
}

/* Glow Pulse Animation */
@keyframes glow-pulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(132, 24, 24, 0.5),
                     0 0 40px rgba(132, 24, 24, 0.8),
                     0 0 20px rgba(132, 24, 24, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(132, 24, 24, 0.7),
                     0 0 60px rgba(132, 24, 24, 1),
                     0 0 30px rgba(132, 24, 24, 0.7);
    }
}

/* Floating Animations for Card Suits */
@keyframes float1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20px, -20px) rotate(90deg);
    }
    50% {
        transform: translate(40px, 0) rotate(180deg);
    }
    75% {
        transform: translate(20px, 20px) rotate(270deg);
    }
}

@keyframes float2 {
    0%, 100% {
        transform: translate(0, 0) rotate(360deg);
    }
    25% {
        transform: translate(-30px, 20px) rotate(270deg);
    }
    50% {
        transform: translate(-60px, 0) rotate(180deg);
    }
    75% {
        transform: translate(-30px, -20px) rotate(90deg);
    }
}

@keyframes float3 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(25px, -15px) rotate(120deg);
    }
    66% {
        transform: translate(-25px, -15px) rotate(240deg);
    }
}

@keyframes float4 {
    0%, 100% {
        transform: translate(0, 0) rotate(360deg);
    }
    33% {
        transform: translate(-20px, 15px) rotate(240deg);
    }
    66% {
        transform: translate(20px, 15px) rotate(120deg);
    }
}

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

/* Expand Width Animation */
@keyframes expandWidth {
    0% {
        width: 80px;
    }
    100% {
        width: 160px;
    }
}

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

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

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

/* Slide In from Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In from Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

/* Shake Animation */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

/* Number Change Animation for Countdown */
@keyframes numberChange {
    0%, 100% {
        transform: translateY(0) rotateX(0deg);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px) rotateX(90deg);
        opacity: 0.3;
    }
}

/* Flip Number Animation - Flipping Clock Effect */
@keyframes flipNumber {
    0% {
        transform: rotateX(0deg);
    }
    50% {
        transform: rotateX(-90deg);
        opacity: 0.5;
    }
    100% {
        transform: rotateX(0deg);
    }
}

/* Flip Up Animation */
@keyframes flipUp {
    0% {
        transform: perspective(400px) rotateX(0deg);
        transform-origin: center bottom;
    }
    100% {
        transform: perspective(400px) rotateX(180deg);
        transform-origin: center bottom;
    }
}

/* Flip Down Animation */
@keyframes flipDown {
    0% {
        transform: perspective(400px) rotateX(-180deg);
        transform-origin: center top;
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        transform-origin: center top;
    }
}

/* Card Flip Animation */
@keyframes cardFlip {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(180deg);
    }
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

/* Blink Animation */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* Reveal Animation */
@keyframes reveal {
    from {
        clip-path: inset(0 100% 0 0);
    }
    to {
        clip-path: inset(0 0 0 0);
    }
}

/* ===================================
   Utility Animation Classes
   =================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }
.delay-8 { animation-delay: 0.8s; }

/* Hover Animations */
.hover-grow {
    transition: transform 0.3s ease;
}

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

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(132, 24, 24, 0.5),
                0 0 40px rgba(132, 24, 24, 0.3);
}

/* ===================================
   Disable all fade effects sitewide
   =================================== */
/* Neutralize fade keyframes */
@keyframes fadeInUp {
    from { opacity: 1; transform: none; }
    to   { opacity: 1; transform: none; }
}

@keyframes fadeIn {
    from { opacity: 1; }
    to   { opacity: 1; }
}

/* Force final state for common fade utility classes */
.fade-in-up,
.animate-on-scroll,
.animate-on-scroll.visible {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

/* Disable pop-up/scale effects and hover scaling sitewide */
@keyframes scaleIn {
    from { opacity: 1; transform: none; }
    to   { opacity: 1; transform: none; }
}

.hover-grow,
.hover-grow:hover,
.hover-glow,
.hover-glow:hover {
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
}
