.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;           /* nascosto di default */
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.overlay.show {
  display: flex;           /* mostra solo quando JS aggiunge la classe */
  opacity: 1;
}

.popup {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 350px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

.close-btn {
  margin-top: 15px;
  background: #c0392b;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.close-btn:hover {
  background: #a93226;
}

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