* {
    box-sizing: border-box;
    margin: 0;
    scroll-behavior: smooth;
}

body {
    background-color: #d1d9e0;
}
main {
    min-height: calc(100vh - 250px); 
}
.hidden {
    display: none !important;
}
header {
    background-color: #0C2C55;
    height: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    padding: 0 20px;
}

.pokeball {
    height: 80px;
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.headline {
    display: flex;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 80px;
    margin-top: 50px;
    color: #0C2C55;
}


.pokemonImg {
    height: 150px;
    width: 150px;
}

.card {
    background-color: #1a3a5c;
    height: 300px;
    width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-8px);
}

.pokemonName {
    color: white;
    padding-top: 20px;
    font-size: 18px;
    font-family: fantasy;
    text-transform: capitalize;
}


#pokedex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1440px;
    gap: 20px;
    margin: 20px auto;
    padding: 20px;
}


footer {
    height: 100px;
    width: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0C2C55;
    padding-top: 20px;
}

#popup {
   display: none;
    position: fixed;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #0C2C55;
    height: 900px;
    width: 550px;
    color: #B8B8B8;
    font-size: 60px;
    font-family: fantasy;
    border-radius: 20px;
    z-index: 2;
}
#popup.active {
    display: flex;
}

.overlay {
   
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}


#popup-img {
    height: 300px;
    display: flex;
    align-items: center;
}

.left_button,
.right_button {
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.left_button:hover,
.right_button:hover {
    transform: translateY(-5px);
}

.left_button img,
.right_button img {
    width: 40px;
    height: 40px;
    display: block;

}

.box_foot {
    position: absolute;
    bottom: 0px;
}

.close_button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    height: 40px;
    width: 40px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
}

.popupMenu {
    display: flex;
    justify-content: center;
    font-size: 20px;
    gap: 20px;
}

.buttonMenu {
    width: auto;
    height: auto;
    border: none;
    background-color: #B8B8B8;
    color: white;
    border-radius: 5px;
}

.stats {
    display: flex;
    flex-direction: column;
    font-size: 20px;
    padding: 10px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    border-radius: 10px;
    padding-left: 10px;
    background-color: #d1d9e0;

}

.statsCard {
    margin-top: 20px;
    height: 300px;
    width: 400px;
    color: #0C2C55;
    border-radius: 10px;
}


.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
}

.abilitiesCard {
    margin-top: 20px;
    height: 300px;
    width: 400px;
    background-color: #d1d9e0;
    color: #0C2C55;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    border-radius: 10px;
    padding-left: 10px;
}

#pokemonInfos {
    padding-top: 10px;
    margin-top: 20px;
    height: 300px;
    width: 400px;
    background-color: #d1d9e0;
    color: #0C2C55;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 25px;
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 50px;
}

.InfoTxt {
    color: #0C2C55;
}

.img-container {
    background-color: white;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}

.loadMore-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 30px;
    margin-top: 30px;
}

.loadMore {
    color: white;
    background-color: #0C2C55;
    height: 60px;
    border-radius: 10px;
}

.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 100px;
    left: 0;
    width: 100%;
    height: calc(100% - 100px);
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;

}

.spinner img {
    width: 200px;
    height: 200px;

}

@media (min-width: 320px) and (max-width: 400px) {
    .overlay {
        z-index: 200;
    }

    header {
        height: 200px;
        width: 100%;
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    main {
        padding-top: 20px;
    }

    .header-inner {
        display: flex;
        flex-direction: column;


    }

    .pokeball {
        height: 80px;
    }

    .search {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    footer {
        position: fixed;
        bottom: 0;
        width: 100%;
    }

    #popup {
        display: none;
        position: fixed;
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #0C2C55;
        height: 700px;
        width: 300px;
        color: #B8B8B8;
        font-size: 40px;
        font-family: fantasy;
        border-radius: 20px;
        z-index: 2;

    }

    #popup-img {
        height: 200px;
        display: flex;
        align-items: center;
    }

    .stats {
        display: flex;
        flex-direction: column;
        font-size: 20px;
        padding: 10px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
        border-radius: 10px;
        padding-left: 10px;
        background-color: #d1d9e0;

    }

    .statsCard {
        margin-top: 20px;
        height: 300px;
        width: 250px;
        color: #0C2C55;
        border-radius: 10px;
    }


    .stat-row {
        display: flex;
        justify-content: space-between;
        padding: 5px 10px;
    }

    .abilitiesCard {
        margin-top: 20px;
        height: 250px;
        width: 250px;
        padding-top: 30px;
        background-color: #d1d9e0;
        color: #0C2C55;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
        border-radius: 10px;
        padding-left: 10px;
    }

    #pokemonInfos {
        padding-top: 10px;
        margin-top: 20px;
        height: 250px;
        width: 250px;
        background-color: #d1d9e0;
        color: #0C2C55;
        display: flex;
        flex-direction: column;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 15px;
        border-radius: 10px;
        padding-left: 10px;
        padding-right: 50px;
    }

    .InfoTxt {
        color: #0C2C55;
    }
}

@media (min-width: 400px) and (max-width: 570px) {
    .overlay {
        z-index: 200;
    }

    header {
        height: 200px;
        width: 100%;
        display: flex;
        flex-direction: column;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    main {
        padding-top: 20px;
    }

    .header-inner {
        display: flex;
        flex-direction: column;


    }

    .pokeball {
        height: 80px;
    }

    .search {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    footer {
        position: fixed;
        bottom: 0;
        width: 100%;
    }

    #popup {
        display: none;
        position: fixed;
        flex-direction: column;
        align-items: center;
        padding-top: 40px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #0C2C55;
        height: 700px;
        width: 380px;
        color: #B8B8B8;
        font-size: 40px;
        font-family: fantasy;
        border-radius: 20px;
        z-index: 2;

    }

    #popup-img {
        height: 200px;
        display: flex;
        align-items: center;
    }

    .stats {
        display: flex;
        flex-direction: column;
        font-size: 20px;
        padding: 10px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 20px;
        border-radius: 10px;
        padding-left: 10px;
        background-color: #d1d9e0;

    }

    .statsCard {
        margin-top: 20px;
        height: 400px;
        width: 300px;
        color: #0C2C55;
        border-radius: 10px;
    }


    .stat-row {
        display: flex;
        justify-content: space-between;
        padding: 5px 10px;
    }

    .abilitiesCard {
        margin-top: 20px;
        height: 250px;
        width: 300px;
        padding-top: 30px;
        background-color: #d1d9e0;
        color: #0C2C55;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 20px;
        border-radius: 10px;
        padding-left: 10px;
    }

    #pokemonInfos {
        padding-top: 10px;
        margin-top: 20px;
        height: 250px;
        width: 300px;
        background-color: #d1d9e0;
        color: #0C2C55;
        display: flex;
        flex-direction: column;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 20px;
        border-radius: 10px;
        padding-left: 10px;
        padding-right: 50px;
    }

    .InfoTxt {
        color: #0C2C55;
    }
}