/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/


#game-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1280px;
  height: 648px;
  -webkit-transform: translate(-50%, -50%) scale(1);
      -ms-transform: translate(-50%, -50%) scale(1);
          transform: translate(-50%, -50%) scale(1);
  -webkit-transform-origin: center;
      -ms-transform-origin: center;
          transform-origin: center;
  z-index: 10;
}


.rotate-landscape {
  -webkit-transform: translate(-50%, -50%) rotate(90deg);
      -ms-transform: translate(-50%, -50%) rotate(90deg);
          transform: translate(-50%, -50%) rotate(90deg);
}




@font-face {
  font-family: "ZombieFont";
  src: url("fonts/MilkyNice-Clean.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}




#final-actions {
  position: absolute;
  top: calc(50% + 240px);   /* 👈 más arriba */
  left: 53%;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
  display: none;
  gap: 300px;               /* 👈 más separados */
  z-index: 10005;
}

body {
  margin: 0;
  background: #000;
  font-family: sans-serif;
  overflow-x: hidden;
  overflow-y: hidden;
}




#btn-descargar {
  position: absolute;
  width: 180px;
  height: 180px;
  right: 210px;   /* ← mové esto para ajustar horizontal */
  top: -150px;    /* ← mové esto para ajustar vertical */
}

#btn-seguir {
  position: absolute;
  width: 180px;
  height: 180px;
  left: 140px;  /* ← mové esto para ajustar horizontal */
  top: -150px;    /* ← mové esto para ajustar vertical */
}

.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  z-index: 9999;
}

.overlay-box {
  background: transparent;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 80%;
  max-height: 80%;
}

.overlay-box img {
  width: auto;
  height: auto;
  max-width: 90%;
  max-height: 90%;
  -o-object-fit: contain;
     object-fit: contain;
}



/* Barra superior */


#logo {
  width: 240px;
  -webkit-transform: translateX(-50px);
      -ms-transform: translateX(-50px);
          transform: translateX(-50px);
}

#logo img {
  height: 120px;
  -webkit-transform: translateY(20px);
      -ms-transform: translateY(20px);
          transform: translateY(20px);
}

#top-bar {
  position: absolute;
  width: 100%;
  height: 20px;               /* ← CLAVE */
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr auto 1fr;
  grid-template-columns: 1fr auto 1fr;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding: 0 20px;
  z-index: 20;

  background: url("img/ui/barra_superior.png") no-repeat center;
  background-size: cover;
}

#top-left,
#top-right {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 10px;
  padding: 0 20px;
}

#top-left {
  -webkit-box-pack: start;
      -ms-flex-pack: start;
          justify-content: flex-start;
  -webkit-transform: translate(140px, 35px);
      -ms-transform: translate(140px, 35px);
          transform: translate(140px, 35px);
  /* X, Y */
}

#top-left img{
  height: 75px;
  width: 75px;
}

#top-right img{
  height: 75px;
  width: 75px;
}

#top-right {
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  -webkit-transform: translate(-200px, 35px);
      -ms-transform: translate(-200px, 35px);
          transform: translate(-200px, 35px);
}

#top-center {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-transform: translate(0px, 0px);
      -ms-transform: translate(0px, 0px);
          transform: translate(0px, 0px);
}


#sound-btn {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 30;
}


/* Zona principal */
#main {
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 260px 1fr 260px;
  grid-template-columns: 260px 1fr 260px;
  position: relative;
  z-index: 5;
}

.flecha {
  width: 50px;
  height: 40px;
  font-size: 22px;
  margin-left: 96px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 100;
}

.flecha img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}



.grid {
  width: 90%;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 6px 1fr;
  grid-template-columns: repeat(2, 1fr);
  -webkit-transform: translate(-5px, -10px);
      -ms-transform: translate(-5px, -10px);
          transform: translate(-5px, -10px);
  -webkit-column-gap: 6px;
     -moz-column-gap: 6px;
          column-gap: 6px;
  row-gap: 0px;
}

/* botones de ítems */
.btn-img {
  width: 120px;
  height: 105px;
  padding: 0px;
  margin-bottom: -4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.btn-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;

  position: relative;
  top: 6px;   /* ⬆️ sube el icono */
  left: -1px;   /* ➡️ lo mueve a la derecha */
}

.btn-ui {
  background: transparent;   /* nada de fondo */
  border: none;              /* sin borde */
  padding: 0;                /* sin padding */
  margin: 0;
  -webkit-box-shadow: none;
          box-shadow: none;
  outline: none;

  width: 64px;
  height: 64px;

  cursor: pointer;
}

.btn-ui:focus {
  outline: none;
}


.btn-ui img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}






/* Panel base */
.panel {
  position: absolute;
  top: 80px; /* debajo de la top bar */
  width: 300px;        /* ancho real de tu imagen */
  height: 650px;       /* alto real de tu imagen */
  overflow: hidden;
  -webkit-transition: -webkit-transform 0.4s ease;
  transition: -webkit-transform 0.4s ease;
  -o-transition: transform 0.4s ease;
  transition: transform 0.4s ease;
  transition: transform 0.4s ease, -webkit-transform 0.4s ease;
  z-index: 6;
}

/* Panel izquierdo */
#panel-left {
  left: 0;
  top: 20px;        
  bottom: 120px;  
  -webkit-transform: translateX(-100%);  
      -ms-transform: translateX(-100%);  
          transform: translateX(-100%);
}

/* Panel derecho */
#panel-right {
  right: 0;
  top: 20px;        
  bottom: 120px;  
  -webkit-transform: translateX(100%);  
      -ms-transform: translateX(100%);  
          transform: translateX(100%);
}

/* Imagen de fondo del panel */
.panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  pointer-events: none;
  z-index: 1;
}

/* Contenido que va encima de la imagen */
.panel-content {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: space-evenly;
      -ms-flex-pack: space-evenly;
          justify-content: space-evenly;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;

  padding: 15px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

.panel-section {
  position: relative;
}


.btn-eliminar {
  position: absolute;
  top: 8px;
  right: 200px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 5;
}

.btn-eliminar-left {
  right: 210px;
  top: 0px;
}

.btn-eliminar-right {
  right: 210px;  /* ejemplo, ajustás a mano */
  top: 0px;    /* ejemplo */
}


.btn-eliminar img {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}




/* Centro */
#center {
  -ms-grid-column: 2;
  grid-column: 2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  gap: 15px;
  position: relative;
  z-index: 3;
}


/* Orden real de profundidad */
#fondo-personaje { z-index: 1; }
#base            { z-index: 0; }

#accb-abajo   { z-index: 2; }
#torso        { z-index: 3; }
#piernas      { z-index: 4; }
#accb-medio   { z-index: 5; }
#acca-34      { z-index: 6; }
#cabeza       { z-index: 7; }
#accb-resto   { z-index: 8; }
#cara-resto   { z-index: 9; }  /* ABAJO de acca-33 */
#acca-33      { z-index: 10; }  /* SUBE */
#cara-especial{ z-index: 11; }  /* arriba de todo */
#acca-resto   { z-index: 12; }

/* Capas de ropa (compatibilidad) */
#ropa-detras  { z-index: 2; }
#ropa-medio   { z-index: 3; }
#ropa-delante { z-index: 12; }


#animacion { z-index: 20; }

#animacion-intro-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: none;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  z-index: 10001;
  pointer-events: none;
}

#animacion-intro {
  width: 60%;        /* ← tamaño relativo a la pantalla */
  min-width: 420px;  /* ← mínimo para pantallas chicas */
  max-width: 450px;  /* ← máximo para pantallas gigantes */
  height: 100%;
  min-height: 420px;
  max-height: 450px;
  display: block;
  position: static; /* sobreescribe el fixed del CSS viejo */
  -o-object-fit: contain;
     object-fit: contain;
}


#character {
  top: 115px;
  width: 450px;
  height: 480px;
  position: relative;   /* MUY importante */
  overflow: visible;     /* corta lo que se salga */
  z-index: 6;
}

#character img {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 90%;
  height: 95%;
  -o-object-fit: contain;
     object-fit: contain;
  pointer-events: none;
  z-index: 0; /* base, cada img individual lo sobreescribe */
}

#fondo {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* Fondo principal */
#video-fondo {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  top: 0;
  left: 0;
}


/* Capa fija decorativa */
#img-capa-fija {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  position: absolute;
  top: 0px;
  left: 0px;
  pointer-events: none;
}

#img-capa-fija2 {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 80;
}


#name-box {
  position: absolute;
  left: 50%;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);

  width: 350px;
  height: 80px;
  top: 500px;

  background: url("img/caja_nombre.png") no-repeat center;
  background-size: 90%;

  display: -webkit-box;

  display: -ms-flexbox;

  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;

  pointer-events: none; /* no molesta al mouse */
  z-index: 9;
}

#name-box span {
  font-family: "ZombieFont", sans-serif;
  right: 30px;
  color: white;
  font-size: 8px;
  line-height: 1.1;
  text-shadow: 1px 1px 2px black;
  stroke: 10px 10px 20px rgb(255, 0, 0);
  opacity: 0;
}


#finish-btn {
  position: absolute;
  padding: 0px;
  width: 300px;
  height: 300px;
  z-index: 15;
  bottom: -247px;
  right: 400px;
  -webkit-transform: translateX(50%);
      -ms-transform: translateX(50%);
          transform: translateX(50%);
}

#finish-btn img{
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}

#btn-reset {
  position: absolute;
  bottom: 10px;
  right: 130px;
  z-index: 20;
  width: 270px;
  padding: 0;
  height: 120px;
  display: block;
}

#btn-reset img{
  width: auto;   /* ajustá */
  height: 120px;  /* mantiene proporción */
  display: inline-block;
}


#btn-fondo-personaje {
  position: absolute;
  bottom: 72px;
  left: 170px;
  width: 250px;
  height: 50px;
  padding: 12px 25px;
  font-size: 18px;
  z-index: 10;
}


#btn-fondo-personaje img{
  width: auto;
  display: block;
  height: 100px;
  display: block;
}

#frase-aleatoria {
  position: absolute;
  left: 50%;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
  top: 505px;
  width: 280px;
  height: 50 0px;
  text-align: center;
  pointer-events: none;
  z-index: 10;
}


/* ===== BOTÓN MÚSICA ===== */
#btn-musica {
  position: absolute;
  top: 0px;
  right: 150px;
  z-index: 25;
  width: 95px;
  height: 95px;
}

/* ===== BOTONES TUTORIAL ===== */

#btn-cerrar-tutorial {
  position: absolute;
  top: 90px;
  right: 180px;
  width: 50px;
  height: 50px;
}

#btn-prev-tutorial {
  position: absolute;
  left: 150px;
  top: 50%;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

#btn-next-tutorial {
  position: absolute;
  right: 150px;
  top: 50%;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  width: 50px;
  height: 50px;
}

/* ===== BOTÓN TIENDA ===== */

#btn-tienda {
  position: absolute;
  top: 10px;
  left: 150px;
  z-index: 25;
  width: 150px;
  height: 10px;
  padding: 0;
  border: none;
  background: transparent;
  display: block;
}

#btn-tienda img {
  width: auto;
  height: 70px;
  display: block;
}


/* ===== SISTEMA DE CÓDIGO / CANDADO ===== */

.btn-bloqueado {
  position: relative;
  cursor: pointer;
  -webkit-filter: brightness(0.6) saturate(0.4);
          filter: brightness(0.6) saturate(0.4);
}

.btn-bloqueado .img-bloqueada {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
  position: relative;
  top: 6px;
  left: -1px;
}

.icono-candado {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  -o-object-fit: contain;
     object-fit: contain;
  pointer-events: none;
  -webkit-filter: brightness(1) saturate(1);
          filter: brightness(1) saturate(1);
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' fill='%23FFD700' stroke='%23B8860B' stroke-width='1.5'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4' fill='none' stroke='%23B8860B' stroke-width='2'/%3E%3Ccircle cx='12' cy='16' r='1.5' fill='%23B8860B'/%3E%3C/svg%3E");
}

.overlay-box-codigo {
  background: rgba(20, 10, 5, 0.95) !important;
  border: 2px solid #5a2d0c;
  border-radius: 16px !important;
  padding: 32px 40px !important;
  min-width: 280px;
}

.titulo-codigo {
  color: #e8c87a;
  font-family: "ZombieFont", sans-serif;
  font-size: 20px;
  margin-bottom: 16px;
  text-shadow: 0 0 8px rgba(232, 200, 122, 0.5);
}

#input-codigo {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: "ZombieFont", sans-serif;
  background: rgba(255,255,255,0.08);
  border: 1px solid #7a4a1e;
  border-radius: 8px;
  color: #f0e8d0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  outline: none;
}

#input-codigo:focus {
  border-color: #e8c87a;
  -webkit-box-shadow: 0 0 6px rgba(232, 200, 122, 0.4);
          box-shadow: 0 0 6px rgba(232, 200, 122, 0.4);
}

#input-codigo::-webkit-input-placeholder {
  color: rgba(240, 232, 208, 0.35);
}

#input-codigo::-moz-placeholder {
  color: rgba(240, 232, 208, 0.35);
}

#input-codigo:-ms-input-placeholder {
  color: rgba(240, 232, 208, 0.35);
}

#input-codigo::-ms-input-placeholder {
  color: rgba(240, 232, 208, 0.35);
}

#input-codigo::placeholder {
  color: rgba(240, 232, 208, 0.35);
}

.btn-codigo-aceptar,
.btn-codigo-cancelar {
  font-family: "ZombieFont", sans-serif;
  font-size: 14px;
  padding: 8px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  margin: 0 6px;
}

.btn-codigo-aceptar {
  background: #7a2d0c;
  color: #f0e8d0;
}

.btn-codigo-aceptar:hover { -webkit-filter: brightness(1.2); filter: brightness(1.2); }

.btn-codigo-cancelar {
  background: rgba(255,255,255,0.1);
  color: #aaa;
}

.btn-codigo-cancelar:hover {
  background: rgba(255,255,255,0.2);
  color: #ddd;
}

#pantalla-negra-carga {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 99999;
  pointer-events: all;
  display: block;
}