/* Overlay background */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none; /* hidden by default */
  z-index: 999;
  transition: opacity 0.3s ease;
}

/* Modal box */
.modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  width: 400px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  padding: 25px;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
  font-family: "Segoe UI", sans-serif;
}

/* Show modal */
.overlay.active,
.modal-box.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Close button */
.close-btn {
  float: right;
  font-size: 20px;
  cursor: pointer;
  color: #888;
  transition: color 0.3s ease;
}
.close-btn:hover {
  color: #e74c3c;
}

/* Headings */
.modal-box h2 {
  margin: 0 0 15px;
  font-size: 22px;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-box h2 span {
  font-size: 22px;
  color: #666;
  float:right;
  
}
.modal-box h2 a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}
.modal-box h2 a:hover {
  text-decoration: underline;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
}
form label {
  margin: 8px 0 4px;
  font-size: 14px;
  color: #444;
}
form input {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
form input:focus {
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52,152,219,0.4);
  outline: none;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  margin-top: 15px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: #fff;
}
.btn-secondary {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
}
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Messages */
.log-message,
.signup-message {
  font-size: 13px;
  margin-top: 5px;
  min-height: 20px;
}

/* Divider */
hr {
  margin: 25px 0;
  border: none;
  border-top: 1px solid #eee;
}

/* Hide by default */
#loginOverlay,
#loginModal {
  display: none;
  opacity: 0;
  pointer-events: none;
}

/* Show when .show is added */
#loginOverlay.show,
#loginModal.show {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Hide signup by default */
#signup-container {
  display: none;
}
