@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Utilities ──
   Generic hide helper. The JS toggles a bare "hidden" class on plain elements
   (e.g. #forgotStep2), so a rule that is not tied to any element type is required.
   Also defined in app.css — login.html and profile-setup.html only load auth.css. */
.hidden { display: none !important; }

body {
  background: #060010;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #f5f5f7;
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center,
    rgba(217, 70, 239, 0.22) 0%,
    rgba(168, 85, 247, 0.12) 40%,
    transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 400px;
  margin: 20px;
  padding: 40px 32px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 40px 80px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 1;
}

/* ── Logo ── */
.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-text {
  display: block;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(135deg, #d946ef, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  display: block;
  font-size: 12px;
  color: #8e8e93;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Tab switcher ── */
.tab-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #8e8e93;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: 'Inter', sans-serif;
}

.tab.active {
  background: rgba(217, 70, 239, 0.15);
  color: #d946ef;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.2);
}

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form.hidden { display: none; }

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 11px;
  color: #8e8e93;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  color: #f5f5f7;
  font-size: 15px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: 'Inter', sans-serif;
}

.input-group input:focus {
  border-color: rgba(217, 70, 239, 0.5);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.input-group input::placeholder { color: #48484a; }

/* ── Button ── */
.btn-primary {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #d946ef, #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
  font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(217, 70, 239, 0.55);
}

/* ── Floating Labels ── */
.float-group {
  position: relative;
}

.float-group input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 22px 16px 8px;
  color: #f5f5f7;
  font-size: 15px;
  outline: none;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-family: 'Inter', sans-serif;
}

.float-group input:focus {
  border-color: rgba(217, 70, 239, 0.5);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
  background: rgba(255, 255, 255, 0.08);
}

.float-group label {
  position: absolute;
  left: 16px;
  top: 15px;
  font-size: 15px;
  color: #48484a;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.float-group input:not(:placeholder-shown) + label,
.float-group input:focus + label {
  top: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #d946ef;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Messages ── */
.error-msg   { color: #f87171; font-size: 13px; min-height: 18px; }
.success-msg { color: #4ade80; font-size: 13px; min-height: 18px; }
.hint-msg    { color: #8e8e93; font-size: 11px; margin-top: -8px; line-height: 1.5; }

/* ── OTP Modal ── */
.otp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 0, 16, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.otp-overlay.hidden { display: none; }

.otp-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 40px 32px;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 40px 80px rgba(0, 0, 0, 0.65);
  text-align: center;
}

.otp-icon {
  font-size: 46px;
  margin-bottom: 14px;
}

.otp-title {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #d946ef, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.otp-subtitle {
  font-size: 13px;
  color: #8e8e93;
  margin-bottom: 28px;
  line-height: 1.65;
}

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 16px;
}

.otp-digit {
  width: 46px;
  height: 56px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #f5f5f7;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  caret-color: #d946ef;
}

.otp-digit:focus {
  border-color: rgba(217, 70, 239, 0.6);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.15);
  background: rgba(255, 255, 255, 0.1);
}

.otp-digit.filled {
  border-color: rgba(217, 70, 239, 0.4);
  background: rgba(217, 70, 239, 0.08);
}

.otp-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #8e8e93;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.otp-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #f5f5f7;
  border-color: rgba(255, 255, 255, 0.2);
}


.btn-resend {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #8e8e93;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.btn-resend:hover:not(:disabled) {
  color: #d946ef;
  border-color: rgba(217, 70, 239, 0.4);
  background: rgba(217, 70, 239, 0.06);
}

.btn-resend:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
