/* --------------------------------- */
/* -----------------GLOBAL--------------- */
/* --------------------------------- */


html,
body {
    padding: 0;
    scroll-behavior: smooth;
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    background-color: #ffffff;
    color: #000;
    background:
        radial-gradient(circle at 20% 30%, var(--b-fairy) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--b-water) 0%, transparent 60%),
        radial-gradient(circle at 50% 70%, var(--b-fire) 0%, transparent 55%),
        radial-gradient(circle at 30% 80%, var(--b-psychic) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, var(--b-grass) 0%, transparent 65%),
        radial-gradient(circle at 60% 40%, var(--b-ice) 0%, transparent 50%);
    background-color: #fff;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: blue;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
    outline: none;
}

h3 {
    pointer-events: none;
    color: #ffffff;
    font-weight: 600;
    width: 100%;
    text-align: center;
    text-shadow: #000;
}

.d_none {
    display: none;
}

.noscroll {
    overflow: hidden;
}


/* -----------------SCROLLBAR--------------- */

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f14d;
}

::-webkit-scrollbar-thumb {
    background: #e2e2e2;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* --------------------------------- */
/* -----------------HEADER--------------- */
/* --------------------------------- */

header {
    background-color: #222;
    padding: 1rem 0;
    color: white;

    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

nav {
    max-width: 1440px;
    width: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav_wrapper {
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.nav_wrapper img {
    height: 2rem;
    filter: invert();
}

.nav_list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav_list li a {
    color: white;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
}

.nav_list li a:hover,
.nav_list li a:focus {
    background-color: white;
    color: #004080;
    text-decoration: none;
    outline: none;
}

.headline_wrapper {
    display: flex;
    align-items: center;
    justify-content: start;
}

.headline_wrapper h1 {
    color: rgb(255, 255, 255);
    width: 90px;
    transform: translate(0%, -0%);
    transition: all 600ms ease;
}

.filterButton_container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;

}

.filter_container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.input_and_button {
    display: flex;
    gap: 0.2rem;


}

.input_field {
    height: 1.2rem;
    width: 120px;
    background-color: rgb(255, 255, 255);
    background-image: url('./assets/icons/search-interface-symbol.png');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 15px 15px;

    padding-right: 24px;
    padding-left: 8px;
    border-width: 0px;
}

.filterButton {
    width: 90px;
    height: 1.5rem;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: rgb(255, 255, 255);
    border-radius: 4px;
    cursor: pointer;
    width: fit-content;
    transition: all 600ms ease;
}

.filterButton:hover {
    background: rgba(255, 255, 255, 0.67);
}

.filterButton.selected {
    background-color: #ffcb05;
    color: black;
    font-weight: bold;
}

.filterButton img {
    height: 1rem;

}

/* --------------------------------- */
/* -----------------MAIN--------------- */
/* --------------------------------- */

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

/* -----------------FILTER--------------- */

.filter_wrapper {
    margin-top: 1rem;
    max-width: 1440px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.filterButton_wrapper {
    display: flex;
    flex-direction: column;
    align-items: space-between;
    justify-content: space-between;
    width: 85%;
}



.current_gen_wrapper {
    color: rgb(255, 255, 255);
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    width: 85%;
    font-size: 1.5rem;
    margin: 0.5rem;
    /* mrgin-top: -1.75rem; */
    pointer-events: none;
    transform: translate(0%, -100%);
    transition: all 250ms ease;
}

.current_gen_container {
    display: flex;
    justify-content: center;
}

/* -----------------POKEMON CARDS--------------- */

.main_wrapper {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.main_container {
    gap: 5rem;
    padding: 1rem;
    padding-top: 0;
}

.content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 0.5rem;
    padding: 1rem;
    gap: 1rem;
}

.pokemon_card_wrapper {
    height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    position: relative;
}

.pokemon_card {
    color: white;
    position: relative;
    border-radius: 0.5rem;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.upper_container {
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}

.lower_container {
    background-color: #000000c8;
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

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

.pokemon_card_image {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -75%);
    height: 100px;
    width: auto;
    z-index: 99;
    transition: transform 0.5s ease;
    transform-origin: center center;
    animation: floatUpDown2 2s ease-in-out infinite;
    animation-delay: 0s;
}

@keyframes floatUpDown2 {
    0% {
        transform: translate(-50%, -76.5%);
    }

    50% {
        transform: translate(-50%, -75%);
    }

    100% {
        transform: translate(-50%, -76.5%);
    }
}


.pokemon_card_image:hover {
    transform: translate(-50%, -75%) scale(1.2);
}

.pokemon_card_bg_image {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -75%);
    height: 150px;
    width: auto;
    z-index: 1;
    transition: transform 0.5s ease;
    transform-origin: center center;
    opacity: 0.07;
    pointer-events: none;
}

.pokemon_id_mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0.5rem;
    border-top-left-radius: 50%;
    border-top-right-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.pokemon_id {
    color: #707070;
    text-align: left;
    font-size: 2.7rem;
    font-weight: 900;
    position: absolute;
    bottom: -1.1rem;
    left: -0.75rem;
    z-index: 2;
    pointer-events: none;

}

.divider {
    background-color: #ffffff28;
    width: 100%;
    height: 3px;
    margin: 0.5rem;
}

.type_icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    z-index: 3;
}

.type_icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

}

.type_icon:hover {
    transform: scale(1.25);
}

.pokemon_name_bg_mask {
    width: 100%;
}

.pokemon_name_grid {
    position: relative;
    z-index: 999;
}

/* --------------------------------- */
/* -----------------FOOTER--------------- */
/* --------------------------------- */

footer {
    background-color: #222;
    color: #ccc;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    height: 5rem;
    transition: all 250ms ease;
}

footer a {
    color: #ccc;
}

footer a:hover,
footer a:focus {
    color: white;
    text-decoration: underline;
    outline: none;
}

/* --------------------------------- */
/* -----------------LOADING SPINNER--------------- */
/* --------------------------------- */

.loading_spinner {
    background-color: rgba(255, 255, 255, 0.432);
    position: fixed;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading_spinner img {
    width: 64px;
    height: 64px;
    animation: spin 0.25s linear infinite;
    opacity: 0.8;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.d_none {
    display: none !important;
}


/* --------------------------------- */
/* -----------------SCROLL TO TOP--------------- */
/* --------------------------------- */

.scroll_to_top {
    position: fixed;
    bottom: 1%;
    right: 1%;
    transform: translate(-2%, -10%);
    z-index: 1000;
}

.back_to_top_image {
    width: 3rem;
    height: auto;
    filter: opacity(0.5)
}

.back_to_top_image:hover {
    filter: invert(0.4) opacity(0.5)
}

/* --------------------------------- */
/* -----------------RESPONSIVE--------------- */
/* --------------------------------- */

@media (max-width: 400px) {
    footer {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .input_field {
        width: 90px;
    }
}




@media (max-width: 520px) {
    .current_gen_wrapper {
        transform: translate(0%, 0%);
    }
}

@media (max-width: 605px) {
    nav ul.nav_wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .filter_wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}