.modal-overlay {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.modal-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  max-width: 520px;
  margin: 10% auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: scale(0.9) translateY(-20px);
  opacity: 0;
  transition: all 0.35s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
  color: #444;
  transition: color 0.2s ease;
}

.close:hover {
  color: #000;
}

.modal-body {
  margin-top: 15px;
}

.success-message {
  margin-top: 20px;
  padding: 12px;
  background: #e8f7ed;
  color: #1d6e34;
  font-weight: 500;
  text-align: center;
  border: 1px solid #b5e0c1;
  border-radius: 6px;
  animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}