:root {
  --pokemon-cards-container-bg-color: rgba(209, 218, 218, 0.5);
}

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

html {
  font-size: 62.5%;
  font-family: "Afacad Flux", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  justify-content: flex-start;
  align-items: center;
  background-image: url(https://i.ibb.co/9rFf0XJ/Screenshot-2024-12-07-at-6-00-23-PM.png);
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  min-width: 100vw;
  margin: 0 auto;
  overflow: hidden;
}

.main-heading {
  padding-top: 3rem;
  font-size: 5rem;
  color: #fdbd01;
}

.user-input-container {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

#search-input,
#search-button {
  width: 20%;
  min-width: 300px;
  height: 4rem;
  border-radius: 1rem;
  font-family: "Afacad Flux", sans-serif;
  font-size: 2.2rem;
}

#search-input {
  padding: 2rem 1rem;
}

#search-input:focus {
  outline: none;
  border: 3px solid #f6bd21;
}

#search-button {
  background-color: #fdbd01;
  font-weight: bold;
}

.pokemon-cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  padding: 6rem;
  width: 95%;
  height: 70vh;
  max-height: 90%;
  max-width: 95%;
  background-color: var(--pokemon-cards-container-bg-color);
  border-radius: 3rem;
  overflow-y: scroll;
}

.pokemon-card {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-left: 2rem;
  min-width: 340px;
  max-height: 220px;
  min-height: 220px;
  max-width: 340px;
  border-radius: 3rem;
  background-color: #f6e652;
  box-shadow: 2px 2px 10px #000;
}

.pokemon-card:hover {
  cursor: pointer;
}

.pokemon-name-and-types-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

#types {
  display: flex;
  gap: 1rem;
}

#pokemon-id {
  font-size: 1.8rem;
}

.pokemon-number {
  color: #fff;
  font-size: 2rem;
}

.pokemon-name {
  font-size: 2rem;
  color: #fff;
  font-weight: bold;
}

.pokemon-type {
  display: block;
  text-align: center;
  width: 10rem;
  padding: 1rem;
  border-radius: 2rem;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

#pokemon-sprite {
  height: 250px;
  width: 300px;
  object-fit: contain;
}

#sprite {
  height: 160px;
  width: 160px;
  object-fit: contain;
}

.pokemon-details {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 2rem;
  align-items: center;
  width: 500px;
  height: 500px;
  height: 60%;
  background-color: #f6bd21;
  border: 2px solid #000;
  box-shadow: 2px 2px 10px #000;
  border-radius: 4rem;
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

#pokemon-name {
  font-size: 3rem;
  font-weight: bold;
}

.pokemon-stats-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  height: 100%;
  background-color: #fff;
  border-radius: 4rem;
  padding: 2rem;
}

.pokemon-stats-container h2 {
  font-size: 2.5rem;
  width: 100%;
  max-width: 100%;
}

.pokemon-stats-container p {
  font-size: 1.8rem;
  padding: 0.2rem;
}

.back-button-container {
  display: flex;
  justify-content: space-between;
  width: 80%;
}

.back-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 10rem;
  min-height: 4rem;
  font-size: 2rem;
  border-radius: 1rem;
  background-color: #f6bd21;
  font-weight: bold;
}

.back-button:hover {
  cursor: pointer;
}

.body-cover {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-width: 100vw;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1;
}

@media (max-width: 600px) {
  .pokemon-name {
    font-size: 2rem;
  }

  .pokemon-cards-container {
    max-width: 100%;
    max-height: 55vh;
    padding: 0;
    padding: 1rem 0;
  }

  .pokemon-details {
    width: 95vw;
    height: 80vh;
  }
  .pokemon-stats-container {
    height: 50%;
  }

  .pokemon-stats-container p {
    font-size: 1.5rem;
  }

  .pokemon-stats-container h2 {
    font-size: 2rem;
    margin: 0.5rem 0;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }

  #pokemon-name {
    font-size: 2rem;
    font-weight: bold;
  }
  #pokemon-sprite {
    height: 180px;
    object-fit: contain;
  }
  .pokemon-type {
    font-size: 1.6rem;
  }
}
