/* ══════════════════════════════════════════════════════════════
   auth.css — Login & Register Page Styles
   ══════════════════════════════════════════════════════════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

/* Background decorative orbs */
.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  pointer-events: none;
  animation: float 10s ease-in-out infinite;
}

.auth-page::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
  animation: float 12s ease-in-out 3s infinite;
}

/* ── Auth Card ───────────────────────────────────────────────── */
.auth-container {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  animation: scale-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Animated border glow */
.auth-card-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
}

.auth-card-wrapper::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
  filter: blur(1px);
}

.auth-card-wrapper:focus-within::before {
  opacity: 0.4;
  animation: border-glow-pulse 3s ease-in-out infinite;
}

.auth-card {
  background: rgba(17, 25, 40, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 48px 44px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ── Auth Header ─────────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.auth-logo-text span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-logo-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.auth-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 36px;
}

/* ── Auth Form ───────────────────────────────────────────────── */
.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-form .form-label svg,
.auth-form .form-label .label-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.auth-form .form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.auth-form .form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Password Field ──────────────────────────────────────────── */
.password-field {
  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;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

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

.password-field .form-input {
  padding-right: 44px;
}

/* ── Forgot Password ─────────────────────────────────────────── */
.auth-forgot {
  text-align: right;
  margin-top: -12px;
  margin-bottom: 20px;
}

.auth-forgot a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-forgot a:hover {
  color: var(--accent-cyan);
}

/* ── Auth Submit Button ──────────────────────────────────────── */
.auth-submit {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 8px;
  position: relative;
}

/* Loading spinner in button */
.auth-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.8s linear infinite;
}

.auth-submit.loading .spinner {
  display: inline-block;
}

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

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

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

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

/* ── Auth Footer Link ────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-footer a {
  color: var(--accent-cyan);
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--accent-blue);
}

/* ── Password Strength ───────────────────────────────────────── */
.password-strength {
  margin-top: 8px;
  display: flex;
  gap: 4px;
}

.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-glass);
  transition: background 0.3s ease;
}

.strength-bar.active-weak   { background: #ef4444; }
.strength-bar.active-medium { background: #f59e0b; }
.strength-bar.active-strong { background: #10b981; }

.strength-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Terms checkbox ──────────────────────────────────────────── */
.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

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

.auth-terms label {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.auth-terms a {
  color: var(--accent-cyan);
}

/* ── Responsive Auth ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-card {
    padding: 36px 24px;
  }

  .auth-title {
    font-size: 1.5rem;
  }
}

/* ── Google Auth Button ──────────────────────────────────────── */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-google:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
