/* =========================================================
   FragCity Banlist
   User Manual inspired redesign
========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background:
        radial-gradient(circle at top, rgba(59, 130, 246, 0.10), transparent 34%),
        radial-gradient(circle at bottom, rgba(14, 165, 233, 0.06), transparent 26%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(8, 15, 28, 0.99));
    overflow-x: hidden;
}

.banlist-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 28px 50px;
    direction: rtl;
    color: #E2E8F0;
    animation: banlistFadeIn 0.35s ease both;
    box-sizing: border-box;
    min-height: 100vh;
}

.banlist-page a {
    color: #60A5FA;
    text-decoration: none;
}

.banlist-page a:hover {
    text-decoration: underline;
}

@keyframes banlistFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Header
========================================================= */

.banlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.banlist-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.banlist-title-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 15px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.28);
    color: #60A5FA;
    font-size: 1.35rem;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.08);
}

.banlist-header h1 {
    margin: 0 0 5px;
    color: #F8FAFC;
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.4;
}

.banlist-header p {
    margin: 0;
    color: #94A3B8;
    font-size: 0.88rem;
    line-height: 1.7;
}

.banlist-header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    color: #93C5FD;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* =========================================================
   Main Container
========================================================= */

.banlist-container {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.94));
    border: 1px solid #22304A;
    border-radius: 24px;
    overflow: hidden;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), 0 0 40px rgba(59, 130, 246, 0.05);
}

/* =========================================================
   Tabs
========================================================= */

.banlist-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.ban-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border-radius: 9px;
    background: transparent;
    border: 1px solid #22304A;
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.ban-tab:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.35);
    color: #CBD5E1;
    transform: translateY(-1px);
}

.ban-tab:focus-visible {
    outline: 2px solid #60A5FA;
    outline-offset: 2px;
}

.ban-tab.active {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-color: #3B82F6;
    color: #FFFFFF;
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.24);
}

.ban-tab.active:hover {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border-color: #3B82F6;
    color: #FFFFFF;
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(59, 130, 246, 0.28);
}

.ban-tab i { font-size: 0.85rem; }

/* =========================================================
   Table Wrapper
========================================================= */

.banlist-table-wrapper {
    position: relative;
    width: 100%;
    min-height: 180px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.banlist-page.is-loading .banlist-table-wrapper {
    opacity: 0.45;
    transform: translateY(4px);
    pointer-events: none;
}

/* =========================================================
   Table Content Animation
========================================================= */

.banlist-table-scroll,
.banlist-state {
    animation: banlistContentIn 0.22s ease both;
}

@keyframes banlistContentIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Table Scroll
========================================================= */

.ban-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 17px;
    border: 1px solid rgba(148, 163, 184, 0.08);
    scrollbar-width: thin;
    scrollbar-color: #334155 #0B1220;
}

.ban-table-scroll::-webkit-scrollbar { height: 9px; }
.ban-table-scroll::-webkit-scrollbar-track { background: #0B1220; }
.ban-table-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
}
.ban-table-scroll::-webkit-scrollbar-thumb:hover { background: #3B82F6; }

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

.ban-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    direction: ltr;
    background: rgba(11, 18, 32, 0.72);
}

.ban-table th {
    padding: 14px 13px;
    background: #0B1220;
    color: #93C5FD;
    border-bottom: 1px solid rgba(59, 130, 246, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.ban-table th i {
    margin-right: 6px;
    color: #60A5FA;
}

.ban-table th.col-rank {
    width: 50px;
    text-align: center;
}

.ban-table td {
    padding: 12px 13px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
    color: #CBD5E1;
    vertical-align: middle;
    text-align: left;
    font-size: 0.79rem;
    white-space: nowrap;
}

.ban-table tbody tr {
    transition: background 0.2s ease;
}

.ban-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.045);
}

.ban-table tbody tr:last-child td { border-bottom: none; }

.rank-cell {
    width: 50px;
    text-align: center !important;
    color: #60A5FA !important;
    font-size: 0.95rem !important;
    font-weight: 800;
}

.mono-cell {
    direction: ltr;
    font-family: Consolas, "Courier New", monospace;
    color: #94A3B8 !important;
}

/* =========================================================
   Player / Admin Cell
========================================================= */

.ban-player {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 170px;
}

.ban-avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.16);
}

.ban-player-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
}

.ban-player-name {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #F8FAFC;
    font-weight: 700;
}

.ban-steam-id {
    display: inline-block;
    padding: 2px 7px;
    background: #0B1220;
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 999px;
    color: #64748B;
    direction: ltr;
    font-size: 0.63rem;
    font-family: Consolas, monospace;
}

/* =========================================================
   Empty / Error States
========================================================= */

.banlist-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 40px 20px;
    text-align: center;
}

.banlist-state-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 17px;
    border-radius: 20px;
    font-size: 1.7rem;
}

.banlist-state h3 {
    margin: 0 0 8px;
    color: #F8FAFC;
    font-size: 1.05rem;
}

.banlist-state p {
    margin: 0;
    max-width: 600px;
    color: #64748B;
    font-size: 0.88rem;
    line-height: 1.8;
}

.banlist-state.empty .banlist-state-icon {
    background: rgba(59, 130, 246, 0.09);
    border: 1px solid rgba(59, 130, 246, 0.20);
    color: #60A5FA;
}

.banlist-state.error .banlist-state-icon {
    background: rgba(239, 68, 68, 0.09);
    border: 1px solid rgba(239, 68, 68, 0.20);
    color: #F87171;
}

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

@media (max-width: 1000px) {
    .banlist-page {
        padding: 22px 18px 36px;
    }

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

    .banlist-header-badge {
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .banlist-container {
        padding: 15px;
        border-radius: 20px;
    }

    .banlist-header h1 { font-size: 1.3rem; }
    .banlist-header p { font-size: 0.8rem; }

    .banlist-title-icon {
        width: 44px;
        height: 44px;
    }

    .banlist-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 15px;
        scrollbar-width: thin;
        scrollbar-color: #334155 transparent;
    }

    .banlist-tabs::-webkit-scrollbar { height: 5px; }
    .banlist-tabs::-webkit-scrollbar-thumb {
        background: #334155;
        border-radius: 999px;
    }

    .ban-tab {
        flex-shrink: 0;
        min-height: 38px;
        padding: 7px 13px;
        font-size: 0.78rem;
    }

    .ban-table { min-width: 850px; }

    .ban-table th,
    .ban-table td {
        padding: 10px 9px;
        font-size: 0.74rem;
    }

    .ban-avatar {
        width: 32px;
        height: 32px;
    }

    .ban-player { min-width: 150px; }
}

@media (max-width: 480px) {
    .banlist-page {
        padding: 16px 12px 28px;
    }

    .banlist-container {
        padding: 10px;
        border-radius: 18px;
    }

    .banlist-header h1 { font-size: 1.15rem; }
    .banlist-title-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 1.1rem;
    }

    .ban-tab {
        padding: 7px 11px;
        font-size: 0.74rem;
    }

    .ban-table { min-width: 780px; }
}
