.container3d {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 20px;
}

#gameCanvas3d {
    width: 100%;
    max-width: 950px; 
    height: auto; /* Adjust height to maintain aspect ratio */
    border: 5px solid #333;
    border-radius: 10px;
    background-color: #1a1a1a;
}

#scoreboard3d {
    text-align: center;
    font-family: 'Segoe UI', 'Helvetica', 'Ubuntu', sans-serif;
    color: #fff;
    margin-top: 20px;
}

#scores3d {
    font-size: 4em;
    padding: 10px;
    margin: 0;
    color: #ffc107;
}

#title3d {
    background-color: #ffc107;
    color: #333;
    padding: 5px;
    font-size: 1.5em;
    margin-bottom: 10px;
    border-radius: 5px;
}
#startGameButton {
    position: relative;
    z-index: 999;
}

#instructions3d h3 {
    font-size: 1em;
    margin-top: 10px;
    display: none;
}

@media only screen and (max-width: 600px) {
    #instructions3d {
        display: block;
    }
}
.container3d {
    text-align: center;
}
.modal {

    left: 0;
    top: 0;
    width: 70%;
    height: 70%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1 !important;
}
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 60% !important;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}