/* ——— GAME PAGE STYLES ——— */
body.game-page {
    margin: 0;
    padding: 0;
    background: #025656;
    color: #000;
    font-family: monospace;
    display: flex;
    flex-direction: column;
}

/* Header fills notch + full width */
body.game-page nav {
    position: relative;
    width: 100%;
    background: #025656;
    padding-top: max(env(safe-area-inset-top), 20px) !important;  /* fills notch */
    padding-bottom: 10px;
}

/* Main area */
body.game-page main {
    background: #000;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0 100px;
}

/* Game container — smaller on mobile landscape */
#gameContainer {
    position: relative;
    width: 95vw;
    max-width: 800px;
    aspect-ratio: 4 / 3;
    border: 2px solid #fff;
    background: #000;
    box-sizing: border-box;
}

/* Reduce size in mobile landscape by 20% */
@media (orientation: landscape) and (max-width: 896px) {
    #gameContainer {
        width: 76vw;   /* ~20% smaller than 95vw */
        max-width: 640px;
    }
}

/* Canvas */
#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    background: #000;
}

/* Controls — hidden until game starts + perfectly centered */
.controls {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
}
#playAgain { display: none; }  /* hidden by default */
#settings { display: none; }  /* hidden by default */


/* Buttons */
button {
    background: #333;
    color: #fff;
    border: 2px solid #fff;
    padding: 14px 28px;
    font-family: monospace;
    font-size: 18px;
    cursor: pointer;
}

/* Instructions — white text + smaller on mobile */
#instructions {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.98);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /*padding: 5%;*/
    box-sizing: border-box;
    z-index: 100;
    color: white;
}

/* Use rem + clamp() → scales perfectly everywhere */
#instructions h2 {
    font-size: clamp(26px, 4.2vw, 60px);     /* min 32px, max 60px, ideal 6vw */
    margin: 2rem 0 2rem 0;
    line-height: 1.2;
    color: white;
}

#instructions p {
    font-size: clamp(12px, 2.2vw, 30px);
    margin: 0 0 1.2rem 0;
    line-height: 1.5;
    color: white;
    max-width: 100%;
}

/* Start button */
#startButton {
    margin-top: 20px;
    padding: 18px 50px;
    font-size: 28px;
    background: #333;
    color: white;
    border: 3px solid white;
}

/* Mobile: reduce instruction text by ~20% */
@media (max-width: 576px) {
    #instructions h2 { font-size: clamp(20px, 7vw, 28px); margin: 1rem 0 1rem 0;}
    #instructions p  { font-size: clamp(10px, 3.3vw, 14px); line-height: 1.0;}
    Button { font-size: 12px; padding: 12px 20px;}
    #startButton     { margin-top: 0px; font-size: 18px; padding: 12px 20px;}
}


