* { box-sizing: border-box; }

:root {
    --accent: #ef4444;
    --accent-dim: #991b1b;
    --border: #3f1010;
    --card: #111111;
    --muted: #a3a3a3;
    --muted-2: #737373;
    --focus-ring: 0 0 0 2px #070707, 0 0 0 4px rgba(239, 68, 68, 0.85);
}

html { overflow-x: clip; }

body {
    margin: 0;
    font-family: "Rajdhani", "Segoe UI", Arial, sans-serif;
    background-color: #070707;
    color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    overflow-x: clip;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 40% at 18% 22%, rgba(185, 28, 28, 0.22) 0%, transparent 58%),
        radial-gradient(ellipse 50% 38% at 82% 78%, rgba(127, 29, 29, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 110%, rgba(69, 10, 10, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 45% 35% at 60% 30%, rgba(40, 40, 40, 0.35) 0%, transparent 50%),
        linear-gradient(165deg, #0c0c0c 0%, #070707 45%, #0a0505 100%);
    background-size: 140% 140%, 150% 150%, 100% 100%, 120% 120%, 100% 100%;
    background-position: 0% 20%, 100% 80%, center bottom, 40% 40%, center;
    animation: panelEmberDrift 26s ease-in-out infinite alternate;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(239, 68, 68, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(239, 68, 68, 0.035) 1px, transparent 1px),
        radial-gradient(ellipse 75% 65% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
    background-size: 48px 48px, 48px 48px, 100% 100%;
    opacity: 0.55;
    animation: panelGridPulse 18s ease-in-out infinite alternate;
}

@keyframes panelEmberDrift {
    0% { background-position: 0% 15%, 100% 85%, center bottom, 30% 45%, center; }
    50% { background-position: 40% 35%, 55% 45%, center bottom, 55% 30%, center; }
    100% { background-position: 85% 55%, 10% 20%, center bottom, 70% 60%, center; }
}

@keyframes panelGridPulse {
    0% { opacity: 0.42; background-position: 0 0, 0 0, center; }
    100% { opacity: 0.62; background-position: 24px 12px, 24px 12px, center; }
}

@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none; }
    body::after { opacity: 0.5; }
    .logo { animation: none; }
    .profile-rank,
    .weapon-icon img,
    .map-thumb,
    .board-side-thumb,
    .snap-tile,
    .weapon-list li,
    .map-card,
    .board-side-item,
    .share-btn,
    .pager-btn,
    .server-chip,
    .profile-core-stats div,
    .stats-table tbody tr {
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    .server-nav .server-chip,
    .weapon-list > li,
    .map-grid > .map-card,
    .board-side-list > .board-side-item,
    .profile-snapshot > .snap-tile,
    .empty-state {
        animation: none !important;
    }
    .table-card.is-loading .stats-table tbody::after {
        animation: none !important;
    }
}

/* Keyboard focus — skip mouse click outlines where browsers support :focus-visible */
:focus { outline: none; }
:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
.server-chip:focus-visible,
.pager-btn:focus-visible,
.share-btn:focus-visible,
.site-nav-link:focus-visible,
.board-type-tab:focus-visible,
.player-link:focus-visible,
.stats-table thead th[data-sort]:focus-visible {
    box-shadow: var(--focus-ring);
    position: relative;
    z-index: 1;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: relative;
    margin-bottom: 18px;
    padding-bottom: 18px;
}

header::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 100vw;
    margin-left: -50vw;
    height: 4px;
    background: var(--accent);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    z-index: 1;
    pointer-events: none;
}

/* White shimmer on top of the red line — same as sparta-panel */
header::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 40vw;
    margin-left: -50vw;
    height: 4px;
    z-index: 2;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(254, 202, 202, 0.15) 35%,
        rgba(254, 242, 242, 0.85) 50%,
        rgba(254, 202, 202, 0.15) 65%,
        transparent 100%
    );
    animation: lineShimmer 4.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes lineShimmer {
    0% {
        transform: translateX(-100%);
        opacity: 0.55;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(250%);
        opacity: 0.55;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-text { min-width: 0; }

.logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    transform-origin: center center;
    animation: logoBreath 5.5s ease-in-out infinite;
}

@keyframes logoBreath {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.045); }
}

h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.15;
}

.tagline {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
    letter-spacing: 0.04em;
}

.header-right {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.site-nav-block {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    min-width: 0;
}
.site-nav-block .refresh-note {
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
}
.site-nav {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid rgba(239, 68, 68, 0.45);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 45%),
        rgba(18, 8, 8, 0.92);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 6px 14px rgba(0, 0, 0, 0.35);
}
.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    padding: 0.5rem 1rem;
    color: #e5e5e5;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.92rem;
    border-right: 1px solid rgba(63, 16, 16, 0.75);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.site-nav-link:last-child { border-right: 0; }
.site-nav-link:hover {
    color: #fff;
    background: rgba(239, 68, 68, 0.22);
}
.site-nav-link.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.5), rgba(127, 29, 29, 0.62));
    box-shadow:
        inset 3px 0 0 var(--accent),
        inset 0 0 0 1px rgba(239, 68, 68, 0.28),
        0 0 14px rgba(185, 28, 28, 0.22);
}
.site-nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fecaca, transparent);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

.refresh-note {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
    transition: color 0.35s ease;
}

.refresh-note.is-fresh {
    color: #fecaca;
    animation: updatedFlash 1.1s ease;
}

@keyframes updatedFlash {
    0% { color: #fff; }
    100% { color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
    .refresh-note.is-fresh { animation: none; }
}

.card {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, transparent 28%),
        linear-gradient(165deg, #161010 0%, #111111 48%, #0c0808 100%);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    box-shadow:
        0 0 0 1px rgba(185, 28, 28, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 -10px 24px rgba(0, 0, 0, 0.35) inset,
        0 10px 28px rgba(0, 0, 0, 0.5),
        0 2px 0 rgba(0, 0, 0, 0.55);
    transform: translateZ(0);
}

.toolbar-card { margin-bottom: 14px; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toolbar-search {
    flex: 1 1 280px;
    min-width: 0;
    max-width: 420px;
}

.toolbar-search input {
    width: 100%;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #f5f5f5;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 10px 14px;
    outline: none;
}

.toolbar-search input:focus {
    border-color: var(--accent-dim);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.toolbar-search input::placeholder { color: #525252; }

.toolbar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.meta-pill {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 4.8rem;
    padding: 6px 12px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.meta-label {
    color: var(--muted-2);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-pill strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fecaca;
    line-height: 1.1;
}

.server-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.server-chip {
    appearance: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 12px;
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #e5e5e5;
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.server-chip:hover {
    border-color: rgba(239, 68, 68, 0.75);
    background: #160808;
    color: #fff;
    transform: translateY(-1px);
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.2),
        0 6px 14px rgba(0, 0, 0, 0.35),
        0 0 16px rgba(185, 28, 28, 0.18);
}

.server-chip:active { transform: translateY(0) scale(0.99); }

.server-chip.is-active {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.22), #1a0808 55%);
    border-color: var(--accent);
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.35),
        inset 3px 0 0 var(--accent),
        0 0 0 1px rgba(239, 68, 68, 0.2),
        0 0 22px rgba(185, 28, 28, 0.35);
}
.server-chip.is-active:hover {
    transform: translateY(-1px);
    border-color: #f87171;
    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.4),
        inset 3px 0 0 #f87171,
        0 0 0 1px rgba(239, 68, 68, 0.28),
        0 0 26px rgba(239, 68, 68, 0.4);
}

.server-chip.is-empty {
    opacity: 0.42;
}
.server-chip.is-empty:hover {
    opacity: 0.7;
}
.server-chip.is-empty.is-active {
    opacity: 0.78;
}

.server-chip-label {
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    line-height: 1.2;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.server-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: #000;
    border: 1px solid #3f1010;
    color: #fecaca;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.server-chip.is-active .server-chip-count {
    border-color: var(--accent-dim);
    color: #fff;
}

@media (max-width: 520px) {
    .server-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
        margin-bottom: 10px;
    }
    .server-chip {
        padding: 6px 8px;
        gap: 2px;
    }
    .server-chip-label { font-size: 0.7rem; letter-spacing: 0.03em; }
    .server-chip-count {
        font-size: 0.68rem;
        padding: 0 5px;
        min-width: 1.3rem;
    }
}

.table-card { padding: 0; overflow: hidden; }

.table-head {
    padding: 16px 16px 10px;
    border-bottom: 1px solid #2a0d0d;
}

.section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Thin accent line under card / panel titles */
.table-head .section-title::after,
.profile-panel > .section-title::after,
.card > .section-title::after {
    content: "";
    display: block;
    margin-top: 0.45rem;
    height: 2px;
    width: min(100%, 11rem);
    background: linear-gradient(
        90deg,
        var(--accent) 0%,
        rgba(239, 68, 68, 0.45) 42%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.28);
}

.table-hint {
    margin: 6px 0 0;
    color: var(--muted-2);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.stats-table th,
.stats-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #1f0a0a;
}

.stats-table thead th {
    position: sticky;
    top: 0;
    background: #0c0c0c;
    color: #fca5a5;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    user-select: none;
}

.stats-table thead th[data-sort] {
    cursor: pointer;
}

.stats-table thead th[data-sort]:hover {
    color: #fff;
}

.stats-table thead th.is-sorted {
    color: #fff;
}

.stats-table thead th.is-sorted::after {
    content: " ▾";
    color: var(--accent);
    font-size: 0.7em;
}

.stats-table thead th.is-sorted.is-asc::after {
    content: " ▴";
}

@keyframes listFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-table tbody tr {
    transition: background 0.14s ease, box-shadow 0.14s ease;
}
.stats-table tbody tr:not(.empty-row),
.server-nav > .server-chip,
.weapon-list > li,
.map-grid > .map-card,
.board-side-list > .board-side-item,
.profile-snapshot > .snap-tile {
    animation: listFadeIn 0.2s ease both;
}
.stats-table tbody tr:nth-child(1),
.server-nav > .server-chip:nth-child(1),
.weapon-list > li:nth-child(1),
.map-grid > .map-card:nth-child(1),
.board-side-list > .board-side-item:nth-child(1),
.profile-snapshot > .snap-tile:nth-child(1) { animation-delay: 0ms; }
.stats-table tbody tr:nth-child(2),
.server-nav > .server-chip:nth-child(2),
.weapon-list > li:nth-child(2),
.map-grid > .map-card:nth-child(2),
.board-side-list > .board-side-item:nth-child(2),
.profile-snapshot > .snap-tile:nth-child(2) { animation-delay: 18ms; }
.stats-table tbody tr:nth-child(3),
.server-nav > .server-chip:nth-child(3),
.weapon-list > li:nth-child(3),
.map-grid > .map-card:nth-child(3),
.board-side-list > .board-side-item:nth-child(3),
.profile-snapshot > .snap-tile:nth-child(3) { animation-delay: 36ms; }
.stats-table tbody tr:nth-child(4),
.server-nav > .server-chip:nth-child(4),
.weapon-list > li:nth-child(4),
.map-grid > .map-card:nth-child(4),
.board-side-list > .board-side-item:nth-child(4),
.profile-snapshot > .snap-tile:nth-child(4) { animation-delay: 54ms; }
.stats-table tbody tr:nth-child(5),
.server-nav > .server-chip:nth-child(5),
.weapon-list > li:nth-child(5),
.map-grid > .map-card:nth-child(5),
.board-side-list > .board-side-item:nth-child(5),
.profile-snapshot > .snap-tile:nth-child(5) { animation-delay: 72ms; }
.stats-table tbody tr:nth-child(6),
.server-nav > .server-chip:nth-child(6),
.weapon-list > li:nth-child(6),
.map-grid > .map-card:nth-child(6),
.board-side-list > .board-side-item:nth-child(6),
.profile-snapshot > .snap-tile:nth-child(6) { animation-delay: 90ms; }
.stats-table tbody tr:nth-child(7),
.server-nav > .server-chip:nth-child(7),
.weapon-list > li:nth-child(7),
.map-grid > .map-card:nth-child(7),
.board-side-list > .board-side-item:nth-child(7),
.profile-snapshot > .snap-tile:nth-child(7) { animation-delay: 108ms; }
.stats-table tbody tr:nth-child(8),
.server-nav > .server-chip:nth-child(8),
.weapon-list > li:nth-child(8),
.map-grid > .map-card:nth-child(8),
.board-side-list > .board-side-item:nth-child(8),
.profile-snapshot > .snap-tile:nth-child(8) { animation-delay: 126ms; }
.stats-table tbody tr:nth-child(9),
.server-nav > .server-chip:nth-child(9),
.weapon-list > li:nth-child(9),
.map-grid > .map-card:nth-child(9),
.board-side-list > .board-side-item:nth-child(9) { animation-delay: 144ms; }
.stats-table tbody tr:nth-child(10),
.server-nav > .server-chip:nth-child(10),
.weapon-list > li:nth-child(10),
.map-grid > .map-card:nth-child(10),
.board-side-list > .board-side-item:nth-child(10) { animation-delay: 162ms; }
.stats-table tbody tr:nth-child(11),
.server-nav > .server-chip:nth-child(11),
.weapon-list > li:nth-child(11),
.map-grid > .map-card:nth-child(11),
.board-side-list > .board-side-item:nth-child(11) { animation-delay: 180ms; }
.stats-table tbody tr:nth-child(12),
.server-nav > .server-chip:nth-child(12),
.weapon-list > li:nth-child(12),
.map-grid > .map-card:nth-child(12),
.board-side-list > .board-side-item:nth-child(12) { animation-delay: 198ms; }
.stats-table tbody tr:nth-child(n+13),
.server-nav > .server-chip:nth-child(n+13),
.weapon-list > li:nth-child(n+13),
.map-grid > .map-card:nth-child(n+13),
.board-side-list > .board-side-item:nth-child(n+13) { animation-delay: 216ms; }

.stats-table tbody tr:hover {
    background: rgba(127, 29, 29, 0.32);
    box-shadow: inset 3px 0 0 var(--accent);
}
.stats-table tbody tr:hover .col-name,
.stats-table tbody tr:hover .col-name span,
.stats-table tbody tr:hover .player-link {
    color: #fff;
    text-shadow: 0 0 12px rgba(254, 202, 202, 0.28);
}
.stats-table tbody tr:hover .player-link {
    border-bottom-color: rgba(239, 68, 68, 0.65);
}

.stats-table tbody tr .col-rank.is-top-rank,
.col-rank.is-top-rank {
    font-weight: 700;
}
.stats-table tbody tr .col-rank.is-top-1,
.col-rank.is-top-1 { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.35); }
.stats-table tbody tr .col-rank.is-top-2,
.col-rank.is-top-2 { color: #e5e5e5; text-shadow: 0 0 8px rgba(229, 229, 229, 0.25); }
.stats-table tbody tr .col-rank.is-top-3,
.col-rank.is-top-3 { color: #f59e0b; text-shadow: 0 0 8px rgba(245, 158, 11, 0.28); }
.stats-table tbody tr .col-rank.is-top-rank:not(.is-top-1):not(.is-top-2):not(.is-top-3) {
    color: var(--accent);
}

.col-rank {
    width: 3rem;
    color: var(--muted-2);
    font-variant-numeric: tabular-nums;
}

.col-name {
    font-weight: 600;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.col-name span {
    font-weight: 700;
}

.col-num {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #e5e5e5;
}

.col-kd {
    color: #fecaca;
    font-weight: 700;
}

.empty-state {
    display: grid;
    gap: 0.4rem;
    justify-items: center;
    justify-self: center;
    width: min(100%, 26rem);
    margin: 0.35rem auto;
    padding: 1.4rem 1.15rem;
    text-align: center;
    border: 1px solid rgba(63, 16, 16, 0.55);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
        rgba(8, 4, 4, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 8px 18px rgba(0, 0, 0, 0.28);
    animation: listFadeIn 0.22s ease both;
}
.empty-state strong {
    color: #fecaca;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}
.empty-state span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
    max-width: 22rem;
}
.empty-panel {
    padding: 1.25rem 1rem;
    display: grid;
    place-items: center;
    min-height: 8.5rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 50%),
        rgba(10, 5, 5, 0.35);
}
.empty-panel > .empty-state {
    margin: 0;
}
.empty-row td {
    text-align: center !important;
    color: var(--muted);
    padding: 16px;
    font-weight: 600;
}
.empty-row td:has(.empty-state) {
    padding: 1rem 12px 1.35rem;
    background:
        radial-gradient(ellipse 70% 80% at 50% 40%, rgba(40, 10, 10, 0.35), transparent 70%);
}

/* Quiet skeleton bars while the players table refreshes */
.table-card.is-loading .stats-table tbody {
    position: relative;
}
.table-card.is-loading .stats-table tbody::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(239, 68, 68, 0.08) 45%,
        transparent 70%
    );
    background-size: 220% 100%;
    animation: emptyShimmer 1.35s ease-in-out infinite;
}
@keyframes emptyShimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 16px 14px;
    border-top: 1px solid #2a0d0d;
    background: #0c0c0c;
}

.pager-btn {
    appearance: none;
    cursor: pointer;
    min-width: 4.5rem;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.55);
    border-radius: 8px;
    color: #fecaca;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.82rem;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.08);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.pager-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: rgba(239, 68, 68, 0.12);
    color: #fff;
    transform: translateY(-1px);
    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 14px rgba(185, 28, 28, 0.18);
}

.pager-btn:active:not(:disabled) {
    transform: translateY(0);
}

.pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pager-info {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    text-align: center;
    min-width: 11rem;
}

.table-card.is-loading .table-scroll {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

.table-card.is-loading .table-head::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 8px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    background-size: 200% 100%;
    animation: searchPulse 1.2s ease-in-out infinite;
}

@keyframes searchPulse {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.site-footer {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
    padding: 26px 20px 28px;
    text-align: center;
    color: #737373;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    overflow: hidden;
}

.site-footer::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: #b91c1c;
    box-shadow: 0 -2px 12px rgba(239, 68, 68, 0.25);
    z-index: 1;
    pointer-events: none;
}

.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    width: 40%;
    z-index: 2;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(254, 202, 202, 0.15) 35%,
        rgba(254, 242, 242, 0.85) 50%,
        rgba(254, 202, 202, 0.15) 65%,
        transparent 100%
    );
    animation: lineShimmer 4.5s ease-in-out infinite;
    pointer-events: none;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-credit {
    margin: 0;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.footer-brand {
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ef4444;
}

.footer-github {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #b91c1c;
    border-radius: 6px;
    background: #111111;
    color: #f5f5f5;
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.footer-github:hover {
    background: #3f1010;
    border-color: #ef4444;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6), 0 6px 20px rgba(185, 28, 28, 0.45);
}

.footer-github:active {
    transform: translateY(0);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4), 0 2px 8px rgba(185, 28, 28, 0.35);
}

.footer-github-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.site-footer--panel {
    /* keep flex margin-top:auto from .site-footer so footer sticks to page bottom */
    padding-top: 3rem;
}

@media (prefers-reduced-motion: reduce) {
    header::before,
    .site-footer::before {
        animation: none;
        opacity: 0;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.player-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.player-link:hover {
    border-bottom-color: rgba(239, 68, 68, 0.55);
}

.profile-back {
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}
.profile-back a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.profile-back a:hover { color: #fff; }

.profile-hero {
    position: relative;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.profile-hero.has-map::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--best-map);
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    filter: saturate(0.7) contrast(1.05);
    transform: scale(1.04);
}
.profile-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7,7,7,0.35) 0%, rgba(7,7,7,0.92) 100%);
}
.profile-hero-inner {
    position: relative;
    z-index: 1;
    padding-top: 1.25rem;
    padding-bottom: 1.5rem;
}
.profile-identity {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.profile-rank {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    min-width: 3.2rem;
    text-shadow:
        0 1px 0 rgba(255, 180, 180, 0.25),
        0 2px 0 #7f1d1d,
        0 3px 0 #5c1212,
        0 8px 18px rgba(0, 0, 0, 0.55);
    transform: perspective(420px) rotateY(-8deg);
    transform-origin: left center;
}
.profile-name {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.55rem;
}
.profile-core-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.25rem;
    max-width: 420px;
}
.profile-core-stats div {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
        rgba(17, 17, 17, 0.78);
    border: 1px solid var(--border);
    padding: 0.65rem 0.8rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 6px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.profile-core-stats div:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 10px 20px rgba(0, 0, 0, 0.45);
}
.profile-core-stats strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 0.15rem;
}

.profile-snapshot {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    perspective: 900px;
}
.snap-tile {
    background:
        linear-gradient(165deg, #1a1010 0%, #111111 55%, #0c0808 100%);
    border: 1px solid var(--border);
    padding: 0.85rem 0.9rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.045) inset,
        0 8px 18px rgba(0, 0, 0, 0.4);
    transform: translateZ(0);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.snap-tile:hover {
    transform: translateY(-3px) rotateX(4deg);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 14px 28px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(239, 68, 68, 0.12);
}
.snap-tile strong {
    display: block;
    font-size: 1.45rem;
    margin: 0.2rem 0;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
.snap-tile em {
    font-style: normal;
    color: var(--muted-2);
    font-size: 0.9rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}
.profile-panel {
    padding: 1rem 1.1rem 1.15rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.profile-panel > .section-title {
    flex: 0 0 auto;
    margin-bottom: 0.85rem;
}

.weapon-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.65rem;
    align-content: start;
    flex: 0 0 auto;
}
.weapon-list li,
.profile-asset-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    min-height: 0;
    padding: 0.45rem 0.5rem;
    border: 1px solid rgba(63, 16, 16, 0.45);
    border-left: 3px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        rgba(10, 5, 5, 0.4);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}
.weapon-list li:hover,
.map-card.profile-asset-row:hover {
    border-color: rgba(239, 68, 68, 0.55);
    border-left-color: rgba(239, 68, 68, 0.85);
    background: rgba(45, 12, 12, 0.75);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 16px rgba(185, 28, 28, 0.12);
}
.weapon-list[data-kind="weapon"] .board-side-thumb {
    background-size: contain;
    background-position: center;
    background-color: #0a0505;
}
.weapon-icon {
    width: 120px;
    height: 64px;
    background: #0a0505;
    border: 1px solid #3f1010;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.weapon-icon img,
.weapon-list .board-side-thumb,
.map-card .board-side-thumb,
.map-thumb {
    transition: transform 0.18s ease;
}
.weapon-list li:hover .weapon-icon img,
.weapon-list li:hover .board-side-thumb,
.map-card.profile-asset-row:hover .board-side-thumb,
.map-card:hover .map-thumb {
    transform: scale(1.05);
}
.weapon-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    image-rendering: auto;
    filter: none !important;
}
.weapon-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
}
.weapon-bar {
    height: 8px;
    background: #1f0a0a;
    margin: 0.45rem 0 0.2rem;
    overflow: hidden;
}
.weapon-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-dim), var(--accent));
    box-shadow: 0 0 0 rgba(239, 68, 68, 0);
    transition: filter 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.weapon-list li:hover .weapon-bar span {
    background: linear-gradient(90deg, #b91c1c, #f87171);
    filter: brightness(1.15);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.45);
}
.weapon-pct {
    color: var(--muted-2);
    font-size: 0.9rem;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.65rem;
    align-content: start;
    flex: 0 0 auto;
    min-width: 0;
}
.map-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border: 1px solid rgba(63, 16, 16, 0.45);
    border-left: 3px solid transparent;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        rgba(10, 5, 5, 0.4);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
    overflow: hidden;
}
.map-card:hover {
    border-color: rgba(239, 68, 68, 0.55);
    border-left-color: rgba(239, 68, 68, 0.85);
    background: rgba(45, 12, 12, 0.75);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 16px rgba(185, 28, 28, 0.12);
}
.map-grid[data-kind="map"] .board-side-thumb {
    background-size: cover;
}
.map-thumb {
    width: 120px;
    height: 64px;
    min-width: 120px;
    min-height: 64px;
    background: #140808 center/cover no-repeat;
    border: 1px solid #3f1010;
}
.map-info h3 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
}
.map-info p { margin: 0.1rem 0; font-size: 0.92rem; }

.alias-list {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}
.muted { color: var(--muted); }

@media (max-width: 900px) {
    .profile-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .weapon-list,
    .map-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .weapon-list li,
    .map-card.profile-asset-row {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 0.35rem;
        padding: 0.3rem 0.35rem;
    }
    .weapon-list .board-side-thumb,
    .map-grid .board-side-thumb {
        width: 56px;
        height: 34px;
    }
    .map-info h3 { font-size: 0.88rem; }
    .map-info p { font-size: 0.78rem; }
    .server-breakdown--hero .breakdown-row {
        grid-template-columns: 1fr auto;
        gap: 0.2rem 0.5rem;
    }
    .server-breakdown--hero .breakdown-row span:nth-child(3),
    .server-breakdown--hero .breakdown-row span:nth-child(4) {
        font-size: 0.78rem;
        color: var(--muted);
    }
}

@media (max-width: 720px) {
    .wrap { padding: 10px 10px 16px; }
    h1 { font-size: 1.15rem; letter-spacing: 0.04em; }
    .tagline { font-size: 0.8rem; margin-top: 2px; }
    .logo { width: 42px; height: 42px; }
    .brand { gap: 10px; }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    .header-right {
        width: 100%;
        justify-content: stretch;
    }
    .site-nav-block { width: 100%; }
    .site-nav { width: 100%; }
    .site-nav-link {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0.42rem 0.65rem;
        font-size: 0.82rem;
    }
    .site-nav-block .refresh-note {
        white-space: normal;
        font-size: 0.72rem;
    }
    .card { padding: 10px; border-radius: 8px; }
    .toolbar-card { margin-bottom: 10px; padding: 10px; }
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .toolbar-search { max-width: none; flex: 1 1 auto; }
    .toolbar-search input {
        padding: 9px 12px;
        font-size: 0.95rem;
    }
    .toolbar-meta {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .meta-pill {
        min-width: 0;
        padding: 5px 8px;
    }
    .meta-pill strong { font-size: 0.95rem; }
    .table-head { padding: 12px 12px 8px; }
    .section-title { font-size: 1rem; }
    .table-hint { font-size: 0.75rem; margin: 4px 0 0; }
    .stats-table { min-width: 0; }
    .stats-table th,
    .stats-table td { padding: 7px 8px; }
    .stats-table thead th { font-size: 0.7rem; letter-spacing: 0.04em; }
    .col-name { max-width: 9.5rem; }
    .col-num { font-size: 0.9rem; }
    .pager {
        gap: 8px;
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    .pager-btn {
        min-width: 3.8rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }
    .pager-info { min-width: 0; font-size: 0.78rem; }
    body::before { animation-duration: 36s; }
    body::after {
        opacity: 0.4;
        animation-duration: 24s;
        background-size: 40px 40px, 40px 40px, 100% 100%;
    }
    .profile-core-stats { max-width: none; gap: 0.45rem; margin-top: 0.85rem; }
    .profile-core-stats div { padding: 0.45rem 0.55rem; }
    .profile-core-stats strong { font-size: 1.1rem; }
    .profile-snapshot { grid-template-columns: 1fr 1fr; gap: 0.45rem; }
    .profile-rank { font-size: 1.7rem; min-width: 2.4rem; }
    .profile-name { font-size: 1.35rem; }
    .profile-hero-inner { padding-top: 0.85rem; padding-bottom: 1rem; }
    .share-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.7rem;
    }
}

/* Share + cross-server */
.profile-back .site-nav-block {
    margin-left: auto;
    flex-shrink: 0;
}
.share-btn {
    appearance: none;
    flex-shrink: 0;
    border: 1px solid rgba(239, 68, 68, 0.75);
    border-radius: 8px;
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
    cursor: pointer;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.18) inset,
        0 4px 12px rgba(185, 28, 28, 0.35),
        0 0 0 1px rgba(127, 29, 29, 0.4);
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.15s ease, filter 0.12s ease;
}
.share-btn:hover {
    border-color: #fecaca;
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 8px 18px rgba(185, 28, 28, 0.45),
        0 0 18px rgba(239, 68, 68, 0.35);
}
.share-btn:active {
    transform: translateY(0);
    filter: brightness(0.98);
}
.server-switch > .server-switch-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.server-switch > .server-switch-summary::-webkit-details-marker { display: none; }
.server-switch > .server-switch-summary .section-title {
    margin: 0;
}
.server-switch > .server-switch-summary::after {
    content: "▾";
    color: var(--muted-2);
    font-size: 0.95rem;
    margin-left: auto;
}
.server-switch[open] > .server-switch-summary::after { content: "▴"; }
.server-switch-hint {
    font-weight: 600;
    color: #fff;
}
.server-switch-hint em {
    font-style: normal;
    color: var(--muted-2);
    font-weight: 500;
}
.profile-hero-breakdown {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(63, 16, 16, 0.55);
}
.profile-hero-breakdown-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}
.profile-hero-breakdown-head strong {
    color: #fff;
    font-size: 0.95rem;
}
.server-breakdown {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.75rem;
    max-height: 260px;
    overflow: auto;
    padding-right: 0.15rem;
}
.server-breakdown--hero {
    margin-top: 0;
    max-height: none;
    overflow: visible;
}
.breakdown-rank.is-top-1 { color: #fbbf24; font-weight: 700; }
.breakdown-rank.is-top-2 { color: #e5e5e5; font-weight: 700; }
.breakdown-rank.is-top-3 { color: #f59e0b; font-weight: 700; }
.profile-rank.is-top-1 { color: #fbbf24; text-shadow: 0 0 14px rgba(251, 191, 36, 0.35); }
.profile-rank.is-top-2 { color: #e5e5e5; text-shadow: 0 0 10px rgba(229, 229, 229, 0.25); }
.profile-rank.is-top-3 { color: #f59e0b; text-shadow: 0 0 10px rgba(245, 158, 11, 0.28); }
.breakdown-row {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 1fr 0.8fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(63, 16, 16, 0.55);
    color: inherit;
    text-decoration: none;
    background: rgba(10, 5, 5, 0.35);
}
.breakdown-row:hover { border-color: rgba(239, 68, 68, 0.45); }
.breakdown-row.is-active {
    border-color: rgba(239, 68, 68, 0.9);
    border-left: 3px solid #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.28), rgba(30, 10, 10, 0.75));
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.22);
}
.breakdown-row.is-active strong { color: #fff; }
.profile-viewing-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.75);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 40%),
        linear-gradient(90deg, rgba(239, 68, 68, 0.32), rgba(20, 8, 8, 0.9));
    box-shadow:
        0 0 0 1px rgba(239, 68, 68, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 6px 14px rgba(0, 0, 0, 0.4);
}
.profile-viewing-chip.is-cross {
    border-color: rgba(239, 68, 68, 0.55);
}
.profile-viewing-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 200, 200, 0.85);
}
.profile-viewing-server {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}
.breakdown-go {
    justify-self: end;
    color: var(--accent, #ef4444);
    font-weight: 700;
}
.profile-panel + .profile-panel,
.profile-snapshot + .profile-panel,
.profile-panel + .profile-grid,
.profile-snapshot + .server-switch,
.server-switch + .profile-grid {
    margin-top: 1.25rem;
}
.profile-back-links {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}
.profile-back-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
}
.profile-back-links a:hover { color: #fff; }
.profile-back-links a.is-boards {
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.45);
    padding: 0.25rem 0.65rem;
    background: rgba(20, 8, 8, 0.75);
}
.profile-back-links a.is-boards:hover {
    border-color: rgba(239, 68, 68, 0.75);
    color: #fff;
}

/* Boards page — Maps / Weapons full-width segmented bar */
.board-type-card {
    margin: 0 0 14px;
    padding: 0;
    overflow: hidden;
}
.board-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
    width: 100%;
}
.board-type-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    width: 100%;
    padding: 16px 18px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: inherit;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.board-type-tab + .board-type-tab {
    border-left: 1px solid var(--border);
}
.board-type-tab .meta-label {
    color: var(--muted-2);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.board-type-tab strong {
    font-family: "Rajdhani", "Segoe UI", sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #a3a3a3;
    line-height: 1.05;
}
.board-type-tab:hover {
    background: rgba(239, 68, 68, 0.12);
}
.board-type-tab:hover strong {
    color: #fecaca;
}
.board-type-tab.is-active {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.34), rgba(40, 10, 10, 0.6));
    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.35),
        inset 0 -3px 0 var(--accent),
        0 0 18px rgba(185, 28, 28, 0.2);
}
.board-type-tab.is-active strong {
    color: #fecaca;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.45);
}
.board-type-tab.is-active .meta-label {
    color: rgba(254, 202, 202, 0.75);
}
.board-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.board-side {
    padding: 0.75rem;
    position: sticky;
    top: 12px;
    align-self: start;
    min-width: 0;
}
.board-side-title {
    margin: 0 0 0.65rem;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    letter-spacing: 0.04em;
}
.board-side-title .board-side-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.35rem;
    padding: 0 0.42rem;
    border-radius: 4px;
    border: 1px solid rgba(185, 28, 28, 0.65);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.22), rgba(30, 10, 10, 0.85));
    color: #fecaca;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
}
.board-side-list {
    display: grid;
    gap: 0.4rem;
}
.board-side-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border: 1px solid rgba(63, 16, 16, 0.45);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 40%),
        rgba(10, 5, 5, 0.4);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
    min-width: 0;
}
.board-side-item:hover {
    border-color: rgba(239, 68, 68, 0.55);
    border-left-color: rgba(239, 68, 68, 0.85);
    background: rgba(45, 12, 12, 0.75);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 16px rgba(185, 28, 28, 0.12);
}
.board-side-item:hover .board-side-thumb {
    transform: scale(1.05);
}
.board-side-item.is-active {
    border-color: rgba(239, 68, 68, 0.85);
    border-left-color: #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.28), rgba(30, 10, 10, 0.75));
    box-shadow:
        inset 0 0 0 1px rgba(239, 68, 68, 0.25),
        0 6px 14px rgba(0, 0, 0, 0.35),
        0 0 18px rgba(185, 28, 28, 0.2);
}
.board-side-item.is-active .board-side-label {
    color: #fff;
}
.board-side-item.is-active .board-side-count {
    color: rgba(255, 220, 220, 0.85);
}
.board-side-thumb {
    display: block;
    width: 120px;
    height: 64px;
    background: #140808 center/cover no-repeat;
    border: 1px solid #3f1010;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 4px 8px rgba(0, 0, 0, 0.45);
    transition: transform 0.18s ease;
    transform-origin: center center;
}
.board-side[data-kind="weapon"] .board-side-thumb {
    background-size: contain;
    background-position: center;
    background-color: #0a0505;
    filter: none;
}
.board-side[data-kind="map"] .board-side-thumb {
    background-size: cover;
}
.board-side-thumb.is-empty { opacity: 0.35; }
.board-hero {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-bottom: 1px solid #2a0d0d;
    background: #0a0505;
    display: block;
    overflow: hidden;
}
.board-hero img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    border: 0;
    background: #0a0505;
    padding: 0;
    filter: none !important;
    object-position: center;
}
.board-hero--map img {
    height: 160px;
    object-fit: cover;
}
.board-hero--weapon {
    padding: 14px 16px;
    box-sizing: border-box;
}
.board-hero--weapon img {
    height: 140px;
    object-fit: contain;
    image-rendering: auto;
    filter: none;
}
.board-hero-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 14px 14px;
    border-bottom: 1px solid #2a0d0d;
    background: rgba(0, 0, 0, 0.45);
}
.board-hero-meta[data-cols="2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.board-hero-meta .meta-pill {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(127, 29, 29, 0.65);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%),
        #0a0505;
}
.board-hero-meta .meta-pill strong {
    font-size: 1.35rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
    .board-hero-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 10px 10px;
    }
    .board-hero-meta[data-cols="2"] {
        grid-template-columns: 1fr 1fr;
    }
    .board-hero-meta .meta-pill { padding: 6px 8px; }
    .board-hero-meta .meta-pill strong { font-size: 1.05rem; }
}
.board-main .stats-table { min-width: 0; }
.board-side-list:focus {
    outline: none;
}
.board-side-list:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45);
}
.board-main[data-kind="map"] .stats-table { min-width: 640px; }
.board-side-meta {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}
.board-side-label {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.board-side-count {
    color: var(--muted-2);
    font-size: 0.8rem;
}
.board-main { min-width: 0; }
@media (max-width: 860px) {
    .board-layout { grid-template-columns: 1fr; gap: 0.75rem; }
    .board-side {
        position: static;
        padding: 0.55rem;
    }
    .board-side-title {
        margin: 0 0 0.45rem;
        font-size: 0.95rem;
    }
    .board-side-list {
        display: flex;
        grid-template-columns: none;
        gap: 0.4rem;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        padding-bottom: 2px;
    }
    .board-side-item {
        flex: 0 0 auto;
        width: 132px;
        grid-template-columns: 1fr;
        gap: 0.3rem;
        padding: 0.3rem;
        scroll-snap-align: start;
    }
    .board-side-thumb {
        width: 100%;
        height: 52px;
    }
    .board-side-label { font-size: 0.8rem; }
    .board-side-count { font-size: 0.68rem; }
    .board-type-tab { padding: 10px 8px; gap: 2px; }
    .board-type-tab strong { font-size: 1.05rem; letter-spacing: 0.08em; }
    .board-type-tab .meta-label { font-size: 0.65rem; }
    .board-type-card { margin-bottom: 10px; }
    .board-hero--map img { height: 110px; }
    .board-hero--weapon { padding: 10px 12px; }
    .board-hero--weapon img { height: 96px; }
    .board-main[data-kind="map"] .stats-table { min-width: 0; }
}

@media (max-width: 520px) {
    /* Fit key columns on phone; Plant/Defuse/Nade + board Deaths/W/L stay on desktop */
    .stats-table .col-extra { display: none; }
    .stats-table { min-width: 0; width: 100%; }
    .col-name { max-width: 8.5rem; }
    .board-side-item { width: 118px; }
    .board-side-thumb { height: 46px; }
    .board-side-label { font-size: 0.76rem; }
    .profile-identity { gap: 0.65rem; }
    .profile-panel { padding: 10px; }
    .profile-panel > .section-title { font-size: 0.95rem; }
    .empty-state { padding: 1rem 0.75rem; }
    .empty-state strong { font-size: 0.95rem; }
}
