.overlay {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%; 
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.overlay.active {
  display: flex;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  z-index: 10;
}
.close-btn:hover {
  background: #ddd;
}

.dialog-card {
  display: flex;
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 900px;
  margin: auto;
  position: relative;
}

.dialog-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
}

.dialog-pokemon-sprite {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  display: block;
}

.dialog-right {
  flex: 1;
  border-radius: 12px;
  padding: 20px;
}

.dialog-pokemon-id {
  font-size: 0.9rem;
  opacity: 0.8;
  display: block;
}

.dialog-pokemon-name {
  font-size: 2rem;
  font-weight: bold;
  margin: 5px 0 15px;
  text-transform: capitalize;
}

.type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: bold;
  margin-right: 8px;
  text-transform: capitalize;
}

.dialog-description {
  font-size: 0.95rem;
  margin: 15px 0;
}

.dialog-details {
  display: flex;
  gap: 15px;
  margin: 15px 0;
}

.detail-btn {
  background: #eee;
  color: #333;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
}

.detail-btn span {
  font-weight: normal;
  font-size: 0.8rem;
}

.dialog-stats-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.stat-box {
  flex: 1 1 30%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  color: #fff;
}

.stat-box.hp { background-color: #f44336; }
.stat-box.atk { background-color: #ff9800; }
.stat-box.def { background-color: #fbc02d; color:#222; }
.stat-box.spa { background-color: #2196f3; }
.stat-box.spd { background-color: #8bc34a; }
.stat-box.speed { background-color: #e91e63; }

.dialog-abilities-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ability-chip {
  background: #f0f0f0;
  color: #333;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: bold;
  text-transform: capitalize;
}

.dialog-navigation {
  margin-top: 56px;
  display: flex;
  justify-content: center;
  gap: 96px;
}

.nav-btn {
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}
.nav-btn:hover {
  background: #ddd;
}