/* ===================================================
   EID SALAMI — Animations (CSS3 Keyframes)
   =================================================== */

/* ── Card Reveal (page load) ──────────────────── */
.card-container {
    animation: cardReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardReveal {
    0% {
        transform: scale(0.3) rotateY(180deg);
        opacity: 0;
    }

    70% {
        transform: scale(1.05) rotateY(-5deg);
    }

    100% {
        transform: scale(1) rotateY(0deg);
        opacity: 1;
    }
}

/* ── Sparkle Float ────────────────────────────── */
.animation-sparkle .card-inner::before,
.animation-sparkle .card-inner::after {
    content: '✨';
    position: absolute;
    font-size: 1.6rem;
    animation: sparkleFloat 2.5s ease-in-out infinite;
    pointer-events: none;
}

.animation-sparkle .card-inner::before {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.animation-sparkle .card-inner::after {
    bottom: 15%;
    left: 8%;
    animation-delay: 1.2s;
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-16px) scale(1.3);
        opacity: 1;
    }
}

/* ── Moon Glow ────────────────────────────────── */
.animation-moon {
    box-shadow: 0 0 60px rgba(212, 160, 23, 0.35);
}

.animation-moon .card-crescent {
    animation: moonPulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(212, 160, 23, 0.6));
}

@keyframes moonPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(212, 160, 23, 0.4));
    }

    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 40px rgba(212, 160, 23, 0.8));
    }
}

/* ── Stars Twinkle ────────────────────────────── */
.animation-stars .card-stars {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.animation-stars .card-stars::before,
.animation-stars .card-stars::after {
    content: '⭐';
    position: absolute;
    font-size: 0.8rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

.animation-stars .card-stars::before {
    top: 8%;
    left: 12%;
    animation-delay: 0s;
}

.animation-stars .card-stars::after {
    top: 20%;
    right: 15%;
    animation-delay: 0.7s;
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ── Glow Pulse ───────────────────────────────── */
.animation-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(212, 160, 23, 0.2);
    }

    50% {
        box-shadow: 0 0 80px rgba(212, 160, 23, 0.5);
    }
}

/* ── Amount Pop ───────────────────────────────── */
.card-amount {
    animation: amountPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both;
}

@keyframes amountPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ── Button Shimmer ───────────────────────────── */
.btn-accept {
    position: relative;
    overflow: hidden;
}

.btn-accept::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -75%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent);
    transform: skewX(-25deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        left: -75%;
    }

    100% {
        left: 150%;
    }
}

/* ── Fade In Up (general utility) ─────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Gentle Bounce ────────────────────────────── */
.bounce {
    animation: gentleBounce 2s ease-in-out infinite;
}

@keyframes gentleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ── Floating Particles (background) ──────────── */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(212, 160, 23, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* ── Skeleton Loading ─────────────────────────── */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Count up number animation ────────────────── */
.count-up {
    display: inline-block;
    animation: countFadeIn 1s ease both;
}

@keyframes countFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}