body:has(.Dialog[open]) {
  overflow: hidden;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: rgb(164, 231, 220);
}

header {
  background-color: rgba(150, 11, 11, 0.979);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  padding-bottom: 10px;
}

footer {
  background-color: rgba(150, 11, 11, 0.979);
  display: flex;
  justify-content: space-evenly;
  padding: 10px;
  padding-top: 10px;
  margin-top: auto;
}

dialog {
  background-color: rgb(164, 231, 220);
  padding: 0;
  margin: auto;
  width: 40%;
}

button {
  background-color: white;
  color: rgb(0, 0, 0);
  border-radius: 20px;
  border-color: black;
  border-width: 3px;
  height: 30px;
  width: 70px;
  font-size: 16px;
  font-weight: 700;
}

h2 {
  word-break: break-word;
  text-align: center;
}

.logo_title {
  display: flex;
  align-items: center;
}

.logo_title h1 {
  padding-right: 5px;
  font-weight: 600;
  color: white;
  font-size: large;
}

.pokemon_card_wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.pokemon_card {
  margin: 10px;
  border-radius: 15px;
  display: flex;
  padding: 10px;
  height: 300px;
  transition: all 0.5s ease-in-out;
  border-top-left-radius: 150px;
  border-top-right-radius: 120px;
  border-bottom-left-radius: 60px;
  border-bottom-right-radius: 150px;
}

.pokemon_card:hover {
  background-color: rgba(87, 121, 100, 0.877);
  transform: rotate(-3deg);
  cursor: pointer;
}

.pokemon_card #pokemonImageBack {
  opacity: 1;
  transition: all 0.5s ease-in-out;
}

.pokemon_card:hover #pokemonImageBack {
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

#pokemonImageFront {
  position: absolute;
  opacity: 0;
  transition: all 0.5s ease-in-out;
}

.pokemon_card:hover #pokemonImageFront {
  opacity: 1;
  transition: all 0.5s ease-in-out;
}

.pokemon_card_textbox {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: column;
}

.pokemon_card_text {
  text-align: center;
}

.pokemon_card_img {
  height: 200px;
  width: 230px;
  display: flex;
  justify-content: center;
  position: relative;
}

.pokemon_card_img img {
  height: 130px;
}

.card_types {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card_types img {
  width: 120px;
}

.pokemon_dialog_main {
  display: flex;
  justify-content: space-evenly;
}

.pokemon_dialog_main_stats {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: column;
}

.pokemon_dialog_types img {
  width: 150px;
}

.pokemon_dialog_img {
  display: flex;
  justify-content: center;
  max-height: 400px;
  object-fit: cover;
}

.tab {
  overflow: hidden;
  background-color: #74bee9;
}

.tab button {
  background-color: inherit;
  text-align: center;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 5px 12px;
  transition: 0.3s;
}

.tab button:hover {
  background-color: white;
}

.tab button.active {
  background-color: white;
}

.tabcontent {
  display: none;
  padding-top: 5px;
  border-top: none;
  font-size: 20px;
  text-align: center;
}

.stat_wrapper {
  display: flex;
  justify-content: space-evenly;
  font-weight: 600;
}

.DialogFooter {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #ccc;
  background-color: rgba(150, 11, 11, 0.979);
  margin-top: 20px;
}

.spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background-color: rgba(150, 11, 11, 0.979);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.spinner img {
  width: 48px;
  height: 48px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.spinner img {
  width: 64px;
  height: 64px;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .pokemon_dialog_img img {
    object-fit: cover;
    max-height: 300px;
  }
}

@media (max-width: 768px) {

  header,
  footer {
    flex-direction: column;
    align-items: center;
  }

  .pokemon_card {
    flex-direction: column;
    height: auto;
    width: 90%;
  }

  .pokemon_card_img {
    width: 100%;
    height: auto;
  }

  .pokemon_card_img img {
    height: 100px;
  }

  .pokemon_dialog_main {
    flex-direction: column;
    align-items: center;
  }

  dialog {
    width: 90%;
  }

  .stat_wrapper {
    justify-content: center;
    gap: 20px;
  }

  .card_types img {
    width: 80px;
  }

  .pokemon_card {
    align-items: center;
  }

  .tabcontent {
    border-top: none;
    font-size: 14px;    
  }
}

@media (max-width: 380px) {
  .pokemon_dialog_img img {
    object-fit: cover;
    max-height: 200px;
  }
}

@media (min-width: 1440px) {
  .widescreen {
    padding-left: calc((100% - 1240px) / 2);
    padding-right: calc((100% - 1240px) / 2);
  }
}