/* ============================================
   XP GAIN ANIMATION (Monkeytype Style)
   ============================================ */

/* XP notification container */
.xp-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

/* XP gain animation */
.xp-gain {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: xpPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    animation-fill-mode: forwards;
}

.xp-gain-icon {
    font-size: 24px;
    animation: xpSpin 0.6s ease-out;
}

.xp-gain-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--text, #1a1a1a);
}

.xp-gain-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent, #2563eb);
    margin-left: 4px;
}

/* Animations */
@keyframes xpPop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    50% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }

    70% {
        transform: scale(0.98) translateY(0);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes xpSpin {
    0% {
        transform: rotate(0deg) scale(0.5);
        opacity: 0;
    }

    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

@keyframes xpFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .xp-gain {
        background: #1a1a1a;
        border-color: #262626;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
}