* {
    box-sizing: border-box;
}
body {
    font-size: 16px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    text-transform: uppercase;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    background: #ecedff;
}

#game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 320px;
    margin: 0 auto;
    min-width: 320px;
    padding: 1em;
    background: #fff;
    border: 3px solid #2c4aab;
    border-radius: 5px;
}

#word-container,
#cards-container {
    display: flex;
    grid-template-columns: max-content;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: center;
}

.looser {
}
.word-cell,
.letter-card {
    min-width: 30px;
    aspect-ratio: 1/1;
    /* height: 50px; */
    border: 3px solid #4c62b3;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition:
        transform 0.3s,
        opacity 0.3s;
    border-radius: 5px;
    /* padding: 5px; */
}

.word-cell {
    background-color: #f2f2f2;
    border-color: #c5c5c5;
    /* width: 65px; */
    /* height: 65px; */
    font-size: 30px;
}

.word-cell.has-letter {
    background-color: #e4f1ff;
    border-color: #4c62b3;
}
.winner {
    animation: winnerAnimate 1s;
}
.looser {
    animation: looserAnimate 1s;
}
.winner .word-cell.has-letter {
    background-color: #e4ffee;
    border-color: #4cb396;
}
.looser .word-cell.has-letter {
    background-color: #f2c2c9;
    border-color: #ed3d3d;
}
.letter-card {
    background-color: #e4f1ff;
}

.letter-card.used {
    background-color: #e4e4e4;
    cursor: not-allowed;
    border-color: #e4e4e4;
}

.letter-card.dragging {
    opacity: 0.5;
}

/* ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð¿Ð¾ÑÐ²Ð»ÐµÐ½Ð¸Ñ */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes looserAnimate {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes winnerAnimate {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ÐÐ½Ð¸Ð¼Ð°Ñ†Ð¸Ñ Ð´Ð»Ñ ÑÐ±Ñ€Ð¾ÑÐ° */
.reset-animation {
    animation: resetMove 0.4s ease-in-out;
}

@keyframes resetMove {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn {
    border: none;
    background: transparent;
    width: auto;
    height: 50px;
    border-radius: 5px;
    padding: 0x;
    cursor: pointer;
}

.btn svg {
    color: #4c62b3;
}

.btn-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn:hover svg {
    fill: #cce5ff;
}

.btn-reset {
}

.btn-speak svg {
    fill: #8cf08c;
    color: #06b10e;
}
