/* =========================================
   UIverse — Auth Pages Stylesheet
   ========================================= */

/* ——— Auth Page Layout ——— */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

/* Animated Background (reuse hero style) */
.auth-page .auth-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.auth-bg__gradient {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.35;
}
.auth-bg__gradient--1 {
  width: 500px;
  height: 500px;
  background: var(--color-gradient-1);
  top: -150px;
  left: -120px;
  animation: floatBlob 12s ease-in-out infinite;
}
.auth-bg__gradient--2 {
  width: 450px;
  height: 450px;
  background: var(--color-gradient-2);
  bottom: -120px;
  right: -100px;
  animation: floatBlob 15s ease-in-out infinite reverse;
}
.auth-bg__gradient--3 {
  width: 300px;
  height: 300px;
  background: var(--color-gradient-3);
  top: 40%;
  right: 20%;
  animation: floatBlob 10s ease-in-out infinite;
  opacity: 0.15;
}

.auth-bg__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 10%, transparent 70%);
}

/* ——— Auth Card ——— */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(22, 22, 31, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(255, 45, 85, 0.06);
  animation: authCardIn 0.6s ease both;
}

@keyframes authCardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Back to home */
.auth-card__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  transition: color var(--transition);
}
.auth-card__back:hover {
  color: var(--color-text);
}
.auth-card__back i {
  font-size: 0.7rem;
}

/* Logo on card */
.auth-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}
.auth-card__logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 40%, var(--color-primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Heading */
.auth-card__heading {
  text-align: center;
  margin-bottom: 8px;
}
.auth-card__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.auth-card__subtitle {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ——— Auth Form ——— */
.auth-form {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Form Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}
.form-group__input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.form-group__icon {
  position: absolute;
  left: 14px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: color var(--transition);
}
.form-group__input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: 0.9rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.form-group__input::placeholder {
  color: var(--color-text-muted);
}
.form-group__input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 45, 85, 0.04);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.12);
}
.form-group__input:focus ~ .form-group__icon,
.form-group__input:focus + .form-group__icon {
  color: var(--color-primary-light);
}

/* Password toggle */
.form-group__toggle-pw {
  position: absolute;
  right: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
  background: none;
  border: none;
}
.form-group__toggle-pw:hover {
  color: var(--color-text);
}

/* Forgot password */
.auth-form__extras {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: -8px;
}
.auth-form__forgot {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-primary-light);
  transition: color var(--transition);
}
.auth-form__forgot:hover {
  color: #ff4d6d;
}

/* Submit Button */
.auth-form__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 24px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(255, 45, 85, 0.3);
  position: relative;
  overflow: hidden;
}
.auth-form__submit:hover {
  box-shadow: 0 6px 24px rgba(255, 45, 85, 0.45);
  transform: translateY(-1px);
}
.auth-form__submit:active {
  transform: translateY(0);
}
.auth-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.auth-form__submit .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.auth-form__submit.loading .spinner {
  display: block;
}
.auth-form__submit.loading .btn-text {
  display: none;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 4px 0;
}
.auth-divider__line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.auth-divider__text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Social / Google button placeholder */
.auth-form__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 24px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.auth-form__social:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.auth-form__social:active {
  transform: translateY(0);
}
.auth-form__social:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.auth-form__social.loading {
  opacity: 0.7;
  pointer-events: none;
}
.auth-form__social svg {
  flex-shrink: 0;
}
.auth-form__social img {
  width: 18px;
  height: 18px;
}

/* Footer text */
.auth-card__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.84rem;
  color: var(--color-text-muted);
}
.auth-card__footer a {
  color: var(--color-primary-light);
  font-weight: 600;
  transition: color var(--transition);
}
.auth-card__footer a:hover {
  color: #ff4d6d;
}

/* ——— Error / Success Messages ——— */
.auth-message {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  animation: fadeInUp 0.3s ease;
}
.auth-message.show {
  display: flex;
}
.auth-message--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}
.auth-message--error i {
  color: #ef4444;
}
.auth-message--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}
.auth-message--success i {
  color: #22c55e;
}

/* ——— Password strength indicator ——— */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.password-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.3s ease;
}
.password-strength__bar.active.weak { background: #ef4444; }
.password-strength__bar.active.medium { background: #f59e0b; }
.password-strength__bar.active.strong { background: #22c55e; }

.password-strength__text {
  font-size: 0.72rem;
  font-weight: 500;
  margin-top: 4px;
  color: var(--color-text-muted);
}

/* ——— Forgot Password Modal ——— */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.show {
  display: flex;
}
.modal {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
  animation: authCardIn 0.3s ease both;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
}
.modal__close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text);
}
.modal__title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.modal__subtitle {
  font-size: 0.84rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}
.modal__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.9rem;
  font-family: var(--font-family);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.modal__input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.12);
}
.modal__input::placeholder {
  color: var(--color-text-muted);
}
.modal__submit {
  width: 100%;
  padding: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(255, 45, 85, 0.3);
}
.modal__submit:hover {
  box-shadow: 0 6px 24px rgba(255, 45, 85, 0.45);
  transform: translateY(-1px);
}
.modal__message {
  margin-top: 12px;
  font-size: 0.82rem;
  display: none;
}
.modal__message.show {
  display: block;
}

/* ——— Responsive ——— */
@media (max-width: 500px) {
  .auth-card {
    padding: 32px 24px;
    border-radius: var(--radius-lg);
  }
  .auth-card__title {
    font-size: 1.3rem;
  }
}
