/* Chrome, Edge and Safari */
*::-webkit-scrollbar {
    height: 13px;
    width: 13px;
}

*::-webkit-scrollbar-track {
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.05);
}

*::-webkit-scrollbar-track:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

*::-webkit-scrollbar-track:active {
    background-color: rgba(0, 0, 0, 0.1);
}

*::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #F22C05;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #FF6600;
}

*::-webkit-scrollbar-thumb:active {
    background-color: #FF0000;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Roboto, sans-serif;
    margin: 0;
    background: fixed linear-gradient(15deg, rgba(212, 41, 11, 1) 0%, rgba(222, 108, 20, 1) 47%, rgba(253, 187, 45, 1) 100%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
}

.paddings {
    padding: 0 256px;
}

.d-none {
    display: none;
}

header {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.header-visible {
    position: sticky;
    z-index: 999;
    top: 0;
    background-color: rgba(255, 255, 255, 0.25);
}

header img {
    height: 100px;
    margin: 1rem;
}

header input {
    height: 40px;
    border: 3px solid #323099;
    background: #FFCE31;
    border-radius: 20px;
    padding: 0 12px;
    font-family: 'Roboto';
    color: #323099;
    font-size: 1rem;
    font-style: italic;
    font-weight: 600;
}

main {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1rem;
    gap: 1rem;
}

.pokedex-card {
    position: relative;
    width: 80%;
    max-width: 256px;
    padding: 32px;
    min-height: 20vh;
    color: rgba(0, 0, 0, 0.5);
    border-radius: 24px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.pokedex-card:hover {
    cursor: pointer;
    transform: scale(1.02);
    transition: transform 150ms ease-in-out;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.3);
}

.pokedex-card:hover .sm-img {
    transform: scale(1.1);
    transition: transform 150ms ease-in-out;
}

.sm-img {
    height: 100px;
    max-width: 128px;
}

.lg-img {
    width: 50%;
    max-width: 11rem;
    max-height: 11rem;
}

.img-pos {
    position: absolute;
    bottom: 32px;
    right: 32px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.type {
    position: absolute;
    display: flex;
    bottom: 32px;
    left: 32px;
    border-radius: 50%;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.3);

}

.type-img {
    height: 32px;
}

.big-card {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.pokemon-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 85%;
    max-width: 512px;
    height: 65%;
    min-height: 40rem;
    background-color: white;
    z-index: 2;
    border-radius: 32px;
    box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.3);
}

.pokemon-detail svg {
    position: absolute;
    left: 8px;
    rotate: 15deg;
    z-index: 3;
}

.card-background {
    width: 100%;
    height: 50%;
    box-shadow: 2px 5px 15px 0px rgba(0, 0, 0, 0.3);
    border-radius: 48px 48px 120% 20%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 1rem;
}

.base-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem;
    gap: 1rem;
    color: #7AC74C;
    margin-bottom: 1rem;
}

.arrow {
    height: 40px;
    width: 40px;
    z-index: 4;
}

.left {
    rotate: -90deg;
    position: absolute;
    left: -40px;
    top: 50%;
}

.right {
    rotate: 90deg;
    position: absolute;
    right: -40px;
    top: 50%;
}

.close-btn {
    height: 32px;
    rotate: 45deg;
    position: absolute;
    top: 16px;
    right: 16px;
}

.show-btn:hover {
    cursor: pointer;
    transform: scale(1.1);
}

.chart {
    width: 90%;
    height: 35%;
    display: flex;
    justify-content: center;
}

#mychart {
    color: #7AC74C;
}

#myBtn {
    width: fit-content;
    aspect-ratio: 1/1;
    display: inline-block;
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    font-size: 0px;
    border: none;
    outline: none;
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    transition: background-color 0.5s, opacity 0.8s, visibility 0.8s;
    visibility: hidden;
    opacity: 0;
}

#myBtn.show {
    visibility: visible;
    opacity: 1;
}

#myBtn::after {
    font-size: larger;

}

.search {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.loading-screen {
    position: fixed;
    top: calc(50% - 194px/2);
    left: calc(50% - 194px/2);
    width: 194px;
    height: 194px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-weight: 600;
    justify-content: center;
    align-items: center;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.5);
}

#loading {
    height: 56px;
    animation: infinite 1s rotate;
}

@keyframes rotate {
    from {
        rotate: 0deg;
    }

    to {
        rotate: 360deg;
    }
}

@media (width <= 600px) {
    header {
        flex-direction: column;
        padding-bottom: 16px;
    }

    .left {
        left: -24px;
    }
    
    .right {
        right: -24px;
    }
}

@media (width > 1440px) {
    main {
        max-width: 1440px;
        margin: auto;
    }  

    header {
        max-width: 1440px;
        margin: auto;
    }  
    
    .pokedex-card {
        min-height: 16vh;
    }
}

@media (height > 1680px) {
    .pokedex-card {
        min-height: 8vh;
    }
    
}

@media (height < 680px) {
    .pokedex-card {
        min-height: 24vh;
    }
    
}