@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #1a1a1a;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
    touch-action: none; /* Prevent default touch behaviors */
    -webkit-user-select: none;
    user-select: none;
}

#game-container {
    position: relative;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

#gameCanvas {
    display: block;
    background-color: #87CEEB;
    cursor: pointer;
    image-rendering: crisp-edges;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
}

#error-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    max-width: 80%;
    font-family: 'Press Start 2P', cursive;
}

/* Orientation message for portrait mode on mobile */
#orientation-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    color: white;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    text-align: center;
    padding: 20px;
}

#orientation-message .rotate-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: rotate 2s ease-in-out infinite;
}

#orientation-message p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 300px;
}

@keyframes rotate {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(90deg); }
}

/* Show orientation message on touch devices in portrait mode */
@media (hover: none) and (pointer: coarse) and (orientation: portrait) {
    #orientation-message {
        display: flex;
    }
    #game-container {
        display: none;
    }
}

/* Mobile landscape - remove box shadow for cleaner look */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {
    #game-container {
        box-shadow: none;
    }
}
