/* COIN RUSH – Estilos */

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

body {
  background: #0d0820;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  color: white;
  
}

#game-container {
  width: 100%;
  height: 100vh;
  max-width: 700px;
  position: relative;
  background: url(/assets/inicio/fondo-juego.png);
  background-size: contain;
  
}

#game-container canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* PHASER CANVAS */
#game-container canvas {
  display: block;
  image-rendering: pixelated;
  box-shadow: 0 0 0 4px #ffd700, 0 0 0 8px #5a3a00, 0 24px 64px #00000099;
}

/* OVERLAYS */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: url(/assets/inicio/fondo.png) ;
  background-size: cover;
  margin: 0 auto;
  max-width: 700px;
  z-index: 100;
  padding: 24px;
  text-align: center;
  border: 15px solid #00b2e6;
}
.overlay.hidden { display: none; }

/* TYPOGRAPHY */
.pixel-title {
  font-size: 30px;
  color: #00b2e6;

  line-height: 1.5;
}
.pixel-title.gold { color: #4F1381; }
.pixel-title.red { color: #00b2e6; }

.pixel-title img {
  width: 300px;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
}
.pixel-sub {
  font-size: clamp(0.48rem, 1.8vw, 0.7rem);
  color: #000;
  line-height: 2.2;
  max-width: 400px;
}

.hl { color: #ffd700; }
.dim { color: #777; font-size: 0.9em; }

/* REWARD BOX */
.reward-box {
  background: red;
  border: 3px solid blue;
  padding: 16px 26px;
  /*box-shadow: 4px 4px 0 #b8860b;*/
  font-size: clamp(0.48rem, 1.6vw, 0.68rem);
  color: #eee;
  line-height: 2.4;
  max-width: 700px;
  background: url(/assets/inicio/fondo.png) ;
  background-size: cover;
  margin: 0 auto;
}

/* INPUT GROUP */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(320px, 90vw);
    font-size: clamp(0.48rem, 1.8vw, 0.7rem);
    

}

/* NOMBRE INPUT - CAMPOS NOMBRE Y TELEFONO*/
.text-input {
  font-size: 20px;
  font-weight: 400;
  padding: 4px 16px;
  background: #fff;
  border: 2px solid #46b3e7;
  color: #000;
  border-radius: 4px;
  text-align: center;
  transition: all 0.2s;
}

.text-input::placeholder {
  color: #000;
    font-size: 16px;

}

.text-input:focus {
 color:#000;

}

/* TELÉFONO INPUT CON PREFIJO */
.phone-input-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 2px solid #46b3e7;
  padding: 4px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}

.phone-input-wrapper:focus-within {
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.phone-prefix {
  color: #000;
  font-weight: bold;
  white-space: nowrap;
}

.phone-input {
  background: transparent;
  border: none;
  color: #000;
  text-align: center;
  flex: 1;
  transition: all 0.2s;
  font-size: 20px;
  font-weight: 400;
  
}

.phone-input::placeholder {
  color:#000;
  font-size: 16px;
}

.phone-input:focus {
  outline: none;
}

/* INPUT HINT */
.input-hint {
  font-size: clamp(0.35rem, 1.2vw, 0.48rem);
  color: #888;
  text-align: center;
}

/* CHECKBOX POLÍTICAS */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  line-height: 1.5;
  text-align: left;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  accent-color: #ffd700;
  cursor: pointer;
  margin-top: 2px;
}

.checkbox-label a {
  color: #ffd700;
  text-decoration: underline;
}

.checkbox-label.error-check {
  color: #ff5555;
}



/* COUPON */
.coupon-wrap {
  background: #fff;
  
  padding: 22px 30px;
  max-width: min(100%, 100vw);
  
  position: relative;
}
.coupon-wrap::before {
  content: '★ FELICIDADES ★';
  font-size: 10px;
  color: #ffd700;
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #0a0322;
  padding: 0 12px;
  white-space: nowrap;
  letter-spacing: 2px;
}

.pct-big {
  font-size: 40px;
  color: #000;
  font-weight: 700;
  line-height: 1;
}
.pct-label { font-size: 14px; color: #000; margin-top: 6px; letter-spacing: 1px; }
.code-box {
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 900;
  color: #000;
  background: rgba(255,255,255,0.08);
  
  border: 2px solid rgba(255,255,255,0.18);
  letter-spacing: 5px;
  cursor: pointer;
  margin-top: 14px;
  display: inline-block;
  transition: background 0.2s;
}
.code-box:hover { background: rgba(255,255,255,0.18); }
.code-hint { font-size: 14px; color: #000; margin-top: 6px; }
.expiry { font-size: 0.42rem; color: #000; margin-top: 10px; }

#barcode {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-top: 10px;
}

#barcode-ecommerce {
  width: 100%;
  max-width: 300px;
  height: auto;
  margin-top: 10px;
  display: none;
}

.stats-row { font-size: 14px; color: #000; }

/* BUTTONS */
/* INSTRUCCIONES */
.instructions-box {
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 18px 22px;
  margin: 10px 0 18px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}
.instructions-title {
  font-family: 'Poppins', monospace;
  font-size: 13px;
  color: #4F1381;
  margin: 0 0 12px;
  text-align: center;
}
.instructions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: #222;
  line-height: 1.7;
}
.instructions-list li {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}
.instructions-list li:last-child { border-bottom: none; }

.pixel-btn {
  font-size: 18px;
  padding: 13px 75px;
  font-weight: 900;
  color: white;
  border: none;
  
  cursor: pointer;
  transition: all 0.08s;
  border-radius: 5px;
}
.pixel-btn:hover { background: #ff5f6d; }
.pixel-btn:active { transform: translate(2px,2px); border-bottom-width: 2px; border-right-width: 2px; }

.pixel-btn.violeta {
  background: #4F1381;
  transition: ease all .3s;
  
}

.pixel-btn.violeta:hover { background: #00b2e6; }

.pixel-btn.azul {
  background: #00b2e6;
  
}
.pixel-btn.green:hover { background: #3ddc6b; }

/* MOBILE CONTROLS */
#on-screen-controls {
  position: fixed;
  bottom: 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 20px;
  z-index: 200;
  pointer-events: none;
}

.controls-group {
  display: flex;
  gap: 12px;
  pointer-events: all;
}

.left-controls {
  flex-direction: row;
}
.color-azul a {
  color: #00b2e6;
}
.color-azul  {
  color: #000;
}

.texto-abajo small.input-hint a {
  color: #fff;
}

.ctrl-btn {
  font-size: 1.2rem;
  width: 70px;
  height: 70px;
  background: #46b3e7;
  border: 3px solid rgba(255, 255, 255, 0.4);
  color: white;
  cursor: pointer;
  border-radius: 12px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.1s;
  pointer-events: all;
}

/* Evita menú contextual de iOS al mantener presionada la imagen */
.ctrl-btn img {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  draggable: false;
}

.ctrl-btn:active {
  background: rgba(29, 185, 84, 1);
  transform: scale(0.95);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ctrl-btn:hover {
  background: rgba(29, 185, 84, 0.95);
}

.btn-jump {
  
  background: #502481;
  
}

.btn-jump:hover {
  background: #502481;
}
.centro {
  align-items: center;
  justify-content: center;         
}

.negro {
  color: #000;
}

.negro strong {
  color: #502481
}
.texto-abajo {
  position: absolute;
  bottom: 10px;
  
}

.texto-abajo small, .texto-abajo small a {
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
}
.btn-jump:active {
  background: rgba(255, 107, 53, 1);
}

.btn-jump:hover {
  background: rgba(255, 107, 53, 0.95);
}

.grande {
  font-size: 30px;
  font-weight: 900; 
}

/* Controles ocultos por defecto; se muestran al iniciar el juego */
#on-screen-controls {
  display: none;
}
/* TOAST */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(70px);
  background: #2dc653;
  color: #000;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.52rem;
  padding: 11px 22px;
  border: 3px solid #1a7a32;
  transition: transform 0.3s;
  z-index: 300;
  white-space: nowrap;
}
#toast.show { transform: translateX(-50%) translateY(0); }
.cortinilla {
  background: #000;
  position: absolute;
  width: 100% ;
  height: 100vh;
  z-index: 1999;
}

.cortinilla h1 {
  text-align: center;
  margin: 25% 0;
  font-family: 'Poppins', sans-serif;
} 
/* CONFETTI */

/* ══ PANTALLA VERIFICACIÓN OTP ══ */
.otp-input {
  font-size: 32px;
  letter-spacing: 14px;
  text-align: center;
  font-weight: 700;
  width: min(220px, 80vw);
}

.verify-info {
  font-size: 15px;f
  color: #eee;
  text-align: center;
  max-width: 300px;
  line-height: 1.7;
}

.verify-info strong {
  color: #502481;
}

.verify-error {
  color: #ff5555;
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  line-height: 1.5;
}

.verify-error.hidden {
  display: none;
}

.resend-link {
  font-size: 13px;
  color: #00b2e6;
  text-decoration: none;
  margin-top: 2px;
  transition: color 0.2s;
}

.resend-link:hover {
  color: #ffd700;
}
.px-confetti {
  position: fixed;
  top: -12px;
  pointer-events: none;
  animation: px-fall linear forwards;
}
@keyframes px-fall {
  to { transform: translateY(108vh) rotate(600deg); opacity: 0; }
}
/* Móviles */
@media (max-width: 700px) {
  .pixel-title img {
    width: 180px;
    
}
.code-box {
  font-size:12px;
  white-space: normal;
  overflow-wrap: anywhere;


}
}

/* Portatiles */
@media (min-width: 701px) and (max-width: 1440px) {
.pixel-title img {
  width: 180px;
}
}

