
:root {
    --pokedexRed: hsl(353, 66%, 43%);
    --pokedexGlass: hsla(194, 74%, 81%, 0.502);
  }

/* ============================================= GENERAL ======================================================   */ 
* {
    box-sizing: border-box;
    font-family: 'Acme';
}

body {
    font-size: 16px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    background-image: url(./img//background4.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
}

.dNone {
    display: none;
}

/* ============================================= LOGO ======================================================   */ 
.logo {
    position: absolute;
    top: 7%;
    left: 1%;
    height: 50px;
    width: 250px;
    rotate: -15deg;
}

/* ============================================= MAIN CONTENT ======================================================   */ 
 .homeScreenContainer {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 482px;
    height: 560px;
    animation: float 3s ease-in-out infinite;
    transition: width 1s ease-in-out, height 1s ease-in-out;
} 

@keyframes float {
    50%{
        transform: translateY(30px);
    }
}

.homeScreenContainerOpened {
    width: 100%;
    height: 100%;
    animation: none;
    cursor: unset;
}

#shadow {
    position: absolute;
    left: 50%;
    bottom: 2%;
    width: 300px;
    height: 20px;
    margin-top: 2rem;
    transform: translate(-50%, -50%);
    background-color: rgb(143,115,6);
    border-radius: 50%;
    filter: blur(3px);
    animation: shrink 3s ease-in-out infinite;
}

@keyframes shrink {
    0% {width: 320px}
    50% {width: 200px}
    100% {width:320px}
}

@keyframes fadeIn {
    0% {opacity: 0;}
    100% {opacity: 1;}
}

 .subContainer {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    background-color: none;
    background: transparent;
}

.upperHalf {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.pokemonContainer {
    position: absolute;
    width: 450px;
    height: 400px;
    background: var(--pokedexGlass);
    border-radius: 20px;
    box-shadow: 20px 20px 50px rgba(0,0,0,0.5);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(5px);
    transition: width 1s ease-in-out, height 1s ease-in-out;
}

.startButton {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    box-shadow: 0 0 15px 15px var(--pokedexRed);
    cursor: pointer;
}

.startButton:hover {
    scale: 1.1;
}

.startButton > img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.lowerHalf {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}


.corner > img {
    height: 206px;
    width: 241px;
    object-fit: cover;
    transition: width 1s ease-in-out, height 1s ease-in-out;
 }

 .upperHalfImg, .lowerHalfImg {
    display: none;
 }

/* ============================================= POKEMONS ======================================================   */ 
.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.search {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 8%;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.search>div:first-of-type {
    display: flex;
    align-items: center;
    height: 30px;
    width: 280px;
    background-color: rgba(228, 226, 226, 0.973);
    border-radius: 20px;
    padding: 0.2rem;
    border: 1px solid rgba(255,255,255,0.5);
    }

.search>div:first-of-type:hover {
    box-shadow: 1px 1px 5px 5px grey;
}

.search>div:first-of-type>div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search>div:first-of-type>div:last-of-type {
    width: 100%;
}

.search input {
    height: 30px;
    width: 100%;
    background-color: rgba(228, 226, 226, 0.973);
    border-radius: 10px;
    border: none;
    outline: none;
    margin-left: 0.5rem;
}

.logoSmall {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.logoSmall:hover {
    scale: 1.1;
}

.logoSmall img {
    height: 40px;
    width: auto;
}

.icon {
    width: 20px;
    height: 20px;
}

.close {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 30px;
    width: 150px;
    background-color: rgba(228, 226, 226, 0.973);
    border-radius: 20px;
    padding: 0.2rem;
    cursor: pointer;
}

.close:hover {
    box-shadow: 1px 1px 5px 5px grey;
}

.close img {
    height: 20px;
    width: 20px;
}

.pokemonList {
    padding: 0.5rem;
    height: 92%;
    width: 100%;
}

.allPokemons {
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    height: 100%;
    width: 100%;
    gap: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-anchor: none;
 }

/* ================================ SCROLLBAR ====================================== */
.allPokemons::-webkit-scrollbar {
    width: 10px;
    scrollbar-gutter: stable;
}

.allPokemons::-webkit-scrollbar-thumb {
    background-color: #A8A8A8;
    border: 1px solid white;
    border-radius: 6px;
}

.allPokemons::-webkit-scrollbar-button {
    color: #A8A8A8;
}

.allPokemons::-webkit-scrollbar-button {
    display: block;
    background-repeat: no-repeat;   
    background-size: 50%;
    background-position: center;
}

.allPokemons::-webkit-scrollbar-button:vertical:start:increment {
    background-image: url(./img/icons/upArrow.svg);
    background-size: 10px 4px;  
}

.allPokemons::-webkit-scrollbar-button:vertical:start:decrement {
    display: none;
}

.allPokemons::-webkit-scrollbar-button:vertical:end:increment {
    display: none;
}

.allPokemons::-webkit-scrollbar-button:vertical:end:decrement {
    background-image: url(./img/icons/downArrow.svg);   
    background-size: 10px 4px;  
}
/* ================================================================================== */
.pokemonCard {
    cursor: pointer;
    height: 15rem;
    width: 13.5rem;
}

.pokemonCard:hover {
    transform: scale(1.05);
}

.cardHeader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 10px;
    background-color: white;
    background-image: url(./img/icons/pokemon.png);
    background-position: center;
    background-size: 80%;
    background-repeat: no-repeat;
}

.cardHeaderBig {
    border-radius: 10px 10px 0 0;
}

.cardHeader > div:first-of-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.closePokemonCard {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 25px;
    height: 25px;
}

.closePokemonCard:hover {
    scale: 1.1;
}

.closePokemonCard > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.closePokemonCard span {
    font-size: 2rem;
    color: white;
    -webkit-text-stroke: 0.5px black;
}

.favorite > img {
    height: 20px;
    width: 20px;
}

.favorite > img:hover {
    transform: scale(1.1);
}

.indexNumber {
    color: white;
    -webkit-text-stroke: 0.5px black;
    font-size: 28px;
}

.pokemonImg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 7.5rem;
    width: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.pokemonImg > img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.cardHeader > div:last-of-type {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.name {
    font-size: 1.5rem;
    color: white;
    -webkit-text-stroke: 0.5px black;
}

.type {
    border-radius: 20px;
    padding: 0.2rem;
    font-size: 0.8rem;
    background-color: rgba(228, 226, 226, 0.973);
    width: 80px;
    text-align: center;
    border: 1px solid white;
    color: white;
}

.bigPokemonCardContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    display: none;
    background: rgba(0,0,0,0.7);
    z-index: 5;
}

.display {
    display: flex;
}

.bigPokemonCard {
    display: flex;
    flex-direction: column;
    height: 40rem;
    width: 22rem;
    border-radius: 10px;
    background-color: white;
}

.cardHeader {
    display: flex;
    flex-direction: column;
}

.indexNumberBig {
    font-size: 2rem;
    color: white;
    -webkit-text-stroke: 0.5px black;
}

.pokemonImgBig {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10rem;
    width: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.pokemonImgBig > img{
    object-fit: contain;
    width: 100%;
    height: 100%;
}

.nameBig {
    font-size: 2rem;
    text-align: center;
    color: white;
    -webkit-text-stroke: 0.5px black;
}

.typeBig {
    width: 110px;
    text-align: center;
    font-size: 1.5rem;
    border-radius: 20px;
    padding: 0.2rem;
    background-color: rgba(228, 226, 226, 0.973);
    border: 1px solid white;
    color: white;
}


.pokemonDataContainer {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    border-radius: 10px;
}

.pokemonDataContainer > div {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    border-radius: 10px 10px 0 0;
    border-top: 1px solid white;
}

.contentContainerBackground {
    background-color: white;
    border-radius: 10px 10px 10px 10px !important;
}

.info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    width: 100%;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
}

.info > div {
    font-size: 1.2rem;
}

.info > div:first-of-type {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 5px;
    width: 80px;
}

.info img {
    width: 20px;
    height: auto;
}

.infoContent, .statsContent,.movesContent {
    width: 100%;
}

.movesContent {
    z-index: 1;
    overflow: hidden;
    border-radius: 0 0 10px 10px;
    height: 200px;
    padding: 1rem 2rem 1rem 2rem;
}

.infoData, .statsData, .movesData {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    padding: 0.5rem;
    padding: 1rem 2rem 1rem 2rem;
    gap: 0.5rem;
    height: 100%;
}

.movesData {
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: scroll;
    overflow: auto;
    border-radius: 0 0 10px 10px;
    padding: 0;
}

/* ================================ SCROLLBAR ====================================== */
.movesData::-webkit-scrollbar {
    width: 10px;
    scrollbar-gutter: stable;
}

.movesData::-webkit-scrollbar-thumb {
    background-color: #A8A8A8;
    border: 2px solid white;
    border-radius: 6px;
}

.movesData::-webkit-scrollbar-button {
    color: #A8A8A8;
}

.movesData::-webkit-scrollbar-button {
    display: block;
    background-repeat: no-repeat;   
    background-size: 50%;
    background-position: center;
}

/* .movesData::-webkit-scrollbar-button:vertical:start:increment {
    background-image: url(./img/icons/upArrow.svg);
    background-size: 10px 4px;  
} */

.movesData::-webkit-scrollbar-button:vertical:start:decrement {
    display: none;
}

.allPokemons::-webkit-scrollbar-button:vertical:end:increment {
    display: none;
}

/* .allPokemons::-webkit-scrollbar-button:vertical:end:decrement {
    background-image: url(./img/icons/downArrow.svg);   
    background-size: 10px 4px;  
} */
/* ================================================================================== */
.infoData > div, .statsData > div, .movesData > div  {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}

.infoData > div > div:first-of-type {
    width: 105px;
}

.infoData > div > div:last-of-type {
    font-weight: bold;
    width: 100%;
}

.statsData > div > div:first-of-type {
    width: 105px;
}

.statsData > div > div:nth-of-type(2) {
    font-weight: bold;
    width: 25px;
}

.movesData > div > div:first-of-type {
    width: 30px;
}

.movesData > div > div:last-of-type {
    font-weight: bold;
}

.progressBar {
    width: 140px;
    background-color: rgb(223, 219, 219);
    border-radius: 10px;
}

.progress {
    width: 1%;
    height: 5px;
    background-color: rgb(105, 196, 248);
    border-radius: 10px;
}

.gender > div:last-of-type {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.gender > div:last-of-type > div {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
}

.genderIcon {
    height: 20px;
    width: 20px;
}

/* ======================= POKEMON TYPES ================================ */
.normal {
    background-color: rgb(168, 168, 120, 0.8);
}

.fire {
    background-color: rgb(240, 128, 48, 0.8);
}

.water {
    background-color: rgb(104, 144, 240, 0.8);
}

.grass {
    background-color: rgb(120, 200, 80, 0.8);
}

.electric {
    background-color: rgb(248, 208, 48, 0.8);
}

.ice {
    background-color: rgb(152, 216, 216, 0.8);
}

.fighting {
    background-color: rgb(192, 48, 40, 0.8);
}

.poison {
    background-color: rgb(160, 64, 160, 0.8);
}

.ground {
    background-color: rgb(224, 192, 104, 0.8);
}

.flying {
    background-color: rgb(168, 144, 240, 0.8);

}

.psychic {
    background-color: rgb(248, 88, 136, 0.8);
}

.bug {
    background-color: rgb(168, 184, 32, 0.8);
}

.rock {
    background-color: rgb(184, 160, 56, 0.8);
}

.ghost {
    background-color: rgb(112, 88, 152, 0.8);
}

.dark {
    background-color: rgb(112, 88, 72, 0.8);
}

.dragon {
    background-color: rgb(112, 56, 248, 0.8);
}

.steel {
    background-color: rgb(184, 184, 208, 0.8);
}

.fairy {
    background-color: rgb(240, 182, 188, 0.8);
}

/* ============================================= LOAD NEXT POKEMON ======================================================   */ 
#anchor {
    overflow-anchor: auto;
    height: 1px;
    width: 100%;
}

.loadNextPokemon {
    position: fixed;
    bottom: 50px;
    left: calc(50% - 100px);
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    width: 200px;
    border-radius: 10px;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 5s;
}

.loadNextPokemon:hover {
    cursor: pointer;
    scale: 1.1;
}

.loadNextPokemon > div {
    color: white;
}

.loadNextPokemon > img{
    width: 25px;
    height: 25px;
}

/* =================================== LOADING ANIMATION ======================================= */
.loader-wrapper {
    width: 25px;
    height: 25px;
    display: none;
}

.loader-wrapper .loader {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    animation: rotate 5s linear infinite;
    }

.loader-wrapper .loader-outer {
    border-top-color: #4bc8eb;
    border-bottom-color: orange;
}

.loader-wrapper .loader-inner {
    border-top-color: #36f372;
    border-bottom-color: #fff;
}

@keyframes rotate {
    0% {
        transform: scale(1) rotate(360deg);
    }
    50% {
        transform: scale(0.8) rotate(-360deg);
    }
}

/* =================================== RESPONSIVENESS ========================================== */
@media(max-width: 720px) {
    .close {
        width: 50px;
    }
    .close > div {
        display: none;
    }
    .logoSmall {
        display: none;
    }
    .search {
        gap: 20px;
    }
    .logo {
        top: 20px;
    }
    .logo > img {
        width: 250px;
        height: auto;
    }
}

@media(max-width: 500px) {
    .subContainer {
        width: 95%;
        height: 95%;
    }
    
    .corner > img {
        display: none;
    }
    .pokemonContainer {
        width: 90%;
        height: 90%;
    }
    .homeScreenContainer {
        animation: none;
        transition: none;
    }
    #shadow {
        display: none;
    }

    .upperHalfImg, .lowerHalfImg {
        display: block;
        height: auto;
        width: 100%;
    }
}

@media(max-width: 400px) {
    .bigPokemonCard {
        width: 90%;
    }

    .search {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }
}



