/* Ementors Academy — Auth modal (OTP + new user) */
.ea-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ea-auth-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ea-auth-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(63, 31, 105, 0.75) 0%,
    rgba(21, 101, 192, 0.65) 40%,
    rgba(122, 184, 50, 0.45) 100%);
  backdrop-filter: blur(4px);
}

.ea-auth-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 25px 60px rgba(63, 31, 105, 0.35);
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ea-auth-overlay.active .ea-auth-modal {
  transform: scale(1) translateY(0);
}

.ea-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #3f1f69;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ea-auth-close:hover {
  transform: scale(1.08);
  background: #fff;
}

.ea-auth-panel {
  display: none;
  padding: 0 0 1.75rem;
}

.ea-auth-panel.active {
  display: block;
  animation: eaPanelIn 0.4s ease;
}

@keyframes eaPanelIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.ea-auth-header {
  padding: 2rem 1.75rem 1.25rem;
  text-align: center;
  color: #fff;
}

.ea-auth-header-login {
  background: linear-gradient(135deg, #3f1f69 0%, #1565C0 55%, #82C3FF 100%);
}

.ea-auth-header-signup {
  background: linear-gradient(135deg, #7ab832 0%, #639c24 40%, #3f1f69 100%);
}

.ea-auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: rgba(255, 255, 255, 0.25);
  border: 3px solid rgba(255, 255, 255, 0.5);
  animation: eaIconPulse 2s ease-in-out infinite;
}

@keyframes eaIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

.ea-auth-title {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: #fff;
}

.ea-auth-subtitle {
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  opacity: 0.92;
  color: #fff;
}

.ea-auth-mobile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.ea-auth-mobile-badge-signup {
  background: rgba(255, 255, 255, 0.22);
}

.ea-auth-form {
  padding: 1.25rem 1.75rem 0;
}

.ea-auth-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #3f1f69;
  margin-bottom: 0.4rem;
}

.ea-text-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.ea-text-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #7ab832;
  font-size: 1.1rem;
}

.ea-text-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 2px solid #e8dff5;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  background: linear-gradient(180deg, #faf8ff 0%, #fff 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ea-text-input:focus {
  outline: none;
  border-color: #7ab832;
  box-shadow: 0 0 0 4px rgba(122, 184, 50, 0.2);
}

.ea-otp-input-wrap {
  margin-bottom: 1.25rem;
  padding: 4px;
  border-radius: 16px;
  background: linear-gradient(90deg, #FFBED2, #FFE8A0, #82C3FF, #7ab832);
  background-size: 300% 100%;
  animation: eaOtpGradient 4s ease infinite;
}

@keyframes eaOtpGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.ea-otp-input-wrap-signup {
  background: linear-gradient(90deg, #7ab832, #FFE8A0, #3f1f69, #82C3FF);
  background-size: 300% 100%;
}

.ea-otp-input {
  width: 100%;
  box-sizing: border-box;
  padding: 1rem;
  border: none;
  border-radius: 13px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  color: #3f1f69;
  background: #fff;
}

.ea-otp-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px #3f1f69;
}

.ea-otp-input::placeholder {
  letter-spacing: 0.2em;
  color: #c4b5d9;
  font-weight: 600;
}

.ea-auth-btn {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ea-auth-btn-login {
  background: linear-gradient(90deg, #1565C0, #3f1f69);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
}

.ea-auth-btn-signup {
  background: linear-gradient(90deg, #7ab832, #639c24);
  box-shadow: 0 6px 20px rgba(122, 184, 50, 0.45);
}

.ea-auth-btn:hover {
  transform: translateY(-2px);
}

.ea-auth-btn:active {
  transform: translateY(0);
}

.ea-auth-hint {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: #6c757d;
  text-align: center;
  line-height: 1.4;
}

.ea-auth-hint i {
  color: #7ab832;
}

@media (max-width: 480px) {
  .ea-auth-modal {
    max-width: 100%;
    border-radius: 1.25rem;
  }

  .ea-otp-input {
    font-size: 1.45rem;
    letter-spacing: 0.25em;
  }
}
