.pokemon-card {
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 10px;
  margin: 10px;
  width: 200px;
  text-align: center;
  float: left;
  background-color: white;
  cursor: pointer;
}

.pokemon-card:hover {
  transform: scale(1.05);
  box-shadow: 8px 8px 8px rgb(0, 0, 0);
  z-index: 1;
}

.pokemontitle p {
  margin-top: -10px;
}

.type-icon {
  width: 30px;
  height: 30px;
  margin-right: 4px;
  vertical-align: middle;
}

.pokeimg {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background-color: #f0f0f0;
  border-radius: 8px;
  padding: 4px;
  transition: background-color 0.3s ease;
}

.hidden {
  display: none !important;
}

#pokemon-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#pokemon-dialog {
  background: white;
  padding: 32px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease-out;
  display: flex;
  justify-content: center;
}

#dialog-close {
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

#dialog-content img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  padding-top: 8px;
}

.dialogimg {
  width: 200px !important;
  height: 200px !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.dialoginformations {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.dialoginformations p {
  margin: 5px;
}

.statinfo {
  padding-bottom: 22px;
}

.stat {
  margin: 8px 0;
  text-align: left;
}

.stat label {
  font-size: 14px;
  display: block;
  margin-bottom: 4px;
}

.stat-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-bar {
  background-color: #eee;
  border-radius: 6px;
  overflow: hidden;
  height: 20px;
  width: 150px;
}

.stat-bar div {
  height: 100%;
  border-radius: 6px;
  transition: width 0.3s ease-in-out;
}

.stat-value {
  font-size: 14px;
  min-width: 30px;
}

#play-cry {
  font-size: 32px;
  margin-top: 18px;
  margin-bottom: 10px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
}

@media (max-width: 545px) {
  .pokemon-card {
    width: 250px;
  }

  .pokeimg {
    width: 180px;
    height: 180px;
  }

  #pokemon-dialog {
    margin-left: 20px;
    margin-right: 20px;
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .dialoginformations h2 {
    font-size: 16px;
  }

  .dialoginformations p {
    font-size: 14px;
  }

  #dialog-content img {
    width: 36px;
  }
}
