body {
    background-color: #111;
    color: #eee;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: sans-serif;
    overflow: hidden; /* Prevent scrollbars */
}

#canvas-container {
    position: relative;
    width: 800px;
    height: 600px;
}

canvas {
    box-sizing: border-box; /* Include border in size */
}

#gameCanvas {
    background-color: #000;
    border: 2px solid #eee;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

#joystickCanvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background-color: transparent;
    border: none; /* Joystick canvas shouldn't have a border */
}


h1 {
    margin-bottom: 20px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #222;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 450px;
    color: #eee;
    border: 1px solid #555;
}

.modal-content h2 {
    margin-top: 0;
    color: #00aaff;
}

.modal-content p {
    line-height: 1.6;
}

#start-game-btn {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #0077ff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#start-game-btn:hover {
    background-color: #0055cc;
}


/* Mobile responsiveness */
@media (max-width: 800px) {
    #canvas-container {
        width: 100vw;
        height: 75vw; /* Maintain 4:3 aspect ratio */
    }

    canvas {
        width: 100%;
        height: 100%;
    }

    h1 {
        font-size: 1.5em;
    }
}
