/*IMPORTAR FONT*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/*COLORES*/

:root{
    --card-color: #ffffff;
    --color-pokemon: #f9d94b; 
    --text-card: #000000;
    --color-button: #101010;
    --color-button-accent: #e7e7e7;
    --text-color-button: #f0f0f0;
    --color-cirle: #f8f8f8;
    --text-color-badge: #fafafa;
    --font-card: "Poppins", sans-serif;
    --background-color: #eff3ff;
    --card-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
    --color-links: #9c9c9c;
}


/*ESTILOS GENERALES*/

*{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

main{
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

body{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: var(--font-card);
    background-color: var(--background-color);
    overflow-y: hidden;
}


/*ESTILOS CARD*/

.title-project{
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1.5rem;
}

.pokeball{
    width: 1em;
    height: 1em;
    display: block;
}

.pokeball:hover{
    transform: rotate(360deg);
    transition: transform .5s ease;
}

#resultado article{
    display: flex;
    width: 340px;
    height: 540px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--card-color);
    border-radius: 15px;
    box-shadow: var(--card-shadow);
    margin-top: 1.5rem;
    overflow: hidden;
}

#resultado article img{
    width: 200px;
}

.color-top{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.cirle-color{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 250px;
    height: 250px;
    background-color: var(--color-cirle);
    border-radius: 50%;

}

#pokemon-sound{
    width: 30px;
    height: 30px;
    color: white;
    border: none;
    background: none;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#pokemon-sound:hover{
    transform: scale(1.3);
}

.info{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    gap: 1rem;
}

.info h2,
.info span{
    text-transform: capitalize;
}

.data{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.60rem;
}

.type,
.sub-type{
    padding: 0.30rem 0.80rem;
    color: var(--text-color-badge);
    font-weight: bold;
    border-radius: 10px;
}

.stat{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    border-top: rgb(194, 194, 194) solid 1px;
    padding-top: 1rem;
}

.stat-item{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-name{
    font-weight: 600;
}

.stat-number,
.stat-number-hp{
    color: var(--color-links);
}

.stat-hp{
    background-color: var(--card-color);
    padding: 0.20rem 0.30rem;
    border-radius: 10px;
    gap: 0.60rem;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 15px;
    left: 15px;
}

.stat-name-hp{
    font-weight: bold;
    font-size: 0.80rem;
}

.nombre-pokemon{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.nombre-pokemon input{
    border: none;
    padding: 1rem 0.85rem;
    border-radius: 10px;
}

input:focus{
    outline: none;
    box-shadow: 0 0 0 2px #a5b4fc;
}

input::placeholder{
    font-family: var(--font-card);
}

.nombre-pokemon button{
    border: none;
    background-color: var(--color-button-accent);
    padding: 0.85rem 1rem; 
    border-radius: 10px;
    color: var(--text-card);
    font-family: var(--font-card);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}

.nombre-pokemon button:hover{
    background-color: var(--color-button);
    color: var(--text-color-button);
}


/*FOOTER*/

footer{
    margin-top: auto;
}

footer small{
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

footer small a{
    text-decoration: none;
    color: var(--text-card);
    transition: color 0.3s ease;
}

footer small a:hover{
    color: var(--color-links);
}

.pokeball-footer{
    width: 20px;
    height: 20px;
    display: block;
}


/*ANIMACIÓN CARD*/

@keyframes aparecer{
    from{
        opacity: 0;
        transform: translateY(20px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}


/*EFECTO 3D PARA JAVASCRIPT*/

.poke-card{
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
    animation: aparecer 0.4s ease;
}


/*COLORES POKEMON*/

article.electric .color-top { background-color: #f9d94b; }
article.water .color-top { background-color: #5eb8f5; }
article.fire .color-top { background-color: #ff7043; }
article.grass .color-top {background-color: #00b894;}
article.bug .color-top {background-color: #16a35c;}
article.dragon .color-top {background-color: #ffeaa7;}
article.fairy .color-top {background-color: #f365a0;}
article.fighting .color-top {background-color: #30336b;}
article.flying .color-top {background-color: #81ecec;}
article.ground .color-top {background-color: #EFB549;}
article.ghost .color-top {background-color: #a55eea;}
article.ice .color-top {background-color: #74b9ff;}
article.normal .color-top {background-color: #95afc0;}
article.poison .color-top {background-color: #6c5ce7;}
article.psychic .color-top {background-color: #a29bfe;}
article.rock .color-top {background-color: #444d50;}
article.dark .color-top {background-color: #070707;}
article.steel .color-top {background-color: #697588;}