.leaderboard-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

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

.leaderboard-header h1 {
    color: #2c5530;
    margin-bottom: 10px;
}

.leaderboard-header p {
    color: #666;
    font-size: 16px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2c5530;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.leaderboard-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.leaderboard-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.leaderboard-table {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.leaderboard-table table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th {
    background: #2c5530;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.leaderboard-table th:hover {
    background: #1e3c22;
}

.leaderboard-table th.sortable::after {
    content: '↕️';
    position: absolute;
    right: 8px;
    opacity: 0.7;
}

.leaderboard-table th.sort-asc::after {
    content: '↑';
}

.leaderboard-table th.sort-desc::after {
    content: '↓';
}

.leaderboard-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.leaderboard-table tbody tr:hover {
    background: #f8f9fa;
}

.leaderboard-row {
    transition: background-color 0.2s ease;
}

.leaderboard-row:hover {
    background: #e8f5e8 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaderboard-row.clickable:hover .user-details h4::after {
    content: ' → View Profile';
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.leaderboard-row.not-clickable {
    opacity: 0.8;
}

.leaderboard-row.not-clickable:hover {
    background: #f8f9fa !important;
    transform: none !important;
    box-shadow: none !important;
}

.private-indicator {
    font-size: 12px;
    opacity: 0.6;
    margin-left: 5px;
}

.rank-cell {
    font-weight: 600;
    color: #2c5530;
    font-size: 18px;
    width: 60px;
}

.rank-cell.rank-1 { color: #ffd700; }
.rank-cell.rank-2 { color: #c0c0c0; }
.rank-cell.rank-3 { color: #cd7f32; }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2c5530;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.user-details h4 {
    margin: 0;
    font-size: 16px;
    color: #2c5530;
}

.user-details p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #666;
}

.progress-cell {
    min-width: 120px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 5px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #34ce57);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-weight: 600;
    color: #2c5530;
}

.date-cell {
    color: #666;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .leaderboard-table {
        font-size: 14px;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px 8px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .date-cell {
        display: none;
    }
}