/* NEON ZERO — UI shell */
:root {
    --bg: #05010f;
    --bg-2: #0d0326;
    --panel: rgba(10, 4, 30, 0.82);
    --panel-edge: rgba(0, 255, 255, 0.35);
    --cyan: #00f6ff;
    --pink: #ff2bd6;
    --violet: #9b5cff;
    --amber: #ffb800;
    --red: #ff3355;
    --green: #39ff9a;
    --text: #e8f7ff;
    --text-dim: #8aa3c2;
    --font-display: 'Orbitron', monospace;
    --font-body: 'Rajdhani', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* Animated backdrop behind the play field */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 60% at 50% 110%, rgba(255, 43, 214, 0.25), transparent 70%),
        radial-gradient(ellipse 70% 50% at 50% -10%, rgba(0, 246, 255, 0.18), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 246, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 246, 255, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

.game-wrap {
    position: fixed;
    inset: 0;
    display: flex;
}

/* ---------- HUD (overlay) ---------- */
.hud {
    position: absolute;
    top: max(6px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: calc(max(8px, env(safe-area-inset-right)) + 140px);
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 5px 10px;
    background: rgba(5, 1, 15, 0.45);
    border: 1px solid rgba(0, 246, 255, 0.22);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    max-width: 760px;
}
.hud-cell {
    display: flex;
    flex-direction: column;
    min-width: 64px;
    flex: 1 1 0;
}
.hud-health { flex: 3 1 160px; }
.hud-label {
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}
.hud-value {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 246, 255, 0.6);
    font-variant-numeric: tabular-nums;
}
.hud-value.dim { color: var(--text); text-shadow: none; opacity: 0.8; }
.hud-value.pink { color: var(--pink); text-shadow: 0 0 10px rgba(255, 43, 214, 0.6); }
.hud-value.amber { color: var(--amber); text-shadow: 0 0 10px rgba(255, 184, 0, 0.6); }

.health-track {
    margin-top: 5px;
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(57, 255, 154, 0.3);
    overflow: hidden;
}
#healthBar {
    height: 100%;
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #12c97a, var(--green));
    box-shadow: 0 0 12px var(--green);
    transition: width 0.25s ease, background 0.3s;
}
#healthBar.medium { background: linear-gradient(90deg, #d98a00, var(--amber)); box-shadow: 0 0 12px var(--amber); }
#healthBar.low {
    background: linear-gradient(90deg, #b3002a, var(--red));
    box-shadow: 0 0 14px var(--red);
    animation: pulse 0.6s ease-in-out infinite alternate;
}

/* ---------- Play field ---------- */
.canvas-frame {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}
#gameCanvas {
    display: block;
    background: #000;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

.corner-buttons {
    position: absolute;
    top: max(6px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    display: flex;
    gap: 6px;
    z-index: 20;
}
.icon-button {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.05rem;
    background: rgba(5, 1, 15, 0.6);
    border: 1px solid var(--panel-edge);
    backdrop-filter: blur(4px);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.icon-button:hover { border-color: var(--cyan); box-shadow: 0 0 12px rgba(0, 246, 255, 0.5); }
#pauseButton.paused { border-color: var(--amber); }

/* ---------- Overlays ---------- */
.overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: radial-gradient(ellipse at center, rgba(13, 3, 38, 0.65), rgba(5, 1, 15, 0.92));
    backdrop-filter: blur(3px);
    overflow-y: auto;
}
.overlay.fixed { position: fixed; z-index: 100; }

.panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: min(100%, 420px);
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--panel-edge);
    border-radius: 14px;
    box-shadow: 0 0 40px rgba(0, 246, 255, 0.15), inset 0 0 30px rgba(155, 92, 255, 0.08);
    animation: rise 0.35s ease-out;
}
.menu-panel { width: min(100%, 560px); gap: 10px; margin: auto; }

.logo {
    position: relative;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 3.4rem);
    letter-spacing: 0.12em;
    color: #fff;
    text-shadow:
        0 0 6px #fff,
        0 0 18px var(--cyan),
        0 0 40px var(--cyan),
        0 0 80px var(--pink);
    animation: flicker 6s infinite;
}
.tagline {
    margin-top: -6px;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--text-dim);
}

.overlay-title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: var(--cyan);
    text-shadow: 0 0 14px var(--cyan), 0 0 40px rgba(0, 246, 255, 0.5);
}
.overlay-title.danger { color: var(--red); text-shadow: 0 0 14px var(--red), 0 0 40px rgba(255, 51, 85, 0.5); }
.final-score {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2.6rem;
    color: var(--amber);
    text-shadow: 0 0 20px rgba(255, 184, 0, 0.7);
    margin-top: -8px;
}

.option-group { width: 100%; display: flex; flex-direction: column; gap: 5px; }
.option-label {
    font-family: var(--font-display);
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
}
.option-row { display: flex; flex-wrap: wrap; gap: 6px; }
.option-row > button {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(138, 163, 194, 0.25);
    color: var(--text-dim);
    transition: all 0.15s;
}
.option-row > button:hover { color: var(--text); border-color: rgba(0, 246, 255, 0.5); }
.option-row > button.active {
    color: #fff;
    background: rgba(0, 246, 255, 0.12);
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(0, 246, 255, 0.35), inset 0 0 10px rgba(0, 246, 255, 0.15);
}
.skins > button { flex: 1 1 30%; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 0.85rem; }
.skins > button::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    background: var(--swatch);
    box-shadow: 0 0 8px var(--swatch);
}
.skins > button.active { border-color: var(--swatch); box-shadow: 0 0 14px color-mix(in srgb, var(--swatch) 45%, transparent); }
.tracks > button { flex: 1 1 10%; font-family: var(--font-display); padding: 7px 0; }

.primary-button, .secondary-button, .danger-button {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: 0.2em;
    transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.primary-button {
    margin-top: 4px;
    font-size: 1.05rem;
    color: #05010f;
    background: linear-gradient(90deg, var(--cyan), #6af0ff 50%, var(--pink));
    box-shadow: 0 0 22px rgba(0, 246, 255, 0.5), 0 0 40px rgba(255, 43, 214, 0.3);
}
.primary-button:hover { filter: brightness(1.15); box-shadow: 0 0 30px rgba(0, 246, 255, 0.7), 0 0 60px rgba(255, 43, 214, 0.4); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: scale(0.98); }
.secondary-button { font-size: 0.85rem; border: 1px solid var(--panel-edge); color: var(--cyan); }
.secondary-button:hover { background: rgba(0, 246, 255, 0.08); }
.danger-button { font-size: 0.75rem; border: 1px solid rgba(255, 51, 85, 0.4); color: var(--red); }
.danger-button:hover { background: rgba(255, 51, 85, 0.08); }

.controls-hint {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 14px;
    font-size: 0.85rem;
    color: var(--text-dim);
}
kbd {
    font-family: var(--font-display);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(138, 163, 194, 0.4);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.performance-notice {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 184, 0, 0.4);
    background: rgba(255, 184, 0, 0.06);
    text-align: center;
}
.performance-notice-title { font-family: var(--font-display); font-size: 0.7rem; color: var(--amber); letter-spacing: 0.1em; }
.performance-notice-text { font-size: 0.85rem; color: var(--text-dim); }

/* Settings */
.settings-panel { align-items: stretch; }
.settings-panel .overlay-title { text-align: center; }
.setting { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.setting span { display: flex; justify-content: space-between; }
.setting b { color: var(--cyan); font-family: var(--font-display); font-size: 0.8rem; }
input[type="range"] { accent-color: var(--cyan); width: 100%; }
select {
    font: inherit;
    padding: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--panel-edge);
}
select option { background: var(--bg-2); }

/* ---------- Animations ---------- */
/* ---------- Touch controls ---------- */
.bomb-button {
    display: none;
    position: absolute;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 6;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.6rem;
    background: radial-gradient(circle at 35% 30%, rgba(255, 184, 0, 0.35), rgba(5, 1, 15, 0.7));
    border: 2px solid rgba(255, 184, 0, 0.7);
    box-shadow: 0 0 18px rgba(255, 184, 0, 0.45);
    touch-action: manipulation;
}
.bomb-button:active { transform: scale(0.94); }
body.touch.playing .bomb-button { display: block; }

/* ---------- Rotate prompt (phones in portrait) ---------- */
#rotatePrompt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: radial-gradient(ellipse at center, #120430, #05010f 70%);
    color: var(--text);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-align: center;
    padding: 24px;
}
.rotate-phone {
    width: 46px;
    height: 80px;
    border: 3px solid var(--cyan);
    border-radius: 9px;
    box-shadow: 0 0 18px rgba(0, 246, 255, 0.5);
    animation: rotate-hint 2.2s ease-in-out infinite;
}
@media (orientation: portrait) and (pointer: coarse) {
    #rotatePrompt { display: flex; }
}
@keyframes rotate-hint {
    0%, 20% { transform: rotate(0deg); }
    50%, 80% { transform: rotate(-90deg); }
    100% { transform: rotate(0deg); }
}

/* Short landscape phones: tighter HUD */
@media (max-height: 500px) {
    .hud { padding: 3px 8px; gap: 4px; right: calc(max(8px, env(safe-area-inset-right)) + 140px); }
    .hud-label { font-size: 0.5rem; }
    .hud-value { font-size: 0.85rem; }
    .health-track { height: 8px; margin-top: 3px; }
    .hud-cell { min-width: 44px; }
    .icon-button { width: 36px; height: 36px; font-size: 0.95rem; }
}

@keyframes pulse { from { opacity: 1; } to { opacity: 0.55; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes grid-scroll { from { background-position: 0 0; } to { background-position: 0 60px; } }
@keyframes slideDown { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes flicker {
    0%, 92%, 100% { opacity: 1; }
    93% { opacity: 0.6; }
    94% { opacity: 1; }
    96% { opacity: 0.75; }
}

@media (prefers-reduced-motion: reduce) {
    .logo, .loading-grid, #healthBar.low, .panel { animation: none; }
}

@media (max-width: 600px) {
    .hud { padding: 6px 8px; }
    .hud-cell { min-width: 52px; }
    .hud-value { font-size: 0.95rem; }
    .panel { padding: 16px; }
    .menu-panel { gap: 8px; }
    .controls-hint { display: none; }
}


/* =====================================================================
   Intro + main menu (landscape phone first)
   ===================================================================== */
.touch-only { display: none; }
body.touch .touch-only { display: inline; }
body.touch .desktop-only { display: none; }
div.touch-only { text-align: center; }
body.touch div.touch-only { display: block; }

/* ---------- Intro ---------- */
#loadingScreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: #05010f;
    overflow: hidden;
    transition: opacity 0.55s ease, transform 0.55s ease;
}
#loadingScreen.ready { cursor: pointer; }
#loadingScreen.leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }
.intro-art {
    position: absolute;
    inset: -2%;
    background: url("assets/sprites/ui/title.jpg") center 60% / cover no-repeat;
    animation: intro-drift 14s ease-in-out infinite alternate;
}
.intro-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 1, 15, 0.55) 0%, rgba(5, 1, 15, 0) 35%, rgba(5, 1, 15, 0) 55%, rgba(5, 1, 15, 0.9) 100%);
}
.intro-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}
.intro-logo {
    font-size: clamp(2.2rem, 9vh, 5rem);
    margin-top: 2vh;
    animation: logo-in 1.1s cubic-bezier(.2, .9, .2, 1) both, flicker 6s 1.2s infinite;
}
.loading-track {
    width: min(360px, 70vw);
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-top: auto;
    transition: opacity 0.3s;
}
#loadingBar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--pink));
    box-shadow: 0 0 12px var(--cyan);
    transition: width 0.2s;
}
.loading-text {
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    color: var(--text-dim);
}
.tap-to-start {
    margin-top: 12px;
    padding: 12px 28px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(0.85rem, 3.2vh, 1.15rem);
    letter-spacing: 0.3em;
    color: #fff;
    text-shadow: 0 0 12px var(--cyan), 0 0 30px var(--pink);
    animation: tap-pulse 1.4s ease-in-out infinite;
}
#loadingScreen.ready .loading-track { opacity: 0; }

@keyframes intro-drift { from { transform: scale(1.02) translateX(-1%); } to { transform: scale(1.08) translateX(1%); } }
@keyframes logo-in {
    from { opacity: 0; letter-spacing: 0.6em; filter: blur(8px); }
    to { opacity: 1; letter-spacing: 0.12em; filter: blur(0); }
}
@keyframes tap-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ---------- Main menu ---------- */
.menu-overlay {
    flex-direction: column;
    gap: 10px;
    background: radial-gradient(ellipse at 30% 50%, rgba(5, 1, 15, 0.25), rgba(5, 1, 15, 0.75));
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(10px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.menu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(12px, 3vw, 40px);
    align-items: center;
    width: min(100%, 980px);
    margin: auto 0;
}
.menu-left {
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(8px, 2.4vh, 16px);
}
.menu-logo {
    /* sized from the column width so it never overflows (container units) */
    font-size: clamp(1.5rem, min(10.5cqi, 11vh), 4.2rem);
    white-space: nowrap;
    text-align: center;
    line-height: 1;
}
.menu-best {
    text-align: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: var(--text-dim);
}
.menu-best b { color: var(--amber); font-size: 1rem; letter-spacing: 0.05em; margin-left: 6px; text-shadow: 0 0 10px rgba(255, 184, 0, 0.6); }
.play-button {
    min-height: 52px;
    padding: clamp(10px, 2.6vh, 16px);
    border-radius: 14px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(1.1rem, 4.5vh, 1.6rem);
    letter-spacing: 0.25em;
    color: #05010f;
    background: linear-gradient(90deg, var(--cyan), #7ef3ff 45%, var(--pink));
    animation: play-glow 2.4s ease-in-out infinite;
    transition: transform 0.1s, filter 0.15s;
    touch-action: manipulation;
}
.play-button:hover { filter: brightness(1.12); }
.play-button:active { transform: scale(0.97); }
.play-icon { font-size: 0.8em; margin-right: 4px; }
@keyframes play-glow {
    0%, 100% { box-shadow: 0 0 22px rgba(0, 246, 255, 0.5), 0 0 50px rgba(255, 43, 214, 0.25); }
    50% { box-shadow: 0 0 34px rgba(0, 246, 255, 0.8), 0 0 80px rgba(255, 43, 214, 0.45); }
}

.menu-right {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.8vh, 14px);
    padding: clamp(10px, 2.4vh, 18px);
    background: rgba(8, 3, 26, 0.72);
    border: 1px solid var(--panel-edge);
    border-radius: 16px;
    box-shadow: 0 0 30px rgba(0, 246, 255, 0.12), inset 0 0 24px rgba(155, 92, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* Segmented controls */
.seg {
    display: flex;
    padding: 3px;
    gap: 3px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(138, 163, 194, 0.22);
}
.seg > button {
    flex: 1;
    min-height: 38px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    touch-action: manipulation;
}
.seg > button.active {
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 246, 255, 0.28), rgba(0, 246, 255, 0.1));
    box-shadow: 0 0 12px rgba(0, 246, 255, 0.35), inset 0 0 0 1px rgba(0, 246, 255, 0.7);
}

/* Ship picker */
.ship-picker {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 6px;
}
.ship-arrow {
    height: 44px;
    border-radius: 10px;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--cyan);
    background: rgba(0, 246, 255, 0.06);
    border: 1px solid rgba(0, 246, 255, 0.25);
    touch-action: manipulation;
}
.ship-arrow:active { background: rgba(0, 246, 255, 0.18); }
.ship-stage { display: flex; flex-direction: column; align-items: center; min-width: 0; }
#shipPreview {
    width: 100%;
    height: clamp(56px, 19vh, 120px);
    touch-action: pan-y;
}
.ship-name {
    font-family: var(--font-display);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: var(--text);
    text-transform: uppercase;
}

/* Music chips */
.track-chips { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.track-chips > button {
    min-height: 36px;
    border-radius: 9px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(138, 163, 194, 0.22);
    touch-action: manipulation;
}
.track-chips > button.active {
    color: #05010f;
    background: var(--pink);
    border-color: var(--pink);
    box-shadow: 0 0 14px rgba(255, 43, 214, 0.6);
}

.menu-overlay .controls-hint { font-size: 0.8rem; opacity: 0.8; }

/* Short landscape phones (most phones held sideways) */
@media (max-height: 430px) {
    .menu-overlay { gap: 4px; }
    .option-label { font-size: 0.55rem; }
    .seg > button { min-height: 34px; font-size: 0.85rem; }
    .track-chips > button { min-height: 32px; }
    .ship-arrow { height: 38px; }
    .menu-overlay .controls-hint { display: none; }
}
/* Narrow screens (portrait desktop windows / tablets): stack the columns */
@media (max-width: 620px) and (min-height: 431px) {
    .menu-grid { grid-template-columns: 1fr; }
}
/* While the menu is up the HUD is noise */
body:not(.playing) .hud { opacity: 0; }

/* Big screens: scale the whole menu up instead of leaving it tiny */
@media (min-width: 1100px) and (min-height: 760px) {
    .menu-grid { zoom: 1.3; }
}

/* Pause / game over / settings panels on short phone screens */
@media (max-height: 430px) {
    .panel { padding: 14px 18px; gap: 8px; }
    .overlay-title { font-size: 1.5rem; }
    .final-score { font-size: 2rem; }
    .primary-button, .secondary-button, .danger-button { padding: 9px; }
    .settings-panel { max-height: calc(100vh - 20px); overflow-y: auto; }
}

/* HUD frame glows on the beat (--beat is set every frame by beat.js) */
.hud {
    box-shadow: 0 0 calc(var(--beat, 0) * 18px) rgba(0, 246, 255, calc(var(--beat, 0) * 0.55));
    border-color: rgba(0, 246, 255, calc(0.22 + var(--beat, 0) * 0.4));
}
.play-button { filter: brightness(calc(1 + var(--beat, 0) * 0.12)); }
