:root {
    color-scheme: dark;
    font-family: "Courier New", Courier, monospace;
    background: #02030a;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, rgba(26, 34, 72, 0.22), transparent 45%),
        #02030a;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

body {
    display: grid;
    place-items: center;
}

.game-shell {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: hidden;
}

canvas {
    display: block;
    width: min(100vw, calc(100vh * 4 / 3));
    height: min(100vh, calc(100vw * 3 / 4));
    max-width: 100%;
    max-height: 100%;
    background: #02030a;
    outline: none;
    image-rendering: pixelated;
}

.mute-toggle {
    position: absolute;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    z-index: 5;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid rgba(124, 248, 255, 0.78);
    border-radius: 999px;
    background: rgba(4, 12, 28, 0.86);
    color: #dffcff;
    font: 700 13px/1 "Courier New", Courier, monospace;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 0 18px rgba(42, 223, 255, 0.14);
    backdrop-filter: blur(8px);
}

.mute-toggle:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.powered {
    position: absolute;
    left: max(10px, env(safe-area-inset-left));
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 4;
    color: rgba(197, 231, 255, 0.55);
    font-size: 10px;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.powered:hover,
.powered:focus-visible {
    color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 620px) {
    .mute-toggle {
        top: 7px;
        right: 7px;
        min-height: 32px;
        padding: 7px 10px;
        font-size: 11px;
    }

    .powered {
        left: 7px;
        bottom: 5px;
        font-size: 8px;
    }
}
