@keyframes emojiIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.6);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes correctGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(46, 204, 113, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.shake {
    animation: shake 0.4s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.pop {
    animation: pop 0.25s ease;
}

@keyframes starShine {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.25); filter: brightness(1.4); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    20% {
        opacity: 0.8;
    }
    to {
        opacity: 0;
        transform: translateY(-60px);
    }
}

.float-emoji {
    position: absolute;
    font-size: 1.4rem;
    animation: floatUp linear infinite;
    pointer-events: none;
}

/* confetti pieces */
.confetti-piece {
    position: absolute;
    top: -12px;
    border-radius: 3px;
    animation: confettiFall ease-in forwards;
    pointer-events: none;
    z-index: 80;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0);
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) translateX(var(--drift, 0)) rotate(var(--rot, 0));
        opacity: 0.7;
    }
}

/* sparkles */
.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: sparkleAnim 0.7s ease forwards;
    pointer-events: none;
    z-index: 80;
}

@keyframes sparkleAnim {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* run-confetti container needs position: relative */
.confetti-holder,
#game-screen {
    position: relative;
}
