/*Determina o tamanho e posicionamento das três partes html*/
html,
body {
    height: 100%;
}

.container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
}

.container-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-around;
    height: 100%;
}

/*Determina o pocicionamento dos itens iniciais*/

.container-principal {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.menu-inicial,
.botoes {
    display: flex;
    justify-content: center;
    align-items: center;
}

.principal,
.tutorial,
.campo-nova-palavra,
.container-nova-palavra {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
}

.principal {
    background: linear-gradient(0deg,
            #f7f7ff,
            #e2e2f5);
    width: 100%;
    height: 90vh;
    justify-content: center;
}

.botoes {
    gap: 1rem;
}

.desenho-forca {
    width: 30%;
}

.vidas {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: .5rem 0;
}

.estrela {
    font-size: 2rem;
    color: #818181;
    /* cinza apagado */
    transition: color 0.3s ease, transform 0.2s ease;
}

.estrela.ativa {
    color: #facc15;
    /* dourado */
}


.tutorial {
    align-items: center;
    width: 60%;
}

.contadores {
    padding: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #374151;
}

#contador-categorias,
#contador-palavras {
    padding: 1rem;
    background-color: aliceblue;
    border-radius: 15px;
    box-shadow: .2rem .2rem .2rem rgba(0, 0, 0, .5);
}


.categorias {
    scroll-margin-top: 10vh;
    padding: 1rem;
    text-align: center;
    align-items: center;
    justify-content: center;
    width: 80%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.categorias-tittle-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.categorias-subtittle {
    font-size: 1rem;
}

.grid-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.card {
    padding: 1rem;
    justify-content: space-around;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 250px;
    pointer-events: auto;
    box-shadow: .2rem .2rem .2rem rgba(0, 0, 0, 0.5);
    background-color: #ffffff;
    border-radius: 15px;
    cursor: pointer;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.card-info {
    display: flex;
    /* 🔥 empurra para o fundo */
    text-align: center;
    gap: 2rem;
}

.card-info p {
    font-size: .9rem;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.15);
    filter: brightness(1.03);
}

.card-img {
    transition: transform 0.25s ease;
    height: 50%;
}

.card:hover .card-img {
    transform: scale(1.08);
}

.card:hover .btn-limpar {
    display: flex;
}

.btn-limpar {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

.btn-limpar:hover {
    background: red;
}

/*Determina o posicionamento do teclado virtual*/

.teclado-virtual {
    padding: .5rem;
    flex-grow: 1%;
}

.tecla {
    font-size: 1.2rem;
}

.teclado-virtual button {
    width: 2rem;
    height: 2.5rem;
}

.fileira {
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
    justify-content: center;
    padding: .5rem
}

/*Determina o tabuleiro do Jogo*/

.area-canvas {
    align-items: center;
    align-content: center;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
}

.dica-palavra {
    width: 90%;
    display: flex;
    height: auto;
    font-size: 1.2rem;
    justify-content: center;
    align-items: center;
}

.timer-span {
    font-weight: bold;
}

.display {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: space-around;
    align-items: center;
}

.display-vidas {
    display: flex;
    align-content: center;
    justify-content: center;
    height: 1rem;
    width: 5rem;
}

.combo-container {
    width: 6rem;
    height: 1.5rem;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
}

#barra-combo {
    height: 100%;
    width: 0%;
    background: orange;
    transition: width 0.3s ease;
}

#texto-combo {
    color: white;
    font-weight: bold;
    font-size: 14px;
}

#timer {
    font-weight: bold;
}

.display-categoria,
.display-pontuacao {
    display: flex;
    height: 1.5rem;
    font-size: 1rem;
    justify-content: center;
    align-items: center;
    align-content: center;
}

.status-categoria {
    display: flex;
    align-items: center;
    align-content: center;
    justify-content: center;
    gap: 1rem;
    margin: .5rem 0;
    font-family: "Inter", sans-serif;
    width: 90%
}

.barra-progresso {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.barra-preenchida {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transition: width 0.4s ease;
}

.status-nome,
.status-contador {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}


#forca {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: .5rem;
}

.letra {
    width: 30px;
    height: 3rem;
}

.container-nova-palavra {
    padding: 3rem;
    width: 90%;
}

.pop-up-ganhou,
.pop-up-perdeu {
    font-weight: bold;
    padding: .5rem;
}

/*Define campos invisíveis*/
.pop-up-perdeu,
.pop-up-ganhou,
.teclado-virtual,
.botoes-in-game,
.campo-nova-palavra,
.area-canvas {
    display: none;
}

.botoes-in-game {
    flex-direction: row;
    gap: 1rem;
    width: auto;
}

.pop-up-perdeu,
.pop-up-ganhou {
    text-align: center;
}

.linha {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.rodape a {
    color: #ffffff;
}

/*Modo Responsivo*/

@media screen and (max-width: 650px) {
    html {
        font-size: .8rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .principal {
        padding: 3%;
    }

    .categorias {
        width: 100%;
    }

    .grid-container {
        width: 90%;
        grid-template-columns: repeat(1, 1fr);
    }

    .card {
        flex-direction: row;
        height: 5rem;
        padding: 0;
    }

    .card img {
        min-width: 2.5rem;
    }

    .card h2 {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }

    .card-info {
        gap: 1rem;
    }

    .categorias-tittle-box {
        padding: 5% 0;
    }

    .status-categoria {
        width: 90%;
        margin: 1rem 0;
    }

    .dica-palavra {
        height: auto;
    }

    .container-principal {
        width: 100%;
    }

    .area-canvas {
        width: 100%;
    }

    .letra {
        width: 20px;
        height: 3rem;
    }

    .teclado-virtual {
        padding: .5rem 0;
    }

    .teclado-virtual button {
        width: 2.5rem;
        height: 3.5rem;
    }

    .dica-palavra {
        font-size: 1.1rem;
    }

    .btn-limpar {
        display: flex;
        position: inherit;
    }

}