/* Styles pour les améliorations et les succès */

.upgrades-section {
    width: 100%;
    max-width: 800px;
    margin: 1rem auto;
}

.upgrades-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tab-button {
    background: rgba(50, 50, 50, 0.5);
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(70, 70, 70, 0.7);
}

.tab-button.active {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 0, 122, 0.5);
}

.upgrades-container {
    background: rgba(20, 20, 20, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.upgrades-container.active {
    display: block;
}

.upgrade {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.5), rgba(30, 30, 30, 0.5));
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.upgrade:hover {
    background: linear-gradient(135deg, rgba(60, 60, 60, 0.5), rgba(40, 40, 40, 0.5));
    box-shadow: 0 0 15px rgba(255, 0, 122, 0.3);
}

/* Couleurs différentes selon le type d'amélioration */
#click-upgrades .upgrade {
    border-color: var(--blue-color);
}

#auto-upgrades .upgrade {
    border-color: var(--green-color);
}

#special-upgrades .upgrade {
    border-color: var(--gold-color);
}

.upgrade.special {
    background: linear-gradient(135deg, rgba(60, 40, 0, 0.5), rgba(40, 30, 0, 0.5));
}

.upgrade.special:hover {
    background: linear-gradient(135deg, rgba(70, 50, 10, 0.5), rgba(50, 40, 10, 0.5));
}

.upgrade.maxed {
    background: linear-gradient(135deg, rgba(40, 0, 40, 0.5), rgba(30, 0, 30, 0.5));
    border-color: var(--purple-color);
}

.upgrade-info {
    display: flex;
    flex-direction: column;
}

.upgrade-name {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.upgrade-desc {
    font-size: 0.9rem;
    color: #ccc;
}

.upgrade-level {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 0.3rem;
}

.upgrade-price {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.upgrade-price span {
    font-weight: bold;
    color: gold;
}

.buy-button {
    background: linear-gradient(135deg, var(--primary-color), #B5006A);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.buy-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 0, 122, 0.7);
}

.buy-button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.buy-button.available {
    background: linear-gradient(135deg, var(--green-color), #2E8B57);
    animation: pulse 2s infinite;
}

/* Succès */
.achievements-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.achievement-counter {
    font-size: 0.9rem;
    background-color: rgba(255, 0, 122, 0.3);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.achievements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.achievement {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.5), rgba(30, 30, 30, 0.5));
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    max-width: 250px;
}

.achievement i {
    font-size: 1.5rem;
    color: #555;
}

.achievement-details {
    display: flex;
    flex-direction: column;
}

.achievement-name {
    font-weight: bold;
    color: #aaa;
}

.achievement-desc {
    font-size: 0.8rem;
    color: #777;
}

.achievement.locked {
    opacity: 0.6;
    filter: grayscale(0.7);
}

.achievement.unlocked {
    background: linear-gradient(135deg, rgba(100, 50, 100, 0.5), rgba(60, 30, 60, 0.5));
    box-shadow: 0 0 15px rgba(255, 0, 122, 0.5);
}

.achievement.unlocked i {
    color: var(--gold-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.achievement.unlocked .achievement-name {
    color: white;
}

.achievement.unlocked .achievement-desc {
    color: #ccc;
}

@keyframes popUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .upgrades-container {
        padding: 1rem;
    }
    
    .upgrade {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .upgrade-price {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.5rem;
    }
    
    .achievements-list {
        flex-direction: column;
    }
    
    .achievement {
        max-width: 100%;
    }
}