body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f8f9fa;
    /*overflow: hidden; /* Prevent scrolling */
}



.game-container {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 10px;
    box-sizing: border-box;
    height: 100vh; /* Ensure the game container takes full height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-gap: 5px;
    column-gap: 0px;
    margin-bottom: 20px;
    justify-content: center;
    touch-action: pan-y; /* Allows vertical panning */
}

.tile {
    width: 80%;
    padding-bottom: 90%; /* Makes the tiles square */
    position: relative;
}

.tile-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid #d3d6da;
    font-size: 1.5em;
    font-weight: bold;
    text-transform: uppercase;
}

.tile.correct .tile-inner {
    background-color: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

.tile.present .tile-inner {
    background-color: #c9b458;
    color: white;
    border-color: #c9b458;
}

.tile.absent .tile-inner {
    background-color: #787c7e;
    color: white;
    border-color: #787c7e;
}

.keyboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    touch-action: pan-y; /* Allows vertical panning */
}

.keyboard-row {
    display: flex;
    gap: 5px;
    justify-content: center;
    width: 100%;
}

.key {
    width: 10vw;
    max-width: 110px;
    height: 12vw;
    max-height: 60px;
    background-color: #d3d6da;
    border: none;
    border-radius: 5px;
    font-size: 0.6em;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: manipulation;
}

.keyboard .key.key-enter {
    width: 200px;
}

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

#toast-container {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background-color: #ffc107;
    color: #333;
    padding: 15px 25px;
    border-radius: 20px;
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.toast .close {
    margin-left: 10px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

@media (max-width: 480px) {
    .game-container {
        max-width: 100%;
        padding: 5px;
        height: 100vh; /* Ensure the game container takes full height */
    }

    .tile-inner {
        font-size: 1em;
    }

    .tile {
        width: 80%; /* Adjusted for smaller screens */
        padding-bottom: 80%; /* Adjusted for smaller screens */
    }

    .key {
        width: 8.6vw; /* Adjusted for smaller screens */
        height: 10.6vw; /* Adjusted for smaller screens */
        max-width: 60px; /* Adjusted for smaller screens */
        max-height: 46px; /* Adjusted for smaller screens */
        font-size: 0.96em; /* Adjusted font size for smaller screens */
    }

    .key.key-enter {
        width: 15vw;
    }
}

.key.correct {
    background-color: #6aaa64;
    color: white;
}

.key.present {
    background-color: #c9b458;
    color: white;
}

.key.absent {
    background-color: #787c7e;
    color: white;
}
