@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@200..800&display=swap');

html {
    /* Define o tamanho da fonte do elemento raiz para que seja responsiva */
    font-size: calc(8px + 0.52vw); 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Oxanium', cursive;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
}

.pokedex-body {
    --pokedex-width: min(950px, 90vw);

    width: var(--pokedex-width);
    aspect-ratio: 840/639; /* Mantém proporção correta */
    position: relative;
    background-image: url(../images/pokedex.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    /* Variáveis para largura e altura */
    --pokedex-height: calc(var(--pokedex-width) * 639 / 840);
}

.pokemon-container {
    position: absolute;
    top: calc(var(--pokedex-height) * 0.31); 
    left: calc(var(--pokedex-width) * 0.115);
    width: calc(var(--pokedex-width) * 0.31);
    height: calc(var(--pokedex-height) * 0.31);
    background-image: url(../images/FundoPadrao.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.pokemon-image {
    position: absolute;
    top: 57%; 
    left: 50%;
    transform: translate(-50%, -50%);
    height: 80%;
    animation: mover 1.5s infinite ease-in-out 0.5s;
    will-change: transform;
}

@keyframes piscar {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    } 
}

@keyframes mover {
    0%, 100% {
        transform: translate(-50%, -50%); 
    }
    50% {
        transform: translate(-53%, -56%); 
    } 
}

.pokemon-data {
    position: absolute;
    top: 17%;
    right: 5%;
    width: 35%;
}

.poke-bg1 {
    position: absolute;
    background-color: #d30a40;
    top: calc(var(--pokedex-height) * 0.6932); 
    left: calc(var(--pokedex-width) * 0.085); 
    width: calc(var(--pokedex-width) * 0.38); 
    height: calc(var(--pokedex-height) * 0.205); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.poke-bg2 {
    position: absolute;
    background-color: #d30a40;
    top: calc(var(--pokedex-height) * 0.34); 
    right: calc(var(--pokedex-width) * 0.057); 
    width: calc(var(--pokedex-width) * 0.36); 
    height: calc(var(--pokedex-height) * 0.57); 
}

form{
    width: 100%;
}

.entry{
    width: 85%;
    padding: 3%;
    font-size: clamp(0.6rem, 1.45vw, 1rem);
    border-radius: 5px;
    border-color: black;
    font-weight: 600;
    box-shadow: calc(var(--pokedex-width) * -0.003) calc(var(--pokedex-width) * 0.003) 0px rgb(121, 118, 118), 
    calc(var(--pokedex-width) * -0.004) calc(var(--pokedex-width) * 0.004) 0px rgb(0, 0, 0), 
    calc(var(--pokedex-width) * -0.002) calc(var(--pokedex-width) * 0.003) 0px rgb(0, 0, 0);
}

.entry::placeholder{
    font-weight: 400;
}

.nav-buttons{
    width: 88%;
    display: flex;
    min-height: 8%;
    margin-top: 2%;
    justify-content: space-around;
}

.btn-arrows{
    width: 35%;
    height: calc(var(--pokedex-height) * 0.075);
    margin-top: 2%;
    font-size: clamp(0.8rem, 2vw, 1.5rem);
    border-radius: 5px;
    border-color: black;
    font-weight: 600;
    box-shadow: 
        calc(var(--pokedex-width) * -0.003) calc(var(--pokedex-width) * 0.003) 0px rgb(121, 118, 118), 
        calc(var(--pokedex-width) * -0.004) calc(var(--pokedex-width) * 0.004) 0px rgb(0, 0, 0), 
        calc(var(--pokedex-width) * -0.002) calc(var(--pokedex-width) * 0.004) 0px rgb(0, 0, 0);
}

.btn-arrows:active{
    box-shadow: inset calc(var(--pokedex-width) * 0.002) calc(var(--pokedex-width) * 0.002) 0px rgba(0, 0, 0, 0.6); 
}

.btn-arrows img {
    width: 16%;
}

#btn-left img{
    transform: rotate(180deg);
}

#btn-sound{
    width: 18%;
    display: flex;
    justify-content: center;
}

#btn-sound img{
    scale: 0.55;
    width: 100%;
}

.painel{
    background-color: azure;
    width: 96%;
    height: 45%;
    border-style: solid;
    border-width: calc(var(--pokedex-width) * 0.002);
    border-radius: calc(var(--pokedex-width) * 0.01);
    border-color: black;
    box-shadow: calc(var(--pokedex-width) * -0.003) calc(var(--pokedex-width) * 0.003) 0px rgb(121, 118, 118), 
    calc(var(--pokedex-width) * -0.004) calc(var(--pokedex-width) * 0.004) 0px rgb(0, 0, 0), 
    calc(var(--pokedex-width) * -0.002) calc(var(--pokedex-width) * 0.002) 0px rgb(0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.poke-name{
    margin-top: 3%;
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    color: rgb(121, 118, 118);
    font-weight: 600;
}

.status-bg{
    margin-top: 2%;
    background-color: rgb(214, 213, 212);
    width: 96%;
    border-radius: 10px;
    height: 72%;
    justify-content: center;
    gap: 0;
    display: flex;
}

.status-pt1{
    flex: 1;
    display: grid;
    margin-left: 1.5%;
}

.status-pt2{
    flex: 1;
    display: grid;
    margin-right: 1.5%;
}

.status-pt2 .stat-name{
    width: 42%;
    font-size: clamp(0.6rem, 2vw, 0.96rem); 
}

.status-container{
    display: flex;
    align-items: center;
    gap: 1%;
}

.stat-bar{
    width: 42%;
    height: 28%;
    background-color: #dedede;
    border-radius: 5px;
    overflow: hidden;
}

.stat-bar-inner{
    width: 80%;
    height: 100%;
    background-color: #3b4cca;
    border-radius: 5px;
    overflow: hidden;
}

.stat-name{
    width: 20%;
    font-size: clamp(0.6rem, 2vw, 1rem); 
}

.stat-value{
    width: 24%;
    font-size: clamp(0.6rem, 2vw, 1rem); 
}

.types-painel{
    margin-top: 5%;
    background-color: azure;
    width: 96%;
    height: 45%;
    border-style: solid;
    border-width: calc(var(--pokedex-width) * 0.002);
    border-radius: calc(var(--pokedex-width) * 0.01);
    border-color: black;
    box-shadow: calc(var(--pokedex-width) * -0.003) calc(var(--pokedex-width) * 0.003) 0px rgb(121, 118, 118), 
    calc(var(--pokedex-width) * -0.004) calc(var(--pokedex-width) * 0.004) 0px rgb(0, 0, 0), 
    calc(var(--pokedex-width) * -0.002) calc(var(--pokedex-width) * 0.002) 0px rgb(0, 0, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.type-img{
    padding: 1%;
    margin-top: 1%;
    border-radius: 15px;
}

.types-row{
    display: flex;
    justify-content: center;
    height: 23%;
    width: 100%;
}

.poke-infos{
    display: flex;
    flex-direction: row;
    margin-top: 3%;
    justify-content: space-around;
    width: 95%;
    white-space: nowrap; 
}

.info{
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    color: rgb(121, 118, 118);
    font-weight: 700;
}

.poke-height{
    margin-top: 1%;
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    color: rgb(121, 118, 118);
    font-weight: 400;
    
}

.poke-weight{
    margin-top: 1%;
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    color: rgb(121, 118, 118);
    font-weight: 400;
}

.poke-desc{
    margin-top: 3.5%;
    font-size: clamp(0.7rem, 2vw, 1rem);
    font-weight: 300;
    width: 95%;
}


@media (max-width: 700px) {
    html {
        font-size: calc(9px + 0.3vw);
    }
}

@media (max-width: 600px) {
    html {
        font-size: calc(8px + 0.3vw);
    }
}

@media (max-width: 500px) {
    html {
        font-size: calc(6.0px + 0.3vw);
    }
}

@media (max-width: 400px) {
    html {
        font-size: calc(4.3px + 0.3vw);
    }
}

@media (max-width: 300px) {
    html {
        font-size: calc(3.8px + 0.3vw);
    }
}
