#mi-contenido {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  z-index: 9999;
}

body,
html {
  height: 100%;
  margin: 0;
  overflow: hidden;
  /* Evita el scroll globalmente */
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.index {
  display: flex;
  flex-direction: column;
}


/* Menu Container (Top Right) */
.menu-container {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 10000;
  /* Ensure above everything */
  display: flex;
  gap: 15px;
  background-color: rgba(255, 255, 255, 0.8);
  /* Optional: slight background for visibility */
  padding: 5px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.theme-juego-menu {
  position: static;
  /* Reset fixed positioning as it's now in container */
  cursor: pointer;
  transition: transform 0.2s;
}

.theme-juego-menu:hover {
  transform: scale(1.1);
}

/* Offcanvas Customization */
.offcanvas-top {
  height: auto !important;
  /* Adapt to content */
  min-height: 200px;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.offcanvas-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.contenedor-padre {
  /* Flexbox Layout Principal */
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  /* Sin scroll en el contenedor principal */
  padding-bottom: 0 !important;
  /* Eliminamos paddings calculados */
}

.contenedor__padre__contenedor {
  /* El contenido ocupa todo el espacio disponible menos el footer */
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* El contenido interno tampoco debe scrollear */
  width: 100%;
}



.theme-juego-footer {
  /* Footer como elemento flexible, NO fixed */
  position: relative !important;
  flex-shrink: 0;
  /* No encoger */
  z-index: 1000;
  width: 100%;
  padding-bottom: env(safe-area-inset-bottom);
  /* Solo el safe area necesario */
}

@media (max-width: 768px) {
  #contenedor-tarjeta {
    width: 95%;
    /* En pantallas más pequeñas, ocupa el 95% del ancho */
  }
}

@media (max-width: 480px) {
  #contenedor-tarjeta {
    width: 100%;
    /* En pantallas muy pequeñas, ocupa el 100% del ancho */
    padding: 0.5rem;
    /* Reduce el padding */
  }
}

#fila-botoneria {
  display: flex;
  height: 8vh;
}



.progress,
.progress-bar {
  border-radius: 0 !important;
}

.btn {
  flex-grow: 1;
  /* Los botones ocupan el mismo espacio */
  margin: 0px;
}

/* Asegúrate de agregar estas clases a tu archivo CSS */
.contenedor-resultados {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.mensaje-fin {
  margin-bottom: 20px;
  /* Espacio entre el mensaje y el botón */
}



/* Animación movimiento tarjeta ------------ */

#tarjeta-move {
  position: relative;
}


@-webkit-keyframes moveLeft {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateX(-100%) rotate(-280deg) scale(35%);
    opacity: 0;
  }
}


@keyframes moveLeft {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateX(-100%) rotate(-280deg) scale(35%);
    opacity: 0;
  }
}

@-webkit-keyframes moveRight {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateX(100%) rotate(280deg) scale(35%);
    opacity: 0;
  }
}

@keyframes moveRight {
  0% {
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateX(100%) rotate(280deg) scale(35%);
    opacity: 0;
  }
}

.tarjeta-move-left {
  -webkit-animation: moveLeft 1.5s ease forwards;
  animation: moveLeft 1.5s ease forwards;
  box-shadow: 0 0 15px 5px rgba(0, 255, 0, 0.7);
  /* Resplandor verde */
}

.tarjeta-move-right {
  -webkit-animation: moveRight 1.5s ease forwards;
  animation: moveRight 1.5s ease forwards;
  box-shadow: 0 0 15px 5px rgba(255, 0, 0, 0.7);
  /* Resplandor rojo */
}

.tooltip {
  z-index: 11000 !important;
}


/* Modal Centering */
.modal-body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  /* Ensure enough height for vertical centering */
}

.btn_contenedor_opciones {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  width: 100%;
}


/* Slider Customization */
.contenedor_accesibilidad_slider {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  justify-content: center;
}

.accesibilidad-label {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
}

.range-container {
  position: relative;
  width: 60%;
}

.form-range {
  width: 100%;
}

.range-value-popup {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.2s;
}


/* Shared Icon Button Style */
.theme-juego-menu,
.game-icon-btn {
  position: static;
  cursor: pointer;
  transition: transform 0.2s;
  color: #333;
  /* Ensure consistent color */
}

.theme-juego-menu:hover,
.theme-juego-menu:hover {
  transform: scale(1.2);
  color: #000;
}


/* --- NEW UNIFIED GAME UI --- */

/* Wrapper for Bottom Fixed Elements - REFACTORED FOR FLEXBOX */
.theme-juego-footer {
  /* Resetting mostly overridden above, ensuring consistency */
  position: relative !important;
  bottom: auto;
  left: auto;
  display: flex;
  flex-direction: column-reverse;
  pointer-events: auto;
  padding-bottom: env(safe-area-inset-bottom);
}

/* The Single Horizontal Bar */
.game-unified-bar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: relative;
}

/* Sections inside the bar */
.game-bar-section {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
}

/* Progress Bar - At the VERY BOTTOM */
.theme-juego-footer .progress {
  height: 6px !important;
  border-radius: 0;
  margin: 0;
}

/* --- LAYOUT SPACING FOR CONTENT --- */

/* Content Container - Reduced padding since buttons are now fixed */
/* Content Container - Flexbox Refactor */
.contenedor-padre {
  overflow-y: hidden;
  height: 100dvh;
  padding-bottom: 0 !important;
}

/* True/False buttons - Now part of fixed footer */
#fila-botoneria {
  width: 100%;
  display: flex;
  margin: 0;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.08);
}

#fila-botoneria .btn {
  padding: 18px;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 0;
  border: none;
  flex: 1;
  min-height: 60px;
  /* Altura mínima para asegurar accesibilidad */
}

/* Icon Sizing - Consistent for ALL icons */
.game-icon-btn {
  width: 28px;
  height: 28px;
  color: #555;
  transition: all 0.2s;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}

.game-icon-btn:hover {
  color: #000;
  background-color: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

/* Specific Colors for specific actions */
#heart-fill,
#heart-outline:hover {
  color: #dc3545;
}

#playBtn:hover,
#pauseBtn:hover {
  color: #198754;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .game-unified-bar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 15px;
    justify-content: center;
  }

  .game-bar-section {
    gap: 10px;
  }

  .section-left {
    order: 1;
    width: 100%;
    justify-content: center;
  }

  .section-right {
    order: 2;
    width: 100%;
    justify-content: center;
  }

  .contenedor-padre {
    padding-bottom: 0 !important;
  }

  /* Ensure ALL icons are consistently sized on mobile */
  .game-icon-btn,
  .game-icon-btn svg {
    width: 32px !important;
    height: 32px !important;
  }

  #fila-botoneria .btn {
    padding: 22px;
    font-size: 1.1rem;
    min-height: 70px;
    /* Mayor altura en móviles para mejor accesibilidad */
  }
}