/* ============== HERO ============== */
/* Cinematic gothic-arena hero — same on every page (full-height, topbar overlays it). */
.hero {
    position: relative;
    aspect-ratio: var(--hero-ratio);
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 32px;
    border-bottom: 1px solid rgba(255,85,48,.45);
    border-radius: 12px;
    overflow: hidden;
    isolation: isolate;
    /* Дефолт: колизей (для страниц без data-game/data-home: broadcast и т.п.) */
    background-image:
        linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
        url('/madwars.ru/assets/brand/v2/hero-1920.jpg');
    background-position: center -15px;
    background-size: cover;
    background-repeat: no-repeat;
}
/* Home: colosseum background. */
body[data-home="1"] .hero { background-image:
    linear-gradient(180deg, rgba(8,5,3,.15) 0%, rgba(8,5,3,.0) 30%, rgba(8,5,3,.0) 70%, rgba(8,5,3,.35) 100%),
    url('/madwars.ru/assets/brand/v2/hero-1920.jpg'); }
/* Per-game backgrounds (game-hub / watch / per-game pages) */
body[data-game="q1"] .hero { background-image:
    linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
    url('/madwars.ru/assets/brand/v2/hero-q1.jpg'); }
body[data-game="q2"] .hero { background-image:
    linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
    url('/madwars.ru/assets/brand/v2/hero-q2.jpg'); }
body[data-game="q3"] .hero { background-image:
    linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
    url('/madwars.ru/assets/brand/v2/hero-q3.jpg'); }
body[data-game="ql"] .hero { background-image:
    linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
    url('/madwars.ru/assets/brand/v2/hero-1920.jpg'); }
body[data-game="tw"] .hero {
    background-image:
        linear-gradient(180deg, rgba(8,5,3,.35) 0%, rgba(8,5,3,.15) 30%, rgba(8,5,3,.15) 70%, rgba(8,5,3,.55) 100%),
        url('/madwars.ru/assets/brand/v2/hero-tw-v2.jpg');
    /* TW картинка маленькая (1024) и игра сама pixel-art — рендерим без интерполяции */
    image-rendering: auto;
}
body[data-game="cs16"] .hero {
    background-image:
        linear-gradient(90deg, rgba(8,10,6,.40) 0%, rgba(8,10,6,.05) 48%, rgba(8,10,6,.55) 100%),
        linear-gradient(180deg, rgba(8,10,6,.10) 0%, rgba(8,10,6,.04) 48%, rgba(8,10,6,.72) 100%),
        url('/madwars.ru/assets/brand/v2/hero-cs16-v2.webp');
    background-position: 52% center;
}
body[data-game="cs2"] .hero {
    background-image:
        linear-gradient(90deg, rgba(21,23,27,.34) 0%, rgba(21,23,27,.02) 48%, rgba(21,23,27,.38) 100%),
        linear-gradient(180deg, rgba(21,23,27,.08) 0%, rgba(21,23,27,.02) 48%, rgba(21,23,27,.70) 100%),
        url('/madwars.ru/assets/brand/v2/hero-cs2-v2.webp');
    background-position: 52% center;
}
.hero::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent) 30%, var(--ember) 50%, var(--accent) 70%, transparent 100%);
    opacity: .7;
    box-shadow: 0 0 18px rgba(255,85,48,.5);
    pointer-events: none;
}
/* Per-game accent for the bottom hero line. */
body[data-game="q1"] .hero { border-bottom-color: rgba(150,150,150,.5); }
body[data-game="q1"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #666666 30%, #aaaaaa 50%, #666666 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(150,150,150,.45);
}
body[data-game="q2"] .hero { border-bottom-color: rgba(123,224,123,.5); }
body[data-game="q2"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #7be07b 30%, #a0f0a0 50%, #7be07b 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(123,224,123,.5);
}
body[data-game="q3"] .hero { border-bottom-color: rgba(212,39,29,.55); }
body[data-game="q3"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #d4271d 30%, #ff6048 50%, #d4271d 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(212,39,29,.55);
}
body[data-game="ql"] .hero { border-bottom-color: rgba(58,217,255,.5); }
body[data-game="ql"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #3ad9ff 30%, #6ae8ff 50%, #3ad9ff 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(58,217,255,.5);
}
body[data-game="tw"] .hero { border-bottom-color: rgba(212,166,87,.55); }
body[data-game="tw"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #d4a657 30%, #ffb070 50%, #d4a657 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(212,166,87,.5);
}
body[data-game="cs16"] .hero { border-bottom-color: rgba(185,160,95,.55); }
body[data-game="cs16"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #76683f 30%, #b9a05f 50%, #76683f 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(185,160,95,.42);
}
body[data-game="cs2"] .hero { border-bottom-color: rgba(229,164,58,.58); }
body[data-game="cs2"] .hero::after {
    background: linear-gradient(90deg, transparent 0%, #a36a20 30%, #e5a43a 50%, #a36a20 70%, transparent 100%);
    box-shadow: 0 0 18px rgba(229,164,58,.45);
}
body[data-hub="1"][data-game="cs16"] .hero-game-title,
body[data-hub="1"][data-game="cs2"] .hero-game-title {
    top: 45%;
    width: min(900px, calc(100% - 220px));
}
body[data-game="cs16"] .hgt-name,
body[data-game="cs2"] .hgt-name {
    font-size: clamp(38px, 5.1vw, 66px);
    line-height: .98;
    white-space: nowrap;
}
@media (max-width: 720px) {
    body[data-hub="1"][data-game="cs16"] .hero-game-title,
    body[data-hub="1"][data-game="cs2"] .hero-game-title {
        top: 44%;
        width: calc(100% - 24px);
    }
    body[data-game="cs16"] .hgt-name,
    body[data-game="cs2"] .hgt-name {
        font-size: clamp(30px, 9vw, 42px);
        white-space: normal;
    }
}
.hero-stats {
    display: flex; gap: 56px;
    max-width: var(--page-max); margin: 0 auto;
    width: 100%; box-sizing: border-box; padding: 0 32px;
    position: relative; z-index: 1;
}
body[data-tab="all"] .hero-stats { margin-top: 32px; }

/* Per-game title overlay (центрированно вверху hero) */
.hero-game-title {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; z-index: 2; pointer-events: none;
    text-shadow: 0 2px 8px rgba(0,0,0,.8), 0 0 24px rgba(0,0,0,.6);
}
.hgt-name {
    display: block;
    font-family: var(--display); font-size: 64px; font-weight: 800;
    letter-spacing: 4px; color: var(--accent);
    text-transform: uppercase;
}
.hgt-sub {
    display: inline-block;
    font-family: var(--display); font-size: 14px; letter-spacing: 6px;
    color: rgba(255,255,255,.95); text-transform: uppercase; margin-top: 10px;
    background: rgba(0,0,0,.5);
    padding: 4px 14px;
    border-radius: 4px;
    backdrop-filter: blur(2px);
}
@media (max-width: 720px) {
    .hgt-name { font-size: 40px; letter-spacing: 2px; }
    .hgt-sub { font-size: 11px; letter-spacing: 3px; }
}

/* Breadcrumb на per-game страницах (внизу hero) */
.hero-crumb {
    position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 2; font-size: 13px; color: rgba(255,255,255,.75);
    background: rgba(0,0,0,.55); padding: 8px 18px; border-radius: 4px;
    backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0,0,0,.8);
}
.hero-crumb a { color: rgba(255,255,255,.85); text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.4); }
.hero-crumb a:hover { color: var(--accent-glow); border-bottom-color: var(--accent); }
.hc-sep { margin: 0 10px; color: rgba(255,255,255,.4); }
.hc-cur { color: #fff; font-weight: 600; }
.stat {
    display: flex; flex-direction: column;
    padding: 12px 18px 10px;
    background:
        linear-gradient(180deg, rgba(60,42,30,.55) 0%, rgba(20,12,8,.7) 100%);
    border: 1px solid var(--metal-light);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255,180,100,.14),
        inset 0 -1px 0 rgba(0,0,0,.55),
        0 4px 14px rgba(0,0,0,.55);
    min-width: 140px;
}
.stat .num {
    font-size: 44px; font-weight: 800; color: var(--accent);
    font-family: var(--display); letter-spacing: 1px; line-height: 1;
    text-shadow:
        0 2px 0 rgba(0,0,0,.7),
        0 0 14px rgba(255,85,48,.55),
        0 0 28px rgba(255,85,48,.32);
}

.stat .lbl {
    font-size: 11px; text-transform: uppercase; color: var(--bone);
    letter-spacing: 1.8px; margin-top: 8px;
    opacity: .8;
}
/* SERVERS ONLINE: green "online" pulse on the label.
   Was neon-blue — feedback (2026-05) said the blue blended with the dark
   page background and did not read as "online". Green is the universal
   live-indicator colour. */
.stat:last-child .lbl::before {
    content: ""; display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; margin-right: 7px; vertical-align: middle;
    background: var(--good);
    box-shadow: 0 0 4px #fff, 0 0 8px var(--good), 0 0 14px rgba(93,179,93,.55);
    animation: brandDotPulse 2.4s ease-in-out infinite;
}
@media (max-width: 700px) {
    body[data-tab="all"] .hero {
        background-image:
            linear-gradient(180deg, rgba(8,5,3,.20) 0%, rgba(8,5,3,.10) 40%, rgba(10,7,5,.55) 100%),
            url('/madwars.ru/assets/brand/v2/hero-1024.jpg');
    }
}

/* ============== GROUPS ============== */
main { max-width: var(--page-max); margin: 0 auto; padding: 48px 32px 64px; width: 100%; box-sizing: border-box; }

/* ============== OVERVIEW (главная-сводка) ============== */
.overview {
    max-width: var(--page-max); margin: 0 auto;
    width: 100%; box-sizing: border-box;
    padding: 24px 32px 0;
}
.ovr-table {
    width: 100%;
    border-collapse: separate; border-spacing: 0;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.ovr-table thead th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--txt-mute);
    font-weight: 700;
}
.ovr-table thead th.num { text-align: right; }
.ovr-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
    color: var(--txt);
    vertical-align: middle;
}
.ovr-table tbody tr:last-child td { border-bottom: 0; }
.ovr-table tbody tr:hover td { background: rgba(255,255,255,.025); }
.ovr-row { cursor: pointer; transition: background .12s; }

.ovr-name {
    font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.ovr-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--bad); flex-shrink: 0;
    box-shadow: 0 0 6px var(--bad);
}
.ovr-dot.on {
    background: var(--neon-blue);
    box-shadow: 0 0 4px #fff, 0 0 8px var(--neon-blue), 0 0 14px rgba(58,217,255,.45);
}
.ovr-dot.partial { background: var(--accent); box-shadow: 0 0 6px rgba(212,166,87,.7); }
.ovr-dot.off { background: var(--bad); box-shadow: 0 0 6px rgba(192,64,64,.4); }
.ovr-sub {
    font-size: 11px; color: var(--txt-mute); font-weight: 500;
    margin-left: 6px; letter-spacing: .5px;
}
td.num { text-align: right; }
.ovr-mono { font-family: var(--mono); font-weight: 700; }
.ovr-status {
    display: inline-block;
    padding: 3px 8px; border-radius: 3px;
    font-family: var(--mono); font-size: 10px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px;
}
.ovr-status.on  {
    background: rgba(58,217,255,.10);
    color: var(--neon-blue);
    text-shadow: 0 0 8px rgba(58,217,255,.45);
}
.ovr-status.off { background: rgba(192,64,64,.15); color: var(--bad); }
.ovr-go a {
    color: var(--accent); text-decoration: none; font-weight: 600;
    font-size: 13px;
}
.ovr-go a:hover { color: #fff; }

/* видимость групп: по умолчанию ВСЕ группы скрыты, JS показывает нужную */
body[data-tab="all"] .group { display: block; }
body[data-tab="all"] .group .srv-grid { display: none; }
body[data-tab="all"] .group-stats.gs-pending { display: none; }
body[data-tab="all"] .overview { display: block; }
body:not([data-tab="all"]) .overview { display: none; }
body:not([data-tab="all"]) .group { display: none; }
body[data-tab="qw"] .group#qw,
body[data-tab="q2"] .group#q2,
body[data-tab="q3"] .group#q3,
body[data-tab="ql"] .group#ql,
body[data-tab="tw"] .group#tw,
body[data-tab="ts"] .group#ts { display: block; }

@media (max-width: 720px) {
    .overview { padding: 16px 16px 0; }
    .ovr-table thead th, .ovr-table tbody td { padding: 10px 12px; font-size: 13px; }
    .ovr-sub { display: none; }
}
@media (max-width: 460px) {
    .overview { padding: 12px 0 0; }
    .ovr-table thead th, .ovr-table tbody td { padding: 9px 8px; font-size: 12px; }
    .ovr-table { border-radius: 6px; }
}
@media (max-width: 380px) {
    .ovr-table thead th, .ovr-table tbody td { padding: 8px 6px; font-size: 11px; }
    .ovr-status { padding: 2px 5px; font-size: 9px; letter-spacing: .5px; }
    .ovr-go a { font-size: 11px; }
}
.group { margin: 32px 0; }
.group-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 4px 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}
.group-title { display: flex; align-items: baseline; gap: 14px; }
.group-title h2 {
    margin: 0; font-size: 26px; font-weight: 800;
    color: var(--txt); letter-spacing: 2px;
    font-family: var(--display);
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0,0,0,.6);
}
.group-sub { font-size: 11px; color: var(--txt-mute); text-transform: uppercase; letter-spacing: 1.2px; }
.group-totals { display: flex; gap: 8px; }
.badge {
    padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700;
    background: var(--bg-3); color: var(--txt-soft);
    text-transform: uppercase; letter-spacing: .8px; font-family: var(--mono);
}
.badge.online  { background: rgba(93,179,93,.12); color: var(--good); }
.badge.players { background: rgba(212,166,87,.12); color: var(--accent); }
