header {
    background-color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    border-bottom: 4px solid black;
    width: 100%;
}

#headerWrapper {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}

header div {
    display: flex;
    align-items: center;
}

header img {
    width: 128px;
}

header input {
    height: 32px;
    border: 4px solid black;
    padding: 2px;
}

main {
    background-color: rgb(211, 51, 51);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

#pokemonContainer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px;
    width: 100%;
    text-align: center;
}

.pokeCard {
    cursor: pointer;
    border: 4px solid black;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;    
    background-color: white;
}

.pokeCard:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
    transition: box-shadow 0.3s ease-in-out;
    transition: transform 0.5s ease-in-out;
}

.pokeCard img {
    width: 100%;
}

.pokeCardTitle {
    font-weight: bold;
    display: flex;
    justify-content: center;
    border-bottom: 4px solid black;
    width: 100%;
}

.pokeCardTitle p{
    margin: 16px;
    font-size: larger;
}

.pokeTypes {
    display: flex;
    border-top: 4px solid black;
    width: 100%;
    height: 100%;
}

.pokeTypes div {
    padding: 8px;
    width: 50%;
    font-weight: bold;
    text-align: center;
}

#morePkmnButton {
    margin-bottom: 24px;
    height: 48px;
    padding: 8px;
    cursor: pointer;
    background-color: white;
    font-weight: bold;
    border: 4px solid black;
}

#morePkmnButton:hover {
    background-color: lightgray;
}

#pokePopUp {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    border: 4px solid black;
    width: 300px;
    height: 650px;
    display: flex;
    background-color: white;
}

#pokePopUpContainer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#pokePopUpContainer img{
    width: 100%;
}

#popUpTitle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    border-bottom: 4px solid black;
}

#popUpTitle p {
    margin: 8px;
    font-weight: bold;
    font-size: larger;
}

#popUpTypes {
    width: 100%;
    display: flex;
    justify-content: left;
    border-top: 4px solid black;
}

#popUpTypes p {
    width: 50%;
    padding: 8px;
}

#subNavigation {
    width: 100%;
    display: flex;
    background-color: black;
    color: white;
}

#subNavigation p:first-child {    
    border-bottom: 4px solid rgb(211, 51, 51);
}

#subNavigation p {
    width: 50%;
    text-align: center;
    margin: 4px;    
    border-bottom: 4px solid black;
}

#subNavigation p:hover {
    border-bottom: 4px solid rgb(211, 51, 51);
    cursor: pointer;
}

#cardInfoSelection {
    width: 100%;
    display: flex;
    flex-direction: column;
}

#cardInfoSelection div {
    display: flex;
    justify-content: space-evenly;
    padding: 3px;
}

#cardInfoSelection div:last-child {
    margin-bottom: 8px;
}

#cardInfoSelection span {
    width: 50%;
}

#switchButtons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: end;
    position: absolute;
    bottom: 0;
}

#previousButton, #nextButton {
    height: 48px;
    width: 100px;
    padding: 8px;
    cursor: pointer;
    background-color: white;
    font-weight: bold;
    border-top: 4px solid black !important;
    border-width: 0;
}

#previousButton {
    border-right: 4px solid black !important;
}

#nextButton {
    border-left: 4px solid black !important;
}

#previousButton:hover, #nextButton:hover {
    background-color: lightgray;
}

footer {
    border-top: 4px solid black;
    width: 100%;
}

footer div{
    display: flex;
    align-items: center;
    justify-content: center;
}

footer img {
    width: 128px;
}

.wt1440 {
    max-width: 1440px;;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.4) !important;
    z-index: 99;
  }
  
  .popUp {
    position: absolute;
    z-index: 100;
  }
  
  .hidden {
    display: none !important;
  }

  @media (max-width: 1050px) {
    #pokemonContainer {
        grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 800px) {
    #pokemonContainer {
        grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 540px) {
    #pokemonContainer {
        display: flex;
        flex-direction: column;
    }

    header img {
        width: 64px;
    }

    header input {
        margin-bottom: 8px;
        width: 200px;
    }

    #headerWrapper {
        display: flex;
        flex-direction: column;
    }

    #pokemonContainer {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .pokeCard {
        max-width: 400px;
        width: 80%
    }

    .pokeCard:hover {
        box-shadow: none;
        transform: none;
    }

    footer img {
        width: 64px;
    }
  }

  /* Loading Screen */

  #loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(-45deg, rgb(211, 51, 51) 5%, white , black );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
  #loadingScreen img {
    width: 100px;
    height: 100px;
    animation: spin 0.5s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }