/*
 * Estética heredada de la web anterior de bluepin.club: azul marino profundo
 * con un halo radial, tipografía limpia y mucho aire. Se mantiene el carácter
 * y se adapta al contenido nuevo, que ahora es funcional y no solo un aviso
 * de "próximamente".
 */

:root {
  /* Azul marino del diseño original: el fondo es claramente azul, no negro.
     El halo radial superior es lo que le da profundidad. */
  --bg-deep:   #071121;
  --bg-mid:    #122842;
  --halo:      #1d3e6b;
  --surface:   rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border:    rgba(255, 255, 255, 0.10);
  --border-2:  rgba(255, 255, 255, 0.16);
  --text:      #eef2f8;
  --muted:     #94a3b8;
  --dim:       #64748b;
  --accent:    #4f83f1;
  --accent-2:  #7aa5f7;
  --ok:        #4ade80;
  --error:     #f87171;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1400px 900px at 50% 18%, var(--halo) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 70%, #050c17 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto,
               'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 0 20px 80px;
}

.wrap { max-width: 680px; margin: 0 auto; }

/* ─── Cabecera ──────────────────────────────────────────────────────────── */

.head {
  text-align: center;
  padding: 72px 0 40px;
}

.pin {
  font-size: 68px;
  line-height: 1;
  display: inline-block;
  /* El halo rojizo del pin sobre el azul, como en el diseño original. */
  filter: drop-shadow(0 0 28px rgba(239, 68, 68, 0.45));
  transform: rotate(-8deg);
}

.head h1 {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #b9cbe8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.head .sub {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-top: 10px;
}

.head .lede {
  color: var(--muted);
  font-size: 17px;
  margin: 24px auto 0;
  max-width: 520px;
}

/* ─── Tarjetas ──────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}

.card h2 { font-size: 21px; font-weight: 650; margin-bottom: 10px; }
.card h3 { font-size: 16px; font-weight: 650; margin-bottom: 8px; }
.card p  { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--text); font-weight: 600; }

.card.hero {
  background: linear-gradient(180deg, rgba(79,131,241,0.10), rgba(79,131,241,0.02));
  border-color: rgba(79, 131, 241, 0.28);
}

/* ─── Formularios ───────────────────────────────────────────────────────── */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin: 18px 0 7px;
}

input, select {
  width: 100%;
  padding: 13px 15px;
  /* 16px evita que iOS haga zoom automático al enfocar el campo. */
  font-size: 16px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

input::placeholder { color: var(--dim); }
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 18px 22px;
  margin-top: 26px;
}

legend {
  padding: 0 9px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

button {
  width: 100%;
  margin-top: 26px;
  padding: 14px;
  font-size: 16px;
  font-weight: 650;
  color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.08s;
}

button:hover:not(:disabled) { opacity: 0.92; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: default; }

.codeform input {
  text-align: center;
  letter-spacing: 12px;
  font-size: 30px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 18px 15px;
  text-indent: 12px; /* compensa el letter-spacing del último carácter */
}

/* ─── Estados ───────────────────────────────────────────────────────────── */

.status {
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: var(--muted);
}

.status.ok  { border-color: rgba(74, 222, 128, 0.4); color: var(--ok); }
.status.bad { border-color: rgba(248, 113, 113, 0.4); color: var(--error); }

.error {
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--error);
  font-size: 14px;
}

.hint { font-size: 13px; color: var(--dim); margin-top: 7px; }
.hint.ok { color: var(--ok, #3ecf8e); }

code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ─── Lista de garantías ────────────────────────────────────────────────── */

.facts { list-style: none; margin-top: 4px; }

.facts li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
}

.facts li:last-child { margin-bottom: 0; }

.facts li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(79, 131, 241, 0.7);
}

.facts strong { display: block; color: var(--text); margin-bottom: 2px; }

/* ─── Tabla de datos conservados ────────────────────────────────────────── */

.kept {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 6px;
}

.kept th,
.kept td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.kept th { color: var(--text); font-weight: 600; width: 38%; }
.kept td { color: var(--muted); }
.kept tr:last-child th,
.kept tr:last-child td { border-bottom: none; }

/* ─── Pie ───────────────────────────────────────────────────────────────── */

.foot {
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  margin-top: 40px;
  line-height: 1.8;
}

.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--border-2); }
.foot a:hover { color: var(--text); }

.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 15px;
  color: var(--text);
}

@media (max-width: 520px) {
  .head { padding: 48px 0 32px; }
  .head h1 { font-size: 34px; }
  .pin { font-size: 56px; }
  .card { padding: 22px; }
  .codeform input { letter-spacing: 8px; font-size: 26px; }
}

select option { color: #0a1628; }

/* ─── Panel del club ─────────────────────────────────────────────────────── */

.card.wide { max-width: 980px; }
.card.narrow { max-width: 440px; }
.card h2 { margin: 0 0 10px; font-size: 20px; }
.panel-bar { max-width: 980px; margin: 0 auto 18px; display: flex; gap: 12px; align-items: center; justify-content: flex-end; color: var(--dim); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--dim); font-weight: 600; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.inline input { padding: 7px 10px; font-size: 14px; min-width: 150px; }
td.actions { display: flex; gap: 6px; }
td.actions form { margin: 0; }
button.small { padding: 7px 12px; font-size: 13px; width: auto; margin: 0; }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.danger { background: #c2303c; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.active { background: rgba(74, 222, 128, 0.15); color: var(--ok); }
.tag.waiting { background: rgba(79, 131, 241, 0.18); color: #8fb2ff; }
.tag.revoked { background: rgba(194, 48, 60, 0.2); color: #ff8a8f; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.grid2 .row-buttons { grid-column: 1 / -1; display: flex; gap: 10px; }
.grid2 .row-buttons button { width: auto; }
textarea { width: 100%; padding: 13px 15px; font: inherit; font-size: 16px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border); border-radius: 11px; color: var(--text); resize: vertical; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* El panel necesita más ancho que el formulario de vinculación. */
.wrap:has(.card.wide) { max-width: 1020px; }
.card.wide { margin-left: auto; margin-right: auto; }
td.actions { flex-wrap: nowrap; white-space: nowrap; }

/* ─── Web pública: menú superior ─────────────────────────────────────────── */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  border-bottom: 1px solid transparent;
  background: rgba(10, 22, 40, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 0 0 18px 18px;
}

.topnav a { color: var(--text); text-decoration: none; }
.topnav-brand { font-weight: 800; font-size: 18px; letter-spacing: 0.5px; white-space: nowrap; }
.topnav-links { display: flex; gap: 22px; flex: 1; justify-content: center; }
.topnav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.topnav-links a:hover { color: var(--text); }
.topnav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.topnav-cta { padding: 8px 16px; border-radius: 999px; background: var(--accent); font-weight: 650; font-size: 14px; }
.lang-switch { display: flex; border: 1px solid var(--border-2); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 6px 11px; font-size: 13px; font-weight: 650; color: var(--muted); }
.lang-switch a.on { background: rgba(255, 255, 255, 0.12); color: var(--text); }

/* ─── Web pública: portada ───────────────────────────────────────────────── */

.wrap.site { max-width: 1100px; }

.hero { text-align: center; padding: 84px 0 40px; }
.hero-pin { font-size: 64px; filter: drop-shadow(0 0 28px rgba(239, 68, 68, 0.45)); transform: rotate(-8deg); display: inline-block; }
.hero h1 {
  font-size: 52px; line-height: 1.12; font-weight: 750; letter-spacing: -1px; margin: 18px auto 18px; max-width: 760px;
  background: linear-gradient(180deg, #ffffff 0%, #b9cbe8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-body { color: var(--muted); font-size: 19px; max-width: 680px; margin: 0 auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.btn { display: inline-block; padding: 13px 24px; border-radius: 12px; font-weight: 650; text-decoration: none; color: #fff; }
.btn.primary { background: var(--accent); }
.btn.ghost { border: 1px solid var(--border-2); color: var(--text); }
.btn:hover { opacity: 0.92; }

.hero-code { max-width: 440px; margin: 44px auto 0; text-align: left; }
.hero-code label { color: var(--muted); font-size: 14px; }
.hero-code-row { display: flex; gap: 10px; margin-top: 8px; }
.hero-code-row input { text-align: center; letter-spacing: 8px; font-size: 22px; text-transform: uppercase; }
.hero-code-row button { width: auto; margin: 0; padding: 0 22px; white-space: nowrap; }

.section { padding: 64px 0 8px; scroll-margin-top: 80px; }
.section > h2 { text-align: center; font-size: 34px; letter-spacing: -0.5px; margin-bottom: 14px; }
.section-lede { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; font-size: 17px; }
.section .card { margin-top: 18px; }
.section h3 { font-size: 18px; margin-bottom: 8px; }

.steps, .features { display: grid; gap: 16px; margin-top: 28px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.features { grid-template-columns: repeat(4, 1fr); }
.step, .feature {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px 22px;
}
.step p, .feature p { color: var(--muted); font-size: 15px; }
.feature-icon { font-size: 30px; margin-bottom: 12px; }
.step-num {
  position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(79, 131, 241, 0.18); color: var(--accent-2); font-weight: 750; display: flex; align-items: center; justify-content: center;
}

.privacy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.privacy-grid .card { margin-top: 28px; }

.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px auto 18px; max-width: 820px; }
.platform { padding: 9px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 15px; }

.stores-title { text-align: center; color: var(--dim); font-size: 14px; margin: 26px 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 auto 18px; max-width: 860px; }
.store { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 12px; background: #0b1628; border: 1px solid var(--border); color: inherit; text-decoration: none; font-weight: 700; }
.store:hover { border-color: var(--accent, #3b82f6); }
button.store { font: inherit; font-weight: 700; cursor: pointer; width: auto; margin: 0; }
.apt-dialog { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100% - 32px); overflow: auto; max-width: 720px; width: calc(100% - 32px); border: 1px solid var(--border); border-radius: 18px; background: #0b1628; color: inherit; padding: 26px; }
.apt-dialog::backdrop { background: rgba(0, 0, 0, 0.65); }
.apt-dialog h3 { margin: 0 0 8px; font-size: 20px; }
.apt-dialog p { color: var(--dim); margin: 0 0 14px; }
.apt-dialog pre { overflow-x: auto; background: #050c17; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; font-size: 13px; line-height: 1.6; margin: 0; }
.apt-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.apt-actions button { width: auto; margin: 0; flex: 0 0 auto; font: inherit; font-weight: 700; padding: 10px 18px; border-radius: 10px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: inherit; }
.apt-actions .apt-copy { background: #3b82f6; border-color: #3b82f6; color: #fff; }
.site-foot { margin-top: 70px; }
.legal { color: var(--dim); font-size: 13px; max-width: 640px; margin: 0 auto 22px; }

@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .topnav-links { display: none; }
}

@media (max-width: 640px) {
  .steps, .features, .privacy-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 36px; }
  .hero-body { font-size: 17px; }
  .section > h2 { font-size: 28px; }
  .topnav { padding: 10px 12px; gap: 10px; }
  .topnav-brand { font-size: 16px; }
}

/* Mantener lo que ya tiene el aparato (solo si ya estaba vinculado). */
.keep { margin: 4px 0 18px; padding: 14px 16px; border-radius: 12px; background: rgba(79, 131, 241, 0.1); border: 1px solid rgba(79, 131, 241, 0.35); }
.keep .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; margin: 0; }
.keep .check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #4f83f1; }

/* ─── Páginas legales (privacidad) ─────────────────────────────────────── */
.legal-page { max-width: 760px; margin: 32px auto 0; line-height: 1.65; }
.legal-page h1 { font-size: 34px; margin: 0 0 6px; }
.legal-updated { color: var(--dim, #8fa3bf); font-size: 14px; margin: 0 0 22px; }
.legal-intro { font-size: 18px; margin-bottom: 26px; }
.legal-page h2 { font-size: 21px; margin: 30px 0 10px; }
.legal-page ul { padding-left: 22px; }
.legal-page li { margin-bottom: 8px; }
.legal-page a { color: #7aa7ff; }

/* Confirmación de derechos antes de enviar una lista. */
.check.rights { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 6px; font-size: 14px; line-height: 1.5; cursor: pointer; }
.check.rights input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: #4f83f1; }
.check.rights a { color: #7aa7ff; }

/* Modo hotel «en una fecha…»: el selector de fecha, separado del desplegable. */
#travelUntil { margin-top: 10px; }

/* Mando desde el móvil (/mando) */
.remote { text-align: center; }
.remote .rrow { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.remote .rkey {
  flex: 1; min-height: 56px; border-radius: 14px; border: 1px solid rgba(238, 242, 248, 0.18);
  background: rgba(238, 242, 248, 0.08); color: inherit; font-size: 18px; font-weight: 600;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; cursor: pointer;
}
.remote .rkey:active { background: rgba(79, 131, 241, 0.45); }
.remote .dpad {
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-areas: ". up ." "left ok right" ". down .";
  gap: 10px; max-width: 300px; margin: 18px auto;
}
.remote .dpad .rkey { min-height: 76px; font-size: 26px; }
.remote .dpad .up { grid-area: up; } .remote .dpad .down { grid-area: down; }
.remote .dpad .left { grid-area: left; } .remote .dpad .right { grid-area: right; }
.remote .dpad .ok { grid-area: ok; border-radius: 50%; background: #2f5fd0; font-size: 22px; }
.remote .digits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.remote .rtext { margin-top: 18px; text-align: left; }
.remote .rtext input { flex: 3; min-height: 52px; }

/* ─── Avisos de infracción (/denunciar) ────────────────────────────────── */
.report-form { margin-top: 10px; }
.report-form .check.rights input[type=radio] { border-radius: 50%; }
.report-form .opt { font-weight: 400; color: var(--dim); }
.report-form [aria-invalid="true"] { border-color: rgba(248, 113, 113, 0.6); }
.report-form input[type=file] { padding: 11px; }
.report-form .error ul { margin: 6px 0 0 20px; }
.report-form .error p { margin-top: 8px; }
.notice-box { margin: 18px 0; padding: 13px 15px; border-radius: 11px; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.35); font-size: 15px; }
.ref-box { text-align: center; margin: 22px 0; }
.ref-box .ref { font-size: 28px; font-weight: 800; letter-spacing: 1px; color: var(--text); font-family: ui-monospace, Menlo, monospace; }
/* Campo trampa para bots: fuera de la vista, sin display:none (algunos bots lo detectan). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Casilla «No soy un robot» (public/captcha.js): prueba de trabajo propia. */
.captcha { margin-top: 26px; }
.captcha-box {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.captcha-box.invalid { border-color: rgba(248, 113, 113, 0.6); }
.captcha[data-state="verified"] .captcha-box { border-color: rgba(74, 222, 128, 0.45); }
.captcha-label { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; font-weight: 600; color: var(--text); cursor: pointer; }
.captcha-label input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: #4f83f1; cursor: pointer; }
.captcha-label input:disabled { cursor: not-allowed; }
.captcha-label input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.captcha-status { font-size: 14px; color: var(--muted); margin-left: auto; }
.captcha[data-state="verified"] .captcha-status { color: var(--ok); }
.captcha[data-state="error"] .captcha-status { color: var(--error); margin-left: 0; flex-basis: 100%; }
.captcha-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-2); border-top-color: var(--accent-2); animation: captcha-spin 0.8s linear infinite; }
.captcha[data-state="checking"] .captcha-spin { display: inline-block; }
.captcha .error { margin-top: 10px; }
.captcha .error a { color: #7aa7ff; }
@keyframes captcha-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .captcha-spin { animation-duration: 2.4s; } }

/* Insignias oficiales de las tiendas (imágenes sin modificar). */
.badge { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--dim); font-size: 12px; }
.badge img { display: block; height: 48px; width: auto; }
.badge-google img { height: 54px; margin: -3px 0; }
.badge:hover img, .badge:focus-visible img { filter: brightness(1.15); }
.badge-note { line-height: 1.2; }
