﻿/* ---------- Leaderboard Container ---------- */
.leaderboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: #37352f;
}

/* ---------- Header ---------- */
.leaderboard-header {
    margin-bottom: 2.5rem;
}

.leaderboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #37352f;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.leaderboard-subtitle {
    font-size: 1.1rem;
    color: #73726e;
    margin: 0;
    font-weight: 400;
}

/* ---------- Category Tabs ---------- */
.leaderboard-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e9e9e7;
    padding-bottom: 0;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #73726e;
    background-color: transparent;
    text-decoration: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    top: 1px;
}

    .tab-button:hover {
        color: #37352f;
        background-color: #fafaf9;
        text-decoration: none;
    }

    .tab-button.active {
        color: #37352f;
        border-bottom-color: #37352f;
        font-weight: 600;
    }

.tab-icon {
    font-size: 1.125rem;
}

/* ---------- Leaderboard List ---------- */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------- Leaderboard Item ---------- */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #ffffff;
    border: 1px solid #e9e9e7;
    border-radius: 12px;
    transition: all 0.2s ease;
}

    .leaderboard-item:hover {
        border-color: #d3d1cb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

    /* Top 3 special styling */
    .leaderboard-item.rank-1 {
        background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
        border-color: #fbbf24;
    }

    .leaderboard-item.rank-2 {
        background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 100%);
        border-color: #d1d5db;
    }

    .leaderboard-item.rank-3 {
        background: linear-gradient(135deg, #fef3e8 0%, #ffffff 100%);
        border-color: #fb923c;
    }

/* ---------- Rank Badge ---------- */
.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.rank-medal {
    font-size: 2rem;
    line-height: 1;
}

.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #9b9a97;
}

/* ---------- User Info ---------- */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #37352f;
    margin: 0 0 0.375rem 0;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #73726e;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-icon {
    font-size: 0.875rem;
}

.stat-divider {
    color: #d3d1cb;
}

/* ---------- Rating Display ---------- */
.rating-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.rating-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #37352f;
    line-height: 1;
}

.rating-stars {
    display: flex;
    gap: 0.125rem;
}

    .rating-stars .star {
        font-size: 0.875rem;
        color: #d3d1cb;
    }

        .rating-stars .star.filled {
            color: #fbbf24;
        }

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background-color: #fafaf9;
    border: 1px solid #e9e9e7;
    border-radius: 16px;
    margin-top: 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #37352f;
    margin-bottom: 0.75rem;
}

.empty-description {
    font-size: 1rem;
    color: #73726e;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.btn-upload-empty {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    background-color: #37352f;
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .btn-upload-empty:hover {
        background-color: #2c2a26;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        color: #ffffff;
        text-decoration: none;
    }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .leaderboard-container {
        padding: 2rem 1.5rem;
    }

    .leaderboard-title {
        font-size: 2rem;
    }

    .leaderboard-tabs {
        flex-direction: column;
        border-bottom: none;
        gap: 0.5rem;
    }

    .tab-button {
        border-bottom: none;
        border: 1px solid #e9e9e7;
        border-radius: 8px;
        justify-content: center;
        top: 0;
    }

        .tab-button.active {
            background-color: #37352f;
            color: #ffffff;
            border-color: #37352f;
        }

    .leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .user-info {
        width: 100%;
    }

    .rating-display {
        align-items: flex-start;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }
}
