/* ═══════════════════════════════════════════════
   HELL 480 — AUTH PAGES  ·  auth.css
   Shared by login.html and register.html
   ═══════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --bg:        #080809;
  --bg2:       #0f0f12;
  --bg3:       #161619;
  --border:    rgba(255, 255, 255, 0.08);
  --fire1:     #cc1100;
  --fire2:     #ef4444;
  --fire3:     #f97316;
  --gold:      #facc15;
  --strava:    #fc4c02;
  --text:      #f0f0f2;
  --muted:     #64748b;
  --muted2:    #334155;
  --green:     #22c55e;
  --red:       #ef4444;
  --font-disp: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius:    14px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); }
.hidden { display: none !important; }

/* ── Ambient glows ── */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bg-glow--left {
  width: 500px; height: 500px;
  bottom: -150px; left: -150px;
  background: radial-gradient(circle, rgba(180, 30, 0, 0.14) 0%, transparent 70%);
}
.bg-glow--right {
  width: 400px; height: 400px;
  top: -100px; right: -100px;
  background: radial-gradient(circle, rgba(255, 100, 0, 0.08) 0%, transparent 70%);
}

/* ════════════════════════════════════
   LAYOUT: two-column split
   ════════════════════════════════════ */
.auth-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ════════════════════════════════════
   LEFT BRAND PANEL
   ════════════════════════════════════ */
.auth-brand {
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

/* inner ember glow */
.auth-brand::before {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 40, 0, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.brand-flame {
  font-size: 3.2rem;
  display: block;
  margin-bottom: 14px;
  filter: drop-shadow(0 0 20px rgba(255, 80, 0, 0.55));
  animation: flamePulse 2.5s ease-in-out infinite;
}

@keyframes flamePulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.brand-title {
  font-family: var(--font-disp);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--fire2);
  margin-bottom: 20px;
}

.brand-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

/* Brand stats row */
.brand-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 32px;
}

.bs-item { text-align: center; }
.bs-val {
  display: block;
  font-family: var(--font-disp);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.bs-lbl {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}
.bs-div {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Registration steps (left panel) */
.reg-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-align: left;
  margin-bottom: 32px;
}

.reg-step {
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.4;
  transition: opacity 0.3s;
}

.reg-step.active  { opacity: 1; }
.reg-step.done    { opacity: 0.7; }

.reg-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--muted2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}

.reg-step.active .reg-step-num {
  background: var(--fire2);
  border-color: var(--fire2);
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.reg-step.done .reg-step-num {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.reg-step-info { flex: 1; }

.reg-step-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.reg-step-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}

.reg-step-line {
  width: 2px;
  height: 24px;
  background: var(--border);
  margin-left: 15px;
}

.brand-quote {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--muted2);
  line-height: 1.7;
  border-left: 2px solid var(--fire2);
  padding-left: 14px;
  text-align: left;
}

/* ════════════════════════════════════
   RIGHT FORM PANEL
   ════════════════════════════════════ */
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 460px;
}

.auth-card-header {
  margin-bottom: 28px;
}

.step-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fire2);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.auth-title {
  font-family: var(--font-disp);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.auth-sub {
  font-size: 0.88rem;
  color: var(--muted);
}

/* ── Error banner ── */
.auth-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.85rem;
  padding: 12px 16px;
  margin-bottom: 20px;
  line-height: 1.5;
  display: none;
}
.auth-error.visible { display: block; }

/* ════════════════════════════════════
   FORM FIELDS
   ════════════════════════════════════ */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.field-group { margin-bottom: 18px; }

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}

.field-optional {
  color: var(--muted);
  font-weight: 400;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.field-link {
  font-size: 0.78rem;
  color: var(--fire3);
  font-weight: 500;
  transition: color 0.2s;
}
.field-link:hover { color: var(--text); }

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

.field-icon {
  position: absolute;
  left: 13px;
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.field-input {
  width: 100%;
  padding: 12px 44px 12px 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input::placeholder { color: var(--muted2); }

.field-input:focus {
  border-color: var(--fire2);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-input.valid {
  border-color: var(--green);
}

.field-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 4px;
  transition: color 0.2s;
  z-index: 1;
}
.field-toggle:hover { color: var(--text); }

.field-error {
  display: block;
  font-size: 0.75rem;
  color: #fca5a5;
  margin-top: 5px;
  min-height: 16px;
}

/* Two-column field row */
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Password strength */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

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

.pw-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

.pw-strength-label {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

/* Checkbox */
.field-row { margin-bottom: 20px; }

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.5;
  user-select: none;
}

.check-input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--muted2);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: background 0.2s, border-color 0.2s;
  background: var(--bg3);
}

.check-input:checked + .check-box {
  background: var(--fire2);
  border-color: var(--fire2);
}

.check-input:checked + .check-box::after {
  content: '✓';
  font-size: 11px;
  color: white;
  font-weight: 700;
}

/* ════════════════════════════════════
   BUTTONS
   ════════════════════════════════════ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
  letter-spacing: 0.2px;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(135deg, var(--fire1), var(--fire2), var(--fire3));
  color: white;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}
.btn--primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn--strava {
  background: var(--strava);
  color: white;
  margin-bottom: 0;
}
.btn--strava:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(252, 76, 2, 0.4);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 12px;
}
.btn--ghost:hover {
  border-color: rgba(255,255,255,0.18);
  color: var(--text);
}

.btn-spinner { font-size: 1rem; }

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

/* ── Switch link ── */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-link {
  color: var(--fire3);
  font-weight: 600;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--text); }

/* ════════════════════════════════════
   REGISTRATION STEP PANELS
   ════════════════════════════════════ */
.reg-step-panel {
  animation: panelIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.reg-step-panel.hidden { display: none; }

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

/* ── Runner preview (step 2) ── */
.runner-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg3);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.runner-preview-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fire1), var(--fire3));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-disp);
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.runner-preview-info { flex: 1; }

.runner-preview-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.runner-preview-email {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.runner-preview-check { font-size: 1.2rem; }

/* ── Strava connect card (step 2) ── */
.strava-connect-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 14px;
}

.strava-connect-logo {
  margin-bottom: 12px;
}

.strava-connect-title {
  font-family: var(--font-disp);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.strava-connect-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.strava-perms {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strava-perms li {
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.perm-yes { color: var(--green); font-weight: 700; }
.perm-no  { color: #475569; font-weight: 700; }

.strava-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted2);
  margin-top: 14px;
}

/* ── Success screen (step 3) ── */
.success-wrap {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 24px rgba(255, 80, 0, 0.6));
  animation: flamePulse 2s ease-in-out infinite;
}

.success-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 24px 0;
}

.ss-item { text-align: center; }

.ss-val {
  display: block;
  font-family: var(--font-disp);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.ss-lbl {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-top: 6px;
}

/* ════════════════════════════════════
   FORGOT PASSWORD MODAL
   ════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px;
  max-width: 400px;
  width: 100%;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.modal-close:hover { color: var(--text); background: var(--bg3); }

.modal-title {
  font-family: var(--font-disp);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ════════════════════════════════════
   TOAST
   ════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  z-index: 10000;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════ */
@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    position: static;
    height: auto;
    padding: 36px 24px 28px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .brand-title  { font-size: 2.2rem; }
  .reg-steps    { display: none; }
  .brand-stats  { display: none; }

  .auth-form-wrap { padding: 32px 20px 48px; }
}

@media (max-width: 480px) {
  .field-row-2 { grid-template-columns: 1fr; }
  .brand-flame { font-size: 2.4rem; }
  .auth-title  { font-size: 1.7rem; }
}
