/* ═══════════════════════════════════════════════════════════
   auth.css — login / signup / reset  ·  Professional Edition
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:           #060810;
  --surface:      rgba(255,255,255,.03);
  --surface2:     rgba(255,255,255,.06);
  --border:       rgba(255,255,255,.08);
  --gold:         #3d84ff;
  --gold2:        #7fb1ff;
  --gold-dark:    #1d4fd8;
  --purple:       #a855f7;
  --teal:         #00e5ff;
  --pink:         #ff2f6e;
  --red:          #f87171;
  --green:        #00ff88;
  --text:         #f3f5fc;
  --muted:        #5b6478;
  --muted2:       #9aa4bc;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 20% 10%, rgba(79,124,255,.14) 0%, transparent 55%),
    radial-gradient(ellipse 55% 70% at 80% 90%, rgba(56,189,248,.1) 0%, transparent 55%);
}

/* ─── Split layout ───────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 768px) {
  .auth-page { display: block; }
  .auth-left  { display: none; }
}

/* ─── Left brand panel ───────────────────────────────────────────── */
.auth-left {
  background: linear-gradient(145deg, rgba(79,124,255,.10) 0%, rgba(56,189,248,.05) 50%, rgba(139,124,246,.08) 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem; position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2338bdf8' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.auth-left::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.auth-brand { position: relative; z-index: 1; }
.auth-brand-logo {
  font-family: 'Inter', sans-serif; font-weight: 800;
  font-size: 1.8rem;
  color: var(--text);
  text-shadow: 0 0 26px rgba(61,132,255,.5), 0 0 60px rgba(61,132,255,.2);
  margin-bottom: .5rem;
}
.auth-brand-sub {
  color: var(--muted2); font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3rem;
}

.auth-features { list-style: none; display: flex; flex-direction: column; gap: .75rem; position: relative; z-index: 1; }
.auth-features li {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: 14px; padding: .85rem 1rem;
  color: var(--muted2); font-size: .86rem; line-height: 1.5;
  transition: border-color .22s, background .22s, transform .18s;
  cursor: default;
}
.auth-features li:hover {
  background: rgba(0,229,255,.05);
  border-color: rgba(0,229,255,.3);
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(0,229,255,.08);
}

.feat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem; flex-shrink: 0;
}
.feat-icon.gold {
  background: linear-gradient(135deg, rgba(61,132,255,.25), rgba(61,132,255,.06));
  border: 1px solid rgba(61,132,255,.5);
  box-shadow: 0 0 20px rgba(61,132,255,.25);
}
.feat-icon.purple {
  background: linear-gradient(135deg, rgba(168,85,247,.25), rgba(168,85,247,.06));
  border: 1px solid rgba(168,85,247,.5);
  box-shadow: 0 0 20px rgba(168,85,247,.25);
}
.feat-icon.teal {
  background: linear-gradient(135deg, rgba(0,229,255,.25), rgba(0,229,255,.06));
  border: 1px solid rgba(0,229,255,.5);
  box-shadow: 0 0 20px rgba(0,229,255,.25);
}
.feat-icon.green {
  background: linear-gradient(135deg, rgba(0,255,136,.25), rgba(0,255,136,.06));
  border: 1px solid rgba(0,255,136,.5);
  box-shadow: 0 0 20px rgba(0,255,136,.25);
}
.feat-icon.pink {
  background: linear-gradient(135deg, rgba(255,47,110,.25), rgba(255,47,110,.06));
  border: 1px solid rgba(255,47,110,.5);
  box-shadow: 0 0 20px rgba(255,47,110,.25);
}

.feat-text { flex: 1; min-width: 0; }
.feat-text strong { display: block; color: var(--text); font-size: .88rem; font-weight: 700; margin-bottom: .18rem; }
.feat-check { font-size: .7rem; color: var(--teal); flex-shrink: 0; text-shadow: 0 0 8px rgba(0,229,255,.6); }

.auth-left-footer {
  position: absolute; bottom: 2rem; left: 3rem; right: 3rem;
  color: var(--muted); font-size: .78rem;
  border-top: 1px solid var(--border); padding-top: 1rem;
  z-index: 1;
}

/* ─── Right form panel ───────────────────────────────────────────── */
.auth-right {
  display: flex; align-items: center; justify-content: center;
  padding: 2.5rem 1.5rem;
}
.auth-form-wrap { width: 100%; max-width: 400px; }
.auth-form-title {
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.55rem;
  color: var(--text); margin-bottom: .4rem;
  text-shadow: 0 0 30px rgba(61,132,255,.35);
}
.auth-form-desc { color: var(--muted2); font-size: .88rem; margin-bottom: 2rem; }

/* ─── Bonus badge ────────────────────────────────────────────────── */
.bonus-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25);
  border-radius: 20px; padding: .4rem 1rem;
  font-size: .8rem; color: #6ee7a8; font-weight: 500; margin-bottom: 1.5rem;
}

/* ─── Alerts ─────────────────────────────────────────────────────── */
.alert {
  padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1.2rem;
  font-size: .85rem; display: flex; align-items: center; gap: .6rem;
}
.alert-error {
  background: rgba(248,113,113,.10); border: 1px solid rgba(248,113,113,.28); color: #fca5a5;
}
.alert-success {
  background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.25); color: #6ee7a8;
}

/* ─── Form inputs ────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.2rem; position: relative; }
.form-group label {
  display: block; font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted2); margin-bottom: .5rem;
}
.hint { color: var(--muted); font-size: .68rem; text-transform: none; letter-spacing: 0; margin-left: .4rem; }
.form-group input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-size: .95rem; font-family: inherit;
  padding: .8rem 1rem; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form-group input::placeholder { color: var(--muted); }
.form-group input:focus {
  border-color: var(--gold);
  background: rgba(79,124,255,.03);
  box-shadow: 0 0 0 3px rgba(79,124,255,.14);
}

/* ─── Auth buttons ───────────────────────────────────────────────── */
.btn-primary {
  width: 100%; padding: .9rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold2));
  color: #fff; font-weight: 700; font-size: .92rem;
  font-family: 'Inter', sans-serif;
  border: none; border-radius: 10px; cursor: pointer;
  transition: all .25s;
  box-shadow: 0 0 28px rgba(61,132,255,.4), 0 4px 20px rgba(61,132,255,.3);
  position: relative; overflow: hidden;
  animation: pulseGlow 2.8s ease-in-out infinite;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,.12), transparent);
  opacity: 0; transition: opacity .2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  animation-play-state: paused;
  box-shadow: 0 0 42px rgba(61,132,255,.65), 0 8px 30px rgba(61,132,255,.45);
}
.btn-primary:hover::after { opacity: 1; }
.btn-primary:active { transform: translateY(0); }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 22px rgba(61,132,255,.45), 0 4px 22px rgba(61,132,255,.3); }
  50%      { box-shadow: 0 0 42px rgba(61,132,255,.8),  0 4px 30px rgba(61,132,255,.5); }
}

/* ─── Auth links ─────────────────────────────────────────────────── */
.auth-link { text-align: center; margin-top: 1.5rem; font-size: .85rem; color: var(--muted); }
.auth-link a {
  color: var(--teal); text-decoration: none; font-weight: 500;
  transition: color .15s;
}
.auth-link a:hover { color: var(--gold2); }

/* ─── Divider ────────────────────────────────────────────────────── */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--muted); font-size: .75rem; margin: 1.5rem 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: var(--border);
}

/* ─── Floating theme toggle ──────────────────────────────────────── */
.theme-toggle-float {
  position: fixed; top: 1rem; right: 1rem; z-index: 1000;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(255,255,255,.03);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: all .18s;
  backdrop-filter: blur(8px); padding: 0;
}
.theme-toggle-float:hover {
  border-color: var(--b2, rgba(255,255,255,.2)); background: rgba(79,124,255,.08);
}

/* ─── Light Mode ─────────────────────────────────────────────────── */
[data-theme="light"] {
  --bg:        #f6f7fb;
  --surface:   rgba(0,0,0,.03);
  --surface2:  rgba(0,0,0,.06);
  --border:    rgba(0,0,0,.09);
  --gold:      #2f5fd6;
  --gold2:     #4a75e0;
  --gold-dark: #1e40af;
  --purple:    #6d28d9;
  --teal:      #0369a1;
  --pink:      #be123c;
  --red:       #dc2626;
  --green:     #16a34a;
  --text:      #131a2c;
  --muted:     #6b7280;
  --muted2:    #4b5563;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 70% 55% at 20% 10%, rgba(47,95,214,.05) 0%, transparent 55%),
    radial-gradient(ellipse 55% 70% at 80% 90%, rgba(3,105,161,.04)  0%, transparent 55%);
}
[data-theme="light"] .auth-left {
  background: linear-gradient(145deg, rgba(47,95,214,.05) 0%, rgba(3,105,161,.03) 50%, rgba(109,40,217,.04) 100%);
  border-right-color: var(--border);
}
[data-theme="light"] .auth-left::after  { background: none; }
[data-theme="light"] .auth-features li  { background: rgba(0,0,0,.02); border-color: var(--border); }
[data-theme="light"] .auth-features li:hover { background: rgba(47,95,214,.04); border-color: rgba(47,95,214,.2); }
[data-theme="light"] .auth-features li strong { color: var(--text); }
[data-theme="light"] .auth-left-footer { border-top-color: var(--border); color: #6b7280; }
[data-theme="light"] .form-group input { background: rgba(0,0,0,.02); border-color: var(--border); color: var(--text); }
[data-theme="light"] .form-group input::placeholder { color: #9ca3af; }
[data-theme="light"] .form-group input:focus { background: rgba(47,95,214,.03); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(47,95,214,.10); }
[data-theme="light"] .btn-primary { animation: none; box-shadow: 0 4px 16px rgba(47,95,214,.2); }
[data-theme="light"] .btn-primary:hover { box-shadow: 0 8px 24px rgba(47,95,214,.32); }
[data-theme="light"] .theme-toggle-float { border-color: var(--border); background: rgba(0,0,0,.03); }
[data-theme="light"] .theme-toggle-float:hover { border-color: rgba(47,95,214,.3); background: rgba(47,95,214,.06); }
[data-theme="light"] .auth-divider::before,
[data-theme="light"] .auth-divider::after { background: var(--border); }
[data-theme="light"] .auth-brand-logo,
[data-theme="light"] .auth-form-title,
[data-theme="light"] .feat-check { text-shadow: none; }
[data-theme="light"] .feat-icon.gold, [data-theme="light"] .feat-icon.purple,
[data-theme="light"] .feat-icon.teal, [data-theme="light"] .feat-icon.green,
[data-theme="light"] .feat-icon.pink { box-shadow: none; }
[data-theme="light"] .auth-features li:hover { box-shadow: none; }
