@import url("https://fonts.googleapis.com/css?family=Press+Start+2P&display=swap");

/* AoG Arcade presentation. Gameplay art (sprites, sounds) is untouched. */
#game-wrapper {
    position: relative;
    margin: 0 auto;
    width: min(100%, 720px);
    font-family: 'Press Start 2P', monospace;
    color: #fff;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

#game-stage {
    position: relative;
    border: 3px solid rgba(155, 111, 240, 0.55);
    border-radius: 14px;
    overflow: hidden;
    background: #050509;
    box-shadow: 0 0 42px rgba(124, 68, 223, 0.28), inset 0 0 60px rgba(0, 0, 0, 0.6);
}

canvas#game {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: none;
}

#game-stage.game-idle canvas#game {
    cursor: default;
}

#game-hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 11px;
    text-shadow: 2px 2px #000;
    pointer-events: none;
    z-index: 5;
}

#game-hud .hud-btn {
    pointer-events: auto;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-family: inherit;
    font-size: 10px;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    cursor: pointer;
}

#game-hud .hud-btn:hover,
#game-hud .hud-btn:focus-visible {
    border-color: #fff;
    outline: none;
}

.game-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(4, 4, 10, 0.72);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.game-overlay h2 {
    margin: 0;
    font-size: clamp(18px, 4.5vw, 34px);
    line-height: 1.5;
    text-shadow: 4px 4px #000;
}

.game-overlay p {
    margin: 0;
    font-size: 11px;
    line-height: 1.9;
    color: #cfc6ec;
}

.game-overlay .menu-btn {
    font-family: inherit;
    font-size: 13px;
    color: #fff;
    background: rgba(124, 68, 223, 0.25);
    border: 2px solid #9b6ff0;
    border-radius: 10px;
    padding: 0.8rem 1.4rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.game-overlay .menu-btn:hover,
.game-overlay .menu-btn:focus-visible {
    background: rgba(124, 68, 223, 0.55);
    outline: none;
}

.game-overlay .menu-btn.secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
}

.game-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    font-size: 10px;
}

.game-options label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    cursor: pointer;
}

.game-options select {
    font-family: inherit;
    font-size: 10px;
    background: #14101f;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 0.3rem;
}

.game-options input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #9b6ff0;
}

#game-final {
    font-size: 12px;
    color: #ffd97c;
}

.blink {
    animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
    to {
        visibility: hidden;
    }
}

@media (max-width: 560px) {
    #game-hud {
        font-size: 9px;
        padding: 0.5rem 0.6rem;
    }
}
