/* ========== PROGRESSION SYSTEM UI ========== */

/* Badge Display */
.badge-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.badge-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--badge-glow) 0%, transparent 70%);
    opacity: 0.3;
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

.badge-icon {
    font-size: 80px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px var(--badge-glow));
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.badge-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--badge-color);
    text-shadow: 0 0 10px var(--badge-glow);
    margin-bottom: 5px;
}

.badge-level-range {
    font-size: 14px;
    color: #aaa;
}

/* XP Progress Bar */
.xp-progress-container {
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 2px solid rgba(255, 200, 0, 0.3);
    margin-bottom: 20px;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.xp-level-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.xp-level-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px var(--badge-glow));
}

.xp-level-text {
    font-size: 28px;
    font-weight: bold;
    color: var(--badge-color);
    text-shadow: 0 0 10px var(--badge-glow);
}

.xp-coins-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.xp-coins-icon {
    font-size: 24px;
}

.xp-coins-amount {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.xp-bar-wrapper {
    position: relative;
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(255, 200, 0, 0.3);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #fc0, #fa0, #f80);
    border-radius: 15px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 200, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.xp-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: xpShimmer 2s infinite;
}

@keyframes xpShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.xp-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 1;
    white-space: nowrap;
}

.xp-details {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: #aaa;
}

.xp-next-badge {
    color: var(--badge-color);
    font-weight: bold;
}

/* Level Up Animation */
@keyframes levelUpPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.level-up-animation {
    animation: levelUpPulse 0.5s ease-out;
}

/* Badge Grid (para mostrar todos os badges) */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 20px;
}

.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.badge-card.unlocked {
    border-color: var(--badge-color);
    background: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 20px var(--badge-glow);
}

.badge-card.locked {
    opacity: 0.4;
    filter: grayscale(100%);
}

.badge-card:hover {
    transform: translateY(-5px);
}

.badge-card-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.badge-card-name {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    text-align: center;
    margin-bottom: 4px;
}

.badge-card-level {
    font-size: 11px;
    color: #aaa;
}

.badge-card.unlocked .badge-card-name {
    color: var(--badge-color);
}

/* Coins Display (HUD) */
.hud-coins {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.hud-coins-icon {
    font-size: 24px;
    animation: coinSpin 3s linear infinite;
}

@keyframes coinSpin {
    0%, 100% { transform: rotateY(0deg); }
    50% { transform: rotateY(180deg); }
}

.hud-coins-amount {
    font-size: 18px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Level Display (HUD) */
.hud-level {
    position: fixed;
    top: 20px;
    right: 180px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    border: 2px solid var(--badge-color, rgba(255, 255, 255, 0.3));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.hud-level-icon {
    font-size: 20px;
}

.hud-level-text {
    font-size: 16px;
    font-weight: bold;
    color: var(--badge-color, #fff);
}

/* XP Gain Animation */
@keyframes xpGainPop {
    0% { transform: scale(0) translateY(0); opacity: 0; }
    50% { transform: scale(1.2) translateY(-20px); opacity: 1; }
    100% { transform: scale(1) translateY(-40px); opacity: 0; }
}

.xp-gain-popup {
    position: fixed;
    font-size: 20px;
    font-weight: bold;
    color: #fc0;
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.8);
    pointer-events: none;
    z-index: 1000;
    animation: xpGainPop 1.5s ease-out forwards;
}

/* Coins Gain Animation */
@keyframes coinsGainPop {
    0% { transform: scale(0) translateY(0); opacity: 0; }
    50% { transform: scale(1.2) translateY(-20px); opacity: 1; }
    100% { transform: scale(1) translateY(-40px); opacity: 0; }
}

.coins-gain-popup {
    position: fixed;
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    z-index: 1000;
    animation: coinsGainPop 1.5s ease-out forwards;
}

/* Progress Stats */
.progress-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.progress-stat-card {
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.progress-stat-label {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.progress-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.progress-stat-icon {
    font-size: 16px;
    margin-right: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hud-coins, .hud-level {
        top: 10px;
        padding: 8px 15px;
    }
    
    .hud-level {
        right: 140px;
    }
    
    .xp-level-text {
        font-size: 24px;
    }
    
    .badge-icon {
        font-size: 60px;
    }
    
    .badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
}

/* Tier Colors (CSS Variables) */
.tier-bronze { --badge-color: #CD7F32; --badge-glow: rgba(205, 127, 50, 0.5); }
.tier-silver { --badge-color: #C0C0C0; --badge-glow: rgba(192, 192, 192, 0.5); }
.tier-gold { --badge-color: #FFD700; --badge-glow: rgba(255, 215, 0, 0.5); }
.tier-platinum { --badge-color: #00CED1; --badge-glow: rgba(0, 206, 209, 0.5); }
.tier-diamond { --badge-color: #B9F2FF; --badge-glow: rgba(185, 242, 255, 0.5); }
.tier-master { --badge-color: #9D4DFF; --badge-glow: rgba(157, 77, 255, 0.5); }
.tier-grandmaster { --badge-color: #FF6B35; --badge-glow: rgba(255, 107, 53, 0.5); }
.tier-challenger { --badge-color: #FFD700; --badge-glow: rgba(255, 215, 0, 0.8); }
.tier-immortal { --badge-color: #FF4655; --badge-glow: rgba(255, 70, 85, 0.8); }
.tier-radiant { --badge-color: #FFEB3B; --badge-glow: rgba(255, 235, 59, 0.8); }
.tier-legendary { --badge-color: #FF1493; --badge-glow: rgba(255, 20, 147, 0.8); }
.tier-god { --badge-color: #FFFFFF; --badge-glow: rgba(255, 255, 255, 1); }
