@charset "utf-8";

/* =========================================================
   INDIVIDUAL GAME PAGE
========================================================= */

.home-text {
  max-width: var(--max-w); /* 1100px, igual que cat-page */
  margin: 0 auto;
}

.home-text p{
  color:#4c7e8a;
}

/* Layout: juego + publicidad derecha */
.game-layout {
  background: var(--white);
  overflow: hidden;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 6px;
}

/* Columna central */
.game-center {
    width: 730px;
  max-width: 100%;
}

/* Canvas wrapper */
.game-canvas-wrap {
  width: 100%;
  overflow: hidden;
  background: #fff;
   position: relative;
}

#animation_container {
  margin: 0 auto;
  display: block;
}

#_preload_div_ {
  max-width: 100%;
  overflow: hidden;
}

/* Info debajo del juego */
.game-info {
  padding: 14px 0;
  background: var(--white);
  text-align: left;
  min-height: 150px;
  
}

.game-info h1 {
  font-family: var(--font);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--violeta);
  font-weight: 400;
  text-align: left;
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
}

.game-back-link {
  display: inline-block;
  font-family: var(--font);
  font-size: .95rem;
  color: var(--orange);
  padding-top: 4px;
  margin-bottom: 4px;
}

.game-back-link:hover { color: var(--violeta); }

.game-info p {
  font-family: system-ui, Arial, sans-serif;
  font-size: .95rem;
  line-height: 1.55;
  margin: 6px 0 0;
  color: #4c7e8a;
}

/* Publicidad derecha */
.game-ad-right {
  float: right;
  width: 120px;
  margin-left: 150px;
}




.responsive-img {
  width: 100%;
  height: auto;
  display: block;
  margin: auto;
  max-width: 828px;
}

/* =========================================================
   PRELOADER
========================================================= */

#_preload_div_ {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f4f7;
  overflow: hidden;
  border-radius: 4px;
}

/* Burbujas */
.prl-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.prl-bubbles span {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  opacity: .55;
  animation: prl-float linear infinite;
}

/* 9 burbujas con tamaños, posiciones y tiempos distintos */
.prl-bubbles span:nth-child(1) { width:28px; height:28px; left:8%;  background:#fc9b38; animation-duration:4.2s; animation-delay:0s;    }
.prl-bubbles span:nth-child(2) { width:18px; height:18px; left:20%; background:#8a4c6e; animation-duration:3.5s; animation-delay:.8s;   }
.prl-bubbles span:nth-child(3) { width:36px; height:36px; left:33%; background:#4c7e8a; animation-duration:5.1s; animation-delay:.3s;   }
.prl-bubbles span:nth-child(4) { width:14px; height:14px; left:47%; background:#fc9b38; animation-duration:3.8s; animation-delay:1.2s;  }
.prl-bubbles span:nth-child(5) { width:24px; height:24px; left:58%; background:#8a4c6e; animation-duration:4.6s; animation-delay:.5s;   }
.prl-bubbles span:nth-child(6) { width:32px; height:32px; left:68%; background:#4c7e8a; animation-duration:3.9s; animation-delay:1.8s;  }
.prl-bubbles span:nth-child(7) { width:20px; height:20px; left:78%; background:#fc9b38; animation-duration:4.8s; animation-delay:.2s;   }
.prl-bubbles span:nth-child(8) { width:40px; height:40px; left:87%; background:#8a4c6e; animation-duration:5.5s; animation-delay:1s;    }
.prl-bubbles span:nth-child(9) { width:16px; height:16px; left:93%; background:#4c7e8a; animation-duration:3.2s; animation-delay:2.1s;  }

@keyframes prl-float {
  0%   { transform: translateY(0)   scale(1);   opacity: .55; }
  80%  { opacity: .4; }
  100% { transform: translateY(-400px) scale(1.1); opacity: 0; }
}

/* Centro: barra + porcentaje */
.prl-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: clamp(140px, 55%, 320px);
}

.prl-bar-wrap {
  width: 100%;
  height: 14px;
  background: #fff;
  border-radius: 99px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.prl-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
    background: #fc9b38;
  animation: none;
  background-size: 200% 100%;
  transition: width .3s ease;
 
}

@keyframes prl-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}



/* Y el breakpoint queda: ****************************************************/
@media (min-width: 1016px) {
  .game-ad-right { display: block; }
}

@media (max-width: 1015px) {
  .game-layout { max-width: 730px; }

}

/* Mobile */
@media (max-width: 730px) {

  .game-center { max-width: 100%; }
  .game-canvas-wrap { overflow: hidden; }
  .game-info { padding: 10px 12px 16px; }
  .game-info h1 { font-size: 1.1rem; }

  #animation_container {
    height: auto !important;
    width: 100% !important;
  }

  #_preload_div_ {
    position: absolute;
    background: #fff !important;
  }

  #_preload_div_ img {
    position: absolute;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
  }
}

@media (max-width: 731px) {
  #_preload_div_,
  #animation_container { min-height: 216px; }
}

@media (max-width: 500px) {
  #_preload_div_,
  #animation_container { height: auto !important; min-height: 216px; }
}

@media (width: 428px) {
  #_preload_div_,
  #animation_container { min-height: 216px; }
}

@media (width: 414px) {
  #_preload_div_,
  #animation_container { min-height: 209px; }
}

@media (width: 390px) {
  #_preload_div_,
  #animation_container { min-height: 197px; }
}

@media (max-width: 375px) {
  #_preload_div_,
  #animation_container { min-height: 188px; }
}

@media (width: 320px) {
  #_preload_div_,
  #animation_container { min-height: 160px; }
}

@media (max-width: 730px) {
  .game-canvas-wrap {
    aspect-ratio: 730 / 367;
  }

  #animation_container {
    height: auto !important;
    width: 100% !important;

  }
}

#canvas {
  max-width: 100% !important;
  opacity: 0;
  transition: opacity .6s ease;
}

#canvas.visible {
  opacity: 1;
}