/* Gamification UI Styles */

.level-badge {
    background: #334155;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.level-badge:active {
    transform: scale(0.95);
}

.xp-bar-container {
    width: 100%;
    max-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xp-bar-bg {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
}

.xp-float {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fbbf24;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    z-index: 9999;
    animation: floatUp 2s forwards;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.xp-float small {
    font-size: 0.8rem;
    color: #fff;
    font-weight: normal;
    margin-top: 2px;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.8);
    }

    10% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -80%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    80% {
        transform: scale(1.05);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}