body {
    margin: 0 !important;
}

html {
    /* scroll-behavior: smooth !important; */
    scrollbar-color: black rgb(29, 29, 29);
    scrollbar-width: small;
    /* overflow-x: hidden; */
    height: 100% !important;
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100vw;
    height: 100vh;
    background-image: url(../img/bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

#spinner {
    position: fixed;
    /* Statt absolute */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3b4cca;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.pokeball-spinner {
    width: 100px;
    height: 100px;
    animation: spin 1s linear infinite;
}

.add-scrolling {
    overflow-y: scroll;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #8a8a8a;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a1a1a;
}

/* -------------------------------------------------------------------------------- */
.header {
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 150px;
    padding: 38px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between
}

.header img {
    height: 60px;
    width: 60px;
}

.header-name-logo {
    display: flex;
    gap: 16px;
    align-items: center;
}

input {
    outline: none;
}

.search {
    display: flex;
    align-items: center;
    gap: 16px;
}

.button {
    padding: 2px;
}

.footer {
    font-size: 14px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 150px;
    padding: 0px 38px 0px 38px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.footer a {
    color: white;
    text-decoration: none;
}

/* -------------------------------------------------------------------------------- */
#content {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 1%;
}

.dialog-bg {
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.d-none {
    display: none;
}

.previewCard {
    border-radius: 20px;
    box-shadow: inset 0px 5px 10px 0px rgba(255, 255, 255, 0.7);
    border: 2px solid;
    border-color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    margin: 1%;
    color: white;
    font-size: medium;
    width: 300px;
    overflow: hidden;
}

.previewCard:hover {
    transform: scale(0.98, 0.98);
    transition: 0.4s;
    overflow: visible;
    opacity: 0.9;
    background-color: black !important;
    cursor: pointer;
}

.previewCard:hover .previewCardImg {
    transform: scale(1.55, 1.55);
    transition: 0.4s;
    color: rgba(0, 0, 0, 0.1);
}

.previewCard:hover .pokeball {
    display: none;
}

.previewCard-Pokemon-Id {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    color: black !important;
}

.previewCard-content {
    position: relative;
}

.previewCard-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 110px;
}

.Pokemon-Name {
    font-size: x-large;
}

.Pokemon-Name:first-letter {
    text-transform: uppercase !important;
}

.pokemon-type-tag {
    border: 2px solid;
    border-radius: 5px;
    border-color: black;
    width: 60px;
    text-align: center;
    padding: 2px;
    font-size: 14px;
    color: white;
}

.pokemon-type-tag::first-letter {
    text-transform: uppercase;
}

.previewCardImg {
    height: 150px;
    width: 150px;
    z-index: 2;
}

.pokeball {
    left: 162px;
    top: -10px;
    opacity: 0.2;
    position: absolute;
    width: 90%;
}

/* --------------------------------------DETAIL_HEADER------------------------------------------ */
.detail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 420px;
    overflow-y: scroll;
    max-height: 100%;
    height: 660px;
    border-radius: 20px;
    padding: 14px;
    border: 2px solid;
    border-color: #f3f5fa;
    box-shadow: inset 0px 0px 10px 0px rgba(255, 255, 255, 0.7);
    overflow-y: hidden;
}

.detail::-webkit-scrollbar {
    display: none;
}

.detail-header {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: white;
    border-radius: 10px;
    padding: 8px;
}

.close-card {
    display: flex;
    justify-content: flex-end;
}

.link {
    cursor: pointer;
    text-decoration: none !important;
    font-weight: 500 !important;

}

.link:hover {
    background-color: rgb(245, 245, 245);
    border-radius: 5px;
}

.arrow {
    height: 32px;
    width: 32px;
}

.arrow:hover {
    cursor: pointer;
}

.pokemonCard-id {
    display: flex;
    width: 100%;
}

.types-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pokemonImage-container {
    display: flex;
    justify-content: center;
}

.pokemonImage-background {
    display: flex;
    justify-content: center;
    position: relative;
    height: 230px;
    width: 230px;
    border: 4px solid;
    border-radius: 10px;
}

.pokemonImage {
    height: 220px;
    width: 220px;
    z-index: 1;
}

.pokeball-pokedex {
    opacity: 0.2;
    position: absolute;
    width: 80%;
    left: -160px;
    top: 120px;
}

/* --------------------------------------DETAIL_FOOTER------------------------------------------ */
.back-forward {
    display: flex;
    justify-content: space-between;
    background-color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 8px;
}

.navigation-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 26px;
    background-color: white;
    padding: 0px 8px 0px 8px;
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: #e9ecef !important;
    --bs-dropdown-link-hover-bg: rgb(245, 245, 245) !important;
    padding: 8px !important;
}

#informationContainer {
    display: flex;
    flex-direction: column;
    background-color: white;
    height: 170px;
    font-size: 15px;
    /* height: 180px; */
    padding: 8px;
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.progress {
    border-radius: 5px !important;
}

/* ------------------ABOUT---------------- */
.description {
    font-style: italic;
    margin-bottom: 8px;
    background-color: #e9ecef;
    border-radius: 5px;
    text-align: center;
}

.about-section {
    display: flex;
    justify-content: space-between;
    width: 180px;
    margin-bottom: 6px;
}

.font-weight500 {
    font-weight: 500;
}

.abilities {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* ------------------STATS---------------- */
.stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    margin-bottom: 4px;
}

.stat-name {
    width: 250px;
    gap: 8px;
    font-weight: 550;
    font-size: 14px;
}

.stat-name:first-letter {
    text-transform: uppercase !important;
}

.stat-value {
    text-align: right;
    gap: 8px;
    font-size: 14px;
    width: 45px;
    color: #666666;
}

.bar-height-width {
    height: 20px !important;
    width: 100%;
}

/* ------------------MOVES---------------- */
#movecontainer {
    overflow-y: scroll;
    scrollbar-color: rgb(29, 29, 29) white;
}

.move {
    display: flex;
    width: 112px;
    height: 35px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    margin-bottom: 4px;
    background-color: #e9ecef;
    border: 1px solid;
    border-color: rgba(0, 0, 0, 0.17);
}

.move:hover {
    background-color: rgb(245, 245, 245);
    border: 1px solid;
    border-color: rgba(0, 0, 0, 0.17);
}

.move:hover+.move-details {
    display: flex;
    font-size: 12px;
    margin-bottom: 8px;
    padding: 5px;
    margin-top: 2px;
    flex-direction: column;
    background-color: rgb(245, 245, 245);
    border-radius: 8px;
}

.move-details {
    display: none;
    margin-right: 8px;
}

.bottom-placeholder {
    height: 50px;
    /* DO NOT DELETE THIS MARGIN */
    margin: 10px;
}

/* ------------------EVOLUTIONCHAIN---------------- */
.chain-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: scroll;
    scrollbar-color: rgb(29, 29, 29) white;
}

.chain {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.pokemonchain-img {
    cursor: pointer;
    height: 80px;
    width: 80px;
}

.pokemonchain-img:hover {
    transform: scale(1.10, 1.10);
    box-shadow: 0px 30px 18px -8px rgba(0, 0, 0, 0.1);
    filter: brightness(80%);
}

.pokemonchain-pokemon {
    text-align: center;
}

/* --------------------------------------RESPONSIVE------------------------------------------ */
@media (max-width: 768px) {

    ::-webkit-scrollbar {
        display: none;
    }

    .previewCard {
        margin: 2.5%;
    }

    .header {
        flex-direction: column;
        padding: 10px;
        justify-content: space-evenly;
    }
}

@media (max-width: 600px) {

    #background {
        background-repeat: repeat;
        background-size: 228vw;
        background-position: 52% 128%; 
       
    }
}

@media (max-width: 420px) {

    .dialog-bg {
        background-repeat: repeat;
        background-size: 180vw;
        background-position: 50% 130%;
    }

    .pokemonchain-img {
        height: 70px;
        width: 70px;
    }

    .about {
        overflow-y: scroll;
    }

    .previewCard {
        margin: 3%;
    }

    .chain {
        flex-direction: column;
    }
}


@media (max-width: 360px) {
    #content {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
    }

    .previewCard:hover .previewCardImg {
        transform: scale(1.2, 1.2);
    }

    .previewCard {
        margin: 1%;
    }
}


@media (max-width: 300px) {
    .previewCard {
        width: 250px;
    }

    .previewCardImg {
        height: 130px;
        width: 130px;
    }

    .previewCard:hover .previewCardImg {
        transform: scale(1.2, 1.2);
    }

    .search {
        flex-direction: column;
        gap: 8px;
    }

    .pokemonImage {
        height: 200px;
        width: 200px;
    }

    .bar-height-width {
        height: 0;
        width: 0;
    }
}