/* =============================================================
   WowCodes Portal — auth-theme.css
   Shared chrome for the standalone auth pages (sign in, register,
   forgot/reset password, verify email): ambient background, pill
   buttons and preloader mirror the wowcodes.in marketing site so
   the portal doesn't feel like a different product mid-session.
   ============================================================= */

:root {
  --bg: #0d0d0d; --bg2: #141414; --bg3: #1a1a1a; --bg4: #222;
  --border: rgba(255,255,255,0.07); --border2: rgba(255,255,255,0.13);
  --amber: #f0a500; --amber-bg: rgba(240,165,0,0.08); --amber-bg2: rgba(240,165,0,0.15);
  --text: #f0ede6; --text2: #9a9690; --text3: #5c5a56;
  --r: 6px; --rl: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  padding: 24px 16px;
  position: relative;
}

a { color: inherit; }

/* Same fixed noise texture used on the marketing pages, so switching
   between wowcodes.in and the portal doesn't read as a texture change. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Ambient background blobs ─────────────────────────────────── */
.bg-ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(90px); }
.bg-blob-1 {
  top: -12%; left: -10%; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(240,165,0,0.10) 0%, transparent 70%);
  animation: bgBlobDrift1 26s ease-in-out infinite;
}
.bg-blob-2 {
  bottom: -15%; right: -10%; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(26,188,138,0.08) 0%, transparent 70%);
  animation: bgBlobDrift2 32s ease-in-out infinite;
}
@keyframes bgBlobDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.15); }
}
@keyframes bgBlobDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, -60px) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .bg-blob-1, .bg-blob-2 { animation: none; }
}

/* ── Page preloader ────────────────────────────────────────────── */
#wc-preloader { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; background: var(--bg); transition: opacity 0.45s ease; }
#wc-preloader::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 620px 420px at 50% 45%, rgba(240,165,0,0.14), transparent 70%); pointer-events: none; }
.wc-preloader-mark { position: relative; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; }
.wc-preloader-ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid rgba(240,165,0,0.15); border-top-color: var(--amber); animation: wcPreloaderSpin 0.85s linear infinite; }
.wc-preloader-logo { width: 22px; height: 22px; position: relative; animation: wcPreloaderPulse 1.6s ease-in-out infinite; }
@keyframes wcPreloaderSpin { to { transform: rotate(360deg); } }
@keyframes wcPreloaderPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.55; transform: scale(0.86); } }
#wc-preloader.wc-preloader-hide { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .wc-preloader-ring, .wc-preloader-logo { animation: none; } }

/* ── Back-to-site button — fixed top-left mobile header stand-in,
   since these auth pages have no top bar of their own. ────────── */
.auth-back-btn {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  inset-inline-start: 16px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 8px;
  padding-inline: 10px 14px;
  border-radius: 999px;
  background: var(--bg2);
  border: 0.5px solid var(--border2);
  color: var(--text2);
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.auth-back-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.auth-back-btn:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }

/* ── Layout ────────────────────────────────────────────────────── */
.auth-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.auth-logo img { height: 24px; width: auto; display: block; }
.auth-logo .brand-tld { color: var(--amber); }

/* Soft glow behind the card, matching the marketing hero's .hero-glow */
.auth-glow {
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 320px;
  background: radial-gradient(ellipse, rgba(240,165,0,0.14) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.auth-card > *:not(.auth-glow) { position: relative; z-index: 1; }

.auth-card {
  background: var(--bg2);
  border: 0.5px solid var(--border);
  border-radius: var(--rl);
  padding: 40px;
  width: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-align: start;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.auth-card h1 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.3px;
}

.auth-card.auth-card-center { text-align: center; }

.auth-subtitle {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 24px;
  line-height: 1.5;
}

.status-icon { font-size: 48px; display: block; margin-bottom: 16px; }

.auth-card p.auth-lede {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Alerts ────────────────────────────────────────────────────── */
.alert {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--r);
  margin-bottom: 16px;
  border: 0.5px solid;
  line-height: 1.5;
}
.alert-error { background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.2); color: #f87171; }
.alert-success { background: rgba(26,188,138,0.08); border-color: rgba(26,188,138,0.2); color: #1abc8a; }

/* ── Forms ─────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 13px; color: var(--text2); font-weight: 500; }

.input-wrap { position: relative; }
.auth-input {
  background: var(--bg3);
  border: 0.5px solid var(--border2);
  border-radius: var(--r);
  padding: 10px 14px;
  color: var(--text);
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.auth-input:focus { border-color: var(--amber); }
.auth-input::placeholder { color: var(--text3); }
.auth-input.has-toggle { padding-inline-end: 42px; }

.pw-toggle {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}
.pw-toggle:hover { color: var(--text2); }
.pw-toggle svg { width: 16px; height: 16px; }

.strength-track { height: 3px; border-radius: 2px; background: var(--bg4); margin-top: 6px; }
.strength-fill { height: 100%; border-radius: 2px; transition: all 0.3s; width: 0; }

.remember-row { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.remember-row input[type="checkbox"] { accent-color: var(--amber); width: 14px; height: 14px; cursor: pointer; }
.remember-row label { font-size: 13px; color: var(--text2); cursor: pointer; }

/* ── Buttons — pill + gradient/glow, matching .btn-nav on wowcodes.in ── */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #ffc233, var(--amber));
  color: #0d0d0d;
  font-weight: 700;
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.1px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(240,165,0,0.35), inset 0 1px 0 rgba(255,255,255,0.35);
  margin-top: 4px;
}
.btn-primary:hover,
.btn-secondary:hover { filter: brightness(1.08); box-shadow: 0 8px 26px rgba(240,165,0,0.5), inset 0 1px 0 rgba(255,255,255,0.35); }
.btn-primary:active,
.btn-secondary:active { transform: scale(0.97); }

.btn-secondary { width: auto; padding: 12px 28px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text2);
  font-weight: 500;
  padding: 11px 28px;
  border-radius: 999px;
  border: 0.5px solid var(--border2);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); background: var(--amber-bg); }

.auth-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text2); }
.auth-foot a { color: var(--amber); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.expired-box { text-align: center; }
.expired-icon { font-size: 40px; margin-bottom: 12px; display: block; }
.expired-box p { color: var(--text2); font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
