/* =========================================
   RESET
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: sans-serif;
}

/* =========================================
   MAIN WRAPPER
========================================= */
#game-ui {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* =========================================
   TITLE SCREEN (your cover.png)
   Path is relative to CSS/style.css → ../Artwork/cover.png
========================================= */
#title-screen {
    position: absolute;
    inset: 0;
    z-index: 20;

    background:
        url("../Artwork/cover.png") center center / contain no-repeat;
    background-color: #000; /* behind transparent parts */

    display: flex;
    align-items: center;
    justify-content: center;
}

/* JS can add this class after Start is pressed */
#title-screen.hidden {
    display: none;
}

/* =========================================
   CANVAS — 640×360, HARD CENTERED
========================================= */
#game-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 640px;
    height: 360px;

    background: #000;
    border: 4px solid #1a1a1a;
    box-shadow: 0 0 32px rgba(0,0,0,0.8);

    image-rendering: pixelated;
    image-rendering: crisp-edges;

    display: block;
}

/* =========================================
   PORTRAIT → ROTATE OVERLAY
========================================= */
@media (orientation: portrait) {
    #game-ui::before {
        content: "Rotate your device to landscape to play Deceptive Dice";
        position: fixed;
        inset: 0;
        z-index: 999;

        background: rgba(0,0,0,0.95);
        color: #fff;

        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;

        padding: 24px;
        font-size: 18px;
        font-family: sans-serif;
    }

    #game-canvas,
    #title-screen {
        display: none !important;
    }
}

@media (orientation: landscape) {
    #game-ui::before {
        display: none;
        content: "";
    }
}
