.close {
  float: right;
  font-size: 20px;
  cursor: pointer;
}


.modal {
  display: flex; /* siempre flex */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;

  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;

  transform: scale(0.8);
  transition: transform .3s ease;
}

/* 🔥 estado activo */
.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal.show .modal-content {
  transform: scale(1);
}