html, body, #game-container {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
}

/* Ensure game container has relative positioning for absolute positioned elements */
#game-container {
    position: relative;
}

/* Mobile portrait mode: Full screen (no constraints) */
#game-container.mobile-portrait {
    /* No constraints - use full screen */
}

/* Desktop mode: Constrain container size so Phaser.Scale.FIT scales down properly */
#game-container.desktop-mode {
    max-width: 90vw;  /* Max 90% of viewport width */
    max-height: 90vh; /* Max 90% of viewport height */
    margin: 0 auto;   /* Center the container */
}

/* Mobile landscape mode: Constrain container size for 1024x768 scaling */
#game-container.mobile-landscape {
    max-width: 90vw;  /* Max 90% of viewport width */
    max-height: 90vh; /* Max 90% of viewport height */
    margin: 0 auto;   /* Center the container */
}

/* Default canvas styling (portrait mode) */
canvas {
    display: block;
    margin: 0 auto;
    background: #000;
}

/* Desktop mode: Fixed 1024x768 with black bars */
#game-container.desktop-mode {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

#game-container.desktop-mode canvas {
    margin: 0; /* Remove margin since flexbox handles centering */
    /* Canvas will be exactly 1024x768 with black borders around it */
}

/* Landscape mode: Center the 1024x768 canvas in the middle of the screen */
#game-container.landscape-mode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#game-container.landscape-mode canvas {
    margin: 0; /* Remove margin since flexbox handles centering */
    /* Canvas will be exactly 1024x768 with black borders around it */
}

/* Load custom game font */
@font-face {
    font-family: 'm5x7';
    src: url('./m5x7-C0ua5re1.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Default font for the game canvas elements created by Phaser */
body, #game-container, canvas {
    font-family: 'm5x7', Arial, Helvetica, sans-serif;
}

/* Share Modal Overlay - Simplified for copy link only */
#share-modal .copied {
  background: #4caf50 !important;
  color: #fff !important;
}
.modal-hidden { display: none !important; }
