@import url('https://fonts.googleapis.com/css2?family=Pixelify+Sans:wght@400..700&display=swap');

:root {
    --amareloprincipal: #FFDE59;
    --pretofonteprincipal: black;
    --brancoprincipal: white;
    --fontetitulos: "Pixelify Sans", sans-serif;
    --fontetextos: sans-serif;
}

* {
    text-decoration: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* CONFIGURAÇÃO DOS TRÊS CONVERSORES */
.conversor {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* IMAGENS DE FUNDO */
.conversor-metro {
    background-image: url("transparentes/caisjoseestelita-pixelart2.png");
}

.conversor-litro {
    background-image: url("transparentes/pacodofrevo-pixelart2.png");
    background-position: center 20%;
}

.conversor-grama {
    background-image: url("transparentes/parquededoisirmaos-pixelart2.png");
}

/* CABEÇALHO */
.cabecalho-jogo {
    min-height: 5.5rem;
    flex-shrink: 0;
    background-color: var(--amareloprincipal);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
}

.cabecalho-jogo h1 {
    font-family: var(--fontetitulos);
    font-size: 4rem;
    color: var(--pretofonteprincipal);
    text-shadow: var(--brancoprincipal) 1.5px 1.5px;
    margin: 0;
}

.cabecalho-jogo h2 {
    font-family: var(--fontetitulos);
    font-size: 1.7rem;
    line-height: 1.1;
    text-align: center;
    color: var(--pretofonteprincipal);
    text-shadow: var(--brancoprincipal) 1.5px 1.5px;
    margin: 0;
}

/* ÁREA DO JOGO */
.area-jogo {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    padding: 2rem 2.5rem;
}

/* ESCALA DE MEDIDAS */
.escala {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
}

/* BOTÕES DA ESCALA */
.unidade {
    height: 55px;
    background-color: var(--brancoprincipal);
    border: 3px solid var(--pretofonteprincipal);
    border-radius: 10px;
    font-family: var(--fontetitulos);
    font-size: 2rem;
    color: var(--pretofonteprincipal);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

/* HOVER SUAVE */
.unidade:hover {
    transform: translateY(-3px);
}

/* UNIDADE DE ORIGEM SELECIONADA */
.unidade.origem-selecionada {
    background-color: var(--amareloprincipal);
    transform: translateY(-3px);
    box-shadow: 0 5px 0 var(--pretofonteprincipal);
}

/* UNIDADE DE DESTINO SELECIONADA */
.unidade.destino-selecionada {
    background-color: var(--brancoprincipal);
    outline: 5px solid var(--amareloprincipal);
    outline-offset: -7px;
}

/* LINHA DA CONVERSÃO */
.linha-conversao {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

/* CAMPOS */
.campo-medida {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.valor-inicial,
.resposta-aluno {
    width: 260px;
    height: 85px;
    background-color: var(--brancoprincipal);
    border: 4px solid var(--pretofonteprincipal);
    border-radius: 18px;
    box-shadow: 7px 7px 0 var(--pretofonteprincipal);
    font-family: var(--fontetextos);
    font-size: 2.5rem;
    text-align: center;
    outline: none;
    transition: transform 0.15s ease;
}

/* HOVER DOS CAMPOS */
.valor-inicial:hover,
.resposta-aluno:hover {
    transform: translateY(-3px);
}

/* INDICAÇÃO DA UNIDADE DE ORIGEM */
.unidade-origem {
    position: absolute;
    bottom: -2rem;
    font-family: var(--fontetitulos);
    font-size: 1.2rem;
    color: var(--pretofonteprincipal);
    text-shadow: var(--brancoprincipal) 1px 1px;
}

/* DESTINO */
.campo-destino {
    width: 260px;
    height: 85px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--brancoprincipal);
    border: 4px solid var(--pretofonteprincipal);
    border-radius: 18px;
    box-shadow: 7px 7px 0 var(--pretofonteprincipal);
    transition: transform 0.15s ease;
}

.campo-destino:hover {
    transform: translateY(-3px);
}

.destino-escolhido {
    font-family: var(--fontetitulos);
    font-size: 3rem;
}

/* PARA E = */
.texto-para,
.igual {
    font-family: var(--fontetitulos);
    font-size: 2.5rem;
    color: var(--pretofonteprincipal);
    text-shadow: var(--brancoprincipal) 1.5px 1.5px;
    flex-shrink: 0;
}

/* BOTÃO VERIFICAR */
.verificar {
    align-self: center;
    margin-bottom: 1rem;
    padding: 0.8rem 2rem;
    font-family: var(--fontetitulos);
    font-size: 1.5rem;
    color: var(--pretofonteprincipal);
    background-color: var(--amareloprincipal);
    border: 4px solid var(--brancoprincipal);
    border-radius: 15px;
    box-shadow: 5px 5px 0 var(--pretofonteprincipal);
    cursor: pointer;
    transition: transform 0.1s ease;
}

/* HOVER DO BOTÃO */
.verificar:hover {
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0 var(--pretofonteprincipal);
}

/* BOTÃO PRESSIONADO */
.verificar:active {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 var(--pretofonteprincipal);
}

/* RESULTADO */
.resultado {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fontetitulos);
    font-size: 2.3rem;
    text-align: center;
    margin: 0.5rem 1rem 1rem 1rem;
    padding: 0 1rem;
}

/* LOCAL */
.local {
    font-family: var(--fontetitulos);
    font-size: 2rem;
    text-align: center;
    margin: 0 0 1rem 0;
}

/* RESPONSIVIDADE PARA TELAS MÉDIAS */
@media (max-width: 1100px) {

    /* CABEÇALHO */
    .cabecalho-jogo {
        min-height: 5rem;
        padding: 0 1.5rem;
    }

    .cabecalho-jogo h1 {
        font-size: 3.2rem;
    }

    .cabecalho-jogo h2 {
        font-size: 1.45rem;
    }

    /* ÁREA DO JOGO */
    .area-jogo {
        gap: 3rem;
        padding: 1.5rem 2rem;
    }

    /* ESCALA */
    .escala {
        width: 100%;
    }

    .unidade {
        height: 50px;
        font-size: 1.6rem;
    }

    /* LINHA DA CONVERSÃO */
    .linha-conversao {
        gap: 1rem;
    }

    /* CAMPOS */
    .valor-inicial,
    .resposta-aluno,
    .campo-destino {
        width: clamp(180px, 23vw, 240px);
        height: 75px;
    }

    .valor-inicial,
    .resposta-aluno {
        font-size: 2.2rem;
    }

    .destino-escolhido {
        font-size: 2.5rem;
    }

    /* TEXTO */
    .texto-para,
    .igual {
        font-size: 2.1rem;
    }

    /* UNIDADE */
    .unidade-origem {
        font-size: 1.1rem;
    }

    /* RESULTADO */
    .resultado {
        font-size: 2rem;
    }

    /* LOCAL */
    .local {
        font-size: 1.7rem;
    }
}

/* RESPONSIVIDADE PARA TABLETS */
@media (max-width: 768px) {

    /* CABEÇALHO */
    .cabecalho-jogo {
        min-height: 4.5rem;
        padding: 0 1rem;
    }

    .cabecalho-jogo h1 {
        font-size: clamp(2.3rem, 7vw, 3rem);
    }

    .cabecalho-jogo h2 {
        font-size: clamp(1.1rem, 3vw, 1.4rem);
    }

    /* ÁREA DO JOGO */
    .area-jogo {
        gap: 2.5rem;
        padding: 1.5rem 1rem;
    }

    /* ESCALA */
    .escala {
        width: 100%;
        grid-template-columns: repeat(7, 1fr);
    }

    .unidade {
        height: 48px;
        font-size: clamp(1.2rem, 3.5vw, 1.6rem);
        border-width: 2px;
        border-radius: 8px;
    }

    /* LINHA DA CONVERSÃO */
    .linha-conversao {
        width: 100%;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    /* CAMPOS */
    .valor-inicial,
    .resposta-aluno,
    .campo-destino {
        width: clamp(140px, 26vw, 210px);
        height: 65px;
        border-width: 3px;
        border-radius: 14px;
        box-shadow: 5px 5px 0 var(--pretofonteprincipal);
    }

    .valor-inicial,
    .resposta-aluno {
        font-size: 1.9rem;
    }

    .destino-escolhido {
        font-size: 2.2rem;
    }

    /* TEXTO */
    .texto-para,
    .igual {
        font-size: 1.8rem;
    }

    /* UNIDADE DE ORIGEM */
    .unidade-origem {
        bottom: -1.7rem;
        font-size: 1rem;
    }

    /* RESULTADO */
    .resultado {
        min-height: 2.8rem;
        font-size: 1.7rem;
        margin: 0.5rem 0.8rem 1rem 0.8rem;
    }

    /* BOTÃO */
    .verificar {
        font-size: 1.3rem;
        padding: 0.7rem 1.6rem;
        margin-bottom: 0.5rem;
    }

    /* LOCAL */
    .local {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
}

/* RESPONSIVIDADE PARA CELULARES */
@media (max-width: 480px) {

    /* CABEÇALHO */
    .cabecalho-jogo {
        min-height: 4rem;
        padding: 0 0.7rem;
    }

    .cabecalho-jogo h1 {
        font-size: 2rem;
    }

    .cabecalho-jogo h2 {
        font-size: 0.95rem;
    }

    /* ÁREA DO JOGO */
    .area-jogo {
        gap: 1.8rem;
        padding: 1rem 0.7rem;
    }

    /* ESCALA */
    .escala {
        grid-template-columns: repeat(7, 1fr);
        width: 100%;
    }

    .unidade {
        height: 42px;
        font-size: clamp(0.9rem, 3.8vw, 1.2rem);
        border-width: 2px;
        border-radius: 7px;
    }

    /* LINHA DA CONVERSÃO */
    .linha-conversao {
        gap: 0.35rem;
    }

    /* CAMPOS */
    .valor-inicial,
    .resposta-aluno,
    .campo-destino {
        width: clamp(95px, 25vw, 125px);
        height: 55px;
        border-width: 3px;
        border-radius: 12px;
        box-shadow: 4px 4px 0 var(--pretofonteprincipal);
    }

    .valor-inicial,
    .resposta-aluno {
        font-size: 1.5rem;
    }

    .destino-escolhido {
        font-size: 1.7rem;
    }

    /* TEXTO */
    .texto-para,
    .igual {
        font-size: 1.3rem;
    }

    /* UNIDADE DE ORIGEM */
    .unidade-origem {
        bottom: -1.5rem;
        font-size: 0.85rem;
    }

    /* RESULTADO */
    .resultado {
        min-height: 2.5rem;
        font-size: 1.4rem;
        margin: 0.4rem 0.5rem 0.8rem 0.5rem;
        padding: 0 0.5rem;
        white-space: normal;
    }

    /* BOTÃO */
    .verificar {
        font-size: 1.1rem;
        padding: 0.6rem 1.3rem;
        border-width: 3px;
    }

    /* LOCAL */
    .local {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
}