/* ========================================
   Auth Pages — Premium Design
   ======================================== */

/* Animated background */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.auth-bg-orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
  top: -15%;
  left: -10%;
  animation: auth-orb-1 14s ease-in-out infinite;
}

.auth-bg-orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  bottom: -10%;
  right: -8%;
  animation: auth-orb-2 16s ease-in-out infinite;
}

.auth-bg-orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: auth-orb-3 12s ease-in-out infinite;
}

.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

@keyframes auth-orb-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, 40px) scale(1.1); }
  66% { transform: translate(-30px, 60px) scale(0.95); }
}

@keyframes auth-orb-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, -30px) scale(1.05); }
  66% { transform: translate(40px, -50px) scale(0.9); }
}

@keyframes auth-orb-3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; }
  50% { transform: translate(-50%, -50%) scale(1.15); opacity: 0.35; }
}

/* Card */
.auth-card-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  animation: auth-card-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card {
  position: relative;
  background: rgba(17, 17, 19, 0.85);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.75rem 2.5rem;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.05),
    0 20px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(139, 92, 246, 0.1);
}

/* Gradient border glow */
.auth-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 21px;
  padding: 1px;
  background: linear-gradient(
    160deg,
    rgba(139, 92, 246, 0.3) 0%,
    rgba(59, 130, 246, 0.1) 30%,
    transparent 60%,
    rgba(139, 92, 246, 0.15) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

/* Back link */
.auth-back {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}

.auth-back:hover {
  color: var(--text-secondary);
}

.auth-back svg {
  width: 16px;
  height: 16px;
}

/* Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-logo-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.auth-logo h1 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #c4b5fd 0%, #8b5cf6 40%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
  line-height: 1.5;
}

/* Login toggle */
.login-toggle {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.75rem;
  gap: 4px;
}

.login-toggle-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.login-toggle-btn:hover {
  color: var(--text-secondary);
}

.login-toggle-btn.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3);
}

/* Form inputs — Premium style */
.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.25s ease;
}

.auth-form input[type="text"]:hover,
.auth-form input[type="email"]:hover,
.auth-form input[type="password"]:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 3px rgba(139, 92, 246, 0.1),
    0 0 20px -4px rgba(139, 92, 246, 0.15);
}

.auth-form input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* Checkbox styling */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.auth-terms input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  margin-top: 1px;
  accent-color: var(--accent-purple);
  cursor: pointer;
}

.auth-terms span {
  color: var(--text-secondary);
}

/* Submit button */
.auth-form .btn-primary {
  position: relative;
  width: 100%;
  padding: 0.8125rem 1.5rem;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
  margin-top: 0.5rem;
}

.auth-form .btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 4px 20px rgba(139, 92, 246, 0.4),
    0 0 40px -8px rgba(139, 92, 246, 0.3);
}

.auth-form .btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

/* Shimmer sweep on button */
.auth-form .btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  animation: auth-shimmer 3s ease-in-out infinite;
}

@keyframes auth-shimmer {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

/* Forgot password */
.auth-forgot {
  text-align: center;
  margin-top: 1rem;
}

.auth-forgot a {
  color: #71717a;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-forgot a:hover {
  color: #a78bfa;
}

/* Terms link inside checkbox */
.auth-terms a {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-terms a:hover {
  color: #c4b5fd;
}

/* Footer */
.auth-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer p {
  margin: 0;
}

.auth-footer a {
  color: #a78bfa;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #c4b5fd;
}

/* Feature hints */
.auth-features {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  animation: auth-features-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

@keyframes auth-features-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-feature-icon svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  gap: 1rem;
}

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

.auth-divider span {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }

  .auth-card {
    padding: 2.25rem 1.75rem;
  }

  .auth-form input[type="text"],
  .auth-form input[type="email"],
  .auth-form input[type="password"] {
    font-size: 16px;
    padding: 0.8125rem 1rem;
  }
}

@media (max-width: 480px) {
  .auth-container {
    padding: 0.75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 16px;
  }

  .auth-card::before {
    border-radius: 17px;
  }

  .auth-logo-img {
    width: 100px;
    height: 100px;
  }

  .auth-logo h1 {
    font-size: 1.5rem;
  }

  .auth-logo p {
    font-size: 0.8125rem;
  }

  .auth-features {
    gap: 1.25rem;
  }

  .auth-feature {
    font-size: 0.6875rem;
  }

  .auth-feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
  }

  .auth-feature-icon svg {
    width: 12px;
    height: 12px;
  }

  .auth-bg-orb-1 {
    width: 300px;
    height: 300px;
  }

  .auth-bg-orb-2 {
    width: 250px;
    height: 250px;
  }

  .auth-bg-orb-3 {
    width: 200px;
    height: 200px;
  }
}
