:root {
    --game-bg: #050505;
    --game-surface: rgba(8, 14, 14, 0.88);
    --game-surface-2: rgba(8, 20, 20, 0.96);
    --game-border: rgba(0, 255, 255, 0.28);
    --game-border-strong: rgba(0, 255, 255, 0.52);
    --game-text: #dcffff;
    --game-muted: #8ac9c9;
    --game-accent: #00ffff;
    --game-success: #7dffb4;
    --game-danger: #ff6b6b;
    --game-warning: #ffd166;
    --game-shadow: 0 0 24px rgba(0, 255, 255, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.game-body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(0, 255, 255, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(0, 255, 255, 0.1), transparent 24%),
        linear-gradient(180deg, #040404 0%, #050505 100%);
    color: var(--game-text);
    font-family: Consolas, "Courier New", monospace;
}

body.game-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 255, 0.07) 0,
        rgba(0, 255, 255, 0.07) 1px,
        transparent 1px,
        transparent 4px
    );
}

.game-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: min(100% - 1.5rem, 1220px);
    margin-inline: auto;
    padding: 1rem 0 2rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--game-border);
    background: rgba(3, 10, 10, 0.78);
    backdrop-filter: blur(10px);
    box-shadow: var(--game-shadow);
}

.game-brand {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-home {
    color: var(--game-text);
    text-decoration: none;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.game-home span {
    color: var(--game-accent);
}

.game-tag {
    color: var(--game-muted);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.game-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shell-button {
    appearance: none;
    border: 1px solid var(--game-border-strong);
    background: rgba(0, 255, 255, 0.06);
    color: var(--game-accent);
    text-decoration: none;
    padding: 0.7rem 1rem;
    font: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: 160ms ease;
}

.shell-button:hover,
.shell-button:focus-visible {
    box-shadow: 0 0 22px rgba(0, 255, 255, 0.28);
    transform: translateY(-1px);
}

.shell-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
    box-shadow: none;
}

.game-main {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.game-sidebar,
.game-stage {
    border: 1px solid var(--game-border);
    background: var(--game-surface);
    box-shadow: var(--game-shadow);
}

.game-sidebar {
    padding: 1rem;
    align-self: start;
}

.game-sidebar h1 {
    margin: 0;
    font-family: "Barlow Condensed", sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--game-accent);
}

.game-sidebar p,
.game-sidebar li,
.game-status,
.game-note {
    color: var(--game-muted);
    line-height: 1.5;
}

.game-status {
    margin-top: 0.85rem;
    min-height: 1.5rem;
    border-left: 2px solid var(--game-border-strong);
    padding-left: 0.7rem;
}

.game-controls {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.game-controls li + li {
    margin-top: 0.45rem;
}

.game-stage {
    min-height: 620px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-panel {
    width: 100%;
}

.game-panel-title {
    margin: 0 0 0.85rem;
    color: var(--game-text);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.game-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
    place-items: center;
    background: rgba(0, 4, 4, 0.78);
}

.game-overlay.open {
    display: grid;
}

.game-dialog {
    width: min(100% - 2rem, 420px);
    border: 1px solid var(--game-border-strong);
    background: var(--game-surface-2);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.18);
    padding: 1.2rem;
    text-align: center;
}

.game-dialog h2 {
    margin: 0;
    color: var(--game-accent);
    font-family: "Barlow Condensed", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 2rem;
}

.game-dialog p {
    margin: 0.85rem 0 1rem;
    color: var(--game-muted);
}

.game-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

@media (max-width: 960px) {
    .game-main {
        grid-template-columns: 1fr;
    }

    .game-stage {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .game-shell {
        width: min(100% - 1rem, 1220px);
    }

    .game-header {
        flex-direction: column;
        align-items: stretch;
    }

    .game-actions {
        justify-content: stretch;
    }

    .game-actions > * {
        flex: 1;
        text-align: center;
    }

    .game-stage,
    .game-sidebar {
        padding: 0.85rem;
    }
}
