*{box-sizing:border-box}
:root{
    --bg:#08100d;
    --bg2:#0c1511;
    --panel:#111c17;
    --panel2:#16231c;
    --line:#26372d;
    --line2:#34483b;
    --text:#eef3ef;
    --muted:#8fa198;
    --accent:#c8aa57;
    --accent2:#e2c773;
    --green:#70c986;
    --red:#dc7777;
    --cyan:#70c7d9;
    --shadow:0 18px 50px rgba(0,0,0,.30);
}
html,body{margin:0;padding:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Tahoma,Arial,sans-serif;font-size:14px}
body{background:
radial-gradient(circle at top right,rgba(87,116,88,.12),transparent 35%),
linear-gradient(180deg,#0d1712 0,#08100d 420px)}
a{color:var(--accent2);text-decoration:none}
a:hover{color:#fff}
.page-shell{width:min(1440px,96%);margin:0 auto}
.site-header{margin-top:18px;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(15,26,21,.96);box-shadow:var(--shadow)}
.header-inner{display:flex;justify-content:space-between;align-items:center;padding:24px 28px}
.brand-kicker{font-size:11px;letter-spacing:.22em;color:var(--muted);font-weight:700}
.brand-title{font-size:32px;line-height:1.05;font-weight:800;letter-spacing:.02em;margin-top:4px}
.brand-title span{color:var(--accent)}
.brand-subtitle{margin-top:6px;color:var(--muted);font-size:13px}
.header-status{display:flex;align-items:center;gap:8px;color:#b9cabf;font-size:12px;font-weight:700;letter-spacing:.08em}
.status-dot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px rgba(112,201,134,.08),0 0 16px rgba(112,201,134,.7)}
.main-nav{display:flex;gap:4px;padding:0 18px 14px}
.nav-link{padding:10px 14px;border-radius:9px;color:#9eafa5;font-size:13px;font-weight:700}
.nav-link:hover,.nav-link.active{background:#1b2a22;color:#fff}
.content{padding:18px 0 8px}
.hero-panel{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:24px 26px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(135deg,#142119,#0f1814);box-shadow:var(--shadow)}
.eyebrow,.panel-eyebrow{font-size:10px;letter-spacing:.18em;color:var(--accent);font-weight:800}
.hero-panel h1,.panel-heading h2{margin:5px 0 7px;font-size:25px}
.hero-panel p{margin:0;max-width:800px;color:var(--muted);line-height:1.5}
.primary-action,.filter-button,.view-button{display:inline-flex;align-items:center;justify-content:center;border-radius:9px;font-weight:800}
.primary-action{padding:11px 16px;border:1px solid #7f6c39;background:linear-gradient(#766232,#5b4e2c);color:#fff;white-space:nowrap}
.primary-action:hover{background:linear-gradient(#8c7538,#6a592d)}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:14px}
.stat-card{padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.stat-label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.12em;font-weight:700}
.stat-value{font-size:27px;font-weight:800;margin-top:5px}
.filter-panel{margin-top:14px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.filters{display:grid;grid-template-columns:2fr 1fr 1.25fr 1fr 1.25fr auto;gap:10px;align-items:end}
.filter-field label{display:block;margin:0 0 6px;color:#91a198;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}
.filter-field input,.filter-field select{width:100%;height:40px;border:1px solid var(--line2);border-radius:9px;background:#0b1410;color:#e9efeb;padding:0 11px;outline:none}
.filter-field input:focus,.filter-field select:focus{border-color:#806f42;box-shadow:0 0 0 3px rgba(200,170,87,.08)}
.filter-actions{display:flex;gap:8px}
.filter-button{height:40px;padding:0 14px;border:1px solid var(--line2);cursor:pointer}
.filter-button.primary{background:#263b2f;color:#fff}
.filter-button.ghost{background:#101813;color:#9fb0a6}
.server-panel{margin-top:14px;border:1px solid var(--line);border-radius:16px;background:var(--panel);overflow:hidden;box-shadow:var(--shadow)}
.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}
.panel-heading h2{font-size:18px;margin-bottom:0}
.panel-links{display:flex;gap:14px;font-size:12px}
.table-scroll{overflow-x:auto;overflow-y:visible;max-height:none}
.modern-server-table{width:100%;border-collapse:separate;border-spacing:0;min-width:1080px}
.modern-server-table thead th{position:static;background:#142019;color:#93a39a;font-size:10px;text-transform:uppercase;letter-spacing:.08em;text-align:left;padding:11px 10px;border-bottom:1px solid var(--line2);white-space:nowrap}
.modern-server-table tbody td{padding:10px;border-bottom:1px solid #1f3027;color:#cdd8d1;vertical-align:middle}
.modern-server-table tbody tr:hover td{background:#17251d}
.modern-server-table tbody tr.populated td{background:rgba(28,45,35,.28)}
.modern-server-table tbody tr.populated:hover td{background:#1a2a21}
.icon-column{width:44px;text-align:center!important}
.private-column{width:80px;text-align:center!important}
.time-column{width:88px;text-align:center!important}
.players-column{width:92px;text-align:center!important}
.info-column{width:70px;text-align:center!important}
.icon-cell,.private-cell,.numeric-cell,.info-cell{text-align:center}
.table-icon{display:inline-block;vertical-align:middle;border:0}
.ts-icon{max-width:26px;max-height:26px;border-radius:4px}
.country-icon{max-width:30px;max-height:20px}
.lock-icon{max-width:18px;max-height:18px}
.server-name-line{display:flex;align-items:center;gap:9px;min-width:190px}
.server-pulse{width:8px;height:8px;border-radius:50%;background:#596a60;flex:0 0 auto}
.server-pulse.active{background:var(--green);box-shadow:0 0 9px rgba(112,201,134,.6)}
.server-pulse.busy{background:var(--accent2);box-shadow:0 0 9px rgba(226,199,115,.55)}
.server-pulse.empty{background:#526158}
.server-name{font-weight:800}
.type-badge,.public-badge{display:inline-block;padding:5px 7px;border-radius:999px;border:1px solid #34463b;background:#142019;color:#a9b8ae;font-size:11px}
.public-badge{color:#8ca697}
.mission-cell{color:#aab8af}
.view-button{padding:7px 10px;border:1px solid #516649;background:#1b2a22;color:#dbe7df;font-size:11px}
.view-button:hover{background:#2b4033}
.view-button.disabled{opacity:.45}
.table-footer{display:flex;justify-content:space-between;align-items:center;padding:13px 17px;border-top:1px solid var(--line);color:var(--muted);font-size:12px}
.classic-shortcuts a{text-decoration:underline}
.alert{margin-top:14px;padding:13px 15px;border-radius:12px;border:1px solid var(--line)}
.alert.warning{background:#211d11;border-color:#5e5330;color:#d8c789}
.alert.error{background:#241313;border-color:#6c3838;color:#e7b0b0}
.empty-table{text-align:center;padding:32px!important;color:var(--muted)!important}
.site-footer{margin:18px 0 28px;padding:14px 4px;color:#6f8076;font-size:11px}
.footer-muted{margin-top:4px;color:#526158}
.nowrap{white-space:nowrap}
@media(max-width:1050px){
    .filters{grid-template-columns:1fr 1fr 1fr}
    .search-field{grid-column:span 2}
    .filter-actions{align-self:end}
}
@media(max-width:760px){
    .page-shell{width:100%}
    .site-header,.hero-panel,.server-panel,.filter-panel{border-radius:0;border-left:0;border-right:0}
    .header-inner{padding:18px 15px}
    .brand-title{font-size:25px}
    .brand-subtitle{font-size:11px}
    .header-status{display:none}
    .hero-panel{align-items:flex-start;flex-direction:column;padding:18px 15px}
    .stats-grid{grid-template-columns:1fr 1fr;padding:0 10px}
    .filter-panel{padding:12px}
    .filters{display:block}
    .filter-field{margin-bottom:10px}
    .filter-actions{margin-top:4px}
    .panel-heading{padding:14px;align-items:flex-start;gap:10px}
    .panel-links{flex-direction:column;gap:4px}
    .table-footer{flex-direction:column;align-items:flex-start;gap:8px}
}


/* Modern server detail / View page */
.detail-hero{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:24px 26px;
    border:1px solid var(--line);
    border-radius:16px;
    background:
        radial-gradient(circle at top right,rgba(200,170,87,.08),transparent 36%),
        linear-gradient(135deg,#15221b,#0e1713);
    box-shadow:var(--shadow);
}
.detail-hero-main{min-width:0}
.detail-server-name{
    margin:5px 0 8px;
    font-size:30px;
    line-height:1.1;
    overflow-wrap:anywhere;
}
.detail-meta-line{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    color:var(--muted);
}
.dot-sep{color:#52645a}
.detail-actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.secondary-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:11px 14px;
    border:1px solid var(--line2);
    border-radius:9px;
    background:#111b16;
    color:#acbbb2;
    font-weight:800;
}
.secondary-action:hover{
    color:#fff;
    background:#1a2921;
}
.join-action{
    min-width:110px;
}
.detail-stats-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:12px;
    margin-top:14px;
}
.detail-stat{
    padding:17px 18px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
}
.detail-stat-label{
    color:var(--muted);
    font-size:10px;
    text-transform:uppercase;
    letter-spacing:.12em;
    font-weight:800;
}
.detail-stat-value{
    margin-top:5px;
    font-size:28px;
    font-weight:900;
}
.detail-stat-value.small{
    font-size:18px;
}
.server-message-card{
    margin-top:14px;
    padding:18px;
    border:1px solid #5d5131;
    border-radius:14px;
    background:linear-gradient(135deg,#201b0f,#17150d);
}
.card-label{
    font-size:10px;
    font-weight:800;
    letter-spacing:.13em;
    color:#b5a360;
}
.server-message{
    margin-top:7px;
    color:#e1d8b9;
    line-height:1.55;
}
.details-layout{
    display:grid;
    grid-template-columns:minmax(0,.95fr) minmax(0,1.35fr);
    gap:14px;
    margin-top:14px;
}
.details-card{
    border:1px solid var(--line);
    border-radius:16px;
    background:var(--panel);
    overflow:hidden;
    box-shadow:var(--shadow);
}
.card-heading{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 20px;
    border-bottom:1px solid var(--line);
}
.card-heading h2{
    margin:4px 0 0;
    font-size:18px;
}
.info-list{
    display:block;
}
.info-row{
    display:grid;
    grid-template-columns:160px minmax(0,1fr);
    gap:12px;
    align-items:center;
    padding:12px 18px;
    border-bottom:1px solid #203027;
}
.info-row:last-child{
    border-bottom:0;
}
.info-key{
    color:#809188;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}
.info-value{
    color:#dce5df;
}
.mono{
    font-family:Consolas,"Courier New",monospace;
}
.connection-pill{
    display:inline-block;
    padding:5px 8px;
    border-radius:8px;
    border:1px solid #3f5848;
    background:#0b1510;
    color:#b9d2c2;
}
.wrap-anywhere{
    overflow-wrap:anywhere;
}
.player-table-wrap{
    overflow-x:auto;
}
.modern-player-table{
    width:100%;
    border-collapse:collapse;
    min-width:620px;
}
.modern-player-table th{
    padding:10px 12px;
    background:#142019;
    color:#8fa098;
    font-size:10px;
    letter-spacing:.08em;
    text-transform:uppercase;
    text-align:left;
    border-bottom:1px solid var(--line2);
}
.modern-player-table td{
    padding:11px 12px;
    border-bottom:1px solid #203027;
    color:#cbd8d0;
}
.modern-player-table tr:hover td{
    background:#17251d;
}
.player-name{
    color:#eef3ef!important;
    font-weight:800;
}
.team-pill{
    display:inline-block;
    padding:4px 7px;
    border-radius:999px;
    border:1px solid #34493c;
    background:#15221b;
    color:#a7b8ad;
    font-size:11px;
}
.number-col{
    width:72px;
    text-align:center!important;
}
.player-empty{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    min-height:210px;
    gap:10px;
    color:var(--muted);
}
.player-empty-icon{
    width:46px;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#122019;
    border:1px solid var(--line2);
    color:#65776d;
    font-weight:900;
}
.detail-bottom-actions{
    display:flex;
    gap:9px;
    justify-content:flex-end;
    margin-top:14px;
    padding:16px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--panel);
}
@media(max-width:980px){
    .details-layout{
        grid-template-columns:1fr;
    }
}
@media(max-width:760px){
    .detail-hero{
        flex-direction:column;
        align-items:flex-start;
        border-radius:0;
        border-left:0;
        border-right:0;
        padding:18px 15px;
    }
    .detail-actions{
        justify-content:flex-start;
    }
    .detail-stats-grid{
        grid-template-columns:1fr 1fr;
        padding:0 10px;
    }
    .details-layout{
        gap:10px;
    }
    .details-card{
        border-radius:0;
        border-left:0;
        border-right:0;
    }
    .info-row{
        grid-template-columns:1fr;
        gap:5px;
    }
    .detail-bottom-actions{
        border-radius:0;
        border-left:0;
        border-right:0;
        justify-content:flex-start;
        flex-wrap:wrap;
    }
}


/* Online server with zero players: slow flashing green status dot */
.server-pulse.idle-online{
    background:#70c986;
    box-shadow:0 0 7px rgba(112,201,134,.45);
    animation:idleOnlinePulse 2.8s ease-in-out infinite;
}

@keyframes idleOnlinePulse{
    0%,100%{
        opacity:.38;
        box-shadow:0 0 4px rgba(112,201,134,.25);
        transform:scale(.92);
    }
    50%{
        opacity:1;
        box-shadow:0 0 12px rgba(112,201,134,.75);
        transform:scale(1.08);
    }
}

/* Respect reduced-motion preferences in modern browsers */
@media (prefers-reduced-motion: reduce){
    .server-pulse.idle-online{
        animation:none;
        opacity:.8;
    }
}


/* Modern About / System page */
.system-modern-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:14px;
    margin-top:14px;
}
.about-section{
    margin-top:14px;
}
.source-status-list{
    padding:4px 0;
}
.source-status-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:14px 18px;
    border-bottom:1px solid #203027;
}
.source-status-row:last-child{
    border-bottom:0;
}
.source-status-name{
    font-weight:800;
    color:#e4ece7;
}
.source-status-detail{
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    text-align:right;
}
.source-status-dot{
    width:9px;
    height:9px;
    border-radius:50%;
    flex:0 0 auto;
}
.source-status-dot.online{
    background:var(--green);
    box-shadow:0 0 9px rgba(112,201,134,.65);
}
.source-status-dot.offline{
    background:#8b5656;
    box-shadow:0 0 7px rgba(220,119,119,.35);
}
.system-ok,.good-text{
    color:#88d79b!important;
}
.system-bad,.bad-text{
    color:#df8686!important;
}
.feature-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
    padding:16px;
}
.feature-card{
    padding:16px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#0d1712;
}
.feature-title{
    font-size:13px;
    font-weight:800;
    color:#e6ede8;
}
.feature-text{
    margin-top:7px;
    color:var(--muted);
    line-height:1.55;
}
.about-copy{
    padding:16px 18px;
    color:#aab9b0;
    line-height:1.65;
}
.about-copy p{
    margin:0 0 13px;
}
.about-copy p:last-child{
    margin-bottom:0;
}
@media(max-width:900px){
    .system-modern-grid{
        grid-template-columns:1fr;
    }
    .feature-grid{
        grid-template-columns:1fr 1fr;
    }
}
@media(max-width:600px){
    .feature-grid{
        grid-template-columns:1fr;
    }
    .source-status-row{
        flex-direction:column;
        align-items:flex-start;
        gap:5px;
    }
    .source-status-detail{
        text-align:left;
    }
}
