body {
    --sb-track-color: #124758;
    --sb-thumb-color: #081f28;
    --sb-size: 8px;
}

body::-webkit-scrollbar {
    width: var(--sb-size)
}

body::-webkit-scrollbar-track {
    background: var(--sb-track-color);
    border-radius: 0px;
}

body::-webkit-scrollbar-thumb {
    background: var(--sb-thumb-color);
    border-radius: 4px;
    border: 1px solid #232E33;
}

@supports not selector(::-webkit-scrollbar) {
    body {
        scrollbar-color: var(--sb-thumb-color) var(--sb-track-color);
    }
}

#loader {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 120px;
    height: 120px;
    margin: -76px 0 0 -76px;
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #082029;
    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;
}

#loading-p-line {
    position: absolute;
    left: 50%;
    top: 50%;
    margin: 60px 0 0 -50px;
    z-index: 1;
    color: white;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.animate-bottom {
    position: relative;
    -webkit-animation-name: animatebottom;
    -webkit-animation-duration: 1s;
    animation-name: animatebottom;
    animation-duration: 1s
}

@-webkit-keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0px;
        opacity: 1
    }
}

@keyframes animatebottom {
    from {
        bottom: -100px;
        opacity: 0
    }

    to {
        bottom: 0;
        opacity: 1
    }
}

#content {
    display: flex;
    justify-content: center;
    align-items: normal;
    flex-wrap: wrap;
    width: 100%;
    padding-bottom: 20px;
    gap: 20px;
}

.pokemon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 162px;
    width: 100%;
    background-color: #082029;
    border-radius: 16px;
    margin: 20px 0 20px 0;
}

.pokemon:hover {
    cursor: pointer;
    box-shadow:
        0 0 15px 5px rgba(255, 255, 255, 0.6),
        inset 0 0 20px 10px rgba(0, 0, 0, 0.2);

    transform: scale(1.01);
}

.pokemon h3 {
    margin: 10px 10px;
    justify-content: space-around;
}

.pokemon img {
    width: 160px;
    height: 160px;
    object-fit: cover;
}

.headline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.types {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 10px 0 10px 0;
}

.type {
    display: flex;
    justify-content: center;
    align-items: center;

    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 4px;
}

.type img {
    width: 100%;
    height: 100%;
    padding: 20%;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto;
}

.button-68 {
    appearance: none;
    backface-visibility: hidden;
    background-color: #124758;
    border-radius: 8px;
    border-style: none;
    box-shadow: rgba(39, 174, 96, .15) 0 4px 9px;
    box-sizing: border-box;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: normal;
    line-height: 1.5;
    outline: none;
    overflow: hidden;
    padding: 13px 20px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transform: translate3d(0, 0, 0);
    transition: all .3s;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    vertical-align: top;
    white-space: nowrap;
}

.button-68:hover {
    background-color: #1F7586;
    opacity: 1;
    transform: translateY(0);
    transition-duration: .35s;
}

.button-68:active {
    transform: translateY(2px);
    transition-duration: .35s;
}

.button-68:hover {
    box-shadow: rgba(39, 174, 96, .2) 0 6px 12px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: 1000;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.500);

    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 600px;
    height: auto;
}

.pokemon-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 520px;
    width: 100%;
    background-color: #082029;
    border-radius: 16px;
}

.pokemon-details h2:not(.tab h2) {
    margin: 20px 20px;
    justify-content: space-around;
}

.pokemon-details-img {
    background-image: url(./assets/img/pokeball_bizar.png);
    background-position: calc(50% - -78px) 20px;
    background-size: 140px;
    background-repeat: no-repeat;
    width: 300px;
    height: auto;
    object-fit: cover;
}

.headline-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#details-container {
    width: 100%;
    height: auto;
    background-color: #0D3240;
}

.img-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.tab-container {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background-color: #0D3240;
}

.tab {
    background-color: #124758;
    color: white;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}

.tab:hover {
    border-bottom: 4px solid white;
    padding-bottom: 4px;
    display: inline-block;
}

.active {
    border-bottom: 4px solid #FC5B4C;
    padding-bottom: 4px;
    display: inline-block;
}

#details-content-main {
    min-height: 258px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 0 40px 40px;
}

table {
    font-size: 20px;
    color: white;
    border-spacing: 4px;
}

#details-content-stats {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    gap: 8px;
}

.stats-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
}

.bar {
    display: flex;
    flex: 0 0 66%;
    width: 100%;
    height: 20px;
    background-color: #0D3240;
    border-radius: 8px;
    border: #082029 4px solid;
}

.inner-bar {
    height: 100%;
    background-color: #FC5B4C;
    border-radius: 5px;
}

.p-tag {
    display: flex;
    flex: 0 0 33%;
    font-size: 20px;
    color: white;
}

.evolution-chain {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.evo-step {
    font-weight: bold;
    background-color: #eee;
    padding: 4px 8px;
    border-radius: 8px;
}

#details-content-evo-chain {
    min-height: 258px;
    display: flex;
    gap: 16px;
    padding: 10px 0;
    align-items: center;
    justify-content: center;
}

.evolution-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.evo-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.evo-arrow {
    font-size: 32px;
    color: white;
    margin: 0 8px;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px 20px;
    background-color: #082029;
    border-radius: 16px;
}

.back_button {
    width: 40px;
    height: 40px;
    object-fit: cover;
    filter: invert(1);
}

.back_button:hover {
    cursor: pointer;
}

.pokemon_logo {
    height: 40px;
    width: auto;
    object-fit: cover;
}

.forward_button {
    width: 40px;
    height: 40px;
    object-fit: cover;
    filter: invert(1);
}

.forward_button:hover {
    cursor: pointer;
}

.background_image {
    background-image: url(./assets/img/pokemon_enton.png);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    height: 100vh;
    width: auto;
}

#close-button {
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    margin: 20px 20px;
    object-fit: cover;
    font-size: 24px;
    filter: invert(1);
    cursor: pointer;
}

@media (max-width: 520px) {

    .overlay-area {
        width: 100%;
    }

    .pokemon-details h2:not(.tab h2) {
        margin: 4px 20px;
    }

    #close-button {
        margin: 4px 20px;
    }

    .pokemon-details-img {
        width: 180px;
        background-position: calc(50% - -52px) 20px;
        background-size: 80px;
    }

    .tab {
        padding: 4px;
    }

    .type {
        width: 28px;
        height: 28px;
    }

    #details-content-evo-chain {
        flex-direction: column;
        gap: unset;
        padding: unset;
        min-height: 240px;
    }

    #details-content-stats {
        min-height: 240px;
        padding: 0 10px 0 10px;
    }

    #details-content-main {
        min-height: 240px;
        padding: 10px;
    }

    .evolution-entry {
        margin: unset;
    }

    .evolution-entry {
        display: flex;
        flex-direction: row-reverse;
        width: 100%;
        padding: 0 20px 0 20px;
        justify-content: space-around;
        margin: unset;
    }

    .evo-arrow {
        display: inline-block;
        transform: rotate(90deg);
    }

    .evo-img {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }

    .navigation {
        padding: 4px 20px;
    }
}