@import url('https://fonts.googleapis.com/css2?family=Rubik+Burned&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
}
:root{
    --bordas: 1px solid black;
}
html, body{
    height: 100%;
}
canvas{
    border: 1px solid black;
    margin: 2rem auto 0;
    background-color: transparent;
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% - 40px);
    max-width: 1000px;
    height: auto;
}
div.img{
    width: 250px;
    height: 350px;
    position: absolute;
    left: 60%;
    top: 20%;
}
div.img > img{
    width: 100%;
    height: 100%;
    border-radius: 15px;
}
div.letters-fild{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: auto;
    height: 50px;
    position: absolute;
    top: 23%;
    left: 13%;
}
div.letters-fild > div.fild-letter{
    width: 30px;
    border-bottom: 3px solid #000;
    text-align: center;
    margin: 0 0.5rem;
    position: relative;
    top: 20%;
    left: 0%;
}
div.letters-fild > div.fild-letter > p{
    color: transparent;
    font-weight: bold;
    font-family: 'Caveat', cursive;
    font-size: 30px;
}
div.container-word-clue{
    border: 3px solid black;
    outline: 1px solid #000;
    width: auto;
    height: 60px;
    text-align: center;
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
    position: absolute;
    top: 10%;
    left: 20%;
}
div.container-word-clue > h2{
    font-size: 30px;
    font-family: 'Rubik Burned', system-ui;
    color: #db7018;
}
div.container-letters{
    display: flex;
    row-gap: 5px;
    width: 500px;
    height: 250px;
    position: absolute;
    top: 32.5%;
    left: 12%;
    z-index: 1;
}
div.container-letters > div.row-letters{
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
div.container-letters > div.row-letters > span{
    flex-wrap: wrap;
    justify-content: center;
}
div.container-letters > div.row-letters > span > button{
    margin: 0 0.2rem;
    width: 42px;
    color: #2350d9;
    font-family: 'Caveat', cursive;
    font-size: 60px;
    text-align: center;
    background-color: transparent;
}
/* estado de botão desabilitado */
div.container-letters > div.row-letters > span > button.disabled{
    opacity: 0.35;
    cursor: not-allowed;
}

/* Toast do jogo */
.game-toast{
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 20px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    z-index: 10000;
    transition: opacity 0.25s ease;
}
/* Responsividade: regras para telas pequenas */
@media (max-width: 900px) {
    canvas{
        position: relative;
        margin-top: 1rem;
    }
    div.img{
        position: relative;
        left: auto;
        top: auto;
        width: 180px;
        height: 220px;
        margin: 1rem auto;
    }
    div.letters-fild{
        position: relative;
        top: auto;
        left: auto;
        margin: 0.5rem auto;
        justify-content: center;
        flex-wrap: wrap;
    }
    div.container-word-clue{
        position: relative;
        top: auto;
        left: auto;
        margin: 1rem auto;
        width: calc(100% - 40px);
    }
    div.container-letters{
        position: relative;
        top: auto;
        left: auto;
        width: calc(100% - 40px);
        height: auto;
        margin: 0.5rem auto 2rem;
    }
    div.container-letters > div.row-letters > span > button{
        font-size: 36px;
        width: 36px;
        margin: 0 0.15rem 0.25rem 0.15rem;
    }
    div.container-letters > div.row-letters > span > div.new-game{
        margin-left: 0.25rem;
    }
}

/* Mantém layout mais parecido com o original em telas maiores */
@media (min-width: 901px) {
    canvas{
        position: absolute;
        margin: 2rem 0 0 9rem;
        width: 1000px;
        height: 480px;
    }
}
div.container-letters > div.row-letters > span > div.new-game{
    width: 70px;
    height: 50px;
    text-align: center;
    margin-left: 0.5rem;
    padding-left: 0.2rem;
}
div.container-letters > div.row-letters > span > div.new-game > abbr > i{
    color: #2350d9;
    font-size: 50px;
}