.beat-invaders-page {
    --beat-cyan: #4ce8ff;
    --beat-pink: #ff426e;
    --beat-gold: #ffe17b;
}

.beat-invaders-page .beat-hud {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 560px);
    margin: 0 auto 10px;
}

.beat-invaders-page .beat-hud > div {
    min-width: 0;
}

.beat-invaders-page .beat-hud span {
    white-space: nowrap;
}

.beat-invaders-page .beat-hud strong {
    color: var(--beat-gold);
}

.beat-invaders-page #livesDisplay {
    color: #ff5479;
    letter-spacing: .08em;
    text-shadow: 0 0 8px rgba(255, 66, 110, .6);
    white-space: nowrap;
}

.beat-control-row {
    display: flex;
    width: min(100%, 560px);
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 8px;
}

.beat-control-row p {
    margin: 0;
    color: #d9d2ec;
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.beat-tilt-button {
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid rgba(76, 232, 255, .8);
    border-radius: 5px;
    color: var(--beat-cyan);
    background: #100d22;
    font: 800 .78rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
}

.beat-tilt-button:hover,
.beat-tilt-button:focus-visible {
    color: #100d22;
    background: var(--beat-cyan);
}

.beat-tilt-button:focus-visible {
    outline: 3px solid var(--beat-gold);
    outline-offset: 3px;
}

.beat-stage {
    position: relative;
    width: min(100%, 560px);
    aspect-ratio: 6 / 7;
    margin: 0 auto;
    overflow: hidden;
    border: 2px solid rgba(76, 232, 255, .75);
    border-radius: 9px;
    background: #090a19;
    box-shadow: 0 0 18px rgba(76, 232, 255, .17), inset 0 0 22px rgba(153, 65, 255, .16);
}

.beat-stage canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    image-rendering: pixelated;
}

.beat-stage .new-game-start-overlay {
    border: 0;
    background: rgba(7, 7, 20, .78);
}

.beat-overlay-controls {
    color: #d9d2ec;
}

.beat-invaders-page .new-game-screen {
    width: 100%;
}

@media (max-width: 620px) {
    .beat-control-row {
        flex-direction: column;
        gap: 7px;
        padding: 0 4px 4px;
    }

    .beat-tilt-button {
        width: min(100%, 220px);
    }
}

@media (min-width: 768px) {
    .beat-tilt-button {
        display: none;
    }

    .beat-stage {
        width: min(100%, 460px);
    }

    .beat-stage canvas {
        max-height: none;
    }
}
