/* ========================================================================== */
/* ESTILOS COMPLETOS PARA JUEGO DE LECTURA EN VOZ ALTA */
/* VERSIÓN 100% CENTRADA EN PANTALLA - CORREGIDA PARA MÓVILES */
/* MODIFICADO: Eliminados estilos redundantes de victoria */
/* ========================================================================== */

/* RESET Y ESTILOS BASE */
.juego-lectura {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    transform: translateY(350px) !important;
    width: 100vw !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: 80vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 15px 20px !important;
    margin: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 20px !important;
    border: none !important;
    box-shadow: none !important;
    z-index: 2147483646 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* CONTENEDOR DE TEXTO PRINCIPAL - CENTRADO Y FLEXIBLE */
.contenedor-texto-lectura {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 15px 20px !important;
    max-width: 100% !important;
    width: 100% !important;
    text-align: center !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 30vh !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
}

/* TEXTO DE LECTURA - CENTRADO Y RESPONSIVE */
.texto-lectura {
    font-size: 28px !important;
    line-height: 1.5 !important;
    color: white !important;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9) !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 25vh !important;
    flex: 1 !important;
    box-sizing: border-box !important;
    transform: translateX(20px) !important;
}

/* PALABRAS INDIVIDUALES */
.palabra-lectura {
    display: inline-block;
    margin: 0 4px 8px 4px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    min-width: 30px;
    text-align: center;
    font-weight: 700;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    box-sizing: border-box;
}

/* PALABRA RESALTADA (ACTUAL) */
.palabra-lectura.resaltada {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.8), rgba(255, 165, 0, 0.6)) !important;
    color: white !important;
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.8);
    border: 3px solid rgba(255, 255, 255, 0.9) !important;
    z-index: 2;
    position: relative;
    animation: pulseResaltado 2s infinite;
}

@keyframes pulseResaltado {
    0%, 100% { 
        box-shadow: 0 10px 25px rgba(255, 215, 0, 0.8); 
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 215, 0, 1); 
    }
}

/* PALABRA LEÍDA CORRECTAMENTE */
.palabra-lectura.correcta {
    background: linear-gradient(145deg, rgba(76, 175, 80, 0.8), rgba(56, 142, 60, 0.6)) !important;
    color: white !important;
    border: 3px solid rgba(255, 255, 255, 0.7) !important;
    animation: palabraCorrecta 0.8s ease-out forwards;
    opacity: 1;
    transform: scale(1);
}

@keyframes palabraCorrecta {
    0% {
        transform: scale(1);
        background: rgba(76, 175, 80, 0.3);
        box-shadow: 0 0 0 rgba(76, 175, 80, 0);
    }
    50% {
        transform: scale(1.2);
        background: rgba(76, 175, 80, 0.9);
        box-shadow: 0 0 40px rgba(76, 175, 80, 1);
    }
    100% {
        transform: scale(1);
        background: rgba(76, 175, 80, 0.6);
        box-shadow: 0 5px 20px rgba(76, 175, 80, 0.6);
    }
}

/* PALABRA CON ERROR */
.palabra-lectura.error {
    background: linear-gradient(145deg, rgba(244, 67, 54, 0.8), rgba(198, 40, 40, 0.6)) !important;
    color: white !important;
    border: 3px solid rgba(255, 255, 255, 0.7) !important;
    animation: palabraError 0.8s ease-out;
}

@keyframes palabraError {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-8px) rotate(-3deg); }
    20% { transform: translateX(8px) rotate(3deg); }
    30% { transform: translateX(-5px) rotate(-2deg); }
    40% { transform: translateX(5px) rotate(2deg); }
    50% { transform: translateX(-3px) rotate(-1deg); }
    60% { transform: translateX(3px) rotate(1deg); }
    70% { transform: translateX(-2px) rotate(-0.5deg); }
    80% { transform: translateX(2px) rotate(0.5deg); }
}

/* LÍNEAS DE TEXTO */
.linea-lectura {
    display: block;
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    min-height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    box-sizing: border-box;
    width: 100%;
}

.linea-lectura.activa {
    background: rgba(255, 255, 255, 0.3);  /* ← FONDO BLANCO TRANSLÚCIDO (30% opacidad) */
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);  /* ← Sombra blanca */
    border: 2px solid rgba(255, 255, 255, 0.5);  /* ← LÍNEA BLANCA (50% opacidad) */
    transform: translateY(-3px);
    animation: lineaActiva 3s infinite alternate;
}


@keyframes lineaActiva {
    0% { box-shadow: 0 0 30px rgba(33, 150, 243, 0.4); }
    100% { box-shadow: 0 0 50px rgba(33, 150, 243, 0.6); }
}

/* ========================================================================== */
/* TABLERO DE LECTURA - EXACTAMENTE IGUAL AL DE DEFENSA */
/* ========================================================================== */

.contador-lectura {
    position: fixed !important;
    bottom: 90px !important; /* 70px arriba de la barra de botones - MISMA POSICIÓN EN TODOS LOS DISPOSITIVOS */
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(190, 150, 120, 0.6) !important; /* EXACTAMENTE EL MISMO COLOR QUE DEFENSA */
    color: white;
    padding: 8px 15px !important;
    border-radius: 14px;
    font-size: 16px;
    z-index: 2147483646 !important;
    font-family: 'Fredoka', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    pointer-events: auto;
    backdrop-filter: blur(5px) !important;
    width: 90%;
    max-width: 500px;
    box-sizing: border-box;
    text-align: center;
    display: none !important;
    justify-content: space-around;
    align-items: center;
    flex-wrap: nowrap;
    animation: aparecerContador 0.5s ease-out !important;
}

.contador-lectura.mostrar {
    display: flex !important;
}

@keyframes aparecerContador {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.contador-lectura div {
    margin: 0 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
    font-weight: bold;
    white-space: nowrap;
    font-size: 16px;
    padding: 0 5px;
}

/* ESTILOS ESPECÍFICOS PARA LOS CONTADORES DE LECTURA - IGUAL QUE DEFENSA */
#contadorPalabras {
    color: #69f0ae !important; /* MISMO COLOR QUE insectos-eliminados */
}

#estadoJuego {
    color: #4fc3f7 !important; /* MISMO COLOR QUE tiempo-restante */
}

/* CÍRCULO DE MICRÓFONO - POSICIÓN AJUSTADA PARA NO SUPERFONERSE CON TABLERO */
.circulo-microfono-lectura {
    position: fixed !important;
    bottom: 180px !important; /* AUMENTADO DE 180px PARA DEJAR ESPACIO AL TABLERO */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 140px !important;
    height: 140px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, rgba(33, 150, 243, 0.9), rgba(21, 101, 192, 0.7)) !important;
    border: 4px solid rgba(255, 255, 255, 0.9) !important;
    color: white !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: 0 20px 40px rgba(33, 150, 243, 0.6) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: bold !important;
    z-index: 2147483647 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    backdrop-filter: blur(10px) !important;
    text-align: center !important;
    padding: 0 !important;
    overflow: hidden;
    box-sizing: border-box !important;
}

.circulo-microfono-lectura::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1%, transparent 10%);
    animation: rotarFondo 20s linear infinite;
    z-index: -1;
}

@keyframes rotarFondo {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.circulo-microfono-lectura.mostrar {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    animation: aparecerMicrofono 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

@keyframes aparecerMicrofono {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5);
    }
    70% {
        transform: translateX(-50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

.circulo-microfono-lectura:hover {
    transform: translateX(-50%) scale(1.2) !important;
    background: linear-gradient(145deg, rgba(33, 150, 243, 1), rgba(21, 101, 192, 0.9)) !important;
    border-color: #fff !important;
    box-shadow: 0 25px 50px rgba(33, 150, 243, 0.9) !important;
}

.circulo-microfono-lectura.escuchando {
    background: linear-gradient(145deg, rgba(244, 67, 54, 0.9), rgba(183, 28, 28, 0.7)) !important;
    border-color: #fff !important;
    animation: pulsarMicrofono 1.5s infinite !important;
}

@keyframes pulsarMicrofono {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 20px 40px rgba(244, 67, 54, 0.7);
    }
    50% {
        transform: translateX(-50%) scale(1.25);
        box-shadow: 0 0 60px rgba(244, 67, 54, 1);
    }
}

/* ICONO Y TEXTO DEL MICRÓFONO */
.circulo-microfono-lectura .icono-microfono-lectura {
    font-size: 40px !important;
    margin-bottom: 6px !important;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
    animation: flotarIcono 3s infinite ease-in-out;
}

@keyframes flotarIcono {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.circulo-microfono-lectura .mensaje-reconocimiento-lectura {
    font-size: 16px !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9) !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    padding: 0 10px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* INDICADOR DE ESCUCHA */
.indicator-escucha {
    display: none;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: #f44336;
    border-radius: 50%;
    animation: latido 1.5s infinite;
    z-index: 2147483648;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.9);
    border: 3px solid white;
    box-sizing: border-box;
}

@keyframes latido {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
    }
    50% {
        transform: translateX(-50%) scale(1.4);
        box-shadow: 0 0 0 20px rgba(244, 67, 54, 0);
    }
}

/* MENSAJE DE VOZ (específico para lectura) */
.mensaje-voz-lectura {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(50, 50, 50, 0.85)) !important;
    border: 4px solid rgba(255, 255, 255, 0.7) !important;
    color: white !important;
    padding: 30px 40px !important;
    border-radius: 20px !important;
    font-size: 24px !important;
    z-index: 2147483648 !important;
    text-align: center !important;
    max-width: 90% !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 700 !important;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7) !important;
    animation: aparecerMensaje 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    display: none !important;
    min-width: 250px;
    box-sizing: border-box !important;
}

.mensaje-voz-lectura.mostrar {
    display: block !important;
}

@keyframes aparecerMensaje {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* EFECTOS DE PARTÍCULAS (específicas para palabras) */
.particula-lectura {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #4CAF50, transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: particulasLectura 1.2s ease-out forwards;
    z-index: 2147483647;
    box-sizing: border-box;
}

@keyframes particulasLectura {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* ESTRELLAS DE RECOMPENSA PARA PALABRAS CORRECTAS */
.estrella-recompensa {
    position: absolute;
    font-size: 28px;
    opacity: 0;
    animation: caerEstrella 2.5s ease-out forwards;
    z-index: 2147483647;
    pointer-events: none;
    text-shadow: 0 0 15px currentColor;
    box-sizing: border-box;
}

@keyframes caerEstrella {
    0% {
        transform: translateY(-100px) rotate(0deg) scale(0.5);
        opacity: 0;
        color: #FFD700;
    }
    20% {
        opacity: 1;
        transform: translateY(-50px) rotate(180deg) scale(1.3);
        color: #FFA500;
    }
    80% {
        opacity: 1;
        color: #FFD700;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) scale(0.5);
        opacity: 0;
        color: #FFA500;
    }
}

/* ANIMACIÓN DE TEXTO COMPLETADO */
.texto-lectura.completado {
    animation: textoCompletado 2.5s ease-out;
    color: #4CAF50 !important;
    text-shadow: 0 0 25px rgba(76, 175, 80, 0.8) !important;
}

@keyframes textoCompletado {
    0% {
        transform: scale(1);
        color: white;
    }
    25% {
        transform: scale(1.05);
        color: #4CAF50;
        text-shadow: 0 0 30px rgba(76, 175, 80, 1);
    }
    50% {
        transform: scale(1.03);
        color: #2196F3;
        text-shadow: 0 0 30px rgba(33, 150, 243, 1);
    }
    75% {
        transform: scale(1.05);
        color: #9C27B0;
        text-shadow: 0 0 30px rgba(156, 39, 176, 1);
    }
    100% {
        transform: scale(1);
        color: #4CAF50;
        text-shadow: 0 0 25px rgba(76, 175, 80, 0.8);
    }
}

/* ANIMACIÓN DE APARICIÓN */
@keyframes aparecerTextoLectura {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.texto-lectura.apareciendo {
    animation: aparecerTextoLectura 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* FEEDBACK VISUAL PARA ACIERTOS */
.feedback-correcto {
    position: absolute;
    font-size: 24px;
    color: #4CAF50;
    font-weight: bold;
    opacity: 0;
    animation: flotarFeedback 1.5s ease-out forwards;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.9);
    z-index: 2147483648;
    pointer-events: none;
    box-sizing: border-box;
}

@keyframes flotarFeedback {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.3) rotate(0deg);
    }
    30% {
        opacity: 1;
        transform: translateY(-30px) scale(1.4) rotate(15deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1) rotate(30deg);
    }
}

/* ========================================================================== */
/* MEDIA QUERIES - CONSISTENTES CON JUEGO DEFENSA */
/* ========================================================================== */

/* Tablets - MODIFICADO: +50px arriba y texto 30% más pequeño */
@media (max-width: 768px) {
    .juego-lectura {
        width: 100vw !important;
        max-width: 100% !important;
        max-height: 70vh !important;
        padding: 12px 15px !important;
        border-radius: 15px !important;
        /* MODIFICADO: +50px arriba (de 370px a 320px) */
        transform: translateY(320px) !important;
    }
    
    .contenedor-texto-lectura {
        padding: 12px 15px !important;
        min-height: 25vh !important;
        max-height: 50vh !important;
    }
    
    .texto-lectura {
        /* MODIFICADO: Texto 30% más pequeño (28px → 19.6px, aprox 20px) */
        font-size: 20px !important;
        line-height: 1.4 !important;
        min-height: 20vh !important;
        transform: translateX(15px) !important;
    }
    
    .palabra-lectura {
        margin: 0 3px 6px 3px;
        padding: 3px 6px;
        /* MODIFICADO: Tamaño de fuente reducido proporcionalmente */
        font-size: 19px;
        min-width: 25px;
    }
    
    .linea-lectura {
        padding: 8px 12px;
        margin-bottom: 8px;
        min-height: 45px;
    }
    
    /* TABLERO CONSISTENTE CON DEFENSA - MISMOS AJUSTES */
    .contador-lectura {
        padding: 8px 12px !important;
        font-size: 16px;
        max-width: 400px;
        /* NO modificar bottom - posición consistente */
    }
    
    .contador-lectura div {
        font-size: 16px;
    }
    
    /* CÍRCULO DE MICRÓFONO - AJUSTADO PARA TABLETS */
    .circulo-microfono-lectura {
        width: 120px !important;
        height: 120px !important;
        bottom: 170px !important; /* AJUSTADO PARA NO SUPERFONERSE */
        font-size: 16px !important;
    }
    
    .circulo-microfono-lectura .icono-microfono-lectura {
        font-size: 36px !important;
    }
}

/* Móviles - MODIFICADO: +50px arriba y texto 30% más pequeño */
@media (max-width: 480px) {
    .juego-lectura {
        width: 100vw !important;
        max-height: 65vh !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
        /* MODIFICADO: +50px arriba (de 220px a 170px) */
        transform: translateY(170px) !important;
    }
    
    .contenedor-texto-lectura {
        padding: 10px 12px !important;
        min-height: 18vh !important;
        max-height: 40vh !important;
    }
    
    .texto-lectura {
        /* MODIFICADO: Texto 30% más pequeño (18px → 12.6px, aprox 13px) */
        font-size: 13px !important;
        line-height: 1.3 !important;
        min-height: 12vh !important;
        transform: translateX(10px) !important;
    }
    
    .palabra-lectura {
        margin: 0 2px 4px 2px;
        padding: 2px 4px;
        /* MODIFICADO: Tamaño de fuente reducido proporcionalmente */
        font-size: 12px;
        min-width: 18px;
        border-radius: 6px;
    }
    
    .linea-lectura {
        padding: 5px 8px;
        margin-bottom: 5px;
        min-height: 35px;
        border-radius: 8px;
    }
    
    /* TABLERO CONSISTENTE CON DEFENSA - MISMOS AJUSTES */
    .contador-lectura {
        padding: 6px 10px !important;
        font-size: 16px;
        max-width: 300px;
        /* NO modificar bottom - posición consistente */
        flex-wrap: wrap;
    }
    
    .contador-lectura div {
        font-size: 16px;
        padding: 0 3px;
    }
    
    /* CÍRCULO DE MICRÓFONO - AJUSTADO PARA MÓVILES */
    .circulo-microfono-lectura {
        width: 100px !important;
        height: 100px !important;
        bottom: 150px !important; /* AJUSTADO PARA NO SUPERFONERSE */
        font-size: 14px !important;
        border-width: 3px !important;
    }
    
    .circulo-microfono-lectura .icono-microfono-lectura {
        font-size: 32px !important;
    }
    
    .circulo-microfono-lectura .mensaje-reconocimiento-lectura {
        font-size: 13px !important;
        padding: 0 8px;
        min-height: 35px;
    }
}

@media (max-width: 360px) {
    .juego-lectura {
        max-height: 60vh !important;
        padding: 8px 10px !important;
        /* MODIFICADO: +50px arriba (de 200px a 150px) */
        transform: translateY(150px) !important;
    }
    
    .texto-lectura {
        /* MODIFICADO: Texto 30% más pequeño (16px → 11.2px, aprox 11px) */
        font-size: 11px !important;
        line-height: 1.2 !important;
        transform: translateX(5px) !important;
    }
    
    .palabra-lectura {
        /* MODIFICADO: Tamaño de fuente reducido proporcionalmente */
        font-size: 11px;
        margin: 0 1px 3px 1px;
        padding: 1px 3px;
        min-width: 16px;
    }
    
    /* CÍRCULO DE MICRÓFONO - AJUSTADO PARA PANTALLAS PEQUEÑAS */
    .circulo-microfono-lectura {
        width: 90px !important;
        height: 90px !important;
        bottom: 140px !important; /* AJUSTADO PARA NO SUPERFONERSE */
    }
    
    /* TABLERO - AJUSTE FINO PARA PANTALLAS MUY PEQUEÑAS */
    .contador-lectura {
        max-width: 280px;
        padding: 5px 8px !important;
    }
}

/* ========================================================================== */
/* FORZAR POSICIÓN CON SELECTORES MÁS ESPECÍFICOS - IGUAL QUE DEFENSA */
/* ========================================================================== */

html body .contador-lectura {
    bottom: 80px !important; /* POSICIÓN FIJA EN TODOS LOS DISPOSITIVOS - IGUAL QUE DEFENSA */
}

/* ESTILOS PARA MODO MANUAL (FALLBACK) */
.modo-manual .circulo-microfono-lectura {
    background: linear-gradient(145deg, rgba(156, 39, 176, 0.9), rgba(123, 31, 162, 0.7)) !important;
}

.modo-manual .circulo-microfono-lectura.escuchando {
    background: linear-gradient(145deg, rgba(255, 152, 0, 0.9), rgba(245, 124, 0, 0.7)) !important;
}

/* ESTILOS PARA DIAGNÓSTICO */
.debug-info {
    position: fixed;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 2147483649;
    display: none;
    font-family: monospace;
    max-width: 150px;
    box-sizing: border-box;
}

.debug-info.mostrar {
    display: block;
}

/* ESTILOS PARA TÍTULO DE INSTRUCCIONES Y PANEL (OPCIONAL) */
.titulo-instrucciones-lectura,
.panel-instrucciones-lectura {
    display: none !important;
}

/* MEJORA PARA VISIBILIDAD EN FONDOS OSCUROS */
.texto-lectura {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* AJUSTES PARA GARANTIZAR CENTRADO PERFECTO */
.juego-lectura {
    transform-origin: center center !important;
}

/* ========================================================================== */
/* ESTILOS PARA MENSAJES DE LINTERNA EN JUEGO DE LECTURA - IDÉNTICOS A LINTERNA */
/* ========================================================================== */

.mensaje-linterna-lectura {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: white !important;
    padding: 25px 35px !important;
    border-radius: 12px !important;
    font-size: 26px !important;
    z-index: 2147483648 !important;
    text-align: center !important;
    max-width: 80% !important;
    font-family: 'Fredoka', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    animation: aparecerMensaje 0.3s ease-out !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    /* Asegurar que sea visible */
    display: block !important;
    opacity: 1 !important;
}

/* MEDIA QUERIES PARA MENSAJES DE LINTERNA EN LECTURA - IGUAL QUE LINTERNA */
@media (max-width: 768px) {
    .mensaje-linterna-lectura {
        font-size: 22px !important;
        padding: 20px 30px !important;
        max-width: 85% !important;
    }
}

@media (max-width: 480px) {
    .mensaje-linterna-lectura {
        font-size: 20px !important;
        padding: 18px 25px !important;
        max-width: 90% !important;
    }
}