/* ===== BETA ACCESS MODAL ===== */

/* Backdrop */
.beta-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 12, 20, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

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

/* Modal */
.beta-modal {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 40px 36px 36px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Close button */
.beta-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.beta-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.beta-modal__close svg {
  width: 14px;
  height: 14px;
  stroke: #6b7280;
  stroke-width: 2;
}

/* Lock icon */
.beta-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eef2ff 0%, #dbeafe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.beta-modal__icon svg {
  width: 24px;
  height: 24px;
  stroke: #135bec;
  stroke-width: 1.8;
  fill: none;
}

/* Text */
.beta-modal__title {
  font-family: "Instrument Serif", serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.2;
}

.beta-modal__desc {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 28px;
}

/* Form */
.beta-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.beta-modal__input-wrap {
  position: relative;
}

.beta-modal__input {
  width: 100%;
  padding: 14px 16px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  box-sizing: border-box;
  letter-spacing: 0.08em;
  text-align: center;
}

.beta-modal__input::placeholder {
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.beta-modal__input:focus {
  background: #fff;
  border-color: #135bec;
  box-shadow: 0 0 0 3px rgba(19, 91, 236, 0.1);
}

/* Error state */
.beta-modal__input.is-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  animation: shake 0.4s ease;
}

/* Submit button */
.beta-modal__submit {
  width: 100%;
  padding: 14px 20px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #0f172a;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease;
  position: relative;
  overflow: hidden;
}

.beta-modal__submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.beta-modal__submit:active {
  transform: translateY(0);
}

.beta-modal__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success state */
.beta-modal__submit.is-success {
  background: #059669;
  pointer-events: none;
}

/* Error message */
.beta-modal__error {
  font-size: 0.82rem;
  color: #ef4444;
  text-align: center;
  min-height: 20px;
  margin: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.beta-modal__error.is-visible {
  opacity: 1;
}

/* Divider */
.beta-modal__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 4px;
}

.beta-modal__divider::before,
.beta-modal__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.beta-modal__divider span {
  font-size: 0.78rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Request access link */
.beta-modal__request {
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.beta-modal__request a {
  color: #135bec;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.beta-modal__request a:hover {
  color: #0e49c0;
}

/* Shake animation */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* Spinner for loading state */
.beta-modal__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .beta-modal {
    padding: 32px 24px 28px;
    border-radius: 16px;
    max-width: 95%;
  }

  .beta-modal__title {
    font-size: 1.4rem;
  }

  .beta-modal__input {
    padding: 12px 14px;
  }

  .beta-modal__submit {
    padding: 12px 16px;
  }
}
