* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --page: #101a18;
    --surface: #172521;
    --surface-border: rgb(229 241 232 / 12%);
    --text: #f3f5ef;
    --muted: #a7b5ac;
    --accent: #c6f36a;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 1rem 1.25rem;
    text-align: center;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(ellipse at 50% 32%, rgb(91 130 102 / 17%), transparent 48%),
        var(--page);
    color: var(--text);
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: min(100%, 620px);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    background: linear-gradient(145deg, rgb(29 44 38 / 94%), rgb(19 31 27 / 96%));
    box-shadow: 0 28px 80px rgb(0 0 0 / 35%);
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.24em;
}

#level-title {
    margin: 0;
    font-size: clamp(2.8rem, 8vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

#game-status {
    min-height: 1.6em;
    margin: 0.35rem 0 1.4rem;
    color: var(--muted);
}

#start-button {
    margin-bottom: 1.5rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent);
    color: #172018;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 24px rgb(198 243 106 / 18%);
    transition: transform 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

#start-button:hover,
#start-button:focus-visible {
    transform: translateY(-2px);
    background: #d7ff89;
    box-shadow: 0 12px 30px rgb(198 243 106 / 26%);
}

#start-button:focus-visible,
.btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.container {
    display: grid;
    width: min(100%, 390px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.7rem, 3vw, 1rem);
    justify-content: center;
    padding: 1rem;
    border: 1px solid var(--surface-border);
    border-radius: 28px;
    background: #101a17;
    box-shadow: inset 0 0 24px rgb(0 0 0 / 35%);
}

.btn {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 4px solid rgb(255 255 255 / 12%);
    border-radius: 24px;
    cursor: pointer;
    box-shadow: inset 0 2px 6px rgb(255 255 255 / 14%), 0 8px 18px rgb(0 0 0 / 24%);
    transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.green {
    background: #2d9c68;
}

.red {
    background: #d85d52;
}

.yellow {
    background: #dfb94b;
}

.blue {
    background: #4a8fbd;
}

.pressed {
    transform: scale(0.96);
    filter: brightness(1.55);
    box-shadow: 0 0 30px rgb(255 255 255 / 28%), inset 0 0 20px rgb(255 255 255 / 20%);
}

body.game-over #level-title {
    color: #ff8e83;
}

body.game-over .game-wrapper {
    border-color: rgb(255 142 131 / 34%);
}

.game-hint {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
}

footer {
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }

    .game-wrapper {
        padding: 1.4rem 1rem;
        border-radius: 22px;
    }

    .container {
        padding: 0.7rem;
        border-radius: 22px;
    }

    .btn {
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}