/* Leaderboard Page - Simple Design matching category-detail & all-assets */

/* Import CSS variables */
@import url("../variables.a45104a2cb93.css");

/* ========================================= */
/* Category Header (Simple like other pages) */
/* ========================================= */

.category-header {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 183, 0, 0.1);
    margin-bottom: 1.5rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF4E6 100%);
    border-radius: 16px;
    color: #FFB700;
    border: 2px solid rgba(255, 183, 0, 0.15);
    font-size: 1.75rem;
}

.category-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.category-subtitle {
    color: #718096;
    margin: 0;
    font-size: 0.9rem;
}

/* User rank display in header */
.user-rank-display {
    background: rgba(255, 183, 0, 0.15);
    border: 2px solid rgba(255, 183, 0, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.user-rank-display h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.user-rank-display p {
    font-size: 0.875rem;
    color: #718096;
    margin: 0;
}

/* ========================================= */
/* Statistics Cards (Filter Card Style)     */
/* ========================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border: 1px solid rgba(255, 183, 0, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255, 183, 0, 0.15);
    border-color: rgba(255, 183, 0, 0.3);
}

.stat-card i {
    color: #FFB700;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #FFB700;
    margin-bottom: 0.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.stat-label {
    color: #718096;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ========================================= */
/* Category Leaders Cards                    */
/* ========================================= */

.category-leaders-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #FFB700;
}

.category-leaders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.category-leader-card {
    background: white;
    border: 1px solid rgba(255, 183, 0, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 4px solid #FFB700;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.category-leader-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(255, 183, 0, 0.15);
}

.category-leader-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-leader-title i {
    color: #FFB700;
}

.leader-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.leader-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 183, 0, 0.2);
}

.leader-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.1) 0%, rgba(255, 183, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFB700;
    border: 2px solid rgba(255, 183, 0, 0.2);
}

.leader-details h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.leader-details h6 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.leader-details h6 a:hover {
    color: #FFB700;
}

.leader-details small {
    color: #718096;
    font-size: 0.8125rem;
}

/* ========================================= */
/* Leaderboard Table                         */
/* ========================================= */

.leaderboard-section {
    margin-bottom: 2rem;
}

.leaderboard-card {
    background: white;
    border: 1px solid rgba(255, 183, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, #FFFBF5 0%, #FFF8F0 100%);
    border-bottom: 2px solid rgba(255, 183, 0, 0.2);
    color: #2d3748;
    font-weight: 700;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.table tbody tr:nth-child(even) {
    background-color: rgba(255, 183, 0, 0.02);
}

.table tbody tr:hover {
    background-color: rgba(255, 183, 0, 0.08);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.15);
}

/* Current user highlight */
.current-user {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%) !important;
    border-left: 4px solid #2196F3;
}

.current-user:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%) !important;
}

.table tbody td {
    vertical-align: middle;
    font-size: 0.875rem;
    padding: 1rem;
    color: #2d3748;
}

/* ========================================= */
/* Rank Badges                               */
/* ========================================= */

.rank-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rank-badge::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 20px currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rank-badge:hover::after {
    opacity: 0.3;
}

/* Gold - 1st place */
.rank-1 {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #663300;
    font-size: 1.3rem;
}

/* Silver - 2nd place */
.rank-2 {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #4A4A4A;
    font-size: 1.2rem;
}

/* Bronze - 3rd place */
.rank-3 {
    background: linear-gradient(135deg, #CD853F 0%, #8B4513 100%);
    color: #FFFFFF;
    font-size: 1.1rem;
}

/* Other ranks */
.rank-other {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #718096;
    font-size: 1rem;
}

/* ========================================= */
/* User Info in Table                        */
/* ========================================= */

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 183, 0, 0.2);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: #FFB700;
    transform: scale(1.1);
}

.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.1) 0%, rgba(255, 183, 0, 0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFB700;
    border: 2px solid rgba(255, 183, 0, 0.2);
}

.user-details h6 {
    font-weight: 600;
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.user-details h6 a {
    color: #2d3748;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-details h6 a:hover {
    color: #FFB700;
}

.user-details small {
    color: #718096;
    font-size: 0.75rem;
}

.verified-badge {
    color: #2196F3;
    font-size: 0.875rem;
}

/* ========================================= */
/* Badges & Labels                           */
/* ========================================= */

.achievement-badge {
    background: linear-gradient(135deg, rgba(255, 183, 0, 0.1) 0%, rgba(255, 183, 0, 0.2) 100%);
    color: #FFB700;
    font-weight: 600;
    border-radius: 12px;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.points-display {
    font-weight: 700;
    color: #2d3748;
    font-size: 1rem;
}

.level-badge {
    font-weight: 600;
    border-radius: 12px;
    padding: 0.375rem 0.875rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================= */
/* Pagination Styling                        */
/* ========================================= */

.pagination {
    gap: 0.25rem;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    color: #2d3748;
    font-weight: 500;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: #f8f9fa;
    border-color: #FFB700;
    color: #FFB700;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #FFB700, #FF9500);
    border-color: #FFB700;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.3);
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .page-link i {
    font-size: 0.875rem;
    line-height: 1;
}

/* ========================================= */
/* Responsive Design                         */
/* ========================================= */

@media (max-width: 768px) {
    .category-header {
        padding: 1rem;
    }

    .category-icon-wrapper {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-rank-display {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .category-leaders-grid {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 0.8125rem;
    }

    .rank-badge {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    .user-avatar,
    .user-avatar-placeholder {
        width: 32px;
        height: 32px;
    }

    .leader-avatar,
    .leader-avatar-placeholder {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .table thead th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }

    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}
