/* ===== Neon Dodge 3D — estilos ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #050510;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #eaf6ff; user-select: none; -webkit-user-select: none;
  touch-action: none; overscroll-behavior: none;
}
#juego, #juego canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.oculto { display: none !important; }

/* ---- HUD ---- */
#hud {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 0; right: 0;
  display: flex; justify-content: center; gap: 18px; z-index: 5; pointer-events: none;
}
.hud-item {
  background: rgba(10, 10, 30, .65); border: 1px solid #00e5ff55; border-radius: 12px;
  padding: 6px 14px; font-size: 18px; font-weight: 700; color: #fff;
  text-shadow: 0 0 8px #00e5ff;
}
.hud-item.x2 { border-color: #ffd54a; color: #ffd54a; text-shadow: 0 0 8px #ffd54a; }

/* ---- Pantallas ---- */
.pantalla {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center;
  background: rgba(4, 4, 16, .82); backdrop-filter: blur(6px);
}
.pantalla h1 { font-size: 44px; letter-spacing: 2px; color: #00e5ff; text-shadow: 0 0 18px #00e5ff, 0 0 46px #00e5ff88; }
.pantalla h1 span { color: #ff2fb3; text-shadow: 0 0 18px #ff2fb3, 0 0 46px #ff2fb388; }
.pantalla h2 { font-size: 32px; color: #fff; text-shadow: 0 0 14px #00e5ff; }
.sub { color: #9fb3c8; font-size: 15px; }
.ayuda { color: #7d8fa3; font-size: 13px; line-height: 1.6; max-width: 340px; }
.resultados { display: flex; flex-direction: column; gap: 8px; font-size: 18px; background: rgba(255,255,255,.05);
  border: 1px solid #ffffff22; border-radius: 14px; padding: 16px 28px; min-width: 260px; }
.resultados b { color: #ffd54a; }

/* ---- Botones ---- */
.btn {
  min-width: 260px; padding: 14px 22px; font-size: 17px; font-weight: 700;
  color: #04121a; background: linear-gradient(135deg, #00e5ff, #00a8cc);
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 0 18px #00e5ff66; transition: transform .08s ease;
}
.btn:active { transform: scale(.96); }
.btn.principal { background: linear-gradient(135deg, #ff2fb3, #b31b7a); color: #fff; box-shadow: 0 0 22px #ff2fb388; font-size: 19px; }
.btn.secundario { background: rgba(255,255,255,.08); color: #eaf6ff; border: 1px solid #ffffff33; box-shadow: none; }
.btn:disabled { opacity: .4; cursor: default; }

/* ---- Barra de progreso lealtad ---- */
.barra { height: 12px; background: #ffffff18; border-radius: 8px; overflow: hidden; }
.relleno { height: 100%; width: 0%; border-radius: 8px;
  background: linear-gradient(90deg, #ffd54a, #ff9d2f); transition: width .4s ease; }

/* ---- Anuncio demo ---- */
.cuenta { font-size: 64px; font-weight: 800; color: #ffd54a; text-shadow: 0 0 24px #ffd54a; }

/* ---- Pista tutorial ---- */
.hint {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 6;
  background: rgba(10, 10, 30, .8); border: 1px solid #ffd54a88; border-radius: 12px;
  padding: 8px 16px; font-size: 15px; font-weight: 700; color: #ffd54a;
  text-shadow: 0 0 8px #ffd54a66; pointer-events: none; white-space: nowrap;
}
.hud-btn {
  pointer-events: auto; background: rgba(10, 10, 30, .65);
  border: 1px solid #00e5ff55; border-radius: 12px;
  color: #fff; font-size: 18px; padding: 6px 12px; cursor: pointer;
}

/* ---- Badges de power-ups activos ---- */
.hud-power {
  position: fixed; top: 64px; left: 12px; z-index: 5;
  display: flex; gap: 8px; pointer-events: none;
}
.power-badge {
  background: rgba(10, 10, 30, .7); border: 1px solid #ffd54a88; border-radius: 10px;
  padding: 4px 10px; font-size: 16px; font-weight: 700; color: #fff;
}

/* ---- Flash rojo al chocar ---- */
.flash {
  position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255, 40, 60, .55) 100%);
}

/* ---- Punto de notificación en bonus ---- */
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #ff2fb3; box-shadow: 0 0 8px #ff2fb3; margin-left: 4px;
}

/* ---- Tienda de skins ---- */
.skins-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  max-width: 340px;
}
.skin-card {
  background: rgba(255,255,255,.06); border: 1px solid #ffffff22; border-radius: 14px;
  padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.skin-card.equipada { border-color: #00e5ff; box-shadow: 0 0 12px #00e5ff55; }
.skin-dot { width: 46px; height: 46px; border-radius: 50%; border: 2px solid #ffffff44; }
.skin-nombre { font-size: 13px; font-weight: 700; }
.skin-btn {
  font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 10px;
  border: none; cursor: pointer; background: linear-gradient(135deg, #00e5ff, #00a8cc); color: #04121a;
}
.skin-btn:disabled { opacity: .45; cursor: default; }
.skin-btn.equipada { background: rgba(255,255,255,.12); color: #9fb3c8; }

/* ---- Foto 3D animada en la tienda ---- */
.skin-foto {
  width: 76px; height: 76px; border-radius: 20px;
  background: radial-gradient(circle at 50% 35%, #1c2b4a 0%, #0a0a22 72%);
  border: 2px solid #ffffff22;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.skin-card.equipada .skin-foto { border-color: #00e5ff; }

/* ---- Versión en el menú ---- */
.version { opacity: .45; font-size: 12px; margin-top: 6px; }

/* ---- Banner de cambio de paisaje / vuelta ---- */
.anuncio {
  position: fixed; top: 38%; left: 50%; z-index: 8; pointer-events: none;
  transform: translate(-50%, -50%);
  font-size: 30px; font-weight: 900; white-space: nowrap;
  color: #fff; text-shadow: 0 0 18px #00e5ff, 0 2px 6px #000;
  animation: anuncio-pop 2.6s ease forwards;
}
@keyframes anuncio-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  22% { transform: translate(-50%, -50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(1); }
}

/* ---- Bocadillo estilo cómic (¡MIAU!) ---- */
.bocadillo {
  position: fixed; top: 52%; left: 50%; z-index: 8; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-6deg);
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Segoe Print', cursive;
  font-size: 34px; font-weight: 900; white-space: nowrap;
  color: #ffea00;
  -webkit-text-stroke: 2px #111;
  text-shadow: 3px 3px 0 #111, 0 0 14px #ffea0088;
  animation: bocadillo-pop 1.6s ease forwards;
}
@keyframes bocadillo-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-6deg) scale(0.3); }
  15% { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg) scale(1.25); }
  30% { transform: translate(-50%, -50%) rotate(-6deg) scale(1); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -70%) rotate(-6deg) scale(1); }
}

/* ---- Misiones diarias ---- */
.mision { margin: 10px 0; text-align: left; }
.mision .m-nombre { font-size: 15px; margin-bottom: 4px; }
.mision .barra { height: 10px; background: #22223a; border-radius: 6px; overflow: hidden; }
.mision .relleno { height: 100%; background: linear-gradient(90deg, #ffd54a, #ff9d2f); border-radius: 6px; transition: width 0.3s; }
.mision .m-prog { font-size: 12px; color: #9a9ac0; margin-top: 2px; }
.mision.completada .m-nombre { color: #7dff9a; }
