body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
    min-height: 100vh;
}

nav {
    width: 100%; /* Ensure nav spans the entire width */
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

nav a, nav a:hover {
    text-decoration: none;
    color: #000;
    padding: 10px 20px;
    border: 1px solid transparent;
}

nav a:hover {
    border-color: #000;
}

#game-container {
    position: relative;
    width: 1024px;
    height: 400px;
    border: 2px solid #000;
    background-color: #fff;
}

#controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

#scoreboard {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 5px;
}

#controls input[type="number"], #controls button {
    width: 50px; /* Adjust if necessary for layout */
    padding: 5px;
}

#controls button {
    padding: 5px 10px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

#scoreboard span {
    margin-right: 20px;
    font-weight: bold;
}

@media (max-width: 700px) {
    #game-container, #scoreboard, #controls {
        width: 90%;
        height: auto; /* Adjust height as needed */
    }
}

#controls input[type="number"]:focus, #controls button:focus {
    outline: 2px solid #0056b3;
}

#controls, #scoreboard {
    width: 640px; /* Match the game-container width for alignment */
    text-align: center;
}