/* ════════════════════════════════════════════════════════
   PromptQuestAi — Auth Stylesheet
   Glassmorphism split-panel design
   ════════════════════════════════════════════════════════ */

:root {
  --bg:        #030B14;
  --panel:     rgba(10, 18, 38, 0.82);
  --line:      rgba(148, 163, 184, 0.09);
  --text:      #F1F5F9;
  --muted:     #8B9CB6;
  --subtle:    #475569;
  --accent:    #7C3AED;
  --accent-2:  #0EA5E9;
  --success:   #10B981;
  --danger:    #EF4444;
  --t:         0.18s;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --r:         14px;
  --r-lg:      20px;
  --r-xl:      28px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ─── BACKGROUND ───────────────────────────────────────── */
.bg-orb {
  position: fixed; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0;
  will-change: transform;
}
.bg-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 65%);
  top: -200px; left: -200px;
  animation: orbDrift 14s ease-in-out infinite;
}
.bg-orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(14,165,233,0.12), transparent 65%);
  bottom: -100px; right: -100px;
  animation: orbDrift 18s ease-in-out infinite reverse;
}

@keyframes orbDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(24px, -32px) scale(1.04); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
@keyframes checkIn {
  from { opacity: 0; transform: scale(0.7) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── SHELL ────────────────────────────────────────────── */
.auth-shell {
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 100vh; position: relative; z-index: 1;
}

/* ─── LEFT PANEL ───────────────────────────────────────── */
.auth-visual {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 36px;
  background: linear-gradient(145deg, rgba(12,22,48,0.98), rgba(6,12,26,0.99));
  border-right: 1px solid var(--line);
}
.auth-visual::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(124,58,237,0.14), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(14,165,233,0.08), transparent 55%);
  pointer-events: none;
}
.auth-visual-content { position: relative; z-index: 1; }
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem;
  letter-spacing: -0.025em; color: var(--text);
  margin-bottom: 40px;
}
.auth-brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, #7C3AED, #0EA5E9);
  display: grid; place-items: center;
  font-weight: 900; font-size: 0.95rem;
  box-shadow: 0 4px 18px rgba(124,58,237,0.45), inset 0 1px 0 rgba(255,255,255,0.15);
}
.auth-headline {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 900; letter-spacing: -0.035em;
  line-height: 1.1; margin-bottom: 14px;
}
.auth-headline span {
  background: linear-gradient(135deg, #C4B5FD 0%, #38BDF8 60%, #D8B4FE 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; animation: gradShift 5s ease infinite;
}
.auth-sub {
  color: var(--muted); font-size: 0.9rem;
  line-height: 1.65; max-width: 38ch; margin-bottom: 32px;
}

/* Feature list */
.auth-features { display: grid; gap: 12px; }
.auth-feature {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--r);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  animation: checkIn 0.4s var(--ease) both;
}
.auth-feature:nth-child(1) { animation-delay: 0.05s; }
.auth-feature:nth-child(2) { animation-delay: 0.12s; }
.auth-feature:nth-child(3) { animation-delay: 0.19s; }
.auth-feature-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1rem;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(167,139,250,0.18);
}
.auth-feature-text strong { display: block; font-size: 0.875rem; font-weight: 700; margin-bottom: 2px; }
.auth-feature-text span { color: var(--muted); font-size: 0.8rem; }

/* Bottom blurb */
.auth-visual-footer {
  position: relative; z-index: 1;
  background: rgba(124,58,237,0.07);
  border: 1px solid rgba(124,58,237,0.16);
  border-radius: var(--r); padding: 16px;
}
.auth-visual-footer p { color: var(--muted); font-size: 0.85rem; line-height: 1.6; }
.auth-visual-footer strong { color: #C4B5FD; }

/* ─── RIGHT PANEL ──────────────────────────────────────── */
.auth-card {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 32px;
  background: linear-gradient(160deg, rgba(10,18,38,0.55), rgba(3,11,20,0.85));
}
.glass {
  background: rgba(10, 18, 38, 0.88);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
  width: min(460px, 100%);
  animation: fadeUp 0.45s var(--ease) both;
}
.glass-title {
  font-size: 1.55rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 4px;
}
.glass-sub { color: var(--muted); font-size: 0.875rem; margin-bottom: 24px; }

/* ─── FORM ─────────────────────────────────────────────── */
.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.78rem; font-weight: 700;
  color: #C4B5FD; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field input, .field textarea, .field select {
  width: 100%; border-radius: var(--r); padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(3, 11, 20, 0.65);
  color: var(--text); font-size: 0.9rem; font-family: inherit;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
  -webkit-appearance: none;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(124,58,237,0.55);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.field input::placeholder { color: var(--subtle); }

/* ─── PASSWORD SHOW / HIDE TOGGLE ──────────────────────── */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px !important; box-sizing: border-box; }
.pw-toggle {
  position: absolute; right: 1px; top: 1px; bottom: 1px;
  width: 42px; background: none; border: none;
  border-radius: 0 calc(var(--r) - 1px) calc(var(--r) - 1px) 0;
  cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: color 0.18s;
}
.pw-toggle:hover { color: var(--text); }
.pw-toggle.pw-visible { color: #A78BFA; }
.pw-toggle svg { display: block; flex-shrink: 0; }

/* Password strength */
.strength-bar {
  height: 3px; border-radius: 3px;
  background: var(--line); margin-top: 8px; overflow: hidden;
}
.strength-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.25s var(--ease), background 0.25s var(--ease);
  width: 0%;
}
.strength-label { font-size: 0.78rem; margin-top: 5px; font-weight: 600; }

/* ─── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-sm);
  font-size: 0.9rem; font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--text); cursor: pointer; font-family: inherit;
  transition: all var(--t) var(--ease); white-space: nowrap;
  letter-spacing: -0.01em; width: 100%;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.14); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.38);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  box-shadow: 0 8px 28px rgba(124,58,237,0.55);
  border-color: transparent;
}

/* ─── LINKS & ALERTS ───────────────────────────────────── */
.auth-link { color: var(--muted); font-size: 0.85rem; margin-top: 8px; }
.auth-link a { color: #A78BFA; font-weight: 600; transition: color var(--t) var(--ease); }
.auth-link a:hover { color: #C4B5FD; }
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: var(--r-sm);
  font-size: 0.85rem; line-height: 1.5; font-weight: 500; margin-bottom: 6px;
}
.alert-error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.22); color: #FCA5A5; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.22); color: #6EE7B7; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card { padding: 32px 20px; }
}
@media (max-width: 480px) {
  .glass { padding: 24px 20px; }
  .auth-card { padding: 24px 16px; align-items: flex-start; padding-top: 40px; }
}
