﻿.wordle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 10px;
}

#grid {
    display: grid;
    gap: 5px;
    margin: 20px 0;
    width: 100%;
    max-width: 350px;
}

.tile {
    aspect-ratio: 1;
    border: 2px solid #d3d6da;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: transform 0.1s;
}

/* Colors */
.correct {
    background-color: #6aaa64;
    color: white;
    border-color: #6aaa64;
}

.present {
    background-color: #c9b458;
    color: white;
    border-color: #c9b458;
}

.absent {
    background-color: #787c7e;
    color: white;
    border-color: #787c7e;
}

/* Animations */
.pop {
    transform: scale(1.1);
}

.flip {
    animation: flipIn 0.5s ease-in forwards;
}

@keyframes flipIn {
    0% {
        transform: rotateX(0);
    }

    50% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0);
    }
}

.win-bounce {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-20px);
    }

    50% {
        transform: translateY(5px);
    }

    60% {
        transform: translateY(-10px);
    }

    80%, 100% {
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .tile {
        font-size: 1.5rem;
    }
}

#keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
    width: 100%;
    max-width: 500px;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    width: 100%;
}

.key {
    flex: 1;
    padding: 15px 0;
    border: none;
    border-radius: 4px;
    background-color: #d3d6da;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    touch-action: manipulation;
}

#key-Enter, #key-Backspace {
    flex: 1.5;
    font-size: 1rem;
}