:root {
    --menu-acc: rgb(238, 238, 238);
    --effect: all 275ms ease-in-out;
    --bgcolor: rgb(249, 249, 249);
    --borders: 1px solid lightgray
}

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

.fire {
    background-color: rgb(253, 125, 36);
}

.bug, .grass {
    background-color: rgb(114, 159, 63);
}

.water,.stellar {
    background-color: rgb(69, 146, 196);
}

.poison,.psychic,.fairy,.flying {
    background-color: rgb(185, 127, 201)
}

.steel,.normal {
    background-color: rgb(158, 183, 184)
}

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

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

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

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


* {
    margin: 0;
    text-decoration: none;
    box-sizing: border-box;
    font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

body {
    background-color: var(--bgcolor);
    position: relative;
    cursor: default;
    scrollbar-face-color:#8080FF;
}

html{
    scroll-behavior: smooth;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 16px;
}

::-webkit-scrollbar-track {
    background-color: var(--menu-acc);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: url("../img/pokeball.png") #ffc107;
}

/* Buttons */
::-webkit-scrollbar-button:single-button {
    background-color: var(--menu-acc);
    display: block;
    border-style: solid;
    height: 13px;
    width: 16px;
  }

/* Up */
::-webkit-scrollbar-button:single-button:vertical:decrement {
    border: none;
    background-image: url("./img/pokeball_top.png");
  }

/* Down */
::-webkit-scrollbar-button:single-button:vertical:increment {
    border: none;
    background-image: url("./img/pokeball_bottom.png");

}

::-webkit-scrollbar-thumb,
::-webkit-scrollbar-button:single-button:vertical:decrement,
::-webkit-scrollbar-button:single-button:vertical:increment {
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.progress{
    position: sticky;
    top:70px;
    z-index: 10000;
    border-top-left-radius: 0px !important;
    border-bottom-left-radius: 0px !important;
    border-top-right-radius: 0px !important;
    border-bottom-right-radius: 0px !important;

}

#progressBar{
    color:var(--bgcolor) !important;

}

.title{
    padding-inline: 20px;
    position: sticky;
    display: flex;
    justify-content: space-between;
    align-items: center;
    top:0;
    height: 70px;
    z-index:1000;
    background-color: var(--bgcolor);
    text-align: center;
    box-shadow: 0px -2px 10px rgba(0,0,0,0.2);
}

#pokedexTitle{
    margin: 0;
}

.blur {
    filter: blur(3px);
}

.searchBoxContainer{
    position: relative;
    display: flex;
    flex-grow: 1;
    justify-content: center;
}

#searchBox{
    height: 40px;
    border-radius: 25px;
    width: 30%;
    text-indent: 15px;
    width: 100%;
    max-width: 450px;
    margin-inline: 20px;
    background-size: contain;
}

#searchBox:focus{
    outline: none;
    border-color: #ffc107;
}


#pokedex-container {
    position: fixed;
    background-color: rgba(0, 0, 0, .2);
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 100;

}

#pokedex-top {
    height: 260px;
    color: white;
    padding: 24px;
    border-radius: 10px;
}

.close img{
    width: 50px;
    opacity: .5;
    transition: var(--effect);
}

.close img:hover{
    opacity: 1;
    transition: var(--effect);
}

.pokeball{
    display: flex;
    align-items: center;
    transition: var(--effect);
    gap: 10px;
}

#pokeball{
    cursor: pointer;
    width: 60px;transition: var(--effect);
}

.button{
    position: absolute;
    display: flex;
    flex-direction: row;
    width:40px;
}

.button img{
    width: 100%;
}

.next-button{
    right: 20px;
}

.previous-button{
    left:20px;
}

.next-button,
.previous-button{
    transition: var(--effect);
    cursor: pointer;
    top: 130px;
    opacity: .5;
}

.next-button:hover,
.previous-button:hover{
    transition: var(--effect);
    opacity: 1;
}

.upbutton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    cursor: pointer;
    opacity: .5;
    transition: opacity 0.3s ease;
}

.upbutton:hover {
    opacity: 1;
    animation: moveUpAndDown 500ms ease 2;
}

@keyframes moveUpAndDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

#pokeball:hover{
    animation: rotateBall 500ms ease-in-out;
    transition: var(--effect);
}

@keyframes rotateBall{
    0%{ 
        transform: rotate(0);
    }
    100%{
        transform: rotate(360deg);
    }
}

.pokedex-inner-container{
    position: fixed;
    height: 560px;
    top: 10%;
    bottom: 0;
    left: 0;
    right: 0;
}

.pokedex-bottom {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 40px 40px 10px 10px;
    margin-top: -40px;
    min-height: 100px;
    height: 60vh;
    flex-direction: column;

}

#pokemonImage {
    width: 200px;
    margin-top: -160px;
}

#overview-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background-color: var(--bgcolor);
    padding-top: 20px;
    gap: 10px;
}

#overview-container > .smallCard:hover{
    transition: var(--effect);
    box-shadow: 0px 0px 5px 4px rgba(0,0,0,0.3);
}

.loadingBarContainer{
    padding-bottom: 20px;
}

.smallCard {
    position: relative;
    color:white;
    padding: 10px;
    width: 250px;
    height: 250px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.1);
    transition: var(--effect);
}

.smallCard h2{
    padding-bottom: 10px;
}

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

.type{
    padding: 5px;
    margin-bottom: 5px;
    width: 100px;
    background-color: rgba(255, 255, 255, .2);
    border-radius: 25px;
}

.smallPokemon{
    position: absolute;
    width: 150px;
    right:0px;
    bottom: 00px; 
    transition: var(--effect);
}

.smallCard:hover > .smallPokemon{
    transform: scale(1.1) translate(-1px, -5px);
    transition: var(--effect);
}

#pokemonStats {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: var(--menu-acc);
    width: 80%;
    height: 80%;
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
    border-left: var(--borders);
    border-bottom: var(--borders);
    border-right: var(--borders);
}

#statsTable {
    width: 100%;
    padding: 20px;
    height: 70%;
    text-align: center;
}

.statsMenuBar {
    display: flex;
    justify-content: space-between;
    text-align: center;
    width: 80%;
    margin-top: 0;
    cursor: pointer;

}

.statsMenuBar div {
    border-radius: 10px 10px 0 0;
    padding: 5px;
    flex-grow: 1;
}

.statsButton{
    border-bottom: var(--borders);
}

.active {
    background-color: var(--menu-acc);
    border-left: var(--borders);;
    border-top: var(--borders);
    border-right: var(--borders);
    border-bottom: none;
}

.statHead{
    font-size: large;
    font-weight: bold;
    padding-bottom: 10px;
}

.statTitle{
    font-weight: bold;
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
}

.statBody{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.statValue{
    border: var(--borders);
    border-radius: 25px;
    padding: 10px;
    text-align: center;
    background-color: var(--bgcolor);
}

.moveStats{
    flex:1;
    text-wrap: nowrap;
    text-align: center;
}

#pokedex {
    position: relative;
    top: 30px;
    left: 0;
    right: 0;
    width: 90%;
    max-width: 500px;
    margin: auto;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 10px;
    right: 40px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.d-none {
    display: none !important;
}

.invisible{
    cursor: default;
    opacity: 0;
}

.tooltip .tooltiptext {
    width: 120px;
    top: 100%;
    left: 50%;
    margin-left: -60px;
}


#loadMore{
    background-color: var(--bgcolor);
    display: flex;
    justify-content: center;
    padding: 20px;
}

.loadMoreBtn{
    background-color: rgba(0,0,0,.1);
    border-radius: 25px;
    padding: 13px;
    width: 50%;
    max-width: 250px;
    height: 50px;
    text-align: center;
    cursor: pointer;
    transition: var(--effect);
}

.loadMoreBtn:hover{
    background-color: rgba(0,0,0,.2);
    transition: var(--effect);
}

.autoload{
    width: 25px;
    opacity: .2;
    cursor: pointer;
}

.autoloadActive{
    animation: rotateBall 500ms ease-in-out;
    opacity: 1 !important;
}

.noScroll{
    overflow: hidden;
}

@media (max-width: 530px) {
    .pokedex-bottom {
            height: 440px;
            margin-top: -200px;
    }

    .loadMoreBtn{
        width: 70%;
    }

    #pokedexTitle{
        display:none;
    }

    #pokemonStats {
        background-color: var(--menu-acc);
        overflow-y: auto;
        border-radius: 0 0 10px 10px;
        height: 77%;
        width: 90%;

    }

    #pokemonImage {
        width: 120px;
        margin-top: -70px;
    }

    #pokedex-top {
        height: 200px;
        margin-bottom: 120px;
    }

    #pokedex {
        height: 100%
    }

    .statValue{
        border: var(--borders);
        border-radius: 25px;
        padding-block: 5px;
        font-size: small;
    }

    .statsMenuBar div{
        font-size: smaller;
    }

    .statsMenuBar{
        width: 90%;
    }

    .button img{
        width: 80%
    }

    .next-button,
    .previous-button {
        top: 130px;
    }

    .smallCard {
        position: relative;
        padding: 10px;
        width: 120px;
        text-align: center;
        height: 120px;
        border-radius: 10px;
        cursor: pointer;
        color:white;
        box-shadow: 0px 0px 3px 0px rgba(0,0,0,0.1)
    }

    .smallCardTitle{
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items:top;
    }

    .smallCardId{
        font-size: x-small;
    }

    .smallPokemon{
        width: 70px;
    }

    h2{
        font-size: smaller;
    }

    .type{
        width: 40px;
        font-size: xx-small
    }

    .statTitle{
        font-size: smaller;
    }
}