:root {
    --bg: #000;
    --card: rgba(8, 10, 14, 0.82);
    --text: #ececec;
    --muted: #9aa0a8;
    --dim: #5c6168;
    --money: #7cff6b;
    --hp: #2f7dff;
    --ok: #3dd68c;
    --bad: #8a3a3a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    background: #000;
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow: hidden;
}

button,
input {
    font: inherit;
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

#app-shell {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
}

.hud-controls {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 4;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 160ms ease;
}

#app-shell:hover .hud-controls {
    opacity: 1;
}

.toggle,
.ghost-button,
.segmented button {
    display: flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border: 0;
    border-radius: 4px;
    background: rgba(20, 22, 26, 0.7);
    color: #b8bcc2;
    font-size: 11px;
    cursor: pointer;
}

.toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle:has(input:checked),
.segmented button.active {
    color: #fff;
    background: rgba(40, 44, 50, 0.9);
}

.workspace {
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr) 236px;
    width: 100%;
    height: 100%;
    background: #000;
}

.team-rail {
    display: flex;
    align-items: flex-start;
    min-width: 0;
    min-height: 0;
    padding: 18px 12px;
}

.player-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-height: 0;
    overflow: auto;
    scrollbar-width: none;
}

.player-list::-webkit-scrollbar {
    display: none;
}

.player-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 28px;
    grid-template-rows: 16px 14px 14px 5px;
    column-gap: 8px;
    width: 100%;
    overflow: hidden;
    border-radius: 3px;
    background: var(--card);
}

.player-card.ct {
    grid-template-columns: 28px minmax(0, 1fr) 42px;
}

.avatar {
    grid-column: 1;
    grid-row: 1 / 4;
    display: grid;
    place-items: center;
    width: 42px;
    height: 44px;
    background: #0b0d10;
    color: #3a3d44;
    font-size: 14px;
    font-weight: 700;
}

.player-card.ct .avatar {
    grid-column: 3;
}

.player-name {
    grid-column: 2;
    grid-row: 1;
    overflow: hidden;
    padding-top: 2px;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-money {
    grid-column: 2;
    grid-row: 2;
    color: var(--money);
    font-size: 11px;
    font-weight: 600;
}

.player-weapon {
    grid-column: 2;
    grid-row: 3;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-hp-num {
    grid-column: 3;
    grid-row: 1;
    padding-top: 2px;
    color: #c5c8ce;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.player-card.ct .player-name,
.player-card.ct .player-money,
.player-card.ct .player-weapon {
    grid-column: 2;
    text-align: right;
}

.player-card.ct .player-hp-num {
    grid-column: 1;
    text-align: left;
    padding-left: 6px;
}

.health-track {
    grid-column: 1 / -1;
    grid-row: 4;
    height: 5px;
    background: #121418;
}

.health-value {
    height: 100%;
    background: var(--hp);
}

.player-card.dead {
    opacity: 0.42;
}

.player-card.dead .health-value {
    width: 0 !important;
}

.player-card.local .player-name {
    color: var(--ok);
}

.empty-roster {
    padding: 24px 8px;
    color: #3a3d44;
    font-size: 12px;
    text-align: center;
}

.radar-column {
    display: grid;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.radar-stage {
    position: relative;
    display: grid;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: #000;
}

#radar {
    display: block;
}

.map-empty {
    position: absolute;
    right: 16px;
    bottom: 16px;
    color: #3a3d44;
    font-size: 11px;
    pointer-events: none;
}

.map-empty[hidden] {
    display: none;
}

.zoom {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zoom input {
    width: 72px;
    height: 2px;
    appearance: none;
    background: #2a2d33;
    cursor: pointer;
}

.zoom input::-webkit-slider-thumb {
    width: 9px;
    height: 9px;
    appearance: none;
    border-radius: 50%;
    background: #d0d2d6;
}

.zoom output {
    width: 32px;
    color: #9aa0a8;
    font-size: 11px;
    text-align: right;
}

.segmented {
    display: flex;
    gap: 2px;
}

.segmented[hidden] {
    display: none;
}

@media (max-width: 980px) {
    .workspace {
        grid-template-columns: 200px minmax(0, 1fr) 200px;
    }
}
