:root {
            --primary-color: #3f51b5;
            --primary-dark: #303f9f;
            --primary-light: #7986cb;
            --accent-color: #ffd700;
            --text-light: #ffffff;
            --text-dark: #212121;
            --background-dark: #1a237e;
            --background-gradient: linear-gradient(135deg, #1a237e 0%, #3f51b5 50%, #7986cb 100%);
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--background-dark);
            color: var(--text-light);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }
        
        .container {
            display: flex;
            flex: 1;
            padding: 20px;
            gap: 20px;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
        }
        
        .video-container {
            flex: 2;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 10px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
        }
        
        .video-wrapper {
            position: relative;
            padding-bottom: 56.25%; /* Ratio 16:9 para PC */
            height: 0;
            overflow: hidden;
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }
        
        .video-wrapper iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
        
        .preguntas-container {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
            display: flex;
            flex-direction: column;
            position: relative;
            /* Asegurar que sea visible por defecto */
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        .preguntas-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid var(--accent-color);
        }
        
        .preguntas-header i {
            color: var(--accent-color);
            margin-right: 10px;
            font-size: 24px;
        }
        
        .preguntas-header h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--text-light);
        }
        
        .preguntas-content {
            flex: 1;
            overflow-y: auto;
            padding: 10px 0;
            word-break: break-word;
            line-height: 1.6;
        }
        
        .preguntas-content p {
            margin-bottom: 10px;
        }
        
        #pregunta-container {
            display: none;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        #pregunta-modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            overflow: auto;
            animation: fadeIn 0.5s ease;
        }
        
        .modal-content {
            background-color: var(--primary-dark);
            padding: 25px;
            border-radius: 10px;
            box-shadow: 0 5px 25px rgba(0,0,0,0.5);
            width: 80%;
            max-width: 800px;
            animation: slideDown 0.5s ease;
            position: relative;
            border: 2px solid var(--accent-color);
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        @keyframes slideDown {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        
        #pregunta-text {
            font-size: 1.2rem;
            margin-bottom: 15px;
            line-height: 1.5;
            color: var(--text-light);
        }
        
        .respuesta-form {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }
        
        .input-group {
            position: relative;
        }
        
        input[type="text"] {
            width: 100%;
            padding: 12px;
            border: 2px solid rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            background: rgba(255, 255, 255, 0.05);
            color: var(--text-light);
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        input[type="text"]:focus {
            outline: none;
            border-color: var(--accent-color);
            background: rgba(255, 255, 255, 0.1);
        }
        
        button {
            background: var(--accent-color);
            color: var(--text-dark);
            border: none;
            padding: 12px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease, transform 0.2s ease;
            display: inline-block;
            font-weight: 600;
        }
        
        button:hover {
            background: #e6c200;
            transform: translateY(-2px);
        }
        
        button:active {
            transform: translateY(0);
        }
        
        #enviar-respuesta {
            width: auto;
            flex: 2;
            margin-top: 0;
            background-color: var(--accent-color);
            font-weight: bold;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        #enviar-respuesta:hover {
            background-color: #e6c200;
        }
        
        .mensaje {
            margin-top: 15px;
            padding: 15px;
            border-radius: 8px;
            font-weight: 500;
            display: none;
            text-align: left;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }
        
        .mensaje .mensaje-principal {
            font-size: 1.1em;
            margin-bottom: 15px;
            text-align: center;
            font-weight: bold;
        }
        
        .mensaje h4 {
            color: var(--accent-color);
            margin: 10px 0 5px 0;
            font-size: 1em;
        }
        
        .mensaje ul {
            margin: 5px 0;
            padding-left: 20px;
        }
        
        .mensaje li {
            margin: 5px 0;
            line-height: 1.4;
        }
        
        .mensaje .aspectos-correctos {
            border-left: 3px solid #4CAF50;
            padding-left: 10px;
            margin: 10px 0;
        }
        
        .mensaje .aspectos-incorrectos {
            border-left: 3px solid #F44336;
            padding-left: 10px;
            margin: 10px 0;
        }
        
        .mensaje .sugerencia {
            border-left: 3px solid #FFC107;
            padding-left: 10px;
            margin: 10px 0;
        }
        
        .correcto {
            color: #81c784;
        }
        
        .correcto .aspectos-correctos h4 {
            color: #4CAF50;
        }
        
        .incorrecto {
            color: #e57373;
        }
        
        .incorrecto .aspectos-incorrectos h4 {
            color: #F44336;
        }
        
        .error {
            color: #ffb74d;
        }
        
        .info-bar {
            margin-top: 15px;
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: space-between;
            background-color: rgba(0,0,0,0.3);
            border-radius: 4px;
            padding: 8px 12px;
        }
        
        #tiempo {
            font-weight: bold;
            color: var(--accent-color);
        }
        
        #tiempo::before {
            content: "Tiempo: ";
            color: rgba(255, 255, 255, 0.7);
            font-weight: normal;
        }
        
        #estado-conexion {
            font-size: 0.8rem;
            padding: 0.2rem 0.5rem;
            border-radius: 3px;
            background: rgba(76, 175, 80, 0.1);
            border: 1px solid rgba(76, 175, 80, 0.2);
        }
        
        .conectado {
            color: #4caf50 !important;
        }
        
        .desconectado {
            color: #f44336 !important;
            background: rgba(244, 67, 54, 0.1) !important;
            border-color: rgba(244, 67, 54, 0.2) !important;
        }
        
        .reconectando {
            background: rgba(255, 152, 0, 0.1);
            color: #ffcc80;
            border-color: rgba(255, 152, 0, 0.2);
            animation: parpadeo 1s infinite;
        }
        
        @keyframes parpadeo {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        #mensaje-error {
            background: rgba(244, 67, 54, 0.15);
            color: #ef9a9a;
            padding: 10px 15px;
            border-radius: 5px;
            margin-top: 10px;
            text-align: center;
            font-size: 0.9rem;
            display: none;
        }
        
        .opciones-botones {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
            flex-wrap: wrap;
            justify-content: space-between;
        }
        
        .opcion-btn {
            flex: 1;
            padding: 12px;
            border: 2px solid var(--accent-color);
            background: transparent;
            color: var(--accent-color);
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            min-width: 120px;
            text-align: center;
        }
        
        .opcion-btn:hover {
            background: var(--accent-color);
            color: var(--text-dark);
        }
        
        .opcion-btn.seleccionada {
            background: var(--accent-color);
            color: var(--text-dark);
            box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
        }
        
        .opciones-multiple {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .opcion-multiple {
            padding: 12px;
            border: 2px solid var(--accent-color);
            background: transparent;
            color: var(--accent-color);
            border-radius: 5px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
            text-align: left;
            font-size: 16px;
        }
        
        .opcion-multiple:hover {
            background: var(--accent-color);
            color: var(--text-dark);
        }
        
        .opcion-multiple.seleccionada {
            background: var(--accent-color);
            color: var(--text-dark);
            box-shadow: 0 0 0 2px rgba(255,255,255,0.5);
        }
        
        .debug-info {
            display: none;
            margin-top: 10px;
            padding: 10px;
            background: rgba(0, 0, 0, 0.3);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            color: rgba(255, 255, 255, 0.7);
            font-family: monospace;
            font-size: 12px;
            max-height: 100px;
            overflow: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }
        
        .show-debug {
            margin-top: 5px;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: rgba(255, 255, 255, 0.6);
            padding: 2px 8px;
            border-radius: 3px;
            font-size: 0.7rem;
            cursor: pointer;
        }
        
        .show-debug:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .pista-container {
            margin-top: 15px;
            padding: 12px;
            background: rgba(255, 193, 7, 0.1);
            border: 1px solid rgba(255, 193, 7, 0.3);
            border-radius: 8px;
            display: none;
            transform: translateY(-10px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.3s ease;
        }
        
        .pista-animada {
            transform: translateY(0);
            opacity: 1;
            background: rgba(255, 193, 7, 0.15);
        }
        
        .pista-titulo {
            font-weight: 600;
            color: #ffc107;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
        }
        
        .pista-titulo i {
            margin-right: 8px;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 0.7; }
            50% { opacity: 1; }
            100% { opacity: 0.7; }
        }
        
        .pista-contenido {
            color: rgba(255, 255, 255, 0.9);
            font-style: italic;
            line-height: 1.4;
            padding: 5px;
            border-left: 3px solid rgba(255, 193, 7, 0.5);
            margin-left: 10px;
        }
        
        .pista-btn {
            background: transparent;
            border: 1px solid rgba(255, 193, 7, 0.5);
            color: #ffc107;
            padding: 8px 12px;
            border-radius: 4px;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            margin-top: 10px;
        }
        
        .pista-btn i {
            margin-right: 6px;
        }
        
        .pista-btn:hover {
            background: rgba(255, 193, 7, 0.2);
            transform: translateY(-2px);
        }
        
        .pista-btn:active {
            transform: translateY(0);
        }
        
        .pista-btn.loading {
            opacity: 0.7;
            cursor: wait;
        }
        
        .pista-btn.loading::after {
            content: "...";
            animation: ellipsis 1.5s infinite;
        }
        
        @keyframes ellipsis {
            0% { content: "."; }
            33% { content: ".."; }
            66% { content: "..."; }
            100% { content: "."; }
        }
        
        #contexto-container {
            display: none;
            position: absolute;
            bottom: 10px;
            left: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 10px;
            border-radius: 8px;
            z-index: 100;
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.3s, transform 0.3s;
        }
        
        .contexto-animado {
            animation: slideUp 0.5s forwards;
        }
        
        .contexto-panel, .pregunta-panel {
            background-color: rgba(255, 255, 255, 0.05);
            border-left: 4px solid var(--accent-color);
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 0 8px 8px 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            transition: all 0.3s ease;
            line-height: 1.6;
        }
        
        .contexto-panel {
            border-left: 4px solid var(--accent-color);
            background-color: rgba(255, 215, 0, 0.05);
        }
        
        .contexto-panel p {
            margin-bottom: 10px;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .pregunta-panel h3 {
            color: var(--text-light);
            margin-bottom: 10px;
            font-size: 1.2rem;
        }
        
        .instruccion-pregunta {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 10px;
            font-style: italic;
        }
        
        #contexto-texto {
            font-size: 16px;
            line-height: 1.6;
            color: white;
            max-height: 150px;
            overflow-y: auto;
            padding-right: 10px;
        }
        
        #cerrar-contexto {
            position: absolute;
            top: 10px;
            right: 10px;
            background: none;
            border: none;
            color: white;
            font-size: 20px;
            cursor: pointer;
            padding: 5px;
        }
        
        #cerrar-contexto:hover {
            color: var(--accent-color);
        }
        
        /* Estilos mejorados para dispositivos móviles */
        @media (max-width: 768px) {
            body {
                min-height: auto;
                height: 100%;
            }

            .container {
                flex-direction: column;
                padding: 8px;
                gap: 0;
                min-height: 0;
                height: 100%;
            }
            
            .video-container {
                width: 100%;
                padding: 8px;
                margin-bottom: 0;
                background: rgba(0, 0, 0, 0.2);
                border-radius: 10px 10px 0 0;
                flex-shrink: 0; /* Evita que el contenedor de video se encoja */
            }
            
            .video-wrapper {
                padding-bottom: 65%;
                margin-bottom: 8px;
            }
            
            .info-bar {
                margin-top: 8px;
                margin-bottom: 0;
            }
            
            .preguntas-container {
                width: 100%;
                padding: 12px;
                margin-top: 0;
                border-radius: 0 0 10px 10px;
                background: rgba(255, 255, 255, 0.05);
                flex: 1;
                min-height: calc(100vh - 300px); /* Altura mínima ajustable según necesidad */
            }
            
            .preguntas-header {
                margin-bottom: 12px;
                padding-bottom: 8px;
            }
            
            .preguntas-header h2 {
                font-size: 1.1rem;
            }
            
            .preguntas-header i {
                font-size: 18px;
            }
            
            #pregunta-text {
                font-size: 1rem;
            }
            
            .opciones-botones {
                flex-direction: column;
            }
            
            #respuesta-input {
                font-size: 16px;
                padding: 10px;
            }
            
            #enviar-respuesta {
                padding: 12px;
                width: 100%;
                font-size: 14px;
            }
            
            .info-bar {
                font-size: 0.75rem;
            }
            
            .preguntas-content {
                flex: 1;
                overflow-y: auto;
                min-height: 200px; /* Altura mínima del contenido */
            }
        }
        
        /* Ajustes adicionales para pantallas muy pequeñas */
        @media (max-width: 480px) {
            body {
                height: auto;
            }

            .container {
                padding: 5px;
            }
            
            .video-container {
                padding: 6px;
            }
            
            .video-wrapper {
                padding-bottom: 70%;
                margin-bottom: 6px;
            }
            
            .info-bar {
                margin-top: 6px;
                padding: 6px 8px;
                font-size: 0.75rem;
            }
            
            .preguntas-container {
                padding: 10px;
            }
            
            .preguntas-header {
                margin-bottom: 10px;
            }
            
            .preguntas-header h2 {
                font-size: 1rem;
            }
            
            .preguntas-container {
                min-height: calc(100vh - 250px); /* Ajuste para pantallas más pequeñas */
            }
        }
        
        .modal-footer {
            display: flex;
            justify-content: space-between;
            margin-top: 20px;
            gap: 10px;
        }
        
        .modal-footer .button-group {
            display: flex;
            gap: 10px;
            flex: 2;
        }
        
        #continuar-sin-responder {
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--text-light);
            flex: 1;
            font-weight: normal;
            padding: 12px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }
        
        #aceptar-puntaje {
            background: var(--primary-light);
            color: var(--text-light);
            border: none;
            flex: 1;
            font-weight: normal;
            padding: 12px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
            display: none; /* Se mostrará solo cuando haya retroalimentación */
        }
        
        #aceptar-puntaje:hover {
            background: var(--primary-color);
            transform: translateY(-2px);
        }
        
        .puntaje-sugerido {
            display: none;
            margin-top: 10px;
            padding: 8px 12px;
            background: rgba(255, 215, 0, 0.1);
            border-radius: 4px;
            border-left: 3px solid var(--accent-color);
            font-size: 0.9rem;
        }
        
        .puntaje-valor {
            font-weight: bold;
            color: var(--accent-color);
        }
        
        .cerrar-modal {
            position: absolute;
            top: 10px;
            right: 10px;
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            font-size: 18px;
            cursor: pointer;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.2s ease;
        }
        
        .cerrar-modal:hover {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            transform: none;
        }
        
        @media (min-width: 769px) {
            #pregunta-modal {
                display: none;
                position: fixed;
                z-index: 1000;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                overflow: auto;
                animation: fadeIn 0.5s ease;
                padding-right: 35%; /* Deja espacio para el panel derecho */
            }
            
            .modal-content {
                margin: 10% 0 0 10%;
                width: 70%;
            }
        }
        
        .stats-panel {
            margin-top: auto;
            padding: 15px;
            background: rgba(63, 81, 181, 0.15);
            border-radius: 8px;
            border: 1px solid rgba(121, 134, 203, 0.2);
        }
        
        .stats-title {
            font-size: 0.9rem;
            color: var(--accent-color);
            margin-bottom: 10px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .stats-title i {
            font-size: 1rem;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        
        .stat-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        
        .stat-label {
            font-size: 0.75rem;
            color: rgba(255, 255, 255, 0.7);
        }
        
        .stat-value {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-light);
        }
        
        .stat-value.highlight {
            color: var(--accent-color);
        }
        
        .nota-final {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nota-label {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.9);
            font-weight: 600;
        }
        
        .nota-value {
            font-size: 1.2rem;
            font-weight: bold;
            color: var(--accent-color);
        }
        
        @media (max-width: 768px) {
            .stats-panel {
                margin-top: 15px;
                padding: 12px;
            }
            
            .stats-grid {
                gap: 8px;
            }
            
            .stat-value {
                font-size: 1rem;
            }
        }

        /* Visual refresh for the lesson view */
        :root {
            --surface-soft: rgba(255, 255, 255, 0.08);
            --surface-strong: rgba(255, 255, 255, 0.14);
            --gold-glow: rgba(255, 215, 0, 0.34);
            --shadow-soft: 0 18px 45px rgba(6, 10, 38, 0.28);
            --shadow-strong: 0 24px 70px rgba(4, 7, 26, 0.44);
            --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
        }

        body {
            background:
                radial-gradient(circle at 12% 4%, rgba(255, 215, 0, 0.14), transparent 28rem),
                radial-gradient(circle at 90% 12%, rgba(121, 134, 203, 0.30), transparent 24rem),
                linear-gradient(180deg, #101747 0%, #1a237e 42%, #111636 100%);
        }

        body::before {
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: -1;
            background-image:
                linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
            background-size: 42px 42px;
            mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
        }

        .container {
            padding: 10px;
            gap: 12px;
        }

        .video-container,
        .preguntas-container {
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
            box-shadow: var(--shadow-soft);
            backdrop-filter: blur(12px);
            animation: panelEnter 720ms var(--ease-out) both;
        }

        .preguntas-container {
            animation-delay: 100ms;
        }

        .video-wrapper {
            border-radius: 14px;
            box-shadow: var(--shadow-strong);
            background: #050716;
        }

        .info-bar,
        .stats-panel,
        #pregunta-container,
        .contexto-panel,
        .pregunta-panel {
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(0, 0, 0, 0.24);
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
        }

        .preguntas-header {
            border-bottom-color: rgba(255, 215, 0, 0.72);
        }

        .preguntas-header i {
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            border-radius: 14px;
            background: rgba(255, 215, 0, 0.12);
            box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.22);
        }

        .preguntas-content {
            scrollbar-width: thin;
            scrollbar-color: var(--accent-color) transparent;
        }

        .preguntas-content::-webkit-scrollbar {
            width: 8px;
        }

        .preguntas-content::-webkit-scrollbar-track {
            background: transparent;
        }

        .preguntas-content::-webkit-scrollbar-thumb {
            background: var(--accent-color);
            border-radius: 999px;
        }

        .stats-panel {
            animation: panelEnter 720ms var(--ease-out) 180ms both;
        }

        .stat-item {
            padding: 10px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.06);
        }

        .nota-final {
            padding: 12px;
            border-radius: 12px;
            background: rgba(255, 215, 0, 0.08);
        }

        button,
        .opcion-btn,
        .opcion-multiple {
            border-radius: 999px;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
        }

        .opcion-multiple {
            border-radius: 14px;
        }

        input[type="text"] {
            border-radius: 12px;
        }

        #pregunta-modal {
            backdrop-filter: blur(8px);
            background: rgba(0, 0, 0, 0.45);
        }

        .modal-content {
            width: calc(100% - 24px);
            margin: 18px auto;
            border-radius: 18px;
            background:
                radial-gradient(circle at 18% 0%, rgba(255, 215, 0, 0.12), transparent 18rem),
                linear-gradient(180deg, #26328a, #171d58);
            box-shadow: var(--shadow-strong);
            animation: modalRise 520ms var(--ease-out);
        }

        .mensaje,
        .pista-container {
            border-radius: 14px;
        }

        @keyframes panelEnter {
            from {
                opacity: 0;
                transform: translateY(24px) scale(0.98);
                filter: blur(8px);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
                filter: blur(0);
            }
        }

        @keyframes modalRise {
            from {
                opacity: 0;
                transform: translateY(18px) scale(0.98);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @media (min-width: 769px) {
            .container {
                padding: 20px;
                gap: 20px;
            }

            .modal-content {
                width: 70%;
                margin: 10% 0 0 10%;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                scroll-behavior: auto !important;
                transition-duration: 0.01ms !important;
            }
        }
