/* ===== LEVEL UP CELEBRATION EFFECTS ===== */

/* Enhanced Level Up Modal */
.level-up-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    animation: modalFadeIn 0.4s ease-out;
}

.level-up-card {
    position: relative;
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.1) 0%,
            rgba(10, 10, 10, 0.95) 50%,
            rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 32px;
    padding: 60px 48px;
    max-width: 500px;
    text-align: center;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(139, 92, 246, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    animation: levelUpCardEntrance 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    overflow: visible;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes levelUpCardEntrance {
    0% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
    }

    60% {
        transform: scale(1.05) translateY(-10px);
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.level-up-title {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(90deg,
            #FFD700 0%,
            #FFC107 50%,
            #FFD700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
    margin-bottom: 32px;
    animation: titleGlow 2s ease-in-out infinite;
    letter-spacing: 0.05em;
}

@keyframes titleGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.6));
    }
}

.level-up-badge-display {
    width: 160px;
    height: 160px;
    margin: 0 auto 32px;
    position: relative;
    animation: badgeReveal 1s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes badgeReveal {
    0% {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }

    60% {
        transform: rotate(10deg) scale(1.1);
    }

    100% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

.level-up-badge-display::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(45deg,
            rgba(139, 92, 246, 0.4),
            rgba(255, 215, 0, 0.3),
            rgba(139, 92, 246, 0.4));
    border-radius: 50%;
    filter: blur(30px);
    animation: badgeGlowPulse 2s ease-in-out infinite;
}

@keyframes badgeGlowPulse {

    0%,
    100% {
        transform: scale(0.9);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* CSS Confetti Particles */
.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #FFD700, #FFC107);
    animation: confettiFall 3s ease-out forwards;
    pointer-events: none;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Sparkle Effects */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff;
    animation: sparkleFloat 2s ease-in-out infinite;
}

@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-20px) scale(1.5);
        opacity: 0.5;
    }
}

/* Reward Info */
.level-up-reward-info {
    margin-top: 32px;
    padding: 24px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.reward-icon-display {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: rewardBounce 0.6s ease-out 0.8s;
}

@keyframes rewardBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.2);
    }
}

.level-up-xp-display {
    font-size: 24px;
    font-weight: 800;
    color: #4ade80;
    margin-top: 24px;
    text-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
}

/* Continue Button */
.level-up-continue-btn {
    margin-top: 32px;
    padding: 16px 48px;
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.level-up-continue-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 15px 40px rgba(139, 92, 246, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.level-up-continue-btn:active {
    transform: translateY(0) scale(1);
}