/* Multi-server ranking pages */
.rank-page {
    padding-top: 14px;
    padding-bottom: 18px;
}

.rank-detail-shell,
.rank-hub-shell {
    border: 1px solid rgba(171, 110, 225, 0.24);
    border-radius: 18px;
    background: rgba(13, 17, 27, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    overflow: hidden;
}

.rank-detail-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(167, 111, 216, 0.18);
}

.rank-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #f7f3ff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
}

.rank-back-link:hover,
.rank-back-link:focus {
    color: #d9b8ff;
}

.rank-switchers {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.rank-switch-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 999px;
    background: rgba(0,0,0,.14);
}

.rank-switch-label {
    padding-left: 8px;
    padding-right: 2px;
    color: rgba(255,255,255,.58);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .45px;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(255,255,255,.9);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
    transition: transform .16s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.rank-pill:hover,
.rank-pill:focus {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.12);
    transform: translateY(-1px);
}

.rank-pill.active {
    color: #fff;
    background: linear-gradient(135deg, #b65fe0 0%, #8d50cf 52%, #675cff 100%);
    border-color: rgba(255,255,255,.34);
    box-shadow: 0 8px 20px rgba(125, 78, 218, .34);
}

.rank-detail-body {
    padding: 24px 24px 20px;
}

.rank-title-wrap {
    text-align: center;
    margin-bottom: 18px;
}

.rank-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    color: #cda7ef;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .55px;
    text-transform: uppercase;
}

.rank-detail-title {
    margin: 0;
    color: #fff;
    font-size: clamp(24px, 3.1vw, 34px);
    line-height: 1.22;
    font-weight: 800;
}

.rank-detail-subtitle {
    margin: 7px 0 0;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}

.rank-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(170, 111, 218, .18);
    border-radius: 14px;
    background: rgba(7, 10, 18, .22);
}

.rank-table {
    width: 100%;
    margin: 0 !important;
    color: rgba(255,255,255,.94);
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.rank-table thead th {
    padding: 12px 14px !important;
    color: rgba(255,255,255,.76);
    background: rgba(171, 95, 215, .09);
    border-bottom: 1px solid rgba(176, 103, 220, .22) !important;
    font-size: 13px !important;
    font-weight: 800;
    line-height: 1.35;
    white-space: nowrap;
    vertical-align: middle;
}

.rank-table tbody td {
    padding: 13px 14px !important;
    border-bottom: 1px solid rgba(255,255,255,.055) !important;
    font-size: 14px !important;
    line-height: 1.45;
    white-space: normal;
    vertical-align: middle;
}

.rank-table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.rank-table tbody tr:hover td {
    background: rgba(255,255,255,.025);
}

.rank-col-index {
    width: 64px;
    text-align: center;
}

.rank-col-name {
    min-width: 150px;
    font-weight: 700;
}

.rank-col-number {
    min-width: 150px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.rank-col-task {
    min-width: 240px;
}

.rank-empty {
    padding: 26px 18px !important;
    color: rgba(255,255,255,.62);
    text-align: center;
}

.rank-updated {
    margin-top: 12px;
    color: rgba(255,255,255,.58);
    font-size: 12px;
    text-align: right;
}

.rank-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    font-size: 12px;
    font-weight: 800;
}

.rank-table tbody tr:nth-child(1) .rank-medal,
.rank-table tbody tr:nth-child(2) .rank-medal,
.rank-table tbody tr:nth-child(3) .rank-medal {
    background: rgba(171, 95, 215, .19);
    border: 1px solid rgba(203, 153, 237, .18);
}

/* Rank hub */
.rank-hub-shell {
    padding: 22px;
}

.rank-hub-back {
    color: rgba(255,255,255,.9);
    font-weight: 700;
    text-decoration: none !important;
}

.rank-hub-title {
    margin: 18px 0 4px;
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    text-align: center;
}

.rank-hub-subtitle {
    margin: 0 0 22px;
    color: rgba(255,255,255,.62);
    font-size: 14px;
    text-align: center;
}

.rank-server-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rank-server-card {
    border: 1px solid rgba(171, 110, 225, .22);
    border-radius: 16px;
    background: rgba(255,255,255,.025);
    overflow: hidden;
}

.rank-server-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid rgba(255,255,255,.055);
}

.rank-server-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(173, 98, 217, .15);
    color: #d8a8f2;
    font-size: 18px;
}

.rank-server-name {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}

.rank-server-note {
    margin: 2px 0 0;
    color: rgba(255,255,255,.55);
    font-size: 12px;
}

.rank-server-actions {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.rank-hub-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 58px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
    color: #fff;
    text-decoration: none !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.rank-hub-link:hover,
.rank-hub-link:focus {
    color: #fff;
    background: rgba(170, 91, 216, .12);
    border-color: rgba(204, 143, 238, .28);
    transform: translateY(-1px);
}

.rank-hub-link-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
}

.rank-hub-link small {
    color: rgba(255,255,255,.48);
    font-size: 11px;
}

@media (max-width: 767.98px) {
    .rank-detail-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-switchers {
        width: 100%;
        justify-content: flex-start;
    }

    .rank-detail-body {
        padding: 20px 12px 16px;
    }

    .rank-table thead th {
        padding: 10px 11px !important;
        font-size: 12px !important;
    }

    .rank-table tbody td {
        padding: 11px !important;
        font-size: 13px !important;
    }

    .rank-server-grid {
        grid-template-columns: 1fr;
    }

    .rank-hub-shell {
        padding: 16px 12px;
    }
}
