/* Leaderboard Specific Styles */
.leaderboard-section {
    padding: 60px 0;
    position: relative;
}

.leaderboard-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Game Leaderboards Grid */
.game-leaderboards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.leaderboard-card {
    background: linear-gradient(145deg, #1a1a3a, #10102a);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(93, 23, 235, 0.2);
}

.leaderboard-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(93, 23, 235, 0.3);
    border-color: rgba(93, 23, 235, 0.6);
}

.leaderboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s;
}

.leaderboard-card:hover::before {
    left: 100%;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(162, 57, 234, 0.3);
}

.game-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5d17eb, #a239ea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    animation: icon-pulse 2s infinite;
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(93, 23, 235, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(93, 23, 235, 0); }
}

.leaderboard-header h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInFromLeft 0.6s ease-out;
    animation-fill-mode: both;
    opacity: 0;
}

.leaderboard-item:nth-child(1) { animation-delay: 0.1s; }
.leaderboard-item:nth-child(2) { animation-delay: 0.2s; }
.leaderboard-item:nth-child(3) { animation-delay: 0.3s; }
.leaderboard-item:nth-child(4) { animation-delay: 0.4s; }
.leaderboard-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.rank-badge {
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
}

.rank-badge.gold {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #8b7355;
    animation: gold-glow 2s infinite alternate;
}

.rank-badge.silver {
    background: linear-gradient(135deg, #c0c0c0, #e6e6e6);
    color: #666;
    animation: silver-glow 2s infinite alternate;
}

.rank-badge.bronze {
    background: linear-gradient(135deg, #cd7f32, #d2b48c);
    color: #5d4037;
    animation: bronze-glow 2s infinite alternate;
}

.rank-badge:not(.gold):not(.silver):not(.bronze) {
    background: linear-gradient(135deg, #5d17eb, #a239ea);
    color: white;
}

@keyframes gold-glow {
    from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

@keyframes silver-glow {
    from { box-shadow: 0 0 8px rgba(192, 192, 192, 0.5); }
    to { box-shadow: 0 0 16px rgba(192, 192, 192, 0.8); }
}

@keyframes bronze-glow {
    from { box-shadow: 0 0 8px rgba(205, 127, 50, 0.5); }
    to { box-shadow: 0 0 16px rgba(205, 127, 50, 0.8); }
}

.player-info {
    flex-grow: 1;
    margin-right: 15px;
}

.player-name {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 3px;
    font-size: 0.9rem;
}

.player-score {
    color: #a0a0ff;
    font-size: 0.8rem;
    font-family: 'Orbitron', sans-serif;
}

.score-value {
    background: linear-gradient(135deg, #5d17eb, #a239ea);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    animation: score-pulse 3s infinite;
}

@keyframes score-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Activity Feed */
.activity-feed {
    background: linear-gradient(145deg, #1a1a3a, #10102a);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    height: fit-content;
    max-height: 600px;
    overflow: hidden;
    border: 1px solid rgba(93, 23, 235, 0.2);
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(162, 57, 234, 0.3);
}

.activity-header h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a239ea, #5d17eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    animation: activity-pulse 1.5s infinite;
}

@keyframes activity-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.activity-list::-webkit-scrollbar {
    width: 6px;
}

.activity-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #5d17eb, #a239ea);
    border-radius: 3px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideInFromRight 0.6s ease-out;
    animation-fill-mode: both;
    position: relative;
    transition: background 0.3s;
}

.activity-item:hover {
    background: rgba(93, 23, 235, 0.1);
    border-radius: 8px;
}

.activity-item.new {
    animation: newActivity 1s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes newActivity {
    0% {
        opacity: 0;
        transform: translateX(30px) scale(0.8);
        background: rgba(162, 57, 234, 0.3);
    }
    50% {
        transform: translateX(0) scale(1.05);
        background: rgba(162, 57, 234, 0.2);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        background: transparent;
    }
}

.activity-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5d17eb, #a239ea);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
}

.activity-content {
    flex-grow: 1;
}

.activity-text {
    color: #e0e0ff;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 2px;
}

.activity-time {
    color: #8888aa;
    font-size: 0.75rem;
}

.activity-game {
    color: #a239ea;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .leaderboard-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .game-leaderboards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .game-leaderboards {
        gap: 20px;
    }
    
    .leaderboard-card,
    .activity-feed {
        padding: 20px;
    }
    
    .rank-badge {
        min-width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .player-name {
        font-size: 0.85rem;
    }
    
    .activity-avatar {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .activity-text {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.leaderboard-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(93, 23, 235, 0.3);
    border-top: 4px solid #5d17eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.empty-leaderboard {
    text-align: center;
    padding: 40px 20px;
    color: #8888aa;
}

.empty-leaderboard i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #5d17eb;
    opacity: 0.5;
}
