/* === Base Modal Layout === */
.modal, #factModal, #submitModal, #shareModal, #loginModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90vw;
  max-width: 600px;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #ccc;
  border-radius: 8px;
  z-index: 2001;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.modal.show, #factModal.show, #submitModal.show, #shareModal.show, #loginModal.show {
  display: block;
}

.modal-content,
.custom-modal-content {
  padding: 1.5rem;
  text-align: center;
  box-sizing: border-box;
}

/* === Share Modal Styling === */
#shareModal input#shareLinkField {
  width: 100%;
  max-width: 100%;
  font-size: 1rem;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #f9f9f9;
  color: #333;
  box-sizing: border-box;
  overflow-x: auto;
  white-space: nowrap;
}

#shareModal .btn {
  padding: 0.5rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  border-radius: 6px;
}

#shareModal .btn-success {
  background-color: #4caf50;
  color: white;
}

#shareModal .btn-secondary {
  background-color: #bbb;
  color: black;
}

/* === Modal Action Buttons Layout === */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}