/* ============================================================
   CineVault – Auth page styles (login, register, 2FA, etc.)
   ============================================================ */

:root {
  --bg:        #0c0c0f;
  --surface:   #141418;
  --surface-2: #1c1c22;
  --border:    #2c2c38;
  --gold:      #d4a832;
  --gold-dim:  #8a6b1a;
  --gold-glow: rgba(212,168,50,0.12);
  --danger:    #c0392b;
  --danger-dim:rgba(192,57,43,0.15);
  --success:   #27ae60;
  --text:      #ede9e0;
  --text-2:    #9990a0;
  --text-3:    #5a5565;
  --radius:    8px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  /* Subtle grain texture */
  background-image: radial-gradient(ellipse at 20% 50%, rgba(212,168,50,0.04) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(212,168,50,0.03) 0%, transparent 50%);
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 32px;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.auth-brand-icon {
  width: 38px; height: 38px;
  background: var(--gold);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  position: relative;
  overflow: hidden;
}

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

.auth-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-3);
  font-size: 0.85rem;
  margin-bottom: 28px;
  line-height: 1.5;
}

/* ── Form fields ── */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.03em;
}

.field label .req { color: var(--gold); }

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"] {
  display: block;
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  appearance: none;
}

.field input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

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

.field-hint {
  font-size: 0.72rem;
  color: var(--text-3);
  margin-top: 5px;
}

/* ── OTP code input ── */
.otp-input {
  letter-spacing: 0.4em;
  font-size: 1.4rem !important;
  text-align: center;
  font-family: 'Courier New', monospace !important;
}

/* ── Submit button ── */
.btn-auth {
  display: block;
  width: 100%;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  margin-top: 8px;
}
.btn-auth:hover { background: #f0c84a; }

.btn-auth-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  text-decoration: none;
  margin-top: 8px;
}
.btn-auth-secondary:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.85rem;
  border-left: 3px solid;
  line-height: 1.5;
}
.alert-error   { background: var(--danger-dim); border-color: var(--danger); color: #e57c72; }
.alert-success { background: rgba(39,174,96,0.1); border-color: var(--success); color: #5ddb8e; }
.alert-info    { background: rgba(41,128,185,0.1); border-color: #2980b9; color: #74b9ff; }

/* ── Auth links ── */
.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-links a { color: var(--gold); }
.auth-links a:hover { color: #f0c84a; }

/* ── Password strength meter ── */
.pw-strength {
  height: 4px;
  border-radius: 4px;
  margin-top: 8px;
  transition: all 0.3s;
  background: var(--border);
  overflow: hidden;
}
.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: all 0.3s;
}

.pw-strength-label {
  font-size: 0.7rem;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Requirements list ── */
.pw-reqs {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.pw-reqs li {
  font-size: 0.75rem;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.pw-reqs li::before { content: '○'; font-size: 0.6rem; }
.pw-reqs li.ok { color: #5ddb8e; }
.pw-reqs li.ok::before { content: '●'; }
.pw-reqs li.fail { color: #e57c72; }
.pw-reqs li.fail::before { content: '✕'; }

/* ── QR code area ── */
.qr-wrap {
  text-align: center;
  margin: 20px 0;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.qr-wrap canvas { border-radius: 6px; }

.secret-code {
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  background: var(--bg);
  border: 1px dashed var(--gold-dim);
  border-radius: var(--radius);
  padding: 10px 14px;
  text-align: center;
  margin: 12px 0;
  user-select: all;
  word-break: break-all;
}

/* ── Divider ── */
.auth-divider {
  text-align: center;
  color: var(--text-3);
  font-size: 0.75rem;
  margin: 20px 0;
  position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%; width: calc(50% - 20px);
  height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

/* ── Step indicator ── */
.auth-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.auth-step {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.auth-step.active { background: var(--gold); }
.auth-step.done   { background: var(--success); }

@media (max-width: 460px) {
  .auth-card { padding: 24px 20px; }
}
