/*
 * La landing de registro (looneychat.com). Copia de la referencia que mandó JJ
 * el 01/10/2026: verde para la acción, fondo negro, nuestro logo y banner.
 *
 * ⚠ SIN `height: 100vh` NI CENTRADO VERTICAL, a propósito: en el celular, al
 * abrirse el teclado, una pantalla centrada se reacomoda y "salta". Arriba de
 * todo y en flujo normal, todo queda en su lugar (pedido de JJ, foto 2).
 */

:root {
  --ink: #0d0d0d;
  --ink-soft: #171717;
  --ink-line: #2a2a2a;
  --ink-line-strong: #525252;
  --fg: #f4f4f4;
  --fg-muted: #a3a3a3;
  --fg-faint: #737373;
  --verde: #4ade80;
  --verde-deep: #22c55e;
  --verde-ink: #052e16;
  --gold: #f5b921;
  --danger: #f87171;
  --radio: 16px;
}

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

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  background: radial-gradient(ellipse at 50% 30%, rgba(179, 24, 29, 0.14) 0%, transparent 60%), var(--ink);
  color: var(--fg);
  font-family: "Figtree", system-ui, -apple-system, sans-serif;
  min-height: 100dvh;
}

[hidden] {
  display: none !important;
}

.pagina {
  margin: 0 auto;
  max-width: 440px;
  padding: max(12px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

/* ------------------------------ cabecera ------------------------------ */

.cabecera {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.logo {
  height: 44px;
  width: auto;
}

.mas18 {
  border: 1px solid var(--ink-line-strong);
  border-radius: 999px;
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
}

.banner {
  border-radius: 12px;
  display: block;
  height: auto;
  margin-bottom: 22px;
  width: 100%;
}

/* ------------------------------ formulario ------------------------------ */

.formulario {
  display: flex;
  flex-direction: column;
}

.etiqueta {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.campo {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line-strong);
  border-radius: 12px;
  color: var(--fg);
  font: inherit;
  /* 16px como mínimo: con menos, Safari hace zoom al tocar el campo. */
  font-size: 17px;
  height: 52px;
  outline: none;
  padding: 0 16px;
  transition: border-color 0.15s;
  width: 100%;
}

.campo::placeholder {
  color: var(--fg-faint);
}

.campo:focus {
  border-color: var(--verde);
}

.campo:disabled {
  opacity: 0.8;
}

.boton-verde {
  align-items: center;
  background: linear-gradient(180deg, var(--verde) 0%, var(--verde-deep) 100%);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(34, 197, 94, 0.25);
  color: var(--verde-ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  gap: 10px;
  height: 54px;
  justify-content: center;
  margin-top: 14px;
  text-decoration: none;
  width: 100%;
}

.boton-verde:active {
  filter: brightness(0.95);
}

.boton-verde:disabled {
  cursor: default;
  filter: saturate(0.8) brightness(0.9);
}

.creando #boton-texto {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boton-giro {
  animation: girar 0.8s linear infinite;
  border: 2.5px solid rgba(5, 46, 22, 0.35);
  border-radius: 50%;
  border-top-color: var(--verde-ink);
  display: none;
  height: 18px;
  width: 18px;
}

.creando .boton-giro {
  display: inline-block;
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

.barra {
  background: var(--ink-line);
  border-radius: 999px;
  height: 4px;
  margin-top: 12px;
  overflow: hidden;
}

.barra-relleno {
  background: var(--verde);
  height: 100%;
  transition: width 0.6s ease;
  width: 0%;
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}

.captcha:not(:empty) {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.ayuda {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
}

/* ------------------------------ los pasos ------------------------------ */

.pasos {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin-top: 14px;
  padding: 16px;
}

.paso {
  align-items: center;
  color: var(--fg-faint);
  display: flex;
  font-size: 15px;
  gap: 10px;
  transition: color 0.2s;
}

.paso:first-child {
  font-weight: 700;
}

.paso-icono {
  flex: none;
  height: 18px;
  width: 18px;
}

.paso.activo {
  color: var(--fg);
}

.paso.activo .paso-icono {
  animation: girar 0.8s linear infinite;
  border: 2.5px solid var(--ink-line-strong);
  border-radius: 50%;
  border-top-color: var(--fg);
}

.paso.hecho {
  color: var(--fg);
}

.paso.hecho .paso-icono {
  background: no-repeat center / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

/* ------------------------------ chips y legales ------------------------------ */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin-top: 20px;
}

.chip {
  align-items: center;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  padding: 8px 13px;
}

.punto {
  background: var(--verde);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--verde);
  height: 7px;
  width: 7px;
}

.legal {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 18px;
}

.separador {
  border: 0;
  border-top: 1px solid var(--ink-line);
  margin: 18px 0;
}

.responsable {
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
}

/* ------------------------------ ¡cuenta creada! ------------------------------ */

.lista {
  align-items: center;
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  position: relative;
  text-align: center;
}

.tilde {
  align-items: center;
  animation: aparecer 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  background: var(--verde-deep);
  border-radius: 50%;
  box-shadow: 0 0 32px rgba(74, 222, 128, 0.45);
  color: #fff;
  display: flex;
  height: 68px;
  justify-content: center;
  width: 68px;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
}

.titulo-lista {
  font-family: "Archivo Black", system-ui, sans-serif;
  font-size: 28px;
  letter-spacing: 0.01em;
  margin: 18px 0 20px;
  text-transform: uppercase;
}

.datos {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radio);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
  width: 100%;
}

.dato {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dato-etiqueta {
  color: var(--fg-faint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dato-valor {
  font-size: 22px;
  font-weight: 800;
  user-select: all;
  word-break: break-all;
}

.boton-jugar {
  font-size: 18px;
  margin-top: 20px;
  text-transform: uppercase;
}

.cuenta {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 12px;
}

.guarda {
  color: var(--fg-muted);
  font-size: 14px;
  margin-top: 14px;
}

.pie {
  color: var(--fg-faint);
  font-size: 12px;
  margin-top: 28px;
}

/* El confeti: papelitos que caen una sola vez, detrás de todo. */
.confeti {
  inset: -12px -16px auto;
  height: 260px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
}

.papel {
  animation: caer var(--dur, 2.4s) ease-in var(--delay, 0s) forwards;
  border-radius: 2px;
  height: 10px;
  opacity: 0;
  position: absolute;
  top: -12px;
  width: 6px;
}

@keyframes caer {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(260px) rotate(var(--giro, 360deg));
  }
}

@media (prefers-reduced-motion: reduce) {
  .papel,
  .tilde,
  .boton-giro,
  .paso.activo .paso-icono {
    animation: none;
  }
}
