/* Mobile-optimized space shooter game styles */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #000;
    overflow: hidden;
    touch-action: none; /* Prevent browser handling of touch events */
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* Remove tap highlight on mobile */
    -webkit-touch-callout: none; /* Disable callout on long-press */
    user-select: none; /* Prevent text selection */
}

#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

canvas {
    display: block;
    touch-action: none; /* Prevent browser handling of touch events */
    cursor: default; /* Use default cursor on desktop */
}

/* Mobile-specific styles */
@media screen and (max-width: 768px) {
    canvas {
        touch-action: none; /* Reinforcing touch-action for mobile */
    }
    
    /* Improve text readability on mobile */
    #game-container {
        font-size: 16px;
        font-weight: bold;
        text-shadow: 0px 0px 3px rgba(0,0,0,0.8);
    }
}

/* Mobile orientation message */
#orientation-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    text-align: center;
    font-family: Arial, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

/* Show orientation message only in landscape on small screens */
@media screen and (max-width: 768px) and (orientation: landscape) and (max-height: 500px) {
    #orientation-message {
        display: flex;
    }
}