/* ==========================================
   HORROR SOLITAIRE - ANIMATIONS
   ========================================== */

@keyframes cardDeal {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(90deg);
    }

    100% {
        transform: rotateY(0deg);
    }
}

@keyframes cardMove {
    from {
        opacity: 0.6;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fog {
    0% {
        transform: translateX(-5%);
        opacity: 0.15;
    }

    50% {
        transform: translateX(5%);
        opacity: 0.3;
    }

    100% {
        transform: translateX(-5%);
        opacity: 0.15;
    }
}

@keyframes candleFlicker {
    0%, 100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

@keyframes lightning {
    0%, 92%, 100% {
        opacity: 0;
    }

    93% {
        opacity: 0.5;
    }

    94% {
        opacity: 0;
    }

    96% {
        opacity: 0.3;
    }
}


/* Animation classes */

.card.dealing {
    animation: cardDeal 0.35s ease-out;
}

.card.flipping {
    animation: cardFlip 0.4s ease-in-out;
}

.card.moving {
    animation: cardMove 0.2s ease-out;
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.fog-layer {
    animation: fog 12s ease-in-out infinite;
}

.candle-light {
    animation: candleFlicker 2s ease-in-out infinite;
}

.lightning-effect {
    animation: lightning 8s infinite;
}