/* ════════════════════════════════════════════════════════
   PromptQuestAi — Auth Stylesheet  ·  Nebula Pro v2
   ════════════════════════════════════════════════════════ */

/* ─── TOKENS ───────────────────────────────────────────── */
:root {
  --bg:           #F4EEFF;
  --panel:        rgba(255, 255, 255, 0.82);
  --line:         rgba(124, 58, 237, 0.1);
  --text:         #1A103C;
  --muted:        #6B6B8D;
  --subtle:       #A49DC0;
  --accent:       #7C3AED;
  --accent-light: #9D6EF8;
  --accent-2:     #EC4899;
  --r-sm:         8px;
  --r:            12px;
  --r-lg:         18px;
  --r-xl:         24px;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --t:            0.22s;
}

/* ─── BASE ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 80% 50% at 15% 20%, rgba(196,181,253,0.55) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 10%, rgba(253,186,116,0.28) 0%, transparent 50%),
    radial-gradient(ellipse 70% 55% at 50% 90%, rgba(249,168,212,0.40) 0%, transparent 60%),
    linear-gradient(145deg, #EEE6FF 0%, #FCE7F5 35%, #FFF1E6 70%, #FFFBF0 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
}
a { color: inherit; text-decoration: none; }

/* ─── SPLIT LAYOUT ─────────────────────────────────────── */
.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ─── LEFT VISUAL PANEL ─────────────────────────────────── */
.auth-visual {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 100% 80% at 0% 50%,
      rgba(196,181,253,0.6) 0%,
      rgba(249,168,212,0.3) 50%,
      transparent 80%),
    linear-gradient(160deg, #EEE6FF 0%, #FCE7F5 50%, #FFF4E6 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 64px 60px;
}

/* Animated orbs inside the panel */
.auth-visual::before {
  content: '';
  position: absolute; inset: -20%;
  background:
    radial-gradient(circle at 20% 60%,
      rgba(124,58,237,0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%,
      rgba(6,182,212,0.18) 0%, transparent 38%),
    radial-gradient(circle at 60% 85%,
      rgba(236,72,153,0.12) 0%, transparent 35%);
  filter: blur(60px);
  animation: authOrbsShift 12s ease-in-out infinite;
}
.auth-visual::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(100,140,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

@keyframes authOrbsShift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(-20px, 30px) scale(1.04); }
  66%       { transform: translate(25px, -20px) scale(0.97); }
}

.auth-visual-inner { position: relative; z-index: 2; max-width: 380px; }
.auth-visual-logo {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 56px; font-size: 1.05rem; font-weight: 800;
  color: var(--text); text-decoration: none;
}
.auth-brand-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
@keyframes authShimmer {
  0%, 70%  { transform: skewX(-15deg) translateX(0); opacity: 1; }
  100%     { transform: skewX(-15deg) translateX(300%); opacity: 0; }
}

.auth-visual-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.13em; color: #A78BFA;
  border: 1px solid rgba(167,139,250,0.28);
  background: rgba(124,58,237,0.1);
  padding: 5px 14px; border-radius: 999px; margin-bottom: 22px;
}
.auth-visual-badge::before {
  content: ''; display: block;
  width: 6px; height: 6px; border-radius: 50%;
  background: #A78BFA;
  box-shadow: 0 0 8px rgba(167,139,250,0.8);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(167,139,250,0.8); }
  50%       { box-shadow: 0 0 0 6px rgba(167,139,250,0); }
}

.auth-visual h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900; letter-spacing: -0.04em;
  line-height: 1.08; margin-bottom: 18px; color: var(--text);
}
.auth-visual .grad {
  background: linear-gradient(135deg, #6D28D9 0%, #67E8F9 45%, #F9A8D4 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
.auth-visual p {
  color: rgba(123,147,184,0.9); font-size: 0.92rem;
  line-height: 1.7; margin-bottom: 40px; max-width: 34ch;
}

/* Feature list */
.auth-features { display: grid; gap: 16px; }
.auth-feature {
  display: flex; align-items: flex-start; gap: 13px;
  opacity: 0; transform: translateX(-16px);
  animation: authFeatureIn 0.5s var(--ease) forwards;
}
.auth-feature:nth-child(1) { animation-delay: 0.15s; }
.auth-feature:nth-child(2) { animation-delay: 0.27s; }
.auth-feature:nth-child(3) { animation-delay: 0.39s; }
.auth-feature:nth-child(4) { animation-delay: 0.51s; }
@keyframes authFeatureIn {
  to { opacity: 1; transform: translateX(0); }
}
.auth-feature-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1rem;
  background: linear-gradient(135deg,
    rgba(124,58,237,0.22) 0%,
    rgba(6,182,212,0.10) 100%);
  border: 1px solid rgba(167,139,250,0.22);
  box-shadow: 0 4px 14px rgba(124,58,237,0.2);
  margin-top: 1px;
}
.auth-feature-text strong {
  display: block; font-size: 0.875rem; font-weight: 700;
  color: var(--text); margin-bottom: 2px;
}
.auth-feature-text span { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }

/* Decorative floating stats card */
.auth-visual-card {
  position: absolute; bottom: 48px; right: -24px;
  width: 220px; border-radius: 16px; padding: 18px 20px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(124,58,237,0.18);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 20px 50px rgba(124,58,237,0.18),
    0 0 0 1px rgba(255,255,255,0.6) inset;
  animation: cardFloat 6s ease-in-out infinite;
  z-index: 3;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0px) rotate(-1.5deg); }
  50%       { transform: translateY(-10px) rotate(-0.5deg); }
}
.auth-visual-card-top {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(100,140,255,0.1);
}
.auth-card-dot { width: 7px; height: 7px; border-radius: 50%; }
.auth-card-dot:nth-child(1) { background: #EF4444; }
.auth-card-dot:nth-child(2) { background: #F59E0B; }
.auth-card-dot:nth-child(3) { background: #22C55E; }
.auth-card-title-label { color: rgba(123,147,184,0.6); font-size: 0.7rem; font-weight: 500; margin-left: 4px; }
.auth-card-stat { text-align: center; padding: 6px 0; }
.auth-card-stat .num {
  font-size: 2rem; font-weight: 900; letter-spacing: -0.05em; line-height: 1;
  background: linear-gradient(135deg, #6D28D9, #EC4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.auth-card-stat .lbl { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
.auth-card-title-label { color: var(--subtle); font-size: 0.7rem; font-weight: 500; margin-left: 4px; }
.auth-card-bar {
  height: 4px; border-radius: 99px;
  background: rgba(124,58,237,0.1); margin-top: 12px; overflow: hidden;
}
.auth-card-bar-fill {
  height: 100%; width: 72%; border-radius: 99px;
  background: linear-gradient(90deg, #7C3AED, #06B6D4);
  animation: barFill 2s ease-out 0.5s both;
}
@keyframes barFill { from { width: 0; } to { width: 72%; } }

/* ─── RIGHT PANEL  (main.auth-card = full-height right side) */
.auth-right,
.auth-card {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px clamp(20px, 6%, 72px);
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(124,58,237,0.1);
  position: relative; min-height: 100vh;
}

/* ─── GLASS CARD  (section.glass = the white floating card) */
.glass {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(124,58,237,0.12);
  border-radius: 24px; padding: 38px 34px;
  backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
  position: relative; overflow: hidden;
  box-shadow:
    0 24px 64px rgba(124,58,237,0.13),
    0 6px 20px rgba(0,0,0,0.06),
    0 0 0 1px rgba(255,255,255,0.7) inset;
  animation: authCardIn 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  display: flex; flex-direction: column;
}
@keyframes authCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Animated rainbow top border on the card */
.glass::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #7C3AED 25%,
    #EC4899 55%,
    #D97706 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: borderSlide 3s linear infinite;
}
@keyframes borderSlide {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Soft radial glow inside card */
.glass::after {
  content: '';
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 280px; height: 200px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(124,58,237,0.1), transparent 65%);
  pointer-events: none; filter: blur(24px);
}

.auth-card-inner { position: relative; z-index: 1; }
.auth-card-hd { margin-bottom: 26px; }
.auth-card-hd h2 {
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -0.03em; margin-bottom: 6px;
}
.auth-card-hd p { color: var(--muted); font-size: 0.875rem; line-height: 1.55; }

/* ─── FORM ─────────────────────────────────────────────── */
.auth-form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.75rem; font-weight: 700;
  color: #6D28D9; letter-spacing: 0.05em; text-transform: uppercase;
}
.field-wrap { position: relative; }
.field-wrap .field-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  font-size: 0.95rem; pointer-events: none; color: var(--subtle);
  transition: color 0.2s;
}
.field input, .field textarea, .field select {
  width: 100%; border-radius: 11px; padding: 12px 14px;
  border: 1px solid rgba(124,58,237,0.15);
  background: rgba(255,255,255,0.85);
  color: var(--text); font-size: 0.9rem; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none;
}
.field-wrap input { padding-left: 40px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: rgba(124,58,237,0.6);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12),
              0 0 20px rgba(124,58,237,0.06);
}
.field-wrap:focus-within .field-icon { color: #A78BFA; }
.field input::placeholder { color: var(--subtle); }
.field-hint { font-size: 0.73rem; color: var(--subtle); }
.field-error { font-size: 0.73rem; color: #B91C1C; font-weight: 500; }

/* Password toggle */
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--subtle); font-size: 0.9rem; padding: 4px;
  transition: color 0.2s; border-radius: 6px;
}
.pw-toggle:hover { color: var(--accent); background: rgba(124,58,237,0.06); }

/* Row with checkbox / link */
.auth-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.auth-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: var(--muted); cursor: pointer;
}
.auth-check input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--accent);
  cursor: pointer; margin: 0; padding: 0;
}
.auth-forgot {
  font-size: 0.82rem; color: var(--accent-light); font-weight: 600;
  transition: color 0.2s;
}
.auth-forgot:hover { color: #6D28D9; }

/* Submit button */
.auth-submit {
  width: 100%; padding: 14px; border-radius: 12px;
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 60%, #06B6D4 100%);
  background-size: 200% auto;
  color: #fff; font-size: 0.95rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer;
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 28px rgba(124,58,237,0.5),
              0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative; overflow: hidden; letter-spacing: -0.01em;
}
.auth-submit::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-12deg);
}
.auth-submit:hover {
  background-position: right center;
  box-shadow: 0 8px 40px rgba(124,58,237,0.65),
              0 0 0 1px rgba(255,255,255,0.12) inset;
  transform: translateY(-2px);
}
.auth-submit:hover::before { animation: shimmer 0.6s ease-out forwards; }
@keyframes shimmer {
  0%   { transform: skewX(-12deg) translateX(0); }
  100% { transform: skewX(-12deg) translateX(350%); }
}
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Divider */
.auth-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--subtle); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(100,140,255,0.12), transparent);
}

/* Footer link */
.auth-footer {
  text-align: center; margin-top: 22px;
  font-size: 0.875rem; color: var(--muted);
}
.auth-footer a {
  color: var(--accent-light); font-weight: 600; transition: color 0.2s;
}
.auth-footer a:hover { color: #6D28D9; }

/* ─── ALERTS ───────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px; border-radius: 10px;
  font-size: 0.83rem; line-height: 1.55; font-weight: 500;
}
.alert-error {
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.28); color: #B91C1C;
}
.alert-success {
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.28); color: #065F46;
}

/* ─── PASSWORD STRENGTH ─────────────────────────────────── */
.pw-strength { display: grid; gap: 6px; }
.pw-strength-bar { display: flex; gap: 4px; }
.pw-strength-bar span {
  flex: 1; height: 3px; border-radius: 99px;
  background: rgba(100,140,255,0.1); transition: background 0.3s;
}
.pw-strength-bar span.filled-weak   { background: #EF4444; }
.pw-strength-bar span.filled-fair   { background: #F59E0B; }
.pw-strength-bar span.filled-good   { background: #10B981; }
.pw-strength-bar span.filled-strong { background: #06B6D4; }
.pw-strength-label { font-size: 0.73rem; color: var(--subtle); }

/* ─── TERMS CHECKBOX ────────────────────────────────────── */
.terms-label { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }
.terms-label a { color: var(--accent-light); font-weight: 600; }
.terms-label a:hover { color: #6D28D9; text-decoration: underline; }

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-card, .auth-right {
    border-left: none;
    background: rgba(255,255,255,0.95);
    backdrop-filter: none;
    padding: 48px 24px;
  }
  .glass { max-width: 100%; box-shadow: none; border: 1px solid rgba(124,58,237,0.1); }
}
@media (max-width: 480px) {
  .glass { padding: 28px 22px; border-radius: 18px; }
  .glass-title { font-size: 1.3rem; }
}

/* ─── HTML-MATCHING ALIASES ─────────────────────────────────
   login.php / register.php use these class names; map them
   to the correct styles defined above.
   ─────────────────────────────────────────────────────────── */

/* Brand link on left panel */
.auth-brand {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 48px; font-size: 1.05rem; font-weight: 800;
  color: var(--text); text-decoration: none;
}

/* Inner wrapper inside .auth-visual */
.auth-visual-content { position: relative; z-index: 2; max-width: 380px; }

/* Headline inside left panel */
.auth-headline {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 900; letter-spacing: -0.04em;
  line-height: 1.1; margin-bottom: 16px; color: var(--text);
}
.auth-headline span {
  background: linear-gradient(135deg, #6D28D9 0%, #EC4899 50%, #D97706 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 5s ease infinite;
}

/* Subtitle on left panel */
.auth-sub {
  color: var(--muted); font-size: 0.9rem;
  line-height: 1.7; margin-bottom: 36px; max-width: 34ch;
}

/* Footer strip on left panel */
.auth-visual-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 60px;
  background: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(124,58,237,0.1);
  font-size: 0.82rem; color: var(--muted);
  backdrop-filter: blur(8px);
}
.auth-visual-footer strong { color: var(--accent); }

/* Form card headings */
.glass-title {
  font-size: 1.6rem; font-weight: 900;
  letter-spacing: -0.04em; margin-bottom: 6px; color: var(--text);
  position: relative; z-index: 1;
}
.glass-sub {
  color: var(--muted); font-size: 0.875rem;
  line-height: 1.6; margin-bottom: 24px;
  position: relative; z-index: 1;
}

/* Mini brand inside card */
.glass-brand {
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 28px; position: relative; z-index: 1;
}
.glass-brand-name {
  font-size: 0.95rem; font-weight: 800; color: var(--text);
}

/* Form grid */
.form-grid { display: grid; gap: 16px; position: relative; z-index: 1; }

/* Divider */
.divider {
  height: 1px; margin: 22px 0;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.15), transparent);
  position: relative; z-index: 1;
}

/* Footer links */
.auth-link { font-size: 0.85rem; color: var(--muted); margin-top: 6px; text-align: center; position: relative; z-index: 1; }
.auth-link a { color: var(--accent); font-weight: 600; transition: color 0.2s; }
.auth-link a:hover { color: #6D28D9; text-decoration: underline; }

/* Generic btn (auth pages don't load main.css) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; border-radius: 13px;
  background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 50%, #EC4899 100%);
  background-size: 200% auto;
  color: #fff; font-size: 0.95rem; font-weight: 700; font-family: inherit;
  border: none; cursor: pointer; text-decoration: none; text-align: center;
  transition: background-position 0.4s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 24px rgba(124,58,237,0.45), 0 0 0 1px rgba(255,255,255,0.1) inset;
  position: relative; overflow: hidden; letter-spacing: -0.01em;
  box-sizing: border-box;
}
.btn::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-12deg);
}
.btn:hover {
  background-position: right center;
  box-shadow: 0 8px 36px rgba(124,58,237,0.6), 0 0 0 1px rgba(255,255,255,0.12) inset;
  transform: translateY(-2px);
}
.btn:hover::before { animation: shimmer 0.6s ease-out forwards; }
.btn:active { transform: translateY(0); }
.btn-primary { /* inherits from .btn */ }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
