:root {
    --bg: #0a1410;
    --bg-deeper: #050a07;
    --bg2: #14261d;
    --bg3: #1a3025;
    --bg-elevated: #1f3a2c;

    --leaf: #3a6e4e;
    --lime: #b8ff5a;
    --lime-bright: #d4ff7a;
    --gold: #d4a943;
    --rust: #b8623a;

    --line: rgba(245,240,230,0.08);
    --line-strong: rgba(245,240,230,0.18);
    --border: rgba(245,240,230,0.08);
    --border-bright: rgba(245,240,230,0.18);

    --text: #f5f0e6;
    --text-muted: #c8c2b4;
    --text-dim: #6b6e64;

    --accent: #b8ff5a;
    --accent-bright: #d4ff7a;
    --accent-deep: #3a6e4e;

    --green: #b8ff5a;
    --yellow: #d4a943;
    --red: #b8623a;
    --blue: #6b9fd4;

    --f-display: 'Fraunces', Georgia, serif;
    --f-body: 'Manrope', system-ui, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius: 4px;
    --radius-sm: 2px;
    --sidebar-w: 240px;
}

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

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--f-body);
    font-size: 14px;
    line-height: 1.5;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 15% 0%, rgba(58,110,78,0.18), transparent 60%),
        radial-gradient(ellipse 60% 50% at 90% 90%, rgba(184,255,90,0.05), transparent 60%);
    z-index: 0;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--lime); color: var(--bg-deeper); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--leaf); }

/* ── Layout ── */
.gs-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.gs-sidebar {
    width: var(--sidebar-w);
    background: rgba(10,20,16,0.72);
    backdrop-filter: blur(20px) saturate(140%);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.gs-logo {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--line);
}
.gs-logo-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    transition: opacity .25s ease;
}
.gs-logo:hover .gs-logo-img { opacity: .9; }

.gs-nav { display: flex; flex-direction: column; padding: 18px 12px; gap: 2px; flex: 1; overflow-y: auto; }

.gs-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color .2s ease, background .2s ease;
}
.gs-nav-link:hover {
    color: var(--lime);
    background: rgba(184,255,90,0.04);
}
.gs-nav-link.active {
    color: var(--lime);
    background: rgba(184,255,90,0.08);
    box-shadow: inset 2px 0 0 var(--lime);
}
.gs-nav-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
    font-family: var(--f-mono);
}

.gs-sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--line);
}
.gs-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color .2s ease, background .2s ease;
}
.gs-logout-btn:hover {
    color: var(--rust);
    background: rgba(184,98,58,0.08);
}
.gs-logout-icon { font-size: 15px; line-height: 1; }

.gs-main {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    position: relative;
}

/* ── Mobile Bar ── */
.gs-mobile-bar { display: none; }
.gs-mobile-toggle { display: none; }
.gs-mobile-logo { display: none; }
.gs-logout-btn-mobile { display: none; }
.gs-backdrop { display: none; }

/* ── Page ── */
.gs-page {
    padding: 40px 48px;
    animation: gs-page-in .3s ease-out;
}
@keyframes gs-page-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gs-page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: -40px -48px 28px;
    padding: 28px 48px 22px;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 20, 16, 0.88);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.gs-page-header h2 {
    font-family: var(--f-display);
    font-size: 38px;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--text);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.gs-uptime {
    font-family: var(--f-mono);
    color: var(--text-dim);
    font-size: 11px;
    letter-spacing: 0.06em;
}

.gs-section-title {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--lime);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    display: flex;
    align-items: center;
    gap: 14px;
}
.gs-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* ── Metric Cards ── */
.gs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.gs-metric-card {
    background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 120%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 26px;
    transition: border-color .2s ease;
}
.gs-metric-card:hover { border-color: var(--leaf); }

.gs-metric-label {
    font-family: var(--f-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-dim);
    margin-bottom: 14px;
    font-weight: 700;
}
.gs-metric-value {
    font-family: var(--f-display);
    font-size: 26px;
    font-weight: 500;
    margin-bottom: 14px;
    letter-spacing: -0.025em;
    line-height: 1;
}
.gs-metric-sub {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 10px;
    letter-spacing: 0.04em;
}

.gs-bar-track { height: 4px; background: var(--bg-deeper); border-radius: 99px; overflow: hidden; }
.gs-bar-fill { height: 100%; border-radius: 99px; transition: width .6s ease; }
.gs-bar-ok    { background: var(--lime); }
.gs-bar-warn  { background: var(--gold); }
.gs-bar-danger { background: var(--rust); }

/* ── Status Badge ── */
.gs-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--f-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid currentColor;
    background: transparent;
}
.gs-status-badge::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.status-running       { color: var(--lime); }
.status-running::before { animation: gs-pulse 2s ease-in-out infinite; }
.status-stopped       { color: var(--gold); }
.status-starting      { color: var(--blue); }
.status-stopping      { color: var(--gold); }
.status-installing    { color: var(--lime); }
.status-not-installed { color: var(--text-dim); }
@keyframes gs-pulse {
    50% { opacity: .35; }
}

/* ── Host List (Server-Seite) ── */
.gs-host-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.gs-host-card {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 26px 24px;
}
.gs-host-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.gs-host-info { display: flex; flex-direction: column; gap: 4px; }
.gs-host-name {
    font-family: var(--f-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.gs-host-location {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}
.gs-host-add {
    background: transparent;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-family: var(--f-body);
    font-size: 14px;
    font-weight: 500;
    transition: all .2s ease;
}
.gs-host-add:hover {
    border-color: var(--lime);
    color: var(--lime);
    background: rgba(184,255,90,0.03);
}
.gs-host-add-icon {
    font-family: var(--f-display);
    font-size: 22px;
    line-height: 1;
}
.gs-host-add-text { font-weight: 600; }
.gs-host-add-hint {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-left: 8px;
}

/* ── Server List (Dashboard – legacy) ── */
.gs-server-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.gs-server-row {
    background: var(--bg);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: background .25s ease;
}
.gs-server-row:hover { background: var(--bg2); }

.gs-server-row-info { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gs-server-row-name {
    font-family: var(--f-display);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.015em;
}
.gs-server-row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.gs-server-row-uptime { color: var(--text-dim); }
.gs-server-row-ram {
    color: var(--lime);
    font-weight: 700;
}
.gs-server-row-invite { color: var(--text-muted); }
.gs-server-row-invite strong {
    color: var(--lime);
    font-family: var(--f-mono);
    letter-spacing: 0.15em;
    font-weight: 700;
}
.gs-server-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.gs-server-row-actions .gs-btn {
    width: 36px;
    padding: 6px 0;
    justify-content: center;
    font-size: 13px;
}

/* ── Toolbar (Search + Filter Pills) ── */
.gs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.gs-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 240px;
    max-width: 420px;
}
.gs-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    font-size: 16px;
    pointer-events: none;
}
.gs-search input {
    width: 100%;
    background: var(--bg-deeper);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 9px 36px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: border-color .2s;
}
.gs-search input:focus { outline: none; border-color: var(--lime); }
.gs-search-clear {
    position: absolute;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: var(--line-strong);
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gs-search-clear:hover { background: var(--rust); color: var(--bg-deeper); }

.gs-filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.gs-pill {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all .2s ease;
}
.gs-pill:hover { color: var(--lime); border-color: var(--leaf); }
.gs-pill.active {
    color: var(--lime);
    border-color: var(--lime);
    background: rgba(184,255,90,0.08);
}

/* ── Game List (Spielserver) ── */
.gs-game-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.gs-game-item { background: var(--bg); transition: background .2s ease; }
.gs-game-item.open { background: var(--bg2); }
.gs-game-item-head {
    display: grid;
    grid-template-columns: 28px 130px 1fr 120px 170px;
    align-items: center;
    gap: 14px;
    padding: 8px;
    cursor: pointer;
    user-select: none;
    transition: background .15s ease;
}
.gs-favorite-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    transition: color .15s, transform .15s;
}
.gs-favorite-btn:hover { color: var(--lime-bright); transform: scale(1.15); }
.gs-favorite-btn.active { color: var(--lime); }
.gs-game-item-icon {
    width: 125px;
    height: 47px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--line);
    background: var(--bg-deeper);
    display: block;
}
.gs-game-item-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--lime);
    background: var(--bg2);
    text-transform: uppercase;
}
.gs-game-item:not(.open) .gs-game-item-head:hover { background: var(--bg2); }
.gs-game-item-name-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.gs-game-item-name {
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: -0.015em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gs-game-item-meta-line {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    font-family: var(--f-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    overflow: hidden;
}
.gs-game-item-uptime {
    color: var(--text-dim);
    white-space: nowrap;
}
.gs-game-item-uptime + .gs-game-item-sub::before {
    content: "·";
    color: var(--text-dim);
    margin-right: 4px;
}
.gs-game-item-sub {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--lime);
    letter-spacing: 0.06em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    padding: 1px 6px;
    border-radius: 2px;
    transition: background .15s ease, color .15s ease;
}
.gs-game-item-sub:hover {
    color: var(--lime-bright);
    background: rgba(184,255,90,0.10);
}
.gs-game-item-sub::after {
    content: " ⧉";
    opacity: 0;
    transition: opacity .15s;
    font-size: 10px;
}
.gs-game-item-sub:hover::after { opacity: .7; }
.gs-game-item-ram-cell {
    display: flex;
    justify-content: center;
}
.gs-game-item-status-cell {
    display: flex;
    justify-content: flex-start;
}
.gs-game-item-status-cell .gs-status-badge {
    min-width: 100%;
    justify-content: center;
}

.gs-game-item-body {
    padding: 8px 22px 22px 50px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--line);
    animation: gs-expand-in .25s ease-out;
}
@keyframes gs-expand-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.gs-game-item-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 24px;
}
.gs-info-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
    gap: 12px;
}
.gs-info-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    flex-shrink: 0;
}
.gs-info-val {
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--text);
    text-align: right;
    word-break: break-all;
}
.gs-info-invite {
    color: var(--lime);
    letter-spacing: 0.15em;
    font-weight: 700;
}
.gs-info-path { color: var(--text-muted); font-size: 11px; }

/* ── Game Cards (legacy, falls noch verwendet) ── */
.gs-game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.gs-game-card {
    background: var(--bg);
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: background .25s ease;
}
.gs-game-card:hover { background: var(--bg2); }

.gs-game-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.gs-game-info { display: flex; flex-direction: column; gap: 10px; }
.gs-game-name {
    font-family: var(--f-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.gs-game-meta {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}
.gs-game-uptime {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.gs-invite-code {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(184,255,90,0.04);
    border: 1px solid rgba(184,255,90,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.gs-invite-label {
    font-family: var(--f-mono);
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
}
.gs-invite-value {
    font-family: var(--f-mono);
    font-size: 16px;
    font-weight: 700;
    color: var(--lime);
    letter-spacing: 0.18em;
}

.gs-game-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Buttons ── */
.gs-btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--f-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.gs-btn:disabled { opacity: .35; cursor: not-allowed; }
.gs-btn:not(:disabled):hover { transform: translateY(-1px); }
.gs-btn:not(:disabled):active { transform: translateY(0); }

.gs-btn-start {
    background: var(--lime);
    color: var(--bg-deeper);
}
.gs-btn-start:not(:disabled):hover {
    background: var(--lime-bright);
    box-shadow: 0 8px 24px -10px rgba(184,255,90,0.5);
}

.gs-btn-stop {
    background: transparent;
    color: var(--rust);
    border-color: var(--rust);
}
.gs-btn-stop:not(:disabled):hover {
    background: rgba(184,98,58,0.08);
    color: #c97a4f;
    border-color: #c97a4f;
}

.gs-btn-restart {
    background: transparent;
    color: var(--gold);
    border-color: var(--gold);
}
.gs-btn-restart:not(:disabled):hover {
    background: rgba(212,169,67,0.08);
}

.gs-btn-install {
    background: transparent;
    color: var(--lime);
    border-color: var(--lime);
}
.gs-btn-install:not(:disabled):hover {
    background: rgba(184,255,90,0.06);
    color: var(--lime-bright);
    border-color: var(--lime-bright);
}

.gs-btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}
.gs-btn-secondary:not(:disabled):hover {
    color: var(--lime);
    border-color: var(--lime);
}

.gs-game-meta-col { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gs-not-installed {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}
.gs-game-ram {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--lime);
    background: rgba(184,255,90,0.06);
    border: 1px solid rgba(184,255,90,0.25);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}
.gs-game-ram-live {
    color: var(--lime-bright);
    background: rgba(184,255,90,0.12);
    border-color: rgba(184,255,90,0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.gs-game-ram-live::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 6px var(--lime);
    animation: gs-pulse 2s ease-in-out infinite;
}

/* ── Log Preview in Game Card ── */
.gs-game-log-preview {
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    max-height: 150px;
    overflow-y: auto;
    line-height: 1.6;
}

/* ── Log Page ── */
.gs-log-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.gs-select {
    background: var(--bg-deeper);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: border-color .2s;
}
.gs-select:focus { outline: none; border-color: var(--lime); }
.gs-autoscroll-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 13px;
}

.gs-log-box {
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    font-family: var(--f-mono);
    font-size: 12px;
    line-height: 1.7;
    height: calc(100vh - 200px);
    overflow-y: auto;
}
.gs-log-empty { color: var(--text-dim); font-style: italic; }
.gs-log-line { white-space: pre-wrap; word-break: break-all; }
.log-error { color: var(--rust); }
.log-warn  { color: var(--gold); }
.log-system { color: var(--lime); font-weight: 700; }

/* ── Login ── */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    padding: 20px;
    position: relative;
}
.login-card {
    background: linear-gradient(180deg, var(--bg2) 0%, var(--bg) 120%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 44px 48px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}
.login-logo-img {
    width: 220px;
    max-width: 100%;
    height: auto;
}

.login-error {
    background: rgba(184,98,58,0.10);
    border: 1px solid rgba(184,98,58,0.4);
    color: var(--rust);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13px;
    font-family: var(--f-mono);
}

.login-field { margin-bottom: 18px; }
.login-field label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 700;
}
.login-input {
    width: 100%;
    background: var(--bg-deeper);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}
.login-input:focus { border-color: var(--lime); }
.login-btn {
    width: 100%;
    background: var(--lime);
    color: var(--bg-deeper);
    border: none;
    padding: 13px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 12px;
    transition: all .2s;
    font-family: inherit;
    letter-spacing: 0.02em;
}
.login-btn:hover {
    background: var(--lime-bright);
    transform: translateY(-1px);
    box-shadow: 0 12px 32px -12px rgba(184,255,90,0.5);
}

/* ── Settings Form ── */
.gs-back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}
.gs-back-link:hover { color: var(--lime); }
.gs-header-sep { color: var(--text-dim); margin: 0 8px; }

.gs-warning-banner,
.gs-success-banner,
.gs-error-banner,
.gs-info-banner {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13px;
    border: 1px solid;
    font-family: var(--f-mono);
    letter-spacing: 0.02em;
}
.gs-warning-banner { background: rgba(212,169,67,0.06); border-color: rgba(212,169,67,0.4); color: var(--gold); }
.gs-success-banner { background: rgba(184,255,90,0.06); border-color: rgba(184,255,90,0.4); color: var(--lime); }
.gs-error-banner   { background: rgba(184,98,58,0.06); border-color: rgba(184,98,58,0.4); color: var(--rust); }
.gs-info-banner    { background: var(--bg2); border-color: var(--line); color: var(--text-muted); }

.gs-form-actions-top, .gs-form-actions-bottom {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.gs-form-actions-bottom {
    margin-top: 28px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    justify-content: flex-end;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--bg) 75%, transparent);
    backdrop-filter: blur(12px);
}

.gs-form { display: flex; flex-direction: column; gap: 20px; }

.gs-form-section {
    background: var(--bg2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 28px;
    transition: border-color .25s;
}
.gs-form-section:hover { border-color: var(--leaf); }
.gs-form-section legend {
    padding: 0 12px;
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--lime);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.gs-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 22px;
    margin-top: 12px;
}

.gs-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gs-form-field > span {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}
.gs-form-field input[type=text],
.gs-form-field input[type=number],
.gs-form-field input[type=password],
.gs-form-field input[type=time],
.gs-form-field input[type=date],
.gs-form-field select {
    background: var(--bg-deeper);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color-scheme: dark;
    transition: border-color .2s;
}
.gs-form-field input:focus,
.gs-form-field select:focus {
    outline: none;
    border-color: var(--lime);
}
.gs-form-field input[type=time],
.gs-form-field input[type=date] {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
}
.gs-form-field input[type=time]::-webkit-calendar-picker-indicator,
.gs-form-field input[type=date]::-webkit-calendar-picker-indicator {
    filter: invert(0.85) sepia(0.4) saturate(8) hue-rotate(60deg);
    cursor: pointer;
    opacity: 0.6;
    transition: opacity .15s;
}
.gs-form-field input[type=time]::-webkit-calendar-picker-indicator:hover,
.gs-form-field input[type=date]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
.gs-form-field input[type=time]::-webkit-datetime-edit,
.gs-form-field input[type=date]::-webkit-datetime-edit { color: var(--text); }
.gs-form-field input[type=time]::-webkit-datetime-edit-fields-wrapper,
.gs-form-field input[type=date]::-webkit-datetime-edit-fields-wrapper { color: var(--text); }
.gs-form-field input[type=time]::-webkit-datetime-edit-text,
.gs-form-field input[type=date]::-webkit-datetime-edit-text { color: var(--text-dim); padding: 0 2px; }
.gs-form-field input[type=time]::-webkit-inner-spin-button,
.gs-form-field input[type=date]::-webkit-inner-spin-button { display: none; }
.gs-form-field input[readonly],
.gs-form-field input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.gs-form-field-check {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row !important;
    cursor: pointer;
    padding-top: 22px;
}
.gs-form-field-check > span {
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    font-family: var(--f-body);
}
.gs-form-field-check input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--lime); cursor: pointer; }

.gs-form-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    display: block;
    margin: 14px 0 8px;
}

.gs-tags { margin-top: 14px; }
.gs-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-tag-item { display: flex; gap: 4px; }
.gs-tag-item input { width: 130px; }

.gs-btn-sm { padding: 6px 12px; font-size: 12px; }

.gs-factor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px 24px;
    margin-top: 12px;
}

.gs-factor {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gs-factor-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}
.gs-factor-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.gs-factor-controls input[type=range] {
    flex: 1;
    accent-color: var(--lime);
    height: 4px;
}
.gs-factor-number {
    width: 70px;
    background: var(--bg-deeper);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: right;
    font-family: var(--f-mono);
    font-weight: 700;
}
.gs-factor-number:focus { outline: none; border-color: var(--lime); }
.gs-factor-hint {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
}

.gs-user-group {
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color .2s;
}
.gs-user-group:hover { border-color: var(--leaf); }
.gs-perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 14px;
}
.gs-perm-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
}
.gs-perm-grid input[type=checkbox] {
    width: 16px;
    height: 16px;
    accent-color: var(--lime);
    cursor: pointer;
}

/* ── Restart Policy ── */
.gs-restart-policy {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gs-restart-policy-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}
.gs-restart-policy-row .gs-form-field-check {
    padding-top: 0;
    flex-shrink: 0;
}
.gs-restart-cron { flex: 1; min-width: 200px; max-width: 280px; }
.gs-restart-cron input { font-family: var(--f-mono); }
.gs-restart-next {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.06em;
}
.gs-restart-help {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}
.gs-restart-help code {
    font-family: var(--f-mono);
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 1px 6px;
    color: var(--lime);
    font-size: 11px;
}

.gs-mod-info {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}
.gs-mod-info p { margin: 0 0 10px; }
.gs-mod-info p strong { color: var(--text); }
.gs-mod-info a {
    color: var(--lime);
    text-decoration: underline;
    text-decoration-color: rgba(184,255,90,0.4);
    text-underline-offset: 2px;
}
.gs-mod-info a:hover { color: var(--lime-bright); }
.gs-mod-info code {
    font-family: var(--f-mono);
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 1px 6px;
    color: var(--lime);
    font-size: 11px;
}
.gs-mod-steps {
    margin: 8px 0 0 22px;
    padding: 0;
}
.gs-mod-steps li { margin-bottom: 6px; }

/* ── Update Banner ── */
.gs-update-banner {
    background: linear-gradient(90deg, rgba(184,255,90,0.10), transparent);
    border: 1px solid rgba(184,255,90,0.4);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-family: var(--f-mono);
    font-size: 12px;
    color: var(--lime);
    font-weight: 700;
    letter-spacing: 0.04em;
}
.gs-update-buildids {
    color: var(--text-muted);
    font-weight: 500;
    margin-right: auto;
}

/* ── Player-Liste ── */
.gs-players {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
}
.gs-players-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}
.gs-players-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}
.gs-players-count {
    font-family: var(--f-mono);
    color: var(--lime);
    font-weight: 700;
}
.gs-players-empty { color: var(--text-dim); font-size: 12px; font-style: italic; }
.gs-players-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gs-player-tag {
    background: rgba(184,255,90,0.08);
    border: 1px solid rgba(184,255,90,0.25);
    color: var(--lime);
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Console ── */
.gs-console {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-deeper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
}
.gs-console-prompt {
    font-family: var(--f-mono);
    color: var(--lime);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}
.gs-console input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--f-mono);
    font-size: 12px;
    outline: none;
    padding: 6px 4px;
}
.gs-console input::placeholder { color: var(--text-dim); }

/* ── Sparklines & History ── */
.gs-sparkline {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}
.gs-ram-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}
.gs-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.gs-history-card {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gs-history-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}

/* ── Log Highlights ── */
.gs-log-mark {
    background: var(--lime);
    color: var(--bg-deeper);
    padding: 0 3px;
    border-radius: 2px;
}

/* ── Toasts ── */
.gs-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.gs-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 14px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: var(--bg-deeper);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: gs-toast-in .3s cubic-bezier(.2,.9,.3,1);
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    font-size: 13px;
    color: var(--text);
    backdrop-filter: blur(12px);
}
.gs-toast-icon {
    font-family: var(--f-mono);
    font-size: 13px;
    font-weight: 700;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}
.gs-toast-text { flex: 1; line-height: 1.45; }
.gs-toast-success { border-color: rgba(184,255,90,0.5); }
.gs-toast-success .gs-toast-icon { background: var(--lime); color: var(--bg-deeper); }
.gs-toast-error { border-color: rgba(184,98,58,0.5); }
.gs-toast-error .gs-toast-icon { background: var(--rust); color: var(--bg-deeper); }
.gs-toast-info .gs-toast-icon { background: var(--blue); color: var(--bg-deeper); }
@keyframes gs-toast-in {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .gs-page { padding: 32px 28px; }
    .gs-game-cards { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { font-size: 13px; }

    .gs-layout {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .gs-mobile-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        background: rgba(10,20,16,0.85);
        backdrop-filter: blur(20px) saturate(140%);
        border-bottom: 1px solid var(--line);
        position: sticky;
        top: 0;
        z-index: 90;
    }
    .gs-mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        width: 38px;
        height: 38px;
        padding: 9px;
        border: 1px solid var(--line-strong);
        background: transparent;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: border-color .2s;
    }
    .gs-mobile-toggle:hover { border-color: var(--lime); }
    .gs-mobile-toggle span {
        display: block;
        width: 18px;
        height: 1.5px;
        background: var(--text);
        transition: transform .25s, opacity .2s;
    }
    .gs-menu-open .gs-mobile-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); background: var(--lime); }
    .gs-menu-open .gs-mobile-toggle span:nth-child(2) { opacity: 0; }
    .gs-menu-open .gs-mobile-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); background: var(--lime); }

    .gs-mobile-logo {
        display: block;
        height: 32px;
        width: auto;
        margin: 0 auto;
    }
    .gs-logout-btn-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        font-size: 16px;
        padding: 0;
        border: 1px solid var(--line-strong);
        background: transparent;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .gs-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        z-index: 110;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(.2,.9,.3,1);
        box-shadow: 8px 0 32px rgba(0,0,0,0.5);
    }
    .gs-menu-open .gs-sidebar { transform: translateX(0); }

    .gs-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(5,10,7,0.65);
        backdrop-filter: blur(2px);
        z-index: 100;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }
    .gs-menu-open .gs-backdrop { opacity: 1; pointer-events: auto; }

    .gs-main { overflow-y: visible; }
    .gs-page { padding: 24px 18px; }
    .gs-page-header {
        margin: -24px -18px 22px;
        padding: 20px 18px 16px;
    }
    .gs-page-header h2 { font-size: 28px; }

    .gs-game-card { padding: 22px 20px; }
    .gs-game-actions .gs-btn { flex: 1 1 auto; justify-content: center; }

    .gs-form-section { padding: 18px 20px; }
    .gs-form-grid { grid-template-columns: 1fr; }
    .gs-factor-grid { grid-template-columns: 1fr; }
    .gs-perm-grid { grid-template-columns: 1fr 1fr; }

    .gs-server-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .gs-server-row-actions { justify-content: flex-end; }

    .gs-game-item-head {
        grid-template-columns: 28px 130px 1fr;
        grid-auto-rows: auto;
        gap: 8px 12px;
    }
    .gs-game-item-icon { grid-row: span 3; }
    .gs-game-item-name-block { grid-column: 3; }
    .gs-game-item-ram-cell,
    .gs-game-item-status-cell {
        grid-column: 3;
        justify-content: flex-start;
    }
    .gs-game-item-status-cell .gs-status-badge { min-width: 0; }
    .gs-game-item-body { padding-left: 22px; }

    .gs-toast-container { top: 12px; right: 12px; left: 12px; }
    .gs-toast { min-width: 0; width: 100%; max-width: none; }

    .gs-log-box { height: calc(100vh - 220px); }
}

@media (max-width: 480px) {
    .gs-perm-grid { grid-template-columns: 1fr; }
    .gs-tag-item input { width: 100px; }
}

/* ── Blazor Error UI ── */
#blazor-error-ui {
    background: var(--rust);
    color: white;
    display: none;
    bottom: 0;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }
