/* Auth Modal Styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--clr-bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
  backdrop-filter: blur(6px);
  animation: fade-in 200ms ease;
}

.modal-overlay.hidden { display: none; }

.modal-box {
  background: hsl(250, 20%, 10%);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  width: 100%;
  max-width: 440px;
  position: relative;
  animation: slide-up 250ms ease;
  box-shadow: 0 0 60px hsl(160,100%,50%,0.08), 0 0 120px hsl(280,80%,55%,0.06);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.modal-close:hover { border-color: var(--clr-neon-pink); color: var(--clr-neon-pink); }

.modal-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--clr-neon-green);
  text-shadow: var(--glow-green);
  margin-bottom: var(--space-6);
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--clr-border);
}

.auth-tab {
  flex: 1;
  padding: var(--space-3);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  text-align: center;
  color: var(--clr-text-muted);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-tab.active {
  color: var(--clr-neon-green);
  border-bottom-color: var(--clr-neon-green);
}

.auth-tab:hover:not(.active) { color: var(--clr-text-primary); }

.auth-form { display: none; flex-direction: column; }
.auth-form.active { display: flex; }

.auth-error {
  color: var(--clr-neon-pink);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 0, 204, 0.08);
  border: 1px solid var(--clr-neon-pink);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
  display: none;
}
.auth-error.visible { display: block; }

.auth-footer {
  text-align: center;
  margin-top: var(--space-4);
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

.auth-footer a {
  color: var(--clr-neon-cyan);
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════════════════
   District 12 — Entrance to New Snack City
   Art direction: docs/aaa-experience/03-ART-DIRECTION.md §12

   The ticket booth at the edge of the district: warm doorway light spilling
   into the night. Cinematic but FAST — the entrance is 300ms and the first
   field is focusable immediately. A returning player never sees it at all.
   ══════════════════════════════════════════════════════════════════════ */

.modal-box {
  overflow: hidden;
  animation: auth-door 300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes auth-door {
  from { opacity: 0; transform: translate3d(0, 12px, 0) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

/* The doorway: warm light falling across the top of the booth. */
.auth-doorway {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 78%;
  pointer-events: none;
  background: radial-gradient(50% 60% at 50% 100%, hsla(38,100%,66%,0.16), transparent 68%);
}

.auth-kicker {
  font-family: var(--font-display);
  font-size: 0.54rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: hsl(38 60% 70%);
  margin: 0 0 0.35rem;
}
.modal-title {
  font-size: 1.5rem !important;
  letter-spacing: 0.04em;
  color: hsl(38 100% 78%) !important;
  text-shadow: 0 0 18px hsla(38,100%,66%,0.28) !important;
  margin-bottom: var(--space-2) !important;
}
.auth-story {
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--clr-text-secondary);
  margin: 0 0 var(--space-5);
}

/* Errors are announced (role="alert") and must also be seen. */
.auth-error.is-info {
  color: hsl(38 90% 80%);
  border-color: hsla(38,100%,66%,0.4);
  background: hsla(38,100%,66%,0.08);
}

.auth-footer a { cursor: pointer; }
.auth-footer a:focus-visible { outline: 2px solid hsl(38 100% 66%); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  .modal-box { animation: none; }
  .modal-overlay { animation: none; }
}

/* ── Age + terms consent ─────────────────────────────────────────────────────
   Sits between the last field and the Create Account button, because that is
   where it is read. Deliberately not styled to disappear: this is the thing
   the account's legal footing rests on, and a consent nobody noticed giving is
   the kind that gets argued about. */

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: var(--space-4);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--clr-text-secondary);
  cursor: pointer;
}

.auth-consent input[type="checkbox"] {
  /* A real tap target, and aligned to the first line of text rather than
     floating against the top of a two-line label. */
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--clr-neon-cyan);
  cursor: pointer;
}

.auth-consent a {
  color: var(--clr-neon-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-consent a:hover { color: var(--clr-text-primary); }

/* Keyboard users must be able to see what is focused. */
.auth-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--clr-neon-cyan);
  outline-offset: 2px;
}
