/* ============================================
   ViralClips AI — Auth Page Styles
   Login / Signup — Premium, Clean
   ============================================ */

/* ============ BODY & BACKGROUND ============ */
.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #fef9f7 0%, #f5f0ff 30%, #f0f7ff 60%, #fef9f7 100%);
  position: relative;
  overflow: hidden;
  padding: var(--space-8) var(--space-4);
}

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

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}

.auth-blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,107,107,0.15), transparent 70%);
  top: -10%;
  right: -10%;
  animation: float 12s ease-in-out infinite;
}

.auth-blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124,58,237,0.1), transparent 70%);
  bottom: -10%;
  left: -10%;
  animation: float 15s ease-in-out infinite reverse;
}

.auth-blob-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(32,201,151,0.08), transparent 70%);
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  animation: float 10s ease-in-out infinite;
}

.auth-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.02) 1px, transparent 0);
  background-size: 40px 40px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-30px); }
}

/* ============ LOGO ============ */
.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--text-primary);
  text-decoration: none;
  margin-bottom: var(--space-8);
  position: relative;
  z-index: 1;
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: white;
}

.auth-logo .logo-accent {
  color: var(--purple-500);
}

/* ============ AUTH CARD ============ */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-3xl);
  box-shadow: 0 20px 60px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: cardAppear 0.4s ease;
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-view {
  padding: var(--space-10) var(--space-8) var(--space-6);
}

/* ============ HEADER ============ */
.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
}

.auth-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============ FORM ============ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--purple-500);
  text-decoration: none;
}

.form-link:hover {
  color: var(--purple-600);
  text-decoration: underline;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.form-input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-xl);
  font-size: var(--text-base);
  font-family: var(--font-primary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--purple-300);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.08);
  background: white;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.input-toggle-pw {
  position: absolute;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.input-toggle-pw:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

/* ============ PASSWORD STRENGTH ============ */
.password-strength {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-1);
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: all 0.3s ease;
}

.strength-fill.weak { width: 30%; background: #e03131; }
.strength-fill.fair { width: 60%; background: #f59f00; }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-label {
  font-size: 11px;
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

.strength-label.weak { color: #e03131; }
.strength-label.fair { color: #f59f00; }
.strength-label.strong { color: var(--success); }

/* ============ ERROR ============ */
.form-error {
  padding: var(--space-3) var(--space-4);
  background: #fff5f5;
  border: 1px solid #ffc9c9;
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  color: #e03131;
  font-weight: 600;
  text-align: center;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ============ SUBMIT BUTTON ============ */
.btn-full {
  width: 100%;
  justify-content: center;
  padding: 14px;
  font-size: var(--text-base);
  font-weight: 800;
  border-radius: var(--radius-xl);
  position: relative;
}

.btn-text, .btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  animation: spin 0.8s linear infinite;
}

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

/* ============ DIVIDER ============ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) var(--space-8);
}

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

.auth-divider span {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============ SOCIAL BUTTON ============ */
.btn-social {
  width: calc(100% - var(--space-8) * 2);
  margin: 0 var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: 12px;
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-google {
  background: white;
  border: 2px solid var(--border-light);
  color: var(--text-primary);
}

.btn-google:hover {
  border-color: #d0d0e0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* ============ SWITCH TEXT ============ */
.auth-switch {
  text-align: center;
  padding: var(--space-5) var(--space-8) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--purple-500);
  font-weight: 700;
  text-decoration: none;
}

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

/* ============ TERMS ============ */
.auth-terms {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  line-height: 1.6;
  margin-top: var(--space-1);
}

.auth-terms a {
  color: var(--purple-500);
  text-decoration: none;
  font-weight: 600;
}

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

/* ============ WELCOME BADGE ============ */
.auth-welcome-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, #f0fdf4, #e6fcf5);
  border-top: 1px solid rgba(18,184,134,0.15);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #087f5b;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 480px) {
  .auth-body {
    padding: var(--space-6) var(--space-3);
  }

  .auth-card {
    border-radius: var(--radius-2xl);
  }

  .auth-view {
    padding: var(--space-8) var(--space-5) var(--space-5);
  }

  .auth-title {
    font-size: var(--text-2xl);
  }

  .auth-divider {
    margin: var(--space-4) var(--space-5);
  }

  .btn-social {
    width: calc(100% - var(--space-5) * 2);
    margin: 0 var(--space-5);
  }

  .auth-switch {
    padding: var(--space-4) var(--space-5) 0;
  }
}
