/* Mobile compatibility styles */
@media (max-width: 768px) {
    #game-container {
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
    }
    
    #mobile-controls {
        display: flex;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 30%;
        z-index: 10;
        pointer-events: none; /* Allow clicks to pass through to canvas except for specific controls */
    }
    
    #mobile-controls.hidden {
        display: none;
    }
    
    #joystick-area {
        flex: 1;
        position: relative;
        pointer-events: auto;
    }
    
    #joystick-base {
        position: absolute;
        bottom: 20%;
        left: 20%;
        width: 100px;
        height: 100px;
        background-color: rgba(0, 0, 0, 0.5);
        border: 2px solid #8a0303;
        border-radius: 50%;
    }
    
    #joystick-thumb {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 50px;
        height: 50px;
        background-color: rgba(138, 3, 3, 0.8);
        border-radius: 50%;
    }
    
    #action-buttons {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-end;
        padding: 20px;
        pointer-events: auto;
    }
    
    #action-buttons button {
        width: 70px;
        height: 70px;
        margin: 5px;
        border-radius: 50%;
        background-color: rgba(0, 0, 0, 0.5);
        border: 2px solid #8a0303;
        color: #fff;
        font-weight: bold;
        font-family: 'Arial', sans-serif;
        text-transform: uppercase;
        font-size: 12px;
    }
    
    #action-buttons button:active {
        background-color: rgba(138, 3, 3, 0.8);
    }
    
    /* Adjust UI elements for mobile */
    .health-bar, .weapon-indicator {
        transform: scale(0.8);
    }
    
    /* Adjust dialogue box for mobile */
    .dialogue-box {
        width: 90% !important;
        font-size: 14px !important;
    }
}

/* Responsive canvas sizing */
@media (orientation: landscape) and (max-width: 1024px) {
    #mobile-controls {
        height: 40%;
    }
    
    #joystick-base {
        width: 80px;
        height: 80px;
    }
    
    #joystick-thumb {
        width: 40px;
        height: 40px;
    }
    
    #action-buttons button {
        width: 60px;
        height: 60px;
        font-size: 10px;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Adjust for high DPI displays */
    #game-canvas {
        image-rendering: -moz-crisp-edges;
        image-rendering: -webkit-crisp-edges;
        image-rendering: pixelated;
        image-rendering: crisp-edges;
    }
}

/* Add these styles to the existing styles.css */
