@import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap");

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

ul {
    padding-left: 0;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgb(81, 54, 16);
    font-size: 1.2rem;
    font-family: "Montserrat", sans-serif;
}

header {
    margin-top: 2rem;
}

.pokemon_filter {
    background-color: rgb(161, 114, 114);
    position: absolute;
    left: 20px;
    top: 40px;
    z-index: 100;
    display: none;
    width: fit-content;
    font-size: .8em;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.pokemon_filter li {
    background-color: rgb(231, 224, 224);
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.pokemon_filter li:hover {
    background-color: transparent;
    font-weight: bold;
}

main {
    width: fit-content;
    height: fit-content;
}

.pokemon-container {
    padding: 1rem;
}

.pokemon-element {
    padding: 1rem;
    border-radius: 0.8rem;
    background-color: rgb(247, 201, 110);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 6px solid rgb(78, 48, 2);
    box-shadow: 10px 5px 5px rgb(78, 43, 2);
}

h2 {
    font-size: 1.5rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    background-color: rgba(255, 250, 250, 0.534);
    padding: 0.5rem 1rem;
    width: 100%;
    border-radius: 0.5rem;
    text-align: center;
}

img {
    width: 10rem;
    border: 10px solid rgba(255, 250, 250, 0.534);
    border-radius: 50%;
    background-color: rgb(247, 201, 110);
}

.stat,
.ability {
    padding-bottom: 0.1rem;
}

h3 {
    margin: 1.5rem 0;
    letter-spacing: 0.2rem;
    border-bottom: 3px solid rgba(255, 250, 250, 0.534);
}

ul>li {
    list-style: none;
}

li.stat {
    display: flex;
    justify-content: space-between;
}

li span {
    margin: 0 2rem;
}

form {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

form input[type="text"] {
    background-color: #efefef;
    padding: 0.5rem 1rem;
    border: 1px solid #efefef;
    border-radius: 8px;
}

form input[type="text"]:focus {
    outline: none;
}

button {
    background-color: rgb(255, 153, 0);
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    color: #efefef;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background-color: rgb(212, 139, 2);
    box-shadow: 1px 2px rgb(78, 43, 2);
}

@media screen and (max-width:480px) {
    form {
        flex-direction: column;
    }

    form>* {
        width: 80%;
        font-size: 80%;
    }

    .pokemon_filter {
        left: 40px;
        top: 30px;
        width: 70%;
    }
}