/* galaga.css */

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Added for joystick positioning */
    width: 100%; /* Make game-area take full width */
}

#game-canvas {
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    width: 100%; /* Ensure it takes full width of its parent */
    height: 100%; /* Ensure it takes full height of its parent */
}

#game-info {
    display: flex;
    justify-content: space-between;
    width: 100%; /* Adjust to 100% for responsiveness */
    max-width: 800px; /* Keep max-width consistent with game-canvas */
    padding: 10px 0;
    font-size: 1.5em;
    color: #fff;
}

.modal {
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #1a1a1a;
    /* margin: 15% auto; */ /* Remove margin as flexbox handles centering */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 10px;
    color: #fff;
}

/* Joystick Styles */
#joystick-base {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: grab;
    position: absolute;
    transform: translate(-50%, -50%);
    left: 50%;
    top: 50%;
}

@media (max-width: 768px) {
    #joystick-base {
        display: flex !important;
        left: auto; /* Remove left: 50% */
        transform: none; /* Remove translateX(-50%) */
        right: 20px; /* Position from right */
        bottom: 20px; /* Move further down */
    }
}

@media (min-width: 769px) {
    #joystick-base {
        display: none;
    }
}
