:root {
    --cyan: #52e0ff;
    --pink: #ff4dbf;
    --green: #4dff66;
    --gold: #ffc43d;
    --dark: #080d24;
}

* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: var(--dark);
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

button {
    font-family: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--dark);
    background-image: url("assets/neon_city_menu_v4.png");
    background-size: cover;
    background-position: center;
}

#app.game-background {
    background-image: url("assets/neon_city_game_clean.png");
}

#app::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(4, 7, 22, 0.08),
        rgba(4, 7, 22, 0.22)
    );
    pointer-events: none;
}

.screen {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 100%;
    padding:
        max(20px, env(safe-area-inset-top))
        18px
        max(22px, env(safe-area-inset-bottom));
    text-align: center;
}

.screen-title {
    margin: 0;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(22px, 7vw, 30px);
    color: var(--cyan);
    text-shadow: 0 0 14px var(--cyan);
}

.spacer {
    flex: 1;
    min-height: 5px;
}

.neon-button {
    width: 100%;
    min-height: 52px;
    padding: 10px;
    border: 2px solid var(--cyan);
    border-radius: 11px;
    background: rgba(8, 16, 38, 0.92);
    color: var(--cyan);
    font-size: 19px;
    font-weight: bold;
    text-shadow: 0 0 9px currentColor;
    box-shadow: inset 0 0 10px rgba(82, 224, 255, 0.08);
}

.neon-button:active {
    background: rgba(40, 60, 95, 0.95);
    transform: scale(0.98);
}

.neon-button.pink {
    color: var(--pink);
    border-color: var(--pink);
}

.neon-button.green {
    color: var(--green);
    border-color: var(--green);
}

.neon-button.gold {
    color: var(--gold);
    border-color: var(--gold);
}

.info {
    color: var(--cyan);
    font-size: 17px;
    font-weight: bold;
    line-height: 1.5;
    white-space: pre-line;
}

.hint {
    color: var(--gold);
    font-size: 21px;
    font-weight: bold;
    text-shadow: 0 0 10px #000;
}

.number-display {
    color: white;
    font-size: 30px;
    font-weight: bold;
    min-height: 42px;
    text-shadow: 0 0 12px var(--cyan);
}

.recent {
    color: var(--pink);
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 0 6px #000, 0 0 12px #000;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    width: 100%;
}

.keypad .neon-button {
    min-height: 55px;
}

.settings-label {
    color: var(--pink);
    font-size: 18px;
    font-weight: bold;
}

input[type="range"] {
    width: 90%;
    accent-color: var(--cyan);
}

.intro-logo {
    width: min(75%, 320px);
    max-height: 35%;
    object-fit: contain;
}

@media (max-height: 720px) {
    .screen {
        gap: 5px;
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .screen-title {
        min-height: 40px;
    }

    .neon-button {
        min-height: 44px;
        font-size: 17px;
    }

    .keypad .neon-button {
        min-height: 43px;
    }
}
