.leaderboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.badge-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 2rem 0;
}

.badge-stat {
    background: var(--surface-1);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-width: 140px;
}

.leaderboard-table {
    background: var(--surface-1);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.leaderboard-row {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    gap: 0.5rem;
}

.leaderboard-row:hover {
    background: var(--surface-2);
    transform: translateX(5px);
}

.leaderboard-row.current-user {
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.1), rgba(103, 58, 183, 0.1));
    border: 2px solid var(--bs-purple);
}

.rank-number {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.contributor-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.contributor-info {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.contributor-name {
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contributor-stats {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.contributor-amount {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--bs-success);
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.contributor-badge {
    flex-shrink: 0;
}

.scroll-to-me {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bs-purple);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    z-index: 1000;
}

.scroll-to-me:hover {
    transform: scale(1.1);
}

.user-status-card {
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.05), rgba(103, 58, 183, 0.05));
}

.user-avatar {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid var(--bs-purple);
}

.user-avatar-placeholder {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    background: linear-gradient(135deg, #9c27b0, #673ab7);
}

/* Pulse animation for highlighting */
@keyframes pulse {
    0%, 100% {
        background: linear-gradient(135deg, rgba(128, 90, 213, 0.1), rgba(103, 58, 183, 0.1));
    }
    50% {
        background: linear-gradient(135deg, rgba(128, 90, 213, 0.3), rgba(103, 58, 183, 0.3));
    }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .leaderboard-header {
        padding: 2rem 0;
    }
    
    .leaderboard-header h1 {
        font-size: 1.75rem;
    }
    
    .leaderboard-header h2 {
        font-size: 1.5rem;
    }
    
    /* Badge summary - stack on mobile */
    .badge-summary {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin: 1.5rem 0;
    }
    
    .badge-stat {
        padding: 0.75rem 1rem;
        min-width: unset;
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }
    
    .badge-stat .badge {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem !important;
    }
    
    .badge-stat strong {
        font-size: 1.25rem;
        margin-top: 0.25rem;
    }
    
    /* Leaderboard rows - vertical layout on mobile */
    .leaderboard-row {
        flex-direction: column;
        padding: 1rem 0.75rem;
        text-align: center;
    }
    
    .leaderboard-row:hover {
        transform: none;
    }
    
    .rank-number {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        min-width: unset;
    }
    
    .contributor-avatar {
        width: 60px;
        height: 60px;
        margin: 0.5rem 0;
    }
    
    .contributor-info {
        margin-bottom: 0.5rem;
    }
    
    .contributor-name {
        white-space: normal;
        font-size: 1rem;
    }
    
    .contributor-stats {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-top: 0.25rem;
    }
    
    .contributor-amount {
        font-size: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .contributor-badge .badge {
        font-size: 0.9rem;
        padding: 0.375rem 0.75rem !important;
    }
    
    /* User status card mobile */
    .user-status-card .card-body {
        padding: 1rem;
    }
    
    .user-status-card .d-flex {
        flex-direction: column !important;
        text-align: center;
    }
    
    .user-avatar,
    .user-avatar-placeholder {
        width: 70px;
        height: 70px;
        margin: 0 auto 1rem !important;
    }
    
    .user-avatar-placeholder {
        font-size: 1.5rem;
    }
    
    .user-status-card h5 {
        font-size: 1.1rem;
    }
    
    .user-status-card .row {
        justify-content: center;
    }
    
    .user-status-card .btn {
        margin-top: 1rem;
        width: 100%;
    }
    
    /* Floating button */
    .scroll-to-me {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .scroll-to-me i {
        font-size: 1rem;
    }
    
    .scroll-to-me span {
        font-size: 0.6rem !important;
    }
    
    /* Navigation buttons */
    .navigation-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navigation-buttons .btn {
        width: 100%;
    }
}

/* Small mobile adjustments */
@media (max-width: 576px) {
    .leaderboard-header .lead {
        font-size: 1rem;
    }
    
    .badge-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .badge-stat {
        padding: 0.5rem;
    }
    
    .badge-stat .badge {
        font-size: 0.75rem;
    }
    
    .contributor-stats {
        font-size: 0.75rem;
    }
    
    /* Hide less important info on very small screens */
    .contributor-stats {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .leaderboard-row:hover {
    background: var(--surface-3);
}

[data-bs-theme="dark"] .leaderboard-row.current-user {
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.2), rgba(103, 58, 183, 0.2));
}

[data-bs-theme="dark"] .user-status-card {
    background: linear-gradient(135deg, rgba(128, 90, 213, 0.1), rgba(103, 58, 183, 0.1));
}