@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('./assets/fonts/poppins-v24-latin-regular.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  src: url('./assets/fonts/poppins-v24-latin-500.woff2') format('woff2');
}
@font-face {
  font-display: swap;
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('./assets/fonts/poppins-v24-latin-600.woff2') format('woff2');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --clr-white: #f3f3f3;
    --clr-blk: #212121;
}
body {
    width: 100%;
    height: 100vh;
    font-family: 'Poppins', sans-serif;
    background: var(--clr-white);
    color: var(--clr-blk);
    cursor: default;
}
main {
    max-width: 90rem;
}
.background {
    position: fixed;
    width: 100%;
    height: 100%;
    max-width: 90rem;
    overflow: hidden;
}
.background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    top: 2rem;
}
.input-container input {
    width: 400px;
    padding: 1rem .75rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    color: var(--clr-blk);
    letter-spacing: .25px;
    box-shadow: 2px 2px 7px rgba(0, 0, 0, .2);
}
.input-container input::placeholder {
    font-size: .9rem;
}
.input-container button {
    padding: 1.1rem;
    margin-left: 1rem;
    color: var(--clr-blk);
    background: var(--clr-white);
    border: none;
    border-radius: 5px;
    text-transform: capitalize;
    letter-spacing: .25px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, .5);
    transition: 200ms ease;
    cursor: pointer;
}
.pokemonCard {
    display: none;
    position: relative;
    top: 3.5rem;
    color: var(--clr-white);
    width: 400px;
    height: 450px;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, .5);
    overflow: hidden;
    z-index: 1;
}
.pokemonCard .error {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}
.pokemonCard .error img {
    display: block;
    width: 115px;
    height: auto;
}
.pokemonCard .error h1 {
    font-size: clamp(3rem, 3vw, 3.5rem);
}
.pokemonCard .error p {
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 400;
    width: 90%;
    text-align: center;
    margin: 5px auto;
}
.img-container {
    position: relative;
}
.content {
    height: 185px;
    line-height: 1.8;
    text-transform: capitalize;
    overflow-Y: auto;
}
.content::-webkit-scrollbar {
    width: 8px;
}
.content::-webkit-scrollbar-track {
    background-color: transparent;
}
.content::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: var(--clr-white);
}
.content h2 {
    text-align: center;
    font-weight: 600;
    font-size: clamp(1.15rem, 3vw, 1.25rem);
}
.pokemon {
    display: block;
    position: relative;
    width: 165px;
    height: 165px;
    margin: 30px auto 15px;
}
.spinner {
    position: absolute;
    top: 39%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 1;
    animation: spinner 800ms linear infinite;
}
@keyframes spinner {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
.pokeball {
    width: 120px;
    height: auto;
    position: absolute;
    bottom: 77%;
    left: 75%;
    filter: opacity(35%);
    transform: rotate(32deg);
    border: solid 5px var(--clr-white);
    border-radius: 50%;
    box-shadow: 3px 2px 7px rgba(0, 0, 0, .8);
}
.pokedex-number p {
    color: var(--clr-white);
    padding: .5rem 1rem;
    font-size: 1.1rem;
    font-weight: 400;
}
.curved-background {
    width: 100%;
    height: 30vh;
    position: absolute;
    top: 0;
    clip-path: ellipse(85% 100% at top center);
    z-index: -1;
}
.name {
    text-align: center;
}
.name-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.name h1 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: .65rem;
}
.name.length h1 {
    line-height: 1.35;
}
.shiny-icon {
    width: 1.2em;
    height: 1.2em;
    position: relative;
    bottom: .35rem;
    cursor: pointer;
}
.measurements {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    position: relative;
}
.type,
.moveset,
.pokedex-entry {
    display: flex;
    align-items: center;
    justify-content: center;
}
.measurements::before {
    content: '';
    position: absolute;
    width: 88%;
    height: 2px;
    left: 50%; 
    bottom: -1rem;
    transform: translateX(-50%);
    background: var(--clr-white);
}
.type {
    margin-top: 1.75rem;
}
.moveset {
    position: relative;
    margin-top: .75rem;
}
.stats h2 {
    margin-top: .75rem;
}
.stats .stats-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin: .5rem auto;
}
.stats span {
    text-transform: lowercase;
}
.stats h2,
.pokedex-entry h2,
.pokemon-ivs h2 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.stats h2::before,
.pokedex-entry h2::before,
.pokemon-ivs h2::before,
.stats h2::after,
.pokedex-entry h2::after,
.pokemon-ivs h2::after {
    content: '';
    flex: 1;
    margin: 0 1.25rem;
    height: 2px;
    background: var(--clr-white);
}
.pokedex-entry {
    position: relative;
    flex-direction: column;
    font-size: .9rem;
    text-align: center;
}
.pokedex-entry h2 {
    margin-top: .65rem;
}
.pokedex-entry p {
    text-transform: none;
    line-height: 1.7;
    max-width: 85%;
    margin: .5rem 0;
}
.pokemon-ivs {
    font-size: clamp(.8rem, 3vw, .9rem);
    text-align: center;
}
progress {
    width: 88%;
    height: 18px;
    border: none;
    outline: none;
    border-radius: 15px;
    background: var(--clr-white);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    overflow: hidden;
}
.progress-bars {
    position: relative;
}
.progress-bars span {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    left: 2.25rem;
    font-weight: 500;
    font-size: .85rem;
    text-align: center;
    color: var(--clr-white);
}
progress::-moz-progress-bar {
    background: var(--clr-progressBar);
}
progress::-webkit-progress-bar {
    background: transparent;
}
progress::-webkit-progress-value {
    background-color: var(--clr-progressBar);
}
@media screen and (max-width: 756px) {
    .input-container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        position: relative;
        top: 2rem;
    }
    .input-container .button-container {
        display: flex;
        gap: 1rem;
        width: 400px;
        margin-top: 1rem;
    }
    .input-container button {
        flex: 1;
        margin-left: 0;
    }
}
@media screen and (max-width: 480px) {
    .input-container {
        width: 90%;
        margin: 0 auto;
    }
    .input-container .button-container {
        margin-top: .5rem;
    }
    .pokemonCard {
        max-width: 90%;
        top: 2.75rem;
    }
}
@media screen and (max-width: 425px) {
    .pokeball {
        bottom: 78%;
        left: 72%;
    }
}
@media screen and (max-width: 375px) {
    .input-container {
        top: 1rem;
    }
    .input-container .button-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: .5rem;
    }
    .input-container .button-container #searchBtn {
        grid-column: span 2;
    }
    .pokemonCard {
        top: 1.75rem;
    }
    .content {
        margin-left: .65rem;
    }
    .measurements {
        display: block;
    }
    .measurements::before {
        display: none;
    }
    .type,
    .moveset {
        align-items: flex-start;
        justify-content: flex-start;
        margin: 0;
    }
    .moveset p {
        width: 80%;
    }
    .stats h2,
    .pokemon-ivs h2 {
        display: inline-block;
    }
    .stats h2::before,
    .pokedex-entry h2::before,
    .pokemon-ivs h2::before,
    .stats h2::after,
    .pokedex-entry h2::after,
    .pokemon-ivs h2::after {
        display: none;
    }
    .stats h2 {
        margin-top: 1rem;
    }
    .stats .stats-wrapper {
        display: block;
    }
    .pokedex-entry {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }
    .pokedex-entry p {
        text-align: left;
        max-width: 90%;
        margin: 0;
    }
    .pokemon-ivs {
        text-align: left;
        margin: .5rem 0;
    }
    .pokemon-ivs h2 {
        margin-bottom: .5rem;
    }
    .progress-bars span {
        left: .45rem;
        top: 40%;
        transform: translateY(-50%);
    }
    progress {
        width: 90%;
    }
}
@media screen and (max-width: 350px) {
    .pokeball {
        width: 110px;
        left: 70%;
        bottom: 80%;
    }
}
@media screen and (max-width: 325px) {
    .pokeball {
        width: 100px;
    }
}
@media screen and (prefers-color-scheme: dark) {
    body {
        background: var(--clr-blk);
    }
}