/* ========================================
   Immaculate AI - Auth Page Styles
   ======================================== */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 40px 20px;
}

/* Neural network background */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.6;
}

/* Gradient overlay */
.auth-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

/* Auth container */
.auth-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  animation: slideUp 0.6s ease;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-glow), 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Logo & Header */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-logo svg {
  width: 48px;
  height: 48px;
}

.auth-logo-text {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-darker);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
}

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

.auth-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

/* Forms */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Turnstile container */
.turnstile-container {
  display: flex;
  justify-content: center;
  margin: 24px 0;
  min-height: 65px;
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

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

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-divider span {
  color: var(--text-muted);
  font-size: 13px;
}

/* Social buttons */
.social-buttons {
  display: flex;
  gap: 12px;
}

.btn-social {
  flex: 1;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.btn-social:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.btn-social svg {
  width: 20px;
  height: 20px;
}

/* Footer links */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-footer a {
  color: var(--primary-light);
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Forgot password */
.forgot-link {
  display: block;
  text-align: right;
  margin-top: -12px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.forgot-link:hover {
  color: var(--primary-light);
}

/* Error state */
.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s ease;
}

.form-error.show {
  display: flex;
}

.form-error svg {
  width: 20px;
  height: 20px;
  color: var(--error);
  flex-shrink: 0;
}

.form-error span {
  color: var(--error);
  font-size: 14px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Success state */
.form-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
}

.form-success.show {
  display: flex;
}

.form-success svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

.form-success span {
  color: var(--success);
  font-size: 14px;
}

/* Loading state */
.auth-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--radius-xl);
  z-index: 100;
}

.auth-loading.active {
  display: flex;
}

.auth-loading span {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Terms checkbox styling */
.terms-checkbox {
  margin-top: 8px;
}

.terms-checkbox label {
  font-size: 13px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 24px;
  }

  .auth-logo-text {
    font-size: 24px;
  }

  .auth-title {
    font-size: 20px;
  }

  .social-buttons {
    flex-direction: column;
  }
}
