/* ACHIEVEMENTS STYLES */
.achievements-section {
    padding: 4rem 0;
}

.player-stats {
    padding: 3rem;
    border-radius: 24px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.3);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.stat-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-progress {
    padding: 2rem;
    background: rgba(0, 240, 255, 0.05);
    border-radius: 16px;
}

.level-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.level-label span:first-child {
    font-weight: 700;
    color: var(--text-primary);
}

/* BADGES */
.badges-section {
    margin-bottom: 4rem;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.badge-card {
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.badge-card.unlocked {
    border: 2px solid var(--accent-cyan);
}

.badge-card.locked {
    opacity: 0.6;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.badge-card.legendary {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid var(--accent-gold);
}

.badge-card:hover {
    transform: translateY(-10px) scale(1.05);
}

.badge-card.unlocked:hover {
    box-shadow: 0 20px 60px rgba(0, 240, 255, 0.4);
}

.badge-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.2), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-card.unlocked:hover .badge-glow {
    opacity: 1;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.badge-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
    animation: float 3s ease-in-out infinite;
}

.badge-card.locked .badge-icon {
    filter: grayscale(100%) opacity(0.5);
    animation: none;
}

.locked-icon {
    font-size: 3rem !important;
}

.badge-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--accent-cyan);
}

.badge-card.locked h3 {
    color: var(--text-muted);
}

.badge-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.badge-xp {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.badge-status {
    color: #00ff88;
    font-weight: 700;
}

.badge-progress {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* LEADERBOARD */
.leaderboard-section {
    padding: 3rem;
    border-radius: 24px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.leaderboard-section h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.leaderboard-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.05);
}

.leaderboard-item.rank-1 {
    border: 2px solid var(--accent-gold);
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.1), transparent);
}

.leaderboard-item.rank-2 {
    border: 2px solid #C0C0C0;
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent);
}

.leaderboard-item.rank-3 {
    border: 2px solid #CD7F32;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent);
}

.leaderboard-item.you {
    border: 2px solid var(--accent-cyan);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
}

.rank {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    min-width: 50px;
    text-align: center;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.player-level {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.player-xp {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--accent-cyan);
    font-size: 1.125rem;
}

/* DAILY CHALLENGE */
.daily-challenge {
    padding: 3rem;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.daily-challenge h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.challenge-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.challenge-icon {
    font-size: 5rem;
    filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

.challenge-details {
    flex: 1;
}

.challenge-details h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.challenge-details p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.challenge-reward {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.challenge-timer {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* NOTIFICATIONS */
.level-up-notification,
.badge-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    padding: 1.5rem;
    border-radius: 16px;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 240, 255, 0.5);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.5));
}

.notification-text h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.notification-text p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.notification-xp {
    color: var(--accent-cyan);
    font-weight: 700;
}

/* BADGE MODAL */
.badge-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.badge-modal-content {
    max-width: 500px;
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    border: 2px solid var(--accent-cyan);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 0, 110, 0.3);
    transform: rotate(90deg);
}

.badge-modal-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.8));
    animation: float 3s ease-in-out infinite;
}

.badge-modal-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.badge-modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.badge-modal-xp {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    color: var(--accent-cyan);
    font-weight: 700;
    margin-bottom: 1rem;
}

.badge-modal-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .badges-grid {
        grid-template-columns: 1fr;
    }

    .challenge-content {
        flex-direction: column;
        text-align: center;
    }

    .level-up-notification,
    .badge-notification {
        right: 10px;
        left: 10px;
    }
}