
/* Leaderboard */
#leaderboard-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    color: white;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
}

.leaderboard-header h3 {
    font-size: 24px;
    margin: 0;
    color: #ff6b35;
}

.leaderboard-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.live-indicator {
    color: #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.player-row {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.player-row:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.player-row.top-player {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.player-row.current-player {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.2), rgba(0, 255, 127, 0.1));
    border: 1px solid rgba(0, 255, 127, 0.4);
}

.rank {
    font-size: 20px;
    font-weight: bold;
    margin-right: 15px;
    min-width: 40px;
    text-align: center;
}

.player-info {
    flex: 1;
}

.player-name {
    font-weight: bold;
    font-size: 16px;
}

.last-updated {
    font-size: 12px;
    color: #888;
}

.score {
    font-size: 18px;
    font-weight: bold;
    color: #ff6b35;
    font-family: monospace;
}

/* Player statistics */
.player-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rank-value {
    color: #00ff00;
    font-weight: bold;
}

.score-value {
    color: #ff6b35;
    font-weight: bold;
    font-family: monospace;
}

/* Leaderboard button */
#show-leaderboard {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    z-index: 999;
    transition: transform 0.2s ease;
}

#show-leaderboard:hover {
    transform: scale(1.05);
}

/* Close button */
#leaderboard-panel button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
}

#leaderboard-panel button:hover {
    background: #ff8c42;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.notification-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.notification-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Celebration modal */
.celebration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
}

.celebration-content {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    animation: bounceIn 0.6s ease;
}

.celebration-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.celebration-content h2 {
    margin: 0 0 15px 0;
    font-size: 28px;
}

.celebration-content button {
    background: white;
    color: #ff6b35;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.celebration-content button:hover {
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    #leaderboard-panel {
        padding: 10px;
    }
    
    .leaderboard-header h3 {
        font-size: 20px;
    }
    
    .player-row {
        padding: 10px;
    }
    
    .rank {
        font-size: 16px;
        min-width: 30px;
        margin-right: 10px;
    }
    
    .player-name {
        font-size: 14px;
    }
    
    .score {
        font-size: 16px;
    }
    
    #show-leaderboard {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 14px;
    }
}
