/* Achievement Badge System Styles */

.achievements-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievements-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.achievements-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 600;
}

.achievements-title i {
    color: #FFD700;
}

.achievement-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.achievement-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.achievement-stat i {
    color: #4CAF50;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.achievement-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.achievement-badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.achievement-badge.earned {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.achievement-badge.earned::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FFD700, #FFA500);
}

.achievement-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.achievement-badge:hover .achievement-icon {
    transform: scale(1.1);
}

.achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 5px;
}

.achievement-description {
    font-size: 0.8rem;
    color: #b0b0b0;
    text-align: center;
    line-height: 1.3;
}

.achievement-rarity {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.achievement-rarity.common {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.achievement-rarity.uncommon {
    background: rgba(205, 127, 50, 0.2);
    color: #CD7F32;
}

.achievement-rarity.rare {
    background: rgba(192, 192, 192, 0.2);
    color: #C0C0C0;
}

.achievement-rarity.epic {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
}

.achievement-rarity.legendary {
    background: rgba(156, 39, 176, 0.2);
    color: #9C27B0;
}

.achievement-earned-date {
    position: absolute;
    bottom: 5px;
    left: 5px;
    font-size: 0.7rem;
    color: #4CAF50;
    font-weight: 600;
}

.achievement-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.achievement-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.achievement-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.achievement-modal-content {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.achievement-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.achievement-modal-title {
    color: #e0e0e0;
    font-size: 1.5rem;
    font-weight: 600;
}

.achievement-modal-close {
    color: #b0b0b0;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.achievement-modal-close:hover {
    color: #e0e0e0;
}

.achievement-modal-body {
    color: #b0b0b0;
    line-height: 1.6;
}

.achievement-category-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.achievement-filter-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #b0b0b0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.achievement-filter-btn:hover,
.achievement-filter-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.3);
}

.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.achievement-notification.show {
    transform: translateX(0);
}

.achievement-notification i {
    font-size: 1.2rem;
}

.achievement-notification-content {
    display: flex;
    flex-direction: column;
}

.achievement-notification-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.achievement-notification-description {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .achievement-badge {
        padding: 12px;
    }
    
    .achievement-icon {
        font-size: 1.5rem;
    }
    
    .achievement-name {
        font-size: 0.8rem;
    }
    
    .achievement-description {
        font-size: 0.7rem;
    }
    
    .achievement-modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .achievement-category-filter {
        justify-content: center;
    }
}

/* Animation for new achievements */
@keyframes achievementEarned {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.achievement-badge.newly-earned {
    animation: achievementEarned 1s ease-in-out;
}
