@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&display=swap");

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background:
        radial-gradient(circle at 20% 10%, rgba(120, 70, 255, 0.35), transparent 40%),
        radial-gradient(circle at 80% 90%, rgba(0, 220, 255, 0.2), transparent 45%),
        linear-gradient(160deg, #050814 0%, #120a2e 45%, #050814 100%);
    font-family: "Orbitron", "Segoe UI", sans-serif;
    color: #e8f7ff;
}

.game-container {
    position: relative;
    border-radius: 10px;
    box-shadow:
        0 0 0 2px rgba(0, 255, 214, 0.35),
        0 0 28px rgba(0, 200, 255, 0.25),
        0 18px 40px rgba(0, 0, 0, 0.55);
}

canvas {
    border: 2px solid rgba(0, 255, 214, 0.55);
    background-color: #050814;
    display: block;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    touch-action: none;
}

@media (max-width: 900px), (pointer: coarse) {
    body {
        align-items: stretch;
        justify-content: stretch;
        background: #050814;
    }

    .game-container {
        width: 100vw;
        width: 100dvw;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        box-shadow: none;
    }

    canvas {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
    }

    .screen-overlay,
    .settings-panel {
        position: fixed;
    }

    .score-hud {
        top: max(10px, env(safe-area-inset-top));
        left: max(10px, env(safe-area-inset-left));
    }
}

.score-hud {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    pointer-events: none;
    padding: 8px 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(8, 16, 40, 0.82), rgba(20, 8, 36, 0.72));
    border: 1px solid rgba(0, 255, 214, 0.35);
    box-shadow: 0 0 14px rgba(0, 220, 255, 0.2);
}

.score-hud p {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0.04em;
    color: #dffcff;
    text-shadow: 0 0 8px rgba(0, 230, 255, 0.55);
}

.score-hud p:last-child {
    margin-bottom: 0;
    color: #ffd76a;
    text-shadow: 0 0 8px rgba(255, 200, 80, 0.45);
}

.screen-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
    background: rgba(2, 6, 18, 0.55);
    backdrop-filter: blur(2px);
}

.screen-card {
    background: linear-gradient(160deg, rgba(10, 18, 42, 0.96), rgba(36, 8, 52, 0.94));
    color: #e8f7ff;
    padding: 22px 26px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(0, 255, 214, 0.4);
    box-shadow:
        0 0 24px rgba(0, 220, 255, 0.25),
        0 0 40px rgba(255, 60, 180, 0.15);
}

.title-card {
    width: min(280px, calc(100vw - 48px));
}

.title-kicker {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.28em;
    color: #7ef9ff;
}

.title-logo {
    margin: 6px 0 4px;
    font-size: 34px;
    letter-spacing: 0.12em;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(0, 230, 255, 0.55);
}

.title-tagline {
    margin: 0 0 18px;
    font-size: 11px;
    color: #b8dfff;
    letter-spacing: 0.06em;
}

.title-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-button {
    width: 100%;
    border: 1px solid rgba(0, 255, 214, 0.45);
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #d8fbff;
    background: linear-gradient(180deg, rgba(18, 40, 88, 0.95), rgba(10, 20, 48, 0.95));
    box-shadow: 0 0 12px rgba(0, 220, 255, 0.2);
}

.menu-button:hover {
    box-shadow: 0 0 18px rgba(0, 255, 214, 0.45);
}

.menu-button-primary {
    border-color: rgba(255, 120, 220, 0.55);
    background: linear-gradient(180deg, rgba(130, 40, 120, 0.95), rgba(70, 12, 90, 0.95));
}

.menu-button-muted {
    border-color: rgba(255, 90, 200, 0.45);
    background: linear-gradient(180deg, rgba(120, 30, 90, 0.9), rgba(70, 12, 60, 0.95));
}

.screen-heading {
    margin: 0 0 14px;
    font-size: 16px;
    letter-spacing: 0.08em;
    color: #7ef9ff;
    text-shadow: 0 0 10px rgba(0, 230, 255, 0.4);
}

.scores-highlight {
    margin: 0 0 8px;
    font-size: 18px;
    color: #ffd76a;
    text-shadow: 0 0 10px rgba(255, 200, 80, 0.45);
}

.scores-meta {
    margin: 0 0 6px;
    font-size: 12px;
    color: #dffcff;
}

.scores-note {
    margin: 0 0 16px;
    font-size: 10px;
    color: #9eb8d8;
    letter-spacing: 0.03em;
}

.settings-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(300px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(12, 20, 48, 0.98), rgba(24, 10, 44, 0.96));
    border: 1px solid rgba(0, 255, 214, 0.35);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(120, 60, 255, 0.2);
    padding: 14px;
    z-index: 7;
    color: #dffcff;
}

.settings-select {
    width: 100%;
    margin-top: 4px;
    margin-bottom: 4px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 255, 214, 0.35);
    background: rgba(8, 16, 40, 0.9);
    color: #dffcff;
    font-family: inherit;
    font-size: 12px;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.settings-panel .screen-heading {
    text-align: left;
}

.settings-panel label {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.settings-panel input[type="range"] {
    width: 100%;
    margin-top: 4px;
    accent-color: #00f6d2;
}


.hidden {
    display: none;
}

#game-over-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #ff7edb;
    text-shadow: 0 0 14px rgba(255, 90, 200, 0.55);
}

#final-score {
    margin: 0 0 14px;
    font-size: 13px;
    color: #ffd76a;
}

#game-over .screen-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(280px, calc(100vw - 48px));
}

#game-over-title {
    margin: 0;
}

#final-score {
    margin: 0;
}
