.ranking-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ranking-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #222222;
}

.ranking-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ranking-table thead th {
    background: #008ECC;
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-table thead th:first-child {
    border-radius: 12px 0 0 0;
    text-align: center;
    width: 60px;
}

.ranking-table thead th:last-child {
    border-radius: 0 12px 0 0;
    text-align: center;
    width: 100px;
}

.ranking-table tbody tr {
    border-bottom: 1px solid #e8f4e8;
    transition: background-color 0.2s ease;
}

.ranking-table tbody tr:hover {
    background-color: #f0f9f0;
}

.ranking-table tbody tr:nth-child(even) {
    background-color: #f5fbf5;
}

.ranking-table tbody tr:nth-child(even):hover {
    background-color: #e8f4e8;
}

.ranking-table td {
    padding: 12px 16px;
    vertical-align: middle;
}

.ranking-table td:first-child {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}

.ranking-table td:last-child {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #5BA52F;
}

.ranking-student-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-student-cell .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-student-cell .student-name {
    font-weight: 600;
    color: #222222;
    font-size: 0.95rem;
    text-transform: capitalize;
}

.ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

.ranking-position.top-1 {
    background: linear-gradient(135deg, #5BA52F, #4a8f27);
    color: #fff;
    box-shadow: 0 2px 8px rgba(91, 165, 47, 0.4);
}

.ranking-position.top-2 {
    background: linear-gradient(135deg, #008ECC, #0077b3);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 142, 204, 0.4);
}

.ranking-position.top-3 {
    background: linear-gradient(135deg, #925D19, #7a4e15);
    color: #fff;
    box-shadow: 0 2px 8px rgba(146, 93, 25, 0.4);
}

.ranking-position.default {
    background: #e8f4e8;
    color: #5BA52F;
}

.ranking-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.ranking-pagination a,
.ranking-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ranking-pagination a {
    background: #fff;
    color: #008ECC;
    border: 2px solid #d1e7dd;
}

.ranking-pagination a:hover {
    background: #008ECC;
    color: #fff;
    border-color: #008ECC;
}

.ranking-pagination .current {
    background: #5BA52F;
    color: #fff;
    border: 2px solid #5BA52F;
}

.ranking-pagination .dots {
    border: none;
    background: none;
    color: #6b7280;
}

.ranking-pagination .prev,
.ranking-pagination .next {
    background: #008ECC;
    color: #fff;
    border: 2px solid #008ECC;
}

.ranking-pagination .prev:hover,
.ranking-pagination .next:hover {
    background: #0077b3;
    border-color: #0077b3;
}

.ranking-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
    font-size: 1rem;
}

.ranking-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5BA52F, #4a8f27);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 70px;
}

@media (max-width: 640px) {
    .ranking-container {
        padding: 0 8px;
    }

    .ranking-title {
        font-size: 1.35rem;
    }

    .ranking-table thead th {
        padding: 10px 8px;
        font-size: 0.75rem;
    }

    .ranking-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .ranking-student-cell {
        gap: 8px;
    }

    .ranking-student-cell .avatar {
        width: 36px;
        height: 36px;
    }

    .ranking-student-cell .student-name {
        font-size: 0.85rem;
    }

    .ranking-position {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .ranking-score-badge {
        padding: 4px 10px;
        font-size: 0.95rem;
    }
}
