:root {
  --night: #141414;
  --white: #fff;
  --orange: #f18110;
  --orange-d: #cc570b;
  --navy: #1c1e69;
  --ink: #141414;
  --radius: 18px;
  --font: ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--night);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.4;
  position: relative;
}

/* Fondo: la esquina del kiosco de noche, oscurecida para que se lea todo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,20,20,.35) 0%, rgba(20,20,20,.88) 45%, var(--night) 100%),
    url("../img/bg.webp") center top / cover no-repeat;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 8px 0 18px; }

.logo {
  display: block;
  width: min(100%, 340px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.7));
}

.tagline {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 14px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 6px;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--navy);
}

/* ---------- Botones ---------- */
.links { display: grid; gap: 12px; }

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 10px 16px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 5px 0 var(--ink);
  font: 800 1.08rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.btn:focus-visible, .form input:focus-visible, .form textarea:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.btn-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--orange);
}
.btn-icon svg, .btn-icon img { display: block; }
.btn-label { flex: 1; text-align: center; padding-right: 42px; } /* centra el texto compensando el icono */

/* Steam: protagonista */
.btn-primary {
  min-height: 78px;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.28rem;
  border-color: var(--ink);
  box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--white);
  animation: pulse 2.6s ease-in-out infinite;
}
.btn-primary:hover { box-shadow: 0 8px 0 var(--ink), 0 0 0 4px var(--white); }
.btn-primary:active { box-shadow: 0 1px 0 var(--ink), 0 0 0 4px var(--white); }
.btn-primary .btn-icon { width: 50px; height: 50px; background: var(--white); color: var(--orange); }
.btn-primary .btn-icon svg, .btn-primary .btn-icon img { width: 32px; height: 32px; }
.btn-primary .btn-label { padding-right: 50px; }

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.025); }
}


/* Link sin URL todavia */
.btn.is-pending { cursor: default; }

/* ---------- Idea ---------- */
.idea {
  margin-top: 34px;
  padding: 22px 18px 20px;
  background: rgba(21, 17, 14, .82);
  border: 3px solid var(--orange);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--navy);
}

.idea h2 {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 1.45rem;
  line-height: 1.15;
  text-align: center;
}
.idea-text { margin: 0 0 16px; text-align: center; font-size: .95rem; opacity: .92; }

.form label { display: block; margin: 12px 0 5px; font-weight: 800; font-size: .9rem; letter-spacing: .02em; }

.form input[type=text], .form input[type=email], .form textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: var(--white);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 14px;
  font: 600 1rem/1.3 var(--font); /* 16px+: evita el zoom automatico en iOS */
}
.form textarea { resize: vertical; min-height: 120px; }

.btn-submit {
  width: 100%;
  margin-top: 18px;
  justify-content: center;
  background: var(--orange);
  color: var(--ink);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.btn-submit:disabled { opacity: .7; cursor: wait; }

/* Honeypot fuera de pantalla (no display:none, algunos bots lo detectan) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  text-align: center;
  border: 3px solid var(--ink);
}
.notice-ok { background: var(--orange); color: var(--ink); }
.notice-error { background: #ffd9d4; color: #7a0f0a; }

.foot { margin-top: 28px; text-align: center; font-size: .8rem; opacity: .7; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 600px) {
  .wrap { padding-top: 44px; }
  .logo { width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { animation: none; }
  .btn { transition: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Pagina /contanos ---------- */
.hero-sm { padding-bottom: 4px; }
.hero-sm .logo { width: min(100%, 240px); }
.idea h1 { margin: 0 0 6px; color: var(--orange); font-size: 1.45rem; line-height: 1.15; text-align: center; }
.form .opt { font-weight: 600; opacity: .7; }
.form .hint { margin: 6px 0 0; font-size: .8rem; opacity: .75; }
a.btn-submit { text-decoration: none; }

/* ---------- /sorteo ---------- */
.wrap-wide { max-width: 720px; }
.sorteo-form input[type=text] { text-align: center; }

/* ---------- /back ---------- */
.wrap-back { max-width: 760px; }
.back-login { margin-top: 12vh; }
.form input[type=password] {
  display: block; width: 100%; padding: 13px 14px; background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 14px; font: 600 1rem/1.3 var(--font);
}
.back-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.back-head h1 { margin: 0; color: var(--orange); font-size: 1.6rem; }
.back-card {
  margin-top: 14px; padding: 16px; background: rgba(21, 17, 14, .85);
  border: 3px solid var(--orange); border-radius: 18px; box-shadow: 0 4px 0 var(--navy);
}
.back-card h2 { margin: 0 0 10px; font-size: 1.1rem; color: var(--orange); }
.back-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.back-row label { font-weight: 800; }
.back-card select, .back-card input[type=text], .back-card input[type=number] {
  padding: 10px 12px; background: var(--white); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; font: 600 1rem/1.2 var(--font);
}
.back-add input[name=name] { flex: 1 1 180px; min-width: 0; }
.back-add input[name=qty] { width: 76px; }
.back-btn {
  padding: 9px 14px; background: var(--orange); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; font: 800 .9rem/1.1 var(--font); cursor: pointer;
}
.back-btn:hover { filter: brightness(1.08); }
.back-btn-ghost { background: var(--white); }
.back-btn-danger { background: #ffd9d4; color: #7a0f0a; }
.back-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.back-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; background: rgba(255,255,255,.08); border-radius: 12px;
}
.back-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.back-actions { display: flex; gap: 6px; }
.back-win { color: var(--orange); font-weight: 800; }
.back-muted { opacity: .65; font-weight: 600; font-size: .9rem; }
.back-bulk { margin-top: 14px; }
.back-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.back-nav a {
  padding: 9px 14px; background: var(--white); color: var(--ink); border: 3px solid var(--ink);
  border-radius: 12px; font: 800 .9rem/1.1 var(--font); text-decoration: none;
}
.back-nav a.is-on { background: var(--orange); }
.back-title { margin: 0 0 4px; color: var(--orange); font-size: 1.5rem; }
.back-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; overflow-wrap: anywhere; }
.back-q { margin: 10px 0 2px; font-weight: 800; font-size: .85rem; color: var(--orange); }
.back-a { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }


/* ---------- /sorteo: pasos llamativos ---------- */
.sorteo-title { margin: 0; text-align: center; font-size: 2rem; line-height: 1.1; color: var(--orange); text-shadow: 0 3px 0 var(--navy); }
.sorteo-sub { margin: 8px 0 22px; text-align: center; font-size: 1.05rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative; margin: 0; padding: 30px 16px 18px; text-align: center;
  background: rgba(21, 17, 14, .88); border: 4px solid var(--white); border-radius: 22px;
  box-shadow: 0 6px 0 var(--navy);
}
.step-tag {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  padding: 5px 20px; background: var(--orange); color: var(--ink); border: 3px solid var(--ink);
  border-radius: 10px; box-shadow: 3px 3px 0 var(--navy);
  font: 900 1.15rem/1.1 var(--font); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.step h2 { margin: 0 0 6px; font-size: 1.5rem; line-height: 1.15; color: var(--white); }
.step p { margin: 0 0 14px; font-size: 1rem; opacity: .95; }
.step-last { border-color: var(--orange); animation: glow 2.2s ease-in-out infinite; }
.step-arrow { display: grid; place-items: center; height: 64px; color: var(--orange); }
.step-arrow svg { animation: nudge-y 1.1s ease-in-out infinite; filter: drop-shadow(0 2px 0 var(--navy)); }

.step-cta {
  display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 72px;
  padding: 10px 16px; color: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink); font: 900 1.3rem/1.1 var(--font); text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease;
}
.step-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.step-cta:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.step-cta:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.step-cta-instagram { background: linear-gradient(45deg, #f09433 0%, #dc2743 50%, #bc1888 100%); }
.step-cta-steam { background: linear-gradient(180deg, #2a475e 0%, #1b2838 100%); }
.step-cta-icon { flex: none; }
.step-cta-point { flex: none; transform: rotate(-90deg); animation: nudge-x 1s ease-in-out infinite; }
.step-cta-point-r { color: var(--orange); }

.sorteo-input { display: flex; align-items: center; gap: 8px; }
.sorteo-input input { flex: 1; min-width: 0; }
.sorteo-input .step-cta-point { transform: rotate(-90deg); filter: drop-shadow(0 2px 0 var(--navy)); }
.sorteo-form label { text-align: center; font-size: 1.05rem; }
.sorteo-form .hint { text-align: center; }
.sorteo-form .btn-submit { min-height: 68px; font-size: 1.3rem; }

@keyframes nudge-y { 0%, 100% { transform: translateY(-5px); } 50% { transform: translateY(6px); } }
@keyframes nudge-x { 0%, 100% { translate: -4px 0; } 50% { translate: 5px 0; } }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 0 var(--navy), 0 0 0 0 rgba(241,129,16,.0); } 50% { box-shadow: 0 6px 0 var(--navy), 0 0 22px 4px rgba(241,129,16,.55); } }
@media (prefers-reduced-motion: reduce) {
  .step-arrow svg, .step-cta-point, .step-last { animation: none; }
}

/* Boton destacado (VOTANOS) */
.links { padding-top: 6px; }
.btn-highlight {
  position: relative;
  min-height: 104px;
  margin: 10px 0;
  background: linear-gradient(90deg, #ffe600 0%, #ff9d00 35%, #ff3d2e 65%, #ffe600 100%);
  background-size: 250% 100%;
  color: var(--ink);
  font-size: 1.75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-width: 4px;
  box-shadow: 0 8px 0 var(--ink), 0 0 0 5px var(--white), 0 0 34px 8px rgba(255, 214, 0, .7);
  animation: pulse-big 1.3s ease-in-out infinite, shine 2.4s linear infinite, wiggle 4s ease-in-out infinite;
}
.btn-highlight:hover { box-shadow: 0 10px 0 var(--ink), 0 0 0 5px var(--white), 0 0 44px 12px rgba(255, 214, 0, .85); }
.btn-highlight:active { box-shadow: 0 1px 0 var(--ink), 0 0 0 5px var(--white); }
.btn-highlight .btn-icon { width: 62px; height: 62px; border-radius: 16px; background: var(--ink); color: #ffe600; }
.btn-highlight .btn-icon svg { width: 42px; height: 42px; animation: spin-star 1.6s ease-in-out infinite; }
.btn-highlight .btn-label { padding-right: 62px; line-height: 1; text-shadow: 2px 2px 0 rgba(255,255,255,.55); }
.btn-sub { display: block; margin-top: 6px; font-size: .78rem; letter-spacing: .06em; font-weight: 800; text-shadow: none; }
.btn-badge {
  position: absolute; top: -20px; right: 12px; padding: 6px 14px;
  background: #e5201b; color: var(--white); border: 3px solid var(--ink); border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink); font: 900 1rem/1 var(--font); letter-spacing: .08em;
  transform: rotate(8deg); animation: badge-pop 1s ease-in-out infinite;
}
@keyframes pulse-big { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes shine { to { background-position: -250% 0; } }
@keyframes spin-star { 0%, 100% { transform: rotate(-18deg) scale(1); } 50% { transform: rotate(18deg) scale(1.25); } }
@keyframes badge-pop { 0%, 100% { transform: rotate(8deg) scale(1); } 50% { transform: rotate(4deg) scale(1.18); } }
@keyframes wiggle { 0%, 82%, 100% { rotate: 0deg; } 86% { rotate: -2deg; } 90% { rotate: 2deg; } 94% { rotate: -1.5deg; } 97% { rotate: 1deg; } }
@media (prefers-reduced-motion: reduce) {
  .btn-highlight, .btn-highlight .btn-icon svg, .btn-badge { animation: none; }
}
body { overflow-x: clip; }
.links { grid-template-columns: minmax(0, 1fr); }
.btn-highlight .btn-label { min-width: 0; padding-right: 0; }
