.game-grid {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    grid-template-rows: repeat(6, 60px);
    gap: 5px;
    justify-content: center;
    margin: 0 auto;
}

.grid-box {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    background-color: white;
    color: black;
    border: 2px solid grey;
    text-transform: uppercase;
    font-family: "Ubuntu Mono", monospace;
}

.grid-box.green {
    background-color: green;
    color: white;
}

.grid-box.orange {
    background-color: orange;
    color: black;
}

.grid-box.grey {
    background-color: grey;
    color: white;
}

.grid-box.invalid {
    background-color: red;
    color: white;
}

#keyboard {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the rows horizontally */
    justify-content: center; /* Center the keyboard vertically */
    margin-top: 20px;
    gap: 5px; /* Add spacing between rows */
    width: 100%; /* Ensure it doesn't exceed the container width */
    max-width: 100%; /* Prevent overflow */
    box-sizing: border-box; /* Include padding in width calculations */
    padding: 0 10px; /* Add slight padding for mobile */
}

.keyboard-row {
    display: flex;
    justify-content: center; /* Center the keys in each row */
    gap: 5px; /* Add spacing between keys */
    width: 100%; /* Ensure rows span the container width */
    max-width: 100%; /* Prevent overflow */
}

.key {
    flex: 1; /* Allow keys to dynamically resize */
    max-width: calc(10% - 5px); /* Adjust dynamically while preventing overflow */
    height: 50px;
    font-size: 15px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #ccc;
    border: 2px solid #888;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Ubuntu Mono", monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.key:active {
    background-color: #aaa;
}

.key.action-key {
    flex: 1.5; /* Slightly wider for action keys */
    max-width: calc(15% - 5px); /* Prevent action keys from exceeding row width */
    background-color: #ddd;
}

.key.action-key:active {
    background-color: #bbb;
}
    
.key.highlight {
    background-color: #ffcc00; /* Highlight color */
    transition: background-color 0.2s;
}

#top10Button {
    text-decoration: underline;
}

.leaderboardButton {
    border: none;
}

#win-message {
    display: none;
}

#lose-message {
    display: none;
}

.stat {
    margin-bottom: 0;
}

.friendsLeaderboardList {
    gap: 12px;
}

.global-stats {
    margin-bottom: 0;
}

#updateStatsButton {
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: 500;
}