
.contenedor-juegos{
  background: white;
  padding: 20px;
}
.navegacion-juegos {
    width: 100%;
    background-color: #5d96be;
    color: white;
    display: flex;
    padding: 10px;
}
.navegacion-juegos span{
    flex:1;
    cursor: pointer;
}
.navegacion-juegos span:last-child{
    text-align: right;
}

iframe.iframe-juego {
    border: none;
    max-width: 100%;
    width: 1800px;
    height: 850px;
    padding: 19px;
    background: white;
    overflow: hidden;
}

.contenedor-iframe{
    display: flex;
    align-items: center;
    gap: 10px;
}

.contenedor-iframe span{
    color: #484848;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.contenedor-iframe span:hover{
    opacity: 0.7;
}

:fullscreen iframe,
  iframe:fullscreen {
    display: flex;
    justify-content: center;
    align-items: center;
  }
.contenedor-botones {
  position: fixed; /* Cambio de relative a fixed */
  margin: auto;
  width: 100%;
  justify-content: center;
  gap: 30px;
  padding: 0px;
  text-align: center;
  bottom: 0; /* Pegado al borde inferior */
  left: 0;
  background: transparent;
  z-index: 9999; /* Para que quede encima del iframe */
}
  .contenedor-botones #menu-pie{
    background-color: rgba(0,0,0,.2);
    padding: 10px;
    margin-top: 0; /* Eliminado el margen negativo */
    position: relative;
    margin-left: -80px;
    margin-right: -80px;
  }
  .contenedor-botones #boton-menu-pie{
    background-color: #878282;
    font-size: 16px;
    padding: 5px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    margin: 0 -80px;
    color: white;
  }


  .entry-content{
    margin-top: -20px !important;
  }
  .contenedor-contador{
    text-align: center;
    font-size: 24px;
    color: #53aaaa;
    font-weight: 600;
  }

  :fullscreen > .contenedor-contador{
    margin-bottom: -60px;
  }


  #menu-pie button {
    background: transparent;
    border: 2px solid #474444;
    border-radius: 50%;
    padding: 0;
    width: 50px;
    height: 50px;
    color: #474444;
    font-weight: 600;
}



#concentracion,#juego_actual,#total_juegos{
    border: 1px solid;
    padding: 2px 20px;
    background: gray;
    color: white;
    margin: 10px;
    display: inline-block;
    border-radius: 10px;
}
#juego_actual{
  background:white;
  color:gray;
}
#concentracion{
 cursor: pointer;
}

:fullscreen > .contenedor-botones #concentracion,:fullscreen > .contenedor-botones #boton-menu-pie{
  display: none;
}

:fullscreen > .contenedor-botones #menu-pie{
  display: block;
  margin-top: 0;
}

div.contenedor-botones.tableta{
  position: fixed;
  bottom:0;
  left: 0;
  
}
div.contenedor-botones.tableta #boton-menu-pie{
  display: none;
}
div.contenedor-botones.tableta #menu-pie{
  display: block;
  margin-top:0;
}

/* Ocultar botón "Ocultar menú" en PWA */
body.es-pwa-mode #boton-menu-pie{
  display: none !important;
}
/* Alinear controles a la derecha en PWA */
body.es-pwa-mode #menu-pie{
  text-align: right;
  padding-right: 20px;
}
/* Quitar padding del contenedor de juegos en PWA */
body.es-pwa-mode .contenedor-juegos{
  padding: 0 !important;
}

:fullscreen > .contenedor-iframe{
  overflow: auto;
  height: 100vh;
}


.lista-juegos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 10px;
}
.imagen-juego {
  border-radius: 5px;
  padding: 0;
  box-sizing: border-box;
  min-width: 500px;
  max-width: 100% ;
}
.imagen-juego:hover{
  margin-top:-5px;
  transition: all 0.2s ease;
}
.imagen-juego img {
  cursor: pointer;
  width: 500px;
}

.botones-acciones {
  margin: 0;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px; 
}

.botones-acciones button {
  background-color:rgb(252, 170, 0);
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  cursor: pointer;
  margin: 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.botones-acciones button:hover,.botones-acciones button:active{
  opacity: 0.7;
  background-color: rgb(252, 170, 0);
}

.identificador{
  margin-top: -40px;
  font-weight: bold;
  margin-bottom: 12px;
  display: flex;
}

.identificador span:first-child{
  flex: 1;
 padding-left: 30px;
}
.identificador span:last-child{
  flex: 1;
  text-align: right;
  padding-right: 30px;
}

#mensaje {
  background: beige;
  margin: 10px 0;
  padding: 5px 10px;
  color: brown;
  font-size: 20px;
  box-shadow: 0 0 11px 0px rgba(0,0,0,.2);
  border-radius: 10px;
  display: inline-block;
  position: fixed;
  top: 20px;
  transform: translate(50%, 0);
}
#mensaje:empty {
  display: none;
}
p.actual {
  font-weight: bold;
  font-style: italic;
  font-size: 20px;
  color: green;
  margin: 10px 0;
  
}

#grabando {
  background: #fff5f5;
  border-left: 4px solid #ff4757;
  color: #c44569;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.1);
  position: absolute;
  top: -50px;
  right: 50%;
  transform: translateX(50%);
  z-index: 10;
}

#grabando::before {
  content: '!';
  width: 20px;
  height: 20px;
  background: #ff4757;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
  animation: pulse-soft 2s infinite;
}

/* Animación del pulso suave */
@keyframes pulse-soft {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 0 5px rgba(255, 71, 87, 0);
  }
}

.acciones button,.botones-acciones button {
  background-color: transparent;
  border: 1px solid steelblue;
  border-radius: 5px;
  margin: 0 10px;
  padding: 5px 10px;
  box-sizing: border-box;
  color: steelblue;
  display: inline-flex;
  gap: 10px;


}

.acciones button:hover,.botones-acciones button:hover {
  background-color: white;
  color:steelblue
}
.acciones button img,.botones-acciones button img {
  width: 30px;
  height: 30px;
}

.mis-cuadernos .imagen-juego{ 
 min-width: 250px; 
 max-width: 250px;
}

span.nueva{
  float: right;
  margin-top: 10px;
  margin-right: -55px;
  z-index: 99;
  color: green;
  font-style: italic;
  border: 1px solid;
  font-size: smaller;
  padding: 0 5px;
  border-radius: 5px;
  cursor: pointer;
}

#marco-restringido {
  position: absolute;
  top: auto;
  width: 1800px;
  height: 850px;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
  background: rgba(255,255,255,.7);
  display: none;
  
  text-align: center;
}
#marco-restringido h2 {
  color: steelblue;
  background: rgba(255,255,255,.9);
  padding: 10px;
}
#marco-restringido span.material-symbols-outlined {
   font-size: 120px;
   font-variation-settings: 'FILL' 1, 'wght' 100, 'GRAD' 0, 'opsz' 1;
   color: steelblue;
   flex:1;
}

iframe.restringido.juego-bloqueado + #marco-restringido {
  display: flex;
}
/* ============================================
   ESTILOS PARA VISTA PREVIA CON IFRAMES
   Añadir al final del archivo estilo.css
   ============================================ */

/* Contenedor del iframe de vista previa */
.contenedor-vista-previa {
  pointer-events: none; 
  position: relative;
  width: 500px;
  height: 375px; /* Proporción 4:3 */
  overflow: hidden;
  border-radius: 5px;
  cursor: pointer;
  background: #f5f5f5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Iframe dentro del contenedor */
.iframe-vista-previa {
  width: 500px;
  height: 375px;
  border: none;
  border-radius: 5px;
  display: block;
  transform: scale(1);
  transform-origin: top left;
  pointer-events: none; /* Evita interacción con el iframe */
  background: white;
}


/* Efecto hover en el contenedor */
.imagen-juego:hover .contenedor-vista-previa {
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  transform: translateY(-2px);
}

/* Indicador de carga */
.contenedor-vista-previa.cargando::before {
  content: 'Cargando vista previa...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
  font-size: 14px;
  z-index: 0;
  font-style: italic;
}
/* Estilos para el nuevo modal de zoom */
.modal-zoom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: none; /* Se cambia a flex con JS */
    justify-content: center;
    align-items: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.modal-contenedor {
    position: relative;
    width: 1044px;
    height: 788px;  /* Altura fija para 768px + padding */
    max-width: 95vw;
    max-height: 95vh;
    background: #f5f5f5;
    border-radius: 15px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.contenedor-juego-zoom {
    width: 1024px;
    height: 768px;  /* Altura fija importante */
    display: block; /* Cambio de flex a block */
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.contenedor-juego-zoom iframe {
    width: 1024px;
    height: 768px;
    max-width: 100%;
    max-height: 100%;
    border: none;
    border-radius: 10px;
    background: white;
}

/* Botón cerrar mejorado */
.modal-contenedor .boton-cerrar-zoom {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 45px;
    height: 45px;
    background-color: white;
    border: 2px solid #333;
    border-radius: 50%;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-contenedor .boton-cerrar-zoom:hover {
    background-color: #f44336;
    color: white;
    border-color: #f44336;
    transform: scale(1.1) rotate(90deg);
}

/* Responsive - mantener proporción 4:3 */
@media (max-width: 1100px) {
    .modal-contenedor {
        width: 90vw;
        height: calc(90vw * 0.75);
    }
    
    .contenedor-juego-zoom,
    .contenedor-juego-zoom iframe {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 768px) {
    .modal-contenedor {
        width: 95vw;
        height: calc(95vw * 0.75);
        padding: 5px;
    }
    
    .modal-contenedor .boton-cerrar-zoom {
        top: 5px;
        right: 5px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Animación de entrada */
.modal-zoom[style*="flex"] .modal-contenedor {
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Evitar selección de texto en botones e iframes */
.botones-acciones button,
.iframe-vista-previa,
.contenedor-vista-previa {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Estilos para el Dialog de Agregar juego al Cuaderno */

/* Dialog nativo HTML5 */
#dialogAgregarFicha {
    border: none;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 650px;
    width: 90%;
    background: white;
}

#dialogAgregarFicha::backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Contenedor principal del dialog */
#dialogAgregarFicha .dialog-content {
    padding: 28px;
}

/* Título del dialog */
#dialogAgregarFicha h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    padding: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

#dialogAgregarFicha h3::before {
    content: '📚';
    font-size: 28px;
}

/* Línea celeste que va de lado a lado */
#dialogAgregarFicha .dialog-content h3 {
    margin: -28px -28px 20px -28px;
    padding: 28px 28px 16px 28px;
    border-bottom: 3px solid #00c4cc;
}

/* Subtítulo o descripción */
#dialogAgregarFicha .dialog-subtitle {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Mensaje del cuaderno actual */
#dialogAgregarFicha .cuaderno-actual-info {
    background: linear-gradient(135deg, rgba(0, 196, 204, 0.08) 0%, rgba(250, 180, 58, 0.08) 100%);
    border-left: 3px solid #00c4cc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
}

#dialogAgregarFicha .cuaderno-actual-info strong {
    color: #00a3aa;
}

/* Label del formulario */
#dialogAgregarFicha label[for="cuaderno"] {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* Select personalizado */
#dialogAgregarFicha select#cuaderno {
    width: 100%;
    padding: 10px 40px 10px 14px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background-color: #f9fafb;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    margin-bottom: 24px;
}

#dialogAgregarFicha select#cuaderno:hover {
    border-color: #d1d5db;
    background-color: #ffffff;
}

#dialogAgregarFicha select#cuaderno:focus {
    outline: none;
    border-color: #00c4cc;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 196, 204, 0.1);
}

/* Contenedor de botones */
#dialogAgregarFicha .dialog-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Botones del dialog */
#dialogAgregarFicha button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    min-width: 100px;
}

/* Botón Cancelar */
#dialogAgregarFicha button.btn-cancelar {
    background-color: transparent;
    color: #6b7280;
    border: 2px solid #a1a3a8;
}

#dialogAgregarFicha button.btn-cancelar:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

/* Botón Agregar (principal) */
#dialogAgregarFicha button.btn-agregar {
    background: linear-gradient(135deg, #00c4cc 0%, #00a3aa 100%);
    color: white;
}

#dialogAgregarFicha button.btn-agregar:hover {
    background: linear-gradient(135deg, #00a3aa 0%, #008a90 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 196, 204, 0.3);
}

#dialogAgregarFicha button.btn-agregar:active {
    transform: translateY(0);
}

/* Animación de entrada del dialog */
#dialogAgregarFicha[open] {
    animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 480px) {
    #dialogAgregarFicha {
        width: 95%;
        max-width: none;
    }
    
    #dialogAgregarFicha .dialog-content {
        padding: 20px;
    }
    
    #dialogAgregarFicha .dialog-buttons {
        flex-direction: column-reverse;
    }
    
    #dialogAgregarFicha button {
        width: 100%;
    }
}
/* Ocultar identificador antiguo */
.identificador {
    display: none !important;
}

/* Contenedor para nivel y botones */
.acciones-nivel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px;
    background: transparent;
    margin-top: 10px;
}

/* Estilo para el nivel */
.nivel-indicador {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 18px;
    color: #333;
}

.nivel-indicador .etiqueta {
    color: #5b86e5;
    font-weight: 600;
    font-size: 16px;
}

.nivel-indicador .valor {
    color: #5b86e5;
    font-size: 20px;
    font-weight: bold;
}

/* Redefinir botones para la nueva sección */
.acciones-nivel .botones-acciones {
    display: flex;
    gap: 12px;
}

.acciones-nivel .botones-acciones button {
    background-color: transparent;
    border: 2px solid #5b86e5;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    color: #5b86e5;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.acciones-nivel .botones-acciones button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.acciones-nivel .botones-acciones button:hover {
    background-color: #5b86e5;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 134, 229, 0.3);
}

.acciones-nivel .botones-acciones button:active {
    transform: translateY(0);
}

/* Ajuste para vista previa */
.contenedor-vista-previa {
    margin-bottom: 0;
}
/* Forzar que todo esté en una sola línea */
#menu-pie {
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
}

#menu-pie button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#menu-pie > * {
    display: inline-flex;
    align-items: center;
}
/* Imagen de vista previa para juegos AIE */
.imagen-preview-aie {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* ============================================
   ESTILOS PARA JUEGO DIRECTO
   Shortcode: [juego_directo]
   ============================================ */
   /* ============================================
   ESTILOS PARA JUEGO DIRECTO
   Shortcode: [juego_directo]
   ============================================ */

/* Info Plan Explora en formulario */
.info-plan-explora {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(250, 180, 58, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-left: 4px solid #fab43a;
    border-radius: 8px;
}

.info-plan-explora .icono-info {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-plan-explora .contenido-info {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #6b5006;
}

.info-plan-explora .contenido-info strong {
    color: #92400e;
    font-weight: 600;
}

.info-plan-explora .lista-juegos-permitidos {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 12px;
    background: white;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #fab43a;
    font-size: 13px;
}

/* Variables del sistema (si no están definidas) */
:root {
    --gm-primary: #00c4cc;
    --gm-secondary: #fab43a;
    --gm-primary-light: #4dd4da;
    --gm-primary-dark: #00a3aa;
    --gm-gray-50: #f9fafb;
    --gm-gray-100: #f3f4f6;
    --gm-gray-200: #e5e7eb;
    --gm-gray-300: #d1d5db;
    --gm-gray-400: #9ca3af;
    --gm-gray-500: #6b7280;
    --gm-gray-600: #4b5563;
    --gm-gray-700: #374151;
    --gm-gray-800: #1f2937;
    --gm-gray-900: #111827;
}

/* ============================================
   CONTENEDOR DEL FORMULARIO
   ============================================ */
.juego-directo-formulario-contenedor {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
}
/* Header del formulario con icono y título */
.juego-directo-header-form {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 3px solid var(--gm-primary);
}

.juego-directo-header-form .icono-titulo {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
    animation: bounce-icon 2s ease-in-out infinite;
}

@keyframes bounce-icon {
    0%, 100% { 
        transform: translateY(0px);
    }
    50% { 
        transform: translateY(-10px);
    }
}

.juego-directo-header-form h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    color: var(--gm-gray-900);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

@keyframes pulse-gamepad {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
    }
}

/* Botón home en el footer del formulario */
.juego-directo-footer-home {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--gm-gray-200);
    text-align: center;
}

.btn-home-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--gm-secondary);
    color: white;
    border: 2px solid var(--gm-secondary);
    color: white;
    border: 2px solid var(--gm-primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-home-footer:hover {
    background: #f09a1a;
    color: white;
    border-color: #f09a1a;
    transform: translateY(-1px);
}

.btn-home-footer .material-symbols-outlined {
    font-size: 18px;
}
.juego-directo-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--gm-gray-200);
}

/* ============================================
   FORMULARIO
   ============================================ */
#form-juego-directo .form-group {
    margin-bottom: 30px;
}

#form-juego-directo label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gm-gray-800);
    margin-bottom: 12px;
}

#form-juego-directo label .material-symbols-outlined {
    font-size: 20px;
    color: var(--gm-primary);
}

#form-juego-directo input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gm-gray-200);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
}

#form-juego-directo input[type="number"]:focus {
    outline: none;
    border-color: var(--gm-primary);
    box-shadow: 0 0 0 3px rgba(0, 196, 204, 0.1);
}

#form-juego-directo input[type="number"]:disabled {
    background: var(--gm-gray-100);
    cursor: not-allowed;
    border-color: var(--gm-gray-300);
}

.campo-ayuda {
    font-size: 12px;
    color: var(--gm-gray-500);
    margin-top: 6px;
    margin-bottom: 0;
    font-style: italic;
}

/* ============================================
   SELECTOR DE ALUMNO
   ============================================ */
.alumno-selector-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    background: var(--gm-gray-50);
    border: 2px solid var(--gm-gray-200);
    border-radius: 10px;
}

.alumno-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gm-gray-600);
    font-size: 15px;
}

.alumno-placeholder .material-symbols-outlined {
    font-size: 32px;
    color: var(--gm-gray-400);
}

.alumno-seleccionado {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alumno-seleccionado img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gm-primary);
}

.alumno-seleccionado span {
    font-weight: 600;
    color: var(--gm-gray-900);
    font-size: 15px;
}

.btn-seleccionar-alumno,
.btn-cambiar-alumno {
    padding: 10px 20px;
    background: var(--gm-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-seleccionar-alumno:hover,
.btn-cambiar-alumno:hover {
    background: var(--gm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
}

/* ============================================
   BOTÓN PRINCIPAL
   ============================================ */
.btn-jugar-ahora {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--gm-primary) 0%, var(--gm-primary-light) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.btn-jugar-ahora:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 196, 204, 0.4);
}

.btn-jugar-ahora:disabled {
    background: var(--gm-gray-200);
    color: var(--gm-gray-600);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-jugar-ahora .material-symbols-outlined {
    font-size: 24px;
}

/* ============================================
   VISTA DEL JUEGO
   ============================================ */
.juego-directo-contenedor {
    width: 100%;
    max-width: 100%;
    background: white;
    padding: 20px;
    min-height: 90vh;
}

.juego-directo-iframe-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--gm-gray-50);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.juego-directo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--gm-gray-50);
    border-radius: 12px;
    border: 2px solid var(--gm-gray-200);
}

.juego-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.juego-id {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--gm-primary);
    color: var(--gm-primary);
    font-weight: 600;
    border-radius: 8px;
    font-size: 14px;
}

.alumno-nombre {
    font-size: 16px;
    font-weight: 600;
    color: var(--gm-gray-800);
}

.btn-cambiar-juego,
.btn-salir {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-cambiar-juego {
    background: var(--gm-secondary);
    color: white;
}

.btn-cambiar-juego:hover {
    background: #f09a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 180, 58, 0.3);
}

.btn-salir {
    background: var(--gm-primary);
    color: white;
}

.btn-salir:hover {
    background: var(--gm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
}

.btn-cambiar-juego .material-symbols-outlined,
.btn-salir .material-symbols-outlined {
    font-size: 20px;
}

/* ============================================
   IFRAME DEL JUEGO
   ============================================ */
.juego-directo-iframe {
    width: 1024px;
    height: 768px;
    max-width: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
}

/* ============================================
   MENSAJES DE ERROR
   ============================================ */
.juego-directo-error {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.juego-directo-error .error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.juego-directo-error h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gm-gray-900);
    margin-bottom: 16px;
}

.juego-directo-error p {
    font-size: 16px;
    color: var(--gm-gray-600);
    line-height: 1.6;
    margin-bottom: 30px;
}

.btn-volver,
.btn-reintentar {
    padding: 16px 40px;
    font-size: 17px;
    font-weight: 600;
    background: var(--gm-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-volver:hover,
.btn-reintentar:hover {
    background: var(--gm-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 196, 204, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .juego-directo-card {
        padding: 30px 20px;
    }
    
    .juego-directo-iframe-wrapper {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .juego-directo-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .juego-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .juego-directo-iframe {
        width: 100%;
        height: 60vh;
    }
    
    .alumno-selector-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-seleccionar-alumno,
    .btn-cambiar-alumno {
        width: 100%;
    }
}

/* ============================================
   MODAL DE ALUMNOS (ajustes específicos)
   ============================================ */
#dlg-alumnos-juego-directo {
    border: none;
    border-radius: 16px;
    padding: 20px;
    max-width: 700px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

#dlg-alumnos-juego-directo::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.lista-alumnos-juego-directo {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    align-items: center;
}

.item-alumno-seleccion {
    display: grid;
    grid-template-rows: 1fr;
    gap: 10px;
    text-align: center;
    padding: 0 10px;
    justify-items: center;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}

.item-alumno-seleccion:hover {
    transform: scale(1.05);
    background: rgba(0, 196, 204, 0.1);
    box-shadow: 0 4px 12px rgba(0, 196, 204, 0.2);
}

.item-alumno-seleccion img {
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.item-alumno-seleccion:hover img {
    border-color: var(--gm-primary);
}

.cerrar-dialogo-juego {
    cursor: pointer;
    font-size: 28px;
    color: var(--gm-gray-600);
    transition: all 0.2s;
}

.cerrar-dialogo-juego:hover {
    color: var(--gm-gray-900);
    transform: rotate(90deg);
}
/* ============================================
   ESTILOS PARA PANTALLA COMPLETA EN PWA
   ============================================ */

/* Cuando está activo el modo fullscreen en PWA */
body.pwa-fullscreen-activo {
    overflow: hidden;
}

/* Ocultar elementos que no deben verse en fullscreen PWA */
body.pwa-fullscreen-activo header,
body.pwa-fullscreen-activo nav,
body.pwa-fullscreen-activo footer,
body.pwa-fullscreen-activo .menu-principal,
body.pwa-fullscreen-activo #wpadminbar {
    display: none !important;
}

/* Contenedor de juegos en modo fullscreen PWA */
.contenedor-juegos.pwa-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000;
    margin: 0 !important;
    padding: 0 !important;
}

/* Iframe del juego en fullscreen PWA - PANTALLA COMPLETA */
.contenedor-juegos.pwa-fullscreen iframe#juegos {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mantener visible solo los controles del juego en fullscreen */
.contenedor-juegos.pwa-fullscreen .contenedor-botones {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
}

/* Ajustes para que los botones se vean bien en fullscreen */
.contenedor-juegos.pwa-fullscreen .contenedor-botones button {
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.contenedor-juegos.pwa-fullscreen .contenedor-botones button:hover {
    background: #fff;
}

/* ============================================
   CENTRAR JUEGO EN PANTALLA COMPLETA (NAVEGADOR)
   Solución para pantallas panorámicas
   ============================================ */

/* Forzar centrado del contenedor principal en fullscreen */
.contenedor-juegos:fullscreen,
.contenedor-juegos:-webkit-full-screen,
.contenedor-juegos:-moz-full-screen,
.contenedor-juegos:-ms-fullscreen {
    background: #000 !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
}

/* Contenedor del iframe centrado */
.contenedor-juegos:fullscreen .contenedor-iframe,
.contenedor-juegos:-webkit-full-screen .contenedor-iframe,
.contenedor-juegos:-moz-full-screen .contenedor-iframe,
.contenedor-juegos:-ms-fullscreen .contenedor-iframe {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
}

/* Iframe centrado con tamaño fijo - ESTO ES LO IMPORTANTE */
.contenedor-juegos:fullscreen iframe#juegos,
.contenedor-juegos:-webkit-full-screen iframe#juegos,
.contenedor-juegos:-moz-full-screen iframe#juegos,
.contenedor-juegos:-ms-fullscreen iframe#juegos {
    width: 1800px !important;
    height: 850px !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    margin: auto !important;
    display: block !important;
    padding: 0 !important;
}

/* Ocultar las flechas de navegación en fullscreen */
.contenedor-juegos:fullscreen .contenedor-iframe > span,
.contenedor-juegos:-webkit-full-screen .contenedor-iframe > span,
.contenedor-juegos:-moz-full-screen .contenedor-iframe > span,
.contenedor-juegos:-ms-fullscreen .contenedor-iframe > span {
    display: none !important;
}

/* Mover botones al final en fullscreen navegador */
.contenedor-juegos:fullscreen .contenedor-botones,
.contenedor-juegos:-webkit-full-screen .contenedor-botones,
.contenedor-juegos:-moz-full-screen .contenedor-botones,
.contenedor-juegos:-ms-fullscreen .contenedor-botones {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
}
