body {
  font-family: "Inter", sans-serif;
  background-color: #07111f;
  color: #f8fafc;
  min-height: 100dvh;
  background-image:
    radial-gradient(
      circle at 15% -10%,
      rgba(125, 211, 252, 0.22),
      transparent 34rem
    ),
    radial-gradient(
      circle at 85% 0%,
      rgba(52, 211, 153, 0.13),
      transparent 30rem
    ),
    linear-gradient(180deg, #0b1526 0%, #07111f 48%, #050a14 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  /* Prevent horizontal scroll during transitions */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    transparent 28%
  );
}

nav {
  padding: 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

nav button {
  min-height: 2rem;
  border-radius: 999px;
  padding-inline: 0.8rem;
}

main {
  /* border: 1px solid rgba(255, 255, 255, 0.13); */
  /* border-radius: 1.35rem; */
  /* background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.105),
      rgba(255, 255, 255, 0.035)
    ),
    rgba(11, 21, 38, 0.5); */
  /* backdrop-filter: blur(30px) saturate(1.35); */
  -webkit-backdrop-filter: blur(30px) saturate(1.35);
  /* box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 52px rgba(0, 0, 0, 0.28); */
  /* padding: 1.15rem; */
}

/* View container transitions (Login vs Signup vs Reset) */
.view-container {
  display: none;
  opacity: 0;
  transition: opacity 0.22s ease;
  width: 100%;
}

.view-container.active {
  display: block;
  opacity: 1;
}

/* Step transitions within a flow */
.step-container {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateX(20px);
  position: absolute;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

.step-container.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
  pointer-events: auto;
  visibility: visible;
}

/* Responsive input styling */
.input-field {
  transition: all 0.2s ease;
  font-size: 13px;
  padding-top: 0.78rem;
  padding-bottom: 0.78rem;
  border-radius: 0.75rem 0.75rem 0 0;
}

.input-field:focus {
  outline: none;
  border-color: #0ea5e9;
  background-color: rgba(255, 255, 255, 0.055);
}

/* OTP Input specific styling */
.otp-input {
  width: 2.55rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 0.75rem 0.75rem 0 0;
}

form {
  margin: 0;
}

form.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}

label {
  letter-spacing: 0.06em !important;
}

button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

button:disabled,
button.auth-button-loading {
  cursor: wait;
  opacity: 0.78;
  pointer-events: none;
}

.auth-button-loading {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  gap: 0.55rem;
}

.auth-button-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #ffffff;
  border-radius: 999px;
  flex: 0 0 auto;
  animation: auth-spin 0.7s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

button[type="submit"],
form button.bg-nexus-500,
form button.bg-accent-500 {
  min-height: 2.8rem;
  border-radius: 0.95rem !important;
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.2);
}

form button:not(.bg-nexus-500):not(.bg-accent-500) {
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

form button.bg-accent-500 {
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.2);
}

#signup-progress-container,
#reset-progress-container {
  margin-bottom: 2rem !important;
}

#signup-form {
  min-height: 16rem !important;
}

#reset-form {
  min-height: 14rem !important;
}

@media (max-width: 420px) {
  main {
    /* border-radius: 1.1rem; */
    /* padding: 0.9rem; */
  }

  .otp-input {
    width: 2.15rem;
  }
}
