* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #f4f7fb;
    background: #10141f;
}

.game-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 18px;
}

h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.stats-panel {
    width: 100%;
    max-width: 960px;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 6px;
}

.stat-item {
    min-width: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 7px 8px;
    background: #182236;
    border: 1px solid #31405c;
}

.stat-label {
    font-size: 10px;
    line-height: 1;
    color: #9fb0cc;
    white-space: nowrap;
}

.stat-item strong {
    font-size: 19px;
    line-height: 1;
    color: #ffffff;
    white-space: nowrap;
}

.upgrade-panel {
    display: none;
}

.upgrade-button {
    min-height: 46px;
    padding: 10px 12px;
    color: #ffffff;
    font: 700 15px/1.2 Arial, Helvetica, sans-serif;
    background: #2f80ed;
    border: 1px solid #8fc1ff;
    cursor: pointer;
}

.upgrade-button:disabled {
    color: #8390a8;
    background: #1a2334;
    border-color: #34435f;
    cursor: not-allowed;
}

.control-panel {
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.control-button {
    min-width: 180px;
    min-height: 44px;
    padding: 10px 18px;
    color: #ffffff;
    font: 700 15px/1.2 Arial, Helvetica, sans-serif;
    background: #256f58;
    border: 1px solid #68d6ad;
    cursor: pointer;
}

.control-button:disabled {
    color: #8390a8;
    background: #1a2334;
    border-color: #34435f;
    cursor: not-allowed;
}

.canvas-frame {
    width: 100%;
    max-width: 960px;
    border: 1px solid #2b3448;
    background: #151b29;
}

#gameCanvas {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #151b29;
}

@media (max-width: 760px) {
    .upgrade-panel {
        grid-template-columns: 1fr;
    }

    .control-panel {
        flex-direction: column;
    }
}
