/* Recap Auth — sign-in / create-account card  v2
   Colors aligned with site: #D71220 red · #161b22 panel · #1f242c border · #8b949e muted */

:root {
  --recap-red: #D71220;
  --recap-red-hover: #e8192a;
  --panel: #161b22;
  --border: #1f242c;
  --muted: #8b949e;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

/* ── Page layout ─────────────────────────────────────────────────────────── */
.signup-main {
  /* Fill the viewport below the 60px sticky nav */
  min-height: calc(100vh - 60px);
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;       /* horizontal centering of card */
  /* Vertical padding gives the card breathing room when it's tall (genres screen).
     margin:auto on the card handles true vertical centering when the card is short. */
  padding: 40px 24px;
}

/* ── Auth card ───────────────────────────────────────────────────────────── */
.signup-shell {
  position: relative;
  width: 100%;
  max-width: 580px;
  /* margin:auto in a flex-direction:column container absorbs equal free space above and
     below the card → vertical centering.  When the card is taller than the available
     space the margins collapse to 0 and the page scrolls normally — no clipping. */
  margin: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 52px 52px 48px;
}

.screen[hidden] { display: none; }

/* subtle red corner glow on every screen */
.screen::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215,18,32,.18) 0%, transparent 65%);
  pointer-events: none;
}

/* ── Top bar ────────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.back-chev {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.back-spacer { width: 36px; }

.step-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,.18);
  transition: width .2s, background .2s;
}
.step-dot.active   { width: 22px; background: var(--recap-red); }
.step-dot.complete { background: var(--recap-red); }

/* ── Heading ────────────────────────────────────────────────────────────── */
.heading { margin-bottom: 32px; }

.kicker {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--recap-red);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.heading h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.7px;
  color: var(--white);
}

.heading .sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ── Field ──────────────────────────────────────────────────────────────── */
.field { display: block; margin-bottom: 20px; }

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.field-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 18px;
  height: 60px;
  transition: border-color .15s, box-shadow .15s;
}

.field-input:focus-within {
  border-color: var(--recap-red);
  box-shadow: 0 0 0 3px rgba(215,18,32,.18);
}

.field-input[data-focused] {
  border-color: var(--recap-red);
  box-shadow: 0 0 0 3px rgba(215,18,32,.18);
}

.field-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 17px;
  font-family: inherit;
  padding: 0;
}
.field-input input[type="password"] { letter-spacing: 4px; }
.field-input input::placeholder { color: rgba(255,255,255,.25); letter-spacing: 0; }

.field-check { color: var(--recap-red); flex-shrink: 0; }

.eye-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.eye-btn:hover { color: var(--white); }

/* ── Password checklist ─────────────────────────────────────────────────── */
.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
}

.checklist li.ok { color: var(--white); }

.checklist .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checklist li.ok .dot {
  background: var(--recap-red);
  border: none;
}

/* ── Legal/terms text ───────────────────────────────────────────────────── */
.legal {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.55;
}

.legal-link {
  color: var(--white);
  text-decoration: underline;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary,
.btn-ghost {
  width: 100%;
  height: 60px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, box-shadow .15s;
}

.btn-primary {
  border: none;
  background: var(--recap-red);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(215,18,32,.38);
}

.btn-primary:hover:not(:disabled) {
  background: var(--recap-red-hover);
  box-shadow: 0 4px 22px rgba(215,18,32,.52);
}

.btn-primary:disabled {
  background: rgba(215,18,32,.15);
  color: rgba(255,255,255,.25);
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.22); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signin-row {
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

.signin-link,
.create-link {
  color: var(--white);
  font-weight: 600;
  cursor: pointer;
}
.signin-link:hover, .create-link:hover { text-decoration: underline; }

/* ── Inline errors ──────────────────────────────────────────────────────── */
.field-error {
  font-size: 14px;
  color: var(--recap-red);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ── Welcome screen ─────────────────────────────────────────────────────── */
.welcome-glow {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215,18,32,.26) 0%, transparent 60%);
  filter: blur(8px);
  pointer-events: none;
}

.welcome-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  position: relative;
  z-index: 1;
}

.logo-recap {
  width: 320px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 0 18px rgba(255,255,255,.15))
    drop-shadow(0 10px 30px rgba(215,18,32,.4));
}

.logo-tagline {
  width: 250px;
  height: auto;
  display: block;
  margin-top: 20px;
  filter: drop-shadow(0 4px 12px rgba(215,18,32,.32));
}

.welcome-blurb {
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin: 36px 8px 0;
}

/* ── Profile avatar ─────────────────────────────────────────────────────── */
.avatar-row {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D71220 0%, #8A0B16 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 900;
  color: var(--white);
  box-shadow: 0 8px 28px rgba(215,18,32,.44);
  position: relative;
}

.avatar-cam {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
  color: #0D1117;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--panel);
}

/* ── Genres ─────────────────────────────────────────────────────────────── */
.genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 11px 18px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color .12s;
}
.pill:hover { border-color: rgba(255,255,255,.28); }

.pill.selected {
  background: var(--recap-red);
  border-color: var(--recap-red);
}

.pill-check { display: none; color: var(--white); }
.pill.selected .pill-check { display: inline-block; }

.genre-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.meta-count { font-size: 14px; color: var(--muted); }

.skip-link {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* ── "Check your email" confirm screen ──────────────────────────────────── */
.done-glow {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(215,18,32,.28) 0%, transparent 62%);
  filter: blur(8px);
  pointer-events: none;
}

.done-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 32px;
  position: relative;
  z-index: 1;
}

.rings {
  position: relative;
  width: 148px;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--recap-red);
}
.ring-outer { inset: 0;    opacity: .2; }
.ring-inner { inset: 20px; opacity: .4; }

.ring-core {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--recap-red);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 36px rgba(215,18,32,.54);
}

.done-title {
  font-size: 34px;
  font-weight: 900;
  margin: 28px 0 12px;
  letter-spacing: -.7px;
  color: var(--white);
  text-align: center;
}

.done-sub {
  font-size: 16px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .signup-main  { padding: 16px 12px 32px; min-height: calc(100vh - 60px); }
  .signup-shell { border-radius: 12px; margin: auto; }
  .screen       { padding: 28px 24px 28px; }
  .heading h1   { font-size: 26px; }
  .heading .sub { font-size: 15px; }
  .heading      { margin-bottom: 24px; }
  .field        { margin-bottom: 16px; }
  .field-input  { height: 52px; padding: 0 14px; }
  .field-input input { font-size: 16px; }
  .btn-primary, .btn-ghost { height: 54px; font-size: 16px; }
  .checklist li { font-size: 14px; }
  .logo-recap   { width: 240px; }
  .logo-tagline { width: 190px; }
  .welcome-blurb { font-size: 14px; }
  .done-title   { font-size: 28px; }
  .done-sub     { font-size: 15px; }
}

/* ── Light theme ───────────────────────────────────────────────────────────────
   These vars are consumed by BOTH signup.css and account.css (account.html loads
   this file too), so overriding them here themes the whole auth/account surface.
   style.css's :root[data-theme="light"] already supplies --border at the same
   specificity; it is repeated here only so the value can't drift. Dark unchanged. */
:root[data-theme="light"] {
  --panel:  #ffffff;
  --border: #cdd5de;
  --muted:  #59636e;
  --white:  #1f2328;   /* "white" text becomes dark ink on light */
}

/* Text that sits ON brand red must stay white in both themes. The .pill.selected
   rule must ALSO restate the red background: the light .pill override below is
   (0,3,0) and would otherwise outrank the (0,2,0) .pill.selected rule. */
:root[data-theme="light"] .btn-primary,
:root[data-theme="light"] .pill.selected .pill-check { color: #fff; }
:root[data-theme="light"] .pill.selected {
  background: var(--recap-red);
  border-color: var(--recap-red);
  color: #fff;
}

/* Form fields: give the resting state a real surface + border on light. */
:root[data-theme="light"] .field-input {
  background: var(--panel);
  border: 1px solid var(--border);
}
:root[data-theme="light"] .eye-btn { color: var(--muted); }
:root[data-theme="light"] .field-error { color: #b81020; }

/* Unselected genre pills were white-on-white. */
:root[data-theme="light"] .pill {
  background: var(--panel);
  border: 1px solid var(--border);
  color: #1f2328;
}
:root[data-theme="light"] .pill:hover { border-color: #9aa5b1; }
