/* 🎃 Matías 28 — estética compartida (noche violeta, naranja de calabaza) */
:root {
  --noche: #0d0614;
  --noche2: #1a0b26;
  --violeta: #7b3fbf;
  --lila: #c9a2ff;
  --naranja: #ff7a1a;
  --naranja2: #ffb347;
  --verde: #7dff9a;
  --texto: #f6ecff;
  --suave: #b9a6cc;
  --vidrio: rgba(20, 8, 32, .72);
  --borde: rgba(201, 162, 255, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--noche) url(img/fondo-movil.webp) center top / cover fixed no-repeat;
  color: var(--texto);
  font: 16px/1.45 'Rubik', system-ui, sans-serif;
  overflow-x: hidden;
}
body::before { /* oscurece el centro para que se lea */
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(13,6,20,.25) 0%, rgba(13,6,20,.55) 35%, rgba(13,6,20,.8) 100%);
}

/* ── niebla y murciélagos ─────────────────────────────────────────── */
.niebla { position: fixed; left: -50%; right: -50%; bottom: -10vh; height: 45vh; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 30% 40% at 20% 70%, rgba(180,140,230,.22), transparent 70%),
    radial-gradient(ellipse 25% 35% at 55% 80%, rgba(140,255,170,.10), transparent 70%),
    radial-gradient(ellipse 35% 45% at 85% 65%, rgba(180,140,230,.18), transparent 70%);
  filter: blur(8px); animation: niebla 28s ease-in-out infinite alternate; }
.niebla.dos { animation-duration: 40s; animation-direction: alternate-reverse; opacity: .8; bottom: -16vh; }
@keyframes niebla { from { transform: translateX(-8%); } to { transform: translateX(8%); } }

.murcielago { position: fixed; top: 0; left: 0; width: 46px; z-index: 1; pointer-events: none; opacity: .85;
  animation: vuelo var(--dur, 14s) linear infinite; animation-delay: var(--del, 0s); }
.murcielago svg { width: 100%; animation: aleteo .28s ease-in-out infinite alternate; transform-origin: center; }
@keyframes aleteo { from { transform: scaleY(1); } to { transform: scaleY(.45); } }
@keyframes vuelo {
  0%   { transform: translate(-10vw, var(--y1, 20vh)) scale(var(--s, 1)); }
  25%  { transform: translate(25vw, calc(var(--y1, 20vh) - 8vh)) scale(var(--s, 1)); }
  50%  { transform: translate(55vw, calc(var(--y1, 20vh) + 6vh)) scale(var(--s, 1)); }
  75%  { transform: translate(85vw, calc(var(--y1, 20vh) - 4vh)) scale(var(--s, 1)); }
  100% { transform: translate(115vw, var(--y1, 20vh)) scale(var(--s, 1)); }
}

/* ── tipografía ───────────────────────────────────────────────────── */
.titulo { font-family: 'Creepster', cursive; font-weight: 400; letter-spacing: .04em; margin: 0;
  color: var(--naranja); text-shadow: 0 0 18px rgba(255,122,26,.7), 0 0 42px rgba(255,90,0,.35), 0 3px 0 #5a1d00; }
.parpadea { animation: parpadeo 6s infinite; }
@keyframes parpadeo { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .55; } 95% { opacity: 1; } 96% { opacity: .4; } }
.sub { color: var(--lila); letter-spacing: .18em; text-transform: uppercase; font-size: .78rem; font-weight: 600; }

/* ── contenedor ───────────────────────────────────────────────────── */
main { position: relative; z-index: 2; max-width: 520px; margin: 0 auto; padding: 28px 16px 80px; }
.hero { text-align: center; padding: 14px 0 22px; }
.hero .titulo { font-size: clamp(3.2rem, 17vw, 5.4rem); line-height: .95; }
.hero .calabaza { width: 96px; margin: 0 auto -6px; display: block; mix-blend-mode: screen; /* el fondo negro de la ilustración desaparece */
  animation: flota 4s ease-in-out infinite; }
@keyframes flota { 50% { transform: translateY(-8px) rotate(-3deg); } }

.tarjeta { background: var(--vidrio); border: 1px solid var(--borde); border-radius: 22px; padding: 22px 18px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.tarjeta + .tarjeta { margin-top: 16px; }

label.campo { display: block; margin-bottom: 18px; }
label.campo > span { display: block; font-weight: 600; margin-bottom: 7px; }
input[type=text] { width: 100%; padding: 14px 15px; border-radius: 14px; border: 1.5px solid var(--borde);
  background: rgba(0,0,0,.4); color: var(--texto); font: inherit; font-size: 17px; outline: none; transition: border-color .2s, box-shadow .2s; }
input[type=text]:focus { border-color: var(--naranja); box-shadow: 0 0 0 4px rgba(255,122,26,.18); }
input::placeholder { color: #8a7a9a; }

.interruptor { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; cursor: pointer; user-select: none; }
.interruptor input { display: none; }
.interruptor .pista { width: 52px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.12); position: relative; transition: background .2s; flex: none; }
.interruptor .pista::after { content: '👻'; position: absolute; top: 2px; left: 2px; width: 26px; height: 26px; border-radius: 50%;
  background: #2a1838; display: grid; place-items: center; font-size: 15px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.interruptor input:checked + .pista { background: var(--violeta); }
.interruptor input:checked + .pista::after { transform: translateX(22px); content: '💑'; }

.boton { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; border: 0; cursor: pointer;
  padding: 16px 18px; border-radius: 16px; font: 700 18px 'Rubik', sans-serif; color: #1b0800; text-decoration: none;
  background: linear-gradient(180deg, var(--naranja2), var(--naranja)); box-shadow: 0 6px 0 #9c3c00, 0 10px 30px rgba(255,122,26,.35);
  transition: transform .1s, box-shadow .1s, opacity .2s; }
.boton:active { transform: translateY(4px); box-shadow: 0 2px 0 #9c3c00, 0 4px 14px rgba(255,122,26,.3); }
.boton[disabled] { opacity: .45; pointer-events: none; }
.boton.secundario { background: rgba(255,255,255,.08); color: var(--texto); box-shadow: inset 0 0 0 1.5px var(--borde); }
.boton.secundario:active { box-shadow: inset 0 0 0 1.5px var(--borde); }
.fila { display: flex; gap: 10px; }
.fila .boton { font-size: 15px; padding: 14px 10px; }

.foto-caja { position: relative; border-radius: 18px; overflow: hidden; border: 2px dashed var(--borde); aspect-ratio: 4/5;
  display: grid; place-items: center; background: rgba(0,0,0,.35); margin-bottom: 12px; }
.foto-caja img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-caja .vacio { text-align: center; color: var(--suave); padding: 20px; }
.foto-caja .vacio b { display: block; font-size: 54px; margin-bottom: 6px; }

.aviso { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,60,60,.16); border: 1px solid rgba(255,90,90,.4); display: none; }
.aviso.ver { display: block; }
.chico { font-size: .86rem; color: var(--suave); }
.centro { text-align: center; }
a { color: var(--naranja2); }

/* ── ficha de monstruo (comprobante) ──────────────────────────────── */
.ficha { text-align: center; animation: aparece .7s cubic-bezier(.2,1.4,.4,1) both; }
.ficha .marco { position: relative; margin: 6px auto 16px; width: min(78vw, 320px); border-radius: 20px; padding: 10px; transform: rotate(-2deg);
  background: linear-gradient(135deg, var(--naranja), var(--violeta)); box-shadow: 0 0 40px rgba(255,122,26,.45); }
.ficha .marco img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 13px; display: block; }
.ficha .marco .numero { position: absolute; top: -14px; right: -12px; background: var(--noche); border: 2px solid var(--naranja);
  color: var(--naranja); font: 400 22px 'Creepster', cursive; padding: 4px 12px; border-radius: 99px; transform: rotate(8deg); }
.ficha h2 { font-family: 'Creepster', cursive; font-weight: 400; font-size: 2.3rem; margin: 6px 0 2px; color: var(--naranja2); }
.ficha .disfraz { font-size: 1.15rem; color: var(--lila); margin-bottom: 14px; }
@keyframes aparece { from { opacity: 0; transform: scale(.6) translateY(30px); } }

.cargando { display: inline-block; animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .murcielago, .niebla, .parpadea, .calabaza { animation: none !important; }
  .murcielago { display: none; }
}
