/* ============================================================
   STYLE.CSS - Bomberman - NES Retro Style
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0f0e17;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', monospace;
    overflow: hidden;
}

#gameContainer {
    position: relative;
    display: inline-block;
}

#gameCanvas {
    display: block;
    border: 3px solid #f97316;
    border-radius: 2px;
    box-shadow:
        0 0 8px #f97316,
        0 0 22px rgba(249, 115, 22, 0.55),
        0 0 55px rgba(249, 115, 22, 0.18),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* CRT Scanlines overlay */
#scanlines {
    position: absolute;
    inset: 3px;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 3px,
        rgba(0, 0, 0, 0.10) 3px,
        rgba(0, 0, 0, 0.10) 4px
    );
    border-radius: 2px;
    z-index: 2;
}

/* ── Responsive mobile ── */
@media (max-width: 820px) {
    body {
        align-items: flex-start;
        overflow-y: auto;
        overflow-x: hidden;
    }
    #gameContainer {
        transform-origin: top center;
        transform: scale(var(--game-scale, 1));
        margin-bottom: calc((var(--game-scale, 1) - 1) * 480px);
    }
}

/* ── Touch device ── */
body.touch-device #gameContainer {
    filter: none;
}
body.touch-device #gameCanvas {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
