/* Online Players Page - Redesigned */
.players-page {
    min-height: calc(100vh - 200px);
    padding: 50px 20px 70px;
    position: relative;
}

.players-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(74, 163, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.players-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* HEADER SECTION */
.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 24px;
}

.players-title-section h1 {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #e8f4ff 0%, #7bb4ff 50%, #4aa3ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.players-title-section p {
    color: #6b7a94;
    font-size: 1rem;
    margin: 0;
}

/* COMPACT STATS */
.players-stats {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(18, 22, 38, 0.7);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.stat-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-badge.all { border-color: rgba(74,163,255,0.3); }
.stat-badge.alliance { border-color: rgba(74,163,255,0.3); }
.stat-badge.horde { border-color: rgba(231,76,60,0.3); }

.stat-badge .stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.stat-badge.all .stat-icon { background: rgba(74,163,255,0.2); color: #4aa3ff; }
.stat-badge.alliance .stat-icon { background: rgba(74,163,255,0.2); color: #4aa3ff; }
.stat-badge.horde .stat-icon { background: rgba(231,76,60,0.2); color: #e74c3c; }

.stat-badge .stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.stat-badge.alliance .stat-value { color: #60a5fa; }
.stat-badge.horde .stat-value { color: #f87171; }

.stat-badge .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7a94;
    font-weight: 600;
}

/* FILTER BAR */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .filter-bar {
        flex-direction: column;
    }
    
    .faction-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .players-stats {
        order: 1;
    }
    
    .search-wrapper {
        width: 100%;
        order: 2;
    }

    .advanced-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.faction-tabs {
    display: flex;
    gap: 6px;
    background: rgba(18, 22, 38, 0.6);
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
}

.faction-tab {
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    background: transparent;
    color: #6b7a94;
}

.faction-tab:hover {
    background: rgba(255,255,255,0.05);
    color: #8a9bbd;
}

.faction-tab.active {
    background: rgba(74,163,255,0.2);
    color: #fff;
    box-shadow: 0 4px 12px rgba(74,163,255,0.2);
}

.faction-tab.all { --tab-color: #4aa3ff; }
.faction-tab.alliance { --tab-color: #4aa3ff; }
.faction-tab.horde { --tab-color: #e74c3c; }

.faction-tab.active.all { background: rgba(74,163,255,0.2); color: #60a5fa; }
.faction-tab.active.alliance { background: rgba(74,163,255,0.2); color: #60a5fa; }
.faction-tab.active.horde { background: rgba(231,76,60,0.2); color: #f87171; }

.search-wrapper {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    background: rgba(18, 22, 38, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 16px 12px 44px;
    color: #e4ecff;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.search-input::placeholder { color: #6b7a94; }
.search-input:focus {
    outline: none;
    border-color: rgba(74,163,255,0.5);
    box-shadow: 0 0 0 4px rgba(74,163,255,0.1);
}

.search-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7a94;
    font-size: 1rem;
}

.advanced-filter-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) repeat(2, minmax(94px, 0.55fr)) auto;
    gap: 10px;
    align-items: end;
    margin: -10px 0 18px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(125, 175, 255, 0.12);
    background: rgba(10, 15, 25, 0.42);
    backdrop-filter: blur(14px) saturate(125%);
}

.player-filter-field {
    display: grid;
    gap: 6px;
}

.player-filter-field span {
    color: #8fa5c4;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.player-filter-field select,
.player-filter-field input {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.045);
    color: #f4f8ff;
    font-weight: 800;
}

.player-filter-field select option {
    background: #0b1726;
    color: #f4f8ff;
}

.player-filter-reset {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.055);
    color: #d7e6ff;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.player-filter-reset.is-hidden {
    display: none;
}

.player-filter-reset:hover {
    background: rgba(74,163,255,0.12);
    border-color: rgba(74,163,255,0.28);
}

/* PLAYER TABLE */
.players-table-wrapper {
    background: rgba(18, 22, 38, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    overflow: hidden;
}

.player-table {
    width: 100%;
    border-collapse: collapse;
}

.player-table th {
    padding: 14px 18px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7a94;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: left;
}

.player-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}

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

.player-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.player-table tbody tr:hover td {
    background: rgba(74,163,255,0.04);
}

/* Player Cell */
.player-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.player-avatars {
    position: relative;
    width: 60px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-race-avatar {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: 2px solid rgba(18, 22, 38, 0.95);
    position: absolute;
    left: 3px;
}

.player-class-avatar {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    position: absolute;
    left: 24px;
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.player-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.player-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    text-decoration: none;
}

.player-name:hover {
    color: #7bb4ff;
}

.player-class-race {
    font-size: 0.8rem;
    color: #6b7a94;
}

.player-gm-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Faction Icon */
.faction-cell {
    width: 50px;
    text-align: center;
}

.faction-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.faction-icon.alliance {
    background: rgba(74,163,255,0.12);
    color: #60a5fa;
    border: 1px solid rgba(74,163,255,0.3);
}

.faction-icon.horde {
    background: rgba(231,76,60,0.12);
    color: #f87171;
    border: 1px solid rgba(231,76,60,0.3);
}

/* Level Cell */
.level-cell {
    width: 80px;
}

.level-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(74,163,255,0.08);
    border: 1px solid rgba(74,163,255,0.2);
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #7ec8ff;
}

/* Zone Cell */
.zone-cell {
    color: #6b7a94;
    font-size: 0.9rem;
}

.zone-hidden {
    color: inherit;
    font: inherit;
}

/* Actions Cell */
.actions-cell {
    width: 120px;
    text-align: right;
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-btn.armory {
    background: rgba(74,163,255,0.1);
    color: #4aa3ff;
    border: 1px solid rgba(74,163,255,0.2);
}

.action-btn.armory:hover {
    background: rgba(74,163,255,0.2);
    border-color: rgba(74,163,255,0.4);
    transform: translateY(-2px);
}

.action-btn.report {
    background: rgba(255,255,255,0.04);
    color: #6b7a94;
    border: 1px solid rgba(255,255,255,0.08);
}

.action-btn.report:hover {
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border-color: rgba(239,68,68,0.2);
}

/* NO PLAYERS STATE */
.no-players-state {
    text-align: center;
    padding: 80px 24px;
    background: rgba(18, 22, 38, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 24px;
}

.no-players-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-players-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e4ecff;
    margin-bottom: 10px;
}

.no-players-text {
    color: #6b7a94;
    font-size: 1.05rem;
}

/* LOADING STATE */
.players-loading {
    text-align: center;
    padding: 60px;
    color: #6b7a94;
}

.players-loading i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

.players-empty-filter {
    display: none;
    padding: 48px 20px;
    color: #9fb2ce;
    text-align: center;
    font-weight: 900;
}

.players-empty-filter.show {
    display: block;
}

.players-empty-filter i {
    display: block;
    margin-bottom: 10px;
    color: #7bb4ff;
    font-size: 1.8rem;
}

.players-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.players-page-btn,
.players-page-gap {
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.players-page-btn {
    color: #a9cfff;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(125, 175, 255, 0.16);
    cursor: pointer;
}

.players-page-btn:hover:not(:disabled),
.players-page-btn.active {
    color: #fff;
    background: rgba(74,163,255,0.18);
    border-color: rgba(74,163,255,0.38);
}

.players-page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.players-page-gap {
    color: #6b7a94;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .player-table th:nth-child(3),
    .player-table td:nth-child(3) {
        display: none;
    }
}

@media (max-width: 600px) {
    .players-page {
        padding: 20px 12px 40px;
    }
    
    .players-title-section h1 {
        font-size: 1.7rem;
    }
    
    .players-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .stat-badge {
        flex: 1;
        justify-content: center;
    }
    
    .player-table th:nth-child(4),
    .player-table td:nth-child(4) {
        display: none;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .action-btn {
        justify-content: center;
    }
}

/* Modern polish */
.players-page {
    padding: 42px 20px 70px;
    overflow: hidden;
}

.players-page::before {
    top: -140px;
    width: 920px;
    height: 620px;
    background:
        radial-gradient(ellipse at 28% 8%, rgba(74, 163, 255, 0.11) 0%, transparent 50%),
        radial-gradient(ellipse at 78% 38%, rgba(16, 185, 129, 0.055) 0%, transparent 42%);
}

.players-page::after {
    content: '';
    position: absolute;
    right: -160px;
    bottom: 4%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(125, 175, 255, 0.055), transparent 62%);
    pointer-events: none;
}

.players-container {
    max-width: 1120px;
}

.players-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 18px;
    padding: 28px;
    border-radius: 18px;
    border: 1px solid rgba(125, 175, 255, 0.14);
    background:
        radial-gradient(ellipse at 18% 0%, rgba(74, 163, 255, 0.10) 0%, transparent 42%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.58), rgba(7, 12, 22, 0.52));
    backdrop-filter: blur(16px) saturate(130%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    position: relative;
    overflow: hidden;
}

.players-overview::before,
.filter-bar::before,
.players-table-wrapper::before,
.no-players-state::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(125, 175, 255, 0.42), transparent);
}

.players-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #7bb4ff;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.players-title {
    margin: 0 0 9px;
    color: #f4f8ff;
    font-size: 2.15rem;
    font-weight: 900;
    line-height: 1.08;
}

.players-copy {
    margin: 0;
    max-width: 650px;
    color: #9fb2ce;
    font-size: 1rem;
    line-height: 1.65;
}

.players-live-card {
    min-width: 178px;
    padding: 15px 16px;
    border-radius: 16px;
    border: 1px solid rgba(74, 163, 255, 0.20);
    background: rgba(74, 163, 255, 0.075);
}

.players-live-label {
    color: #8fa5c4;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.players-live-value {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 7px;
    color: #f4f8ff;
    font-size: 1.05rem;
    font-weight: 900;
}

.players-live-updated {
    margin-top: 8px;
    color: #8fa5c4;
    font-size: 0.76rem;
    font-weight: 800;
}

.players-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.filter-bar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(240px, auto) minmax(0, 1fr) minmax(260px, 320px);
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(125, 175, 255, 0.12);
    background: rgba(10, 15, 25, 0.46);
    backdrop-filter: blur(14px) saturate(125%);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.faction-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.faction-tab {
    min-height: 42px;
    border-radius: 11px;
    color: #8fa5c4;
    font-weight: 800;
}

.faction-tab.active {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 8px 18px rgba(0,0,0,0.18);
}

.players-stats {
    justify-content: end;
    gap: 10px;
}

.stat-badge {
    min-width: 116px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.stat-badge .stat-icon {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-wrapper {
    width: min(320px, 100%);
    justify-self: end;
}

.search-input {
    min-height: 46px;
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    color: #f4f8ff;
}

.players-table-wrapper {
    position: relative;
    background:
        linear-gradient(180deg, rgba(10, 15, 25, 0.60), rgba(7, 12, 22, 0.50));
    border: 1px solid rgba(125, 175, 255, 0.13);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(14px) saturate(125%);
}

.player-table th {
    padding: 15px 18px;
    color: #8fa5c4;
    background: rgba(255, 255, 255, 0.035);
}

.player-table td {
    padding: 16px 18px;
    border-bottom-color: rgba(255,255,255,0.055);
}

.player-table tbody tr:hover td {
    background: rgba(74, 163, 255, 0.065);
}

.player-race-avatar,
.player-class-avatar {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.player-class-avatar {
    border: 1px solid rgba(125, 175, 255, 0.24);
}

.player-name {
    color: #f4f8ff;
}

.player-name:hover {
    color: #7bb4ff;
}

.player-class-race,
.zone-cell {
    color: #95a8c4;
}

.faction-icon,
.level-badge,
.action-btn {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.level-badge {
    border-radius: 999px;
}

.action-btn {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    border-radius: 12px;
}

.no-players-state {
    position: relative;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(74, 163, 255, 0.10) 0%, transparent 45%),
        linear-gradient(180deg, rgba(10, 15, 25, 0.58), rgba(7, 12, 22, 0.52));
    border-color: rgba(125, 175, 255, 0.14);
    backdrop-filter: blur(16px) saturate(130%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

@media (max-width: 900px) {
    .players-overview {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .players-live-card {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .players-page {
        padding: 26px 12px 46px;
    }

    .players-overview {
        padding: 22px;
    }

    .players-title {
        font-size: 1.68rem;
    }

    .filter-bar {
        padding: 12px;
        grid-template-columns: 1fr;
    }

    .advanced-filter-bar {
        grid-template-columns: 1fr;
    }

    .faction-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .faction-tab {
        padding: 10px 8px;
    }

    .stat-badge {
        min-width: 0;
        padding: 10px 8px;
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .stat-badge .stat-icon {
        width: 30px;
        height: 30px;
    }

    .player-table th,
    .player-table td {
        padding: 13px 12px;
    }

    .player-avatars {
        width: 52px;
    }
}
