/* ============================================
   AnshulTheGreat.com — Auth Pages (Login, Signup, Reset)
   Premium Glassmorphism Auth Cards
   ============================================ */

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

/* ── Floating Orbs Background ── */
.auth-page::before,
.auth-page::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.auth-page::before {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3), transparent 70%);
  top: -100px;
  right: -100px;
  animation: orbFloat1 12s ease-in-out infinite;
}

.auth-page::after {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.25), transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: orbFloat2 15s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.05); }
}

/* ── Auth Nav Bar ── */
.auth-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 18, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.auth-nav .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.auth-nav .logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

.auth-nav .logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Auth Card ── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(26, 26, 46, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(124, 58, 237, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card-header {
  text-align: center;
  margin-bottom: 36px;
}

.auth-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(124, 58, 237, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #c4b5fd;
}

.auth-card-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f0f0f8;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  font-size: 0.9rem;
  color: #a0a0c0;
  line-height: 1.5;
}

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

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #a0a0c0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-field .input-wrapper {
  position: relative;
}

.auth-field .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6a6a8e;
  pointer-events: none;
  transition: color 0.2s;
}

.auth-field input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #f0f0f8;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-field input::placeholder {
  color: #6a6a8e;
}

.auth-field input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.auth-field input:focus + .input-icon,
.auth-field input:focus ~ .input-icon {
  color: #c4b5fd;
}

/* ── Password Strength Bar ── */
.password-strength {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  margin-top: 6px;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s, background 0.3s;
}

.password-strength-bar.weak { width: 25%; background: #ef4444; }
.password-strength-bar.fair { width: 50%; background: #f59e0b; }
.password-strength-bar.good { width: 75%; background: #06b6d4; }
.password-strength-bar.strong { width: 100%; background: #22c55e; }

.password-strength-text {
  font-size: 0.72rem;
  margin-top: 4px;
  color: #6a6a8e;
}

/* ── Auth Submit Button ── */
.auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  margin-top: 4px;
}

.auth-submit::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  opacity: 0;
  z-index: -1;
  filter: blur(16px);
  transition: opacity 0.3s;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 30px rgba(124, 58, 237, 0.35);
}

.auth-submit:hover::before {
  opacity: 0.6;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

.auth-submit.loading .btn-text { display: none; }
.auth-submit.loading .spinner { display: block; }

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

/* ── Auth Footer Links ── */
.auth-links {
  text-align: center;
  margin-top: 24px;
  font-size: 0.85rem;
  color: #a0a0c0;
}

.auth-links a {
  color: #c4b5fd;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.auth-links a:hover {
  color: #8b5cf6;
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  color: #6a6a8e;
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ── Auth Error/Success Messages ── */
.auth-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  display: none;
  align-items: center;
  gap: 8px;
  animation: messageFadeIn 0.3s ease;
}

.auth-message.visible {
  display: flex;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.auth-message.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #86efac;
}

@keyframes messageFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Forgot Password Link ── */
.forgot-password-link {
  text-align: right;
  margin-top: -10px;
}

.forgot-password-link a {
  font-size: 0.8rem;
  color: #a0a0c0;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-password-link a:hover {
  color: #c4b5fd;
}

/* ── Light Theme Overrides ── */
html[data-theme='light'] .auth-nav {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-theme='light'] .auth-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

html[data-theme='light'] .auth-card-header h1 {
  color: #0f172a;
}

html[data-theme='light'] .auth-card-header p,
html[data-theme='light'] .auth-field label,
html[data-theme='light'] .auth-links,
html[data-theme='light'] .forgot-password-link a,
html[data-theme='light'] .auth-divider {
  color: #475569;
}

html[data-theme='light'] .auth-field input {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

html[data-theme='light'] .auth-field input::placeholder {
  color: #94a3b8;
}

html[data-theme='light'] .auth-divider::before,
html[data-theme='light'] .auth-divider::after {
  background: rgba(15, 23, 42, 0.08);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card {
    padding: 36px 24px;
    border-radius: 20px;
  }

  .auth-card-header h1 {
    font-size: 1.3rem;
  }

  .auth-nav {
    padding: 12px 16px;
  }
}
