.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 9500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: min(480px, 92vw);
  background: var(--surface, #1a1a24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 36px;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
}

.modal-overlay.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: transparent;
  color: #8b8b9b;
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.modal-title {
  margin: 0 0 6px;
  font-family: "Syne", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.modal-subtitle {
  margin: 0 0 24px;
  color: #8b8b9b;
  font-size: 15px;
  line-height: 1.5;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-label {
  display: grid;
  gap: 6px;
  color: #8b8b9b;
  font-size: 13px;
}

.modal-input {
  width: 100%;
  background: #22222e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 16px;
  color: #f1f0ef;
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input:focus {
  border-color: #4f46e5;
}

.modal-input::placeholder {
  color: #555;
}

.modal-submit {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  border: none;
  background: #4f46e5;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 4px;
}

.modal-submit:hover {
  background: #6366f1;
  box-shadow: 0 0 24px rgba(79, 70, 229, 0.3);
}

.modal-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.modal-success {
  text-align: center;
  padding: 20px 0;
  color: #10b981;
  font-weight: 600;
  font-size: 16px;
}
