* {
    box-sizing: border-box;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}


body {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, sans-serif;
    background: linear-gradient(135deg, #ffe29f), #ffa99f;
    background-color: gainsboro;
    margin: 0;
}

h1 {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: #1e1e1e;
    text-shadow: 2px 2px #ffffff;
    margin-bottom: 1rem;
    letter-spacing: 5px;
    font-family: system-ui, sans-serif;
}

.display {
    width: 100%;
    height: 50px;
    font-size: 24px;
    padding: 12px;
    display: flex;
    justify-content: flex-end;
    color: white;
    border-radius: 4px;
    /*background-color: rgb(60, 80, 100);*/
}

#keyboard {
    padding: 24px;
    width: 600px;
    height: 700px;
    gap: 32px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid black;
    background-color: #1f1e1e;
    min-height: 100vh;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    ;

}

.row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.userRow {
    display: flex;
    justify-content: space-between;
    margin-bottom: auto;
    padding: 0;
    width: 600px;
    height: 400px;

}

.row:last-child::before {
    width: 40px;
    height: 40px;
}

.button {
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: #4eafff;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    transition: background 0.2s;
}

.button:hover {
    background-color: #007acc;
}

.user-letter {
    padding: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    background-color: white;
    border-radius: 4px;
    border: 2px solid #ccc;
    transition: background 0.3s, transform 0.2s;
}

.user-letter {
    background-color: white;
    border: 2px solid #ccc;
    color: #333;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.user-letter:empty {
    background-color: #f0f0f0;
}


.enter,
.undo {
    background-color: rgba(255, 255, 255, 0.5);
}

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

.yellow {
    background-color: #c9b458;
    color: white;
}

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

@keyframes flip {
    0% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(90deg);
        background-color: #bbb;
    }

    0% {
        transform: rotateX(0deg);
    }

}

.flip {
    animation: flip 0.6s ease forwards;
    transform-style: preserve-3d;
}

.result-message {
    font-size: 1.8rem;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
    color: white;
}