* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    overflow: hidden;
}

body.arcade-game {
    background: #050711;
    color: #f6f7ff;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.game-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    image-rendering: pixelated;
    touch-action: none;
    background: #050711;
}

.wwg-back-btn {
    position: fixed;
    top: 18px;
    left: 18px;
    width: 44px;
    height: 44px;
    z-index: 20;
    display: grid;
    place-items: center;
    color: #f6f7ff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    background: rgba(5, 7, 17, .7);
    backdrop-filter: blur(14px);
}

.game-hud {
    position: fixed;
    top: 18px;
    left: 78px;
    right: 18px;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    pointer-events: none;
}

.game-title {
    min-width: 0;
}

.game-title h1 {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 3.4rem);
    line-height: .9;
    letter-spacing: -1px;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

.game-title p {
    margin: 8px 0 0;
    max-width: 44ch;
    color: rgba(246, 247, 255, .66);
    font-size: .86rem;
    line-height: 1.45;
}

.stat-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.stat,
.restart-btn {
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(5, 7, 17, .66);
    backdrop-filter: blur(12px);
    color: #f6f7ff;
    padding: 8px 12px;
    font: 800 .76rem/1 "Courier New", monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.stat span {
    color: #7dd3fc;
}

.restart-btn {
    pointer-events: auto;
    cursor: pointer;
}

.restart-btn:hover {
    border-color: rgba(125, 211, 252, .65);
    background: rgba(125, 211, 252, .16);
}

.game-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 10;
    transform: translateX(-50%);
    max-width: min(520px, calc(100vw - 32px));
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(5, 7, 17, .7);
    backdrop-filter: blur(14px);
    padding: 11px 14px;
    color: rgba(246, 247, 255, .82);
    font: 700 .82rem/1.35 "Courier New", monospace;
    text-align: center;
}

@media (max-width: 720px) {
    .game-hud {
        left: 16px;
        top: 72px;
        right: auto;
        width: min(358px, calc(100vw - 32px));
        flex-direction: column;
        align-items: stretch;
    }

    .stat-bar {
        justify-content: stretch;
    }

    .game-title p {
        display: none;
    }

    .stat,
    .restart-btn {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 74px;
        padding: 8px;
        text-align: center;
    }

    .game-toast {
        bottom: 14px;
    }
}
