@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f7f7f7;
    font-family: Arial, sans-serif;
}

#usernameContainer, #menu, #game {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20%;
}

#usernameInput {
    padding: 10px;
    font-size: 18px;
    margin: 10px 0;
}

button {
    padding: 12px 24px;
    font-size: 18px;
    margin: 8px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #4CAF50; /* Green background */
    color: white; /* White text */
    transition: background-color 0.3s, transform 0.3s;
    width: 150px;  /* Set a fixed width */
    height: 50px;  /* Set a fixed height */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
}

button:hover {
    background-color: #45a049; /* Darker green */
}

button:active {
    transform: scale(0.95); /* Slightly smaller on click */
}

#gameCanvas {
    border: 1px solid #000;
    width: 90%;  /* Adjust width for portrait mode */
    max-width: 400px;
    height: auto;
}

#score {
    font-size: 24px;
    margin: 10px 0;
}

#controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#leaderboard {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
}

#leaderboard h2, #leaderboard h3 {
    margin: 0;
    padding: 10px;
    background: #333;
    color: #fff;
    text-align: center;
}

#leaderboard ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

#leaderboard ul li {
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

#leaderboard ul li:last-child {
    border-bottom: none;
}
