/* ==========================================================================
   1. CAMPUS ESTUDIANTIL (Cursos Activos)
   ========================================================================== */
.campus-container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.campus-title { font-size: 2rem; color: var(--text-color, #1e293b); margin-bottom: 2rem; font-weight: 800; }

.campus-courses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; }
.campus-course-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); transition: transform 0.3s ease; border: 1px solid #e2e8f0; display: flex; flex-direction: column; }
.campus-course-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.campus-course-image { height: 180px; background-size: cover; background-position: center; border-bottom: 1px solid #e2e8f0; }
.campus-course-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.campus-course-title { font-size: 1.25rem; font-weight: 700; color: var(--text-color, #1e293b); margin: 0 0 1.5rem 0; line-height: 1.3; }

/* Barras de progreso del alumno */
.course-status-active { margin-bottom: 1.5rem; flex-grow: 1; }
.progress-header { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 0.5rem; }
.progress-track { height: 8px; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; background-color: var(--primary-color, #2563eb); }
.progress-fill.completed { background-color: #16a34a !important; }

/* Botones de acción del estudiante */
.btn-play-course { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; padding: 0.85rem; background: var(--primary-color, #2563eb); color: var(--btn-text-color, #ffffff) !important; text-decoration: none; border-radius: 8px; font-weight: 600; transition: filter 0.2s; }
.btn-play-course:hover { filter: brightness(0.9); }
.btn-play-course.completed { background: white; color: var(--text-color, #1e293b) !important; border: 1px solid #cbd5e1; }
.btn-play-course.completed:hover { background: #f8fafc; }

.empty-campus-state { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; background: white; border-radius: 12px; border: 2px dashed #cbd5e1; }
.empty-campus-state h3 { color: var(--text-color, #1e293b); margin: 1rem 0 0.5rem 0; font-size: 1.5rem; }
.empty-campus-state p { color: #64748b; max-width: 500px; margin: 0 auto 1.5rem auto; line-height: 1.6; }

/* ==========================================================================
   2. PANTALLA DE REVISIÓN PENDIENTE (pending_review.php)
   ========================================================================== */
.review-main-wrapper { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 65px); padding: 2rem; background: var(--bg-color, #f8fafc); }
.review-card { background: white; max-width: 600px; width: 100%; padding: 3rem 2rem; border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); text-align: center; border-top: 6px solid var(--primary-color, #2563eb); }
.review-icon-container { width: 80px; height: 80px; background: color-mix(in srgb, var(--primary-color) 10%, #eff6ff); color: var(--primary-color, #2563eb); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem auto; }
.review-title { font-size: 1.8rem; color: var(--text-color, #1e293b); margin: 0 0 1rem 0; font-weight: 800; }
.review-description { font-size: 1rem; color: #64748b; line-height: 1.6; margin-bottom: 2rem; }
.review-contact-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-contact { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.5rem; border-radius: 8px; font-weight: 600; text-decoration: none; transition: filter 0.2s; }
.btn-contact:hover { filter: brightness(0.9); }
.btn-whatsapp { background: #16a34a; color: white !important; }
.btn-email { background: #f1f5f9; color: #475569 !important; border: 1px solid #cbd5e1; }

/* ==========================================================================
   3. REPRODUCTOR DE CURSOS (Campus Virtual - Play)
   ========================================================================== */
body.player-mode { overflow: hidden !important; margin: 0; padding: 0; }
body.player-mode .layout-frontend,
body.player-mode .app-container,
body.player-mode .main-content,
body.player-mode .content-wrapper,
body.player-mode .content-area { padding: 0 !important; margin: 0 !important; max-width: 100% !important; width: 100% !important; display: flex; flex-direction: column; }
body.player-mode .navbar { display: flex !important; z-index: 100; }

.player-layout { display: flex; width: 100%; height: calc(100vh - 65px); background-color: var(--bg-color, #f8fafc); overflow: hidden; margin: 0; padding: 0; }

/* Sidebar del Temario */
.player-sidebar { width: 320px; background: #ffffff; border-right: 1px solid #e2e8f0; display: flex; flex-direction: column; transition: width 0.3s ease, transform 0.3s ease; flex-shrink: 0; height: 100%; overflow-y: auto; }
.player-sidebar.collapsed { width: 0; transform: translateX(-100%); border-right: none; }
.player-sidebar-header { padding: 1rem 1.5rem; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, var(--primary-color) 95%, #f8fafc); position: sticky; top: 0; z-index: 10; }
.player-sidebar-btn { background: white; border: 1px solid #cbd5e1; border-radius: 6px; padding: 0.4rem 0.6rem; color: var(--text-color, #475569); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; text-decoration: none; font-weight: bold; font-size: 0.85rem;}
.player-sidebar-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

.topic-group { border-bottom: 1px solid #e2e8f0; }
.topic-title { padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--text-color, #1e293b); font-size: 0.95rem; cursor: pointer; transition: background 0.2s; }
.topic-title:hover { background: color-mix(in srgb, var(--primary-color) 5%, #f1f5f9); }
.topic-title.active-topic { background: color-mix(in srgb, var(--primary-color) 10%, #eff6ff); color: var(--primary-color, #2563eb); }
.topic-link { flex-grow: 1; text-decoration: none; color: inherit; display: flex; align-items: center; gap: 0.5rem; }
.topic-link.locked { color: #94a3b8; cursor: not-allowed; }

.lesson-list { list-style: none; padding: 0; margin: 0; background: #f8fafc; }
.lesson-link { padding: 1rem 1.5rem 1rem 2.5rem; display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: #475569; font-size: 0.9rem; transition: background 0.2s; border-top: 1px solid #e2e8f0; }
.lesson-link:hover { background: #e2e8f0; color: var(--text-color, #1e293b); }
.lesson-link.active { background: white; color: var(--primary-color, #2563eb); border-left: 3px solid var(--primary-color, #2563eb); font-weight: 600; }
.lesson-link.locked { color: #94a3b8; cursor: not-allowed; }

/* Contenido Principal (El Player) */
.player-main { flex-grow: 1; display: flex; flex-direction: column; height: 100%; overflow-y: auto; background-color: var(--bg-color, #ffffff); }
.player-main-header { padding: 1.5rem 2rem; background: white; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 1.5rem; }
.player-content-area { padding: 2rem; max-width: 900px; margin: 0 auto; width: 100%; box-sizing: border-box; }

.course-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--primary-color, #2563eb); font-weight: 700; margin-bottom: 0.25rem; }
.player-main-header h2 { margin: 0; font-size: 1.5rem; color: var(--text-color, #1e293b); display: flex; align-items: center; gap: 0.5rem; }
.breadcrumb-muted { color: #94a3b8; text-decoration: none; transition: color 0.2s; }
.breadcrumb-muted:hover { color: var(--primary-color, #2563eb); }

/* ==========================================================================
   5. COMPONENTES MULTIMEDIA Y EXÁMENES (Player)
   ========================================================================== */

/* Contenedores Multimedia */
.player-text-content { font-size: 1.05rem; line-height: 1.7; color: var(--text-color, #334155); margin-bottom: 3rem; }
.player-text-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; }

.player-video-box { width: 100%; max-width: 1000px; margin: 0 auto 2rem auto; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2); background: #000; }
.player-video-box iframe, .player-video-box video { width: 100%; aspect-ratio: 16/9; display: block; border: none; }

.player-audio-box { width: 100%; max-width: 600px; margin: 0 auto 2rem auto; background: white; padding: 1.5rem; border-radius: 8px; border: 1px solid #cbd5e1; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; }
.player-doc-box { width: 100%; margin: 0 auto 2rem auto; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.player-doc-iframe-wrapper { width: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border: 1px solid #cbd5e1; background: #e2e8f0; }

/* Botones flotantes (Aparecen cuando se oculta el menú lateral) */
.hidden-actions-container { display: none; gap: 0.5rem; }

/* Grid de Actividades de la Unidad */
.activities-grid { display: flex; flex-direction: column; gap: 1rem; }
.activity-card { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; background: white; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.activity-card:hover { transform: translateX(5px); border-color: var(--primary-color, #2563eb); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.activity-card.locked { opacity: 0.7; cursor: not-allowed; }
.activity-card.locked:hover { transform: none; border-color: #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

.activity-icon { width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--primary-color) 10%, #eff6ff); color: var(--primary-color, #2563eb); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.locked { background: #f1f5f9; color: #94a3b8; }

/* Textos internos de la Tarjeta de Actividad (Estas eran las clases faltantes) */
.activity-info h4 { margin: 0 0 0.25rem 0; font-size: 1.1rem; color: var(--text-color, #1e293b); }
.activity-info p { margin: 0; font-size: 0.9rem; color: #64748b; }


/* Exámenes */
.exam-badge { display: inline-flex; align-items: center; background: #fee2e2; color: #dc2626; padding: 0.4rem 1rem; border-radius: 9999px; font-weight: bold; font-size: 0.85rem; letter-spacing: 1px; margin-bottom: 1rem; }
.exam-timer { display: inline-flex; align-items: center; gap: 0.5rem; background: #fef9c3; color: #a16207; padding: 0.75rem 1.5rem; border-radius: 8px; font-size: 1.25rem; font-weight: bold; margin-bottom: 2rem; border: 1px solid #fde047; }
.exam-question-card { background: white; border: 1px solid #e2e8f0; border-radius: 8px; padding: 2rem; margin-bottom: 1.5rem; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.exam-question-number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--primary-color, #2563eb); color: var(--btn-text-color, white); border-radius: 50%; font-size: 0.9rem; font-weight: bold; margin-right: 0.5rem; vertical-align: middle; }
.exam-option-label { display: flex; align-items: center; gap: 0.75rem; padding: 1rem; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; transition: background 0.2s; background: #f8fafc; }
.exam-option-label:hover { background: white; border-color: var(--primary-color, #2563eb); }
.exam-textarea { width: 100%; padding: 1rem; border: 1px solid #cbd5e1; border-radius: 6px; font-family: inherit; resize: vertical; background: #f8fafc; }
.exam-textarea:focus { outline: none; border-color: var(--primary-color, #2563eb); background: white; }

/* ==========================================================================
   4. COMENTARIOS Y ENVÍO (Player)
   ========================================================================== */

   /* ==========================================================================
   4. COMPONENTES MULTIMEDIA Y EXÁMENES (Player)
   ========================================================================== */
.player-text-content { font-size: 1.05rem; line-height: 1.7; color: var(--text-color, #334155); margin-bottom: 3rem; }
.player-video-box { width: 100%; max-width: 1000px; margin: 0 auto 2rem auto; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2); background: #000; }
.player-video-box iframe, .player-video-box video { width: 100%; aspect-ratio: 16/9; display: block; border: none; }
.player-audio-box { width: 100%; max-width: 600px; margin: 0 auto 2rem auto; background: white; padding: 1.5rem; border-radius: 8px; border: 1px solid #cbd5e1; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; }
.player-doc-box { width: 100%; margin: 0 auto 2rem auto; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.player-doc-iframe-wrapper { width: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.1); border: 1px solid #cbd5e1; background: #e2e8f0; }

/* Botones flotantes (Aparecen cuando se oculta el menú lateral) */
.hidden-actions-container { display: none; gap: 0.5rem; }

/* Grid de Actividades de la Unidad */
.activities-grid { display: flex; flex-direction: column; gap: 1rem; }
.activity-card { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; background: white; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; transition: all 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.activity-card:hover { transform: translateX(5px); border-color: var(--primary-color, #2563eb); box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.activity-card.locked { opacity: 0.7; cursor: not-allowed; }
.activity-card.locked:hover { transform: none; border-color: #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }

.activity-icon { width: 48px; height: 48px; border-radius: 8px; background: color-mix(in srgb, var(--primary-color) 10%, #eff6ff); color: var(--primary-color, #2563eb); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-icon.locked { background: #f1f5f9; color: #94a3b8; }

/* Textos internos de la Tarjeta de Actividad (Estas eran las clases faltantes) */
.activity-info h4 { margin: 0 0 0.25rem 0; font-size: 1.1rem; color: var(--text-color, #1e293b); }
.activity-info p { margin: 0; font-size: 0.9rem; color: #64748b; }
.btn-cite-comment { background: transparent; border: none; color: #94a3b8; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.25rem; padding: 0; transition: color 0.2s; }
.btn-cite-comment:hover { color: var(--primary-color, #2563eb); }

/* Contenedor maestro para aislar el editor Quill del footer */
.editor-master-container { border: 1px solid #cbd5e1; border-radius: 8px; background: white; margin-bottom: 2rem; overflow: hidden; }
.quill-editor-container { height: 250px; border: none !important; }
.ql-toolbar.ql-snow { border: none !important; border-bottom: 1px solid #e2e8f0 !important; background: #f8fafc; }
.ql-container.ql-snow { border: none !important; }

/* Área de acción de envío */
.comment-footer-actions { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; background: #f8fafc; border-top: 1px solid #cbd5e1; }
.word-counter-msg { font-size: 0.85rem; font-weight: bold; margin: 0; }

.lesson-interaction-section { margin-top: 4rem; padding-top: 2rem; border-top: 2px dashed #e2e8f0; }
.interaction-title { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; color: var(--text-color, #1e293b); margin: 0 0 0.5rem 0; }
.interaction-subtitle { color: #64748b; font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.5; }
.privacy-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; background: #fffbeb; color: #b45309; border-radius: 6px; font-size: 0.85rem; font-weight: 600; margin-bottom: 2rem; border: 1px solid #fde68a; }

.comments-history { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 3rem; }
.comment-meta { font-size: 0.85rem; color: #64748b; margin-bottom: 0.4rem; }
.comment-student .comment-meta { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-start; }
.comment-teacher .comment-meta { display: flex; align-items: center; gap: 0.75rem; justify-content: flex-end; flex-direction: row-reverse; }
.comment-meta .name { font-weight: 700; color: var(--text-color, #1e293b); }

.bubble { padding: 1rem 1.5rem; border-radius: 12px; font-size: 0.95rem; line-height: 1.6; max-width: 85%; }
.comment-student .bubble { background: white; border: 1px solid #e2e8f0; color: var(--text-color, #334155); border-top-left-radius: 2px; }
.comment-teacher .bubble { background: color-mix(in srgb, var(--primary-color) 10%, #eff6ff); color: var(--text-color, #1e3a8a); border: 1px solid color-mix(in srgb, var(--primary-color) 20%, #bfdbfe); border-top-right-radius: 2px; }

/* Navegación Inferior del Player */
.lesson-navigation { display: flex; justify-content: space-between; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid #e2e8f0; }
.btn-nav { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.85rem 1.5rem; border-radius: 8px; font-weight: 600; text-decoration: none; transition: all 0.2s; }
.btn-prev { background: white; border: 1px solid #cbd5e1; color: #475569; }
.btn-prev:hover { background: #f1f5f9; color: var(--text-color, #1e293b); }
.btn-next { background: var(--primary-color, #2563eb); border: none; color: var(--btn-text-color, white); }
.btn-locked { background: #f1f5f9 !important; border: 1px dashed #cbd5e1 !important; color: #94a3b8 !important; cursor: not-allowed; }
.btn-locked:hover { background: #f1f5f9 !important; color: #94a3b8 !important; }

/* ==========================================================================
   6. VISOR DE LIBROS INTERACTIVOS (ESTUDIANTE)
   ========================================================================== */
.viewer-layout {
    background: #94a3b8; 
    height: calc(100vh - 85px); 
    width: 100%;
    padding: 2rem 1rem 6rem 1rem; /* Margen inferior para que la píldora no tape contenido */
    text-align: center; 
    overflow: auto; /* SCROLL NATIVO ACTIVADO */
    position: relative;
    box-sizing: border-box;
}

/* El cursor cambia a manito cuando se activa el botón PAN */
.viewer-layout.pan-mode-active { cursor: grab !important; }
.viewer-layout.pan-mode-dragging { cursor: grabbing !important; }

/* Wrapper para mantener el lienzo centrado cuando se aleja el zoom */
.student-canvas-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
}

/* El lienzo usa width/height en lugar de transform para activar el scroll del navegador */
.student-canvas-container {
    position: relative;
    display: block;
    margin: 0 auto;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: width 0.2s ease-out, height 0.2s ease-out; /* Animación de zoom fluida */
}

.student-canvas-bg {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ==========================================================================
   WIDGETS INTERACTIVOS DEL ALUMNO (Estilos extraídos del JS)
   ========================================================================== */
.canvas-element {
    position: absolute;
    box-sizing: border-box;
}

.student-input-field {
    pointer-events: auto; 
    cursor: text; 
    background: rgba(255, 255, 255, 0.6); 
    border: 2px dashed #94a3b8; 
    width: 100%; 
    height: 100%; 
    box-sizing: border-box; 
    outline: none; 
    border-radius: 4px; 
    transition: border 0.3s, background 0.3s; 
    color: #0f172a; 
    font-weight: 500; 
    font-family: inherit; 
    padding: 0.25rem 0.5rem;
}

.student-checkbox-wrapper {
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    pointer-events: auto; 
    background: rgba(255, 255, 255, 0.6); 
    border: 2px dashed #94a3b8; 
    border-radius: 4px; 
    box-sizing: border-box; 
    transition: border 0.3s, background 0.3s;
}

.audio-widget-wrapper {
    pointer-events: auto; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    box-sizing: border-box; 
    width: 100%; 
    height: 100%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.audio-widget {
    background: var(--primary-color, #2563eb);
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn-toggle {
    background: transparent;
    border: none;
    color: white;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-btn-toggle svg {
    width: 50%;
    height: 50%;
    fill: currentColor;
}

/* ==========================================================================
   CONTROLES FLOTANTES Y PÍLDORAS
   ========================================================================== */
.viewer-header-focus {
    background: #ffffff; 
    padding: 1rem 2rem; 
    margin: 0; 
    border-bottom: 1px solid #e2e8f0; 
    position: relative; 
    z-index: 10;
}

.viewer-header-flex {
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%;
}

.save-indicator-badge {
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #64748b; 
    background: #f1f5f9; 
    padding: 0.4rem 0.75rem; 
    border-radius: 20px; 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
}

.save-indicator-floating {
    position: fixed; 
    top: 15px; 
    right: 20px; 
    z-index: 1000; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: #64748b; 
    background: #ffffff; 
    padding: 0.4rem 0.75rem; 
    border-radius: 20px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    display: flex; 
    align-items: center; 
    gap: 0.5rem;
}

.viewer-controls-pill {
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 1000; 
    display: inline-flex; 
    align-items: center; 
    background: #ffffff; 
    border: 1px solid #cbd5e1; 
    border-radius: 30px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.2); 
    height: 48px; 
    padding: 0 0.5rem;
}

.viewer-controls-pill button {
    background: transparent;
    border: none;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.viewer-controls-pill button:hover:not(:disabled) {
    background: #f1f5f9;
    color: var(--primary-color, #2563eb);
}

.viewer-controls-pill button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.viewer-controls-pill .active-tool {
    background: color-mix(in srgb, var(--primary-color) 15%, transparent);
    color: var(--primary-color, #2563eb);
}

.viewer-pagination-line {
    display: flex; 
    align-items: center; 
    height: 100%; 
    border-right: 1px solid #e2e8f0; 
    padding-right: 0.5rem; 
    margin-right: 0.5rem; 
    white-space: nowrap;
}

.viewer-zoom-line {
    display: flex; 
    align-items: center; 
    height: 100%;
}

.zoom-level-display {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    min-width: 45px;
    text-align: center;
}
/* ==========================================================================
   4. COMPONENTES MULTIMEDIA Y EXÁMENES (Player)
   ========================================================================== */

/* Contenedor principal del contenido */
.player-content-area {
    padding: 2rem;
    max-width: 1200px; /* Asegura un buen ancho en pantallas grandes */
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Envoltura unificada para medios (Video, Audio, Docs) */
.media-container {
    width: 100%;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #cbd5e1);
}

/* Estilos para el contenedor de Video */
.player-video-box {
    width: 100%; /* Ocupa el 100% del contenedor padre */
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
    background: #000;
}

.media-video-iframe {
    width: 100%;
    aspect-ratio: 16/9; /* Mantiene la proporción de video */
    display: block;
    border: none;
}

/* Estilos para el contenedor de Audio */
.player-audio-box {
    width: 100%;
    max-width: 800px; /* Un poco más contenido que el video por estética */
    margin: 0 auto;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.media-audio-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-color, #1e293b);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Estilos para el contenedor de Documentos (PDFs) */
.media-doc-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.media-doc-container {
    width: 100%; /* Ocupa el 100% del contenedor padre */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
}

.media-doc-iframe {
    width: 100%;
    height: 75vh; /* Altura adaptable */
    min-height: 600px;
    border: none;
    display: block;
}

.media-doc-actions {
    text-align: right;
    width: 100%;
}

/* Resto de estilos del reproductor... (Textos, Editor Quill, etc.) */
.player-text-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color, #334155);
    margin-bottom: 3rem;
}

/* Controles ocultos */
.hidden-actions-container {
    display: none;
    gap: 0.5rem;
}

/* ==========================================================================
   7. INTERFAZ DE EXÁMENES DEL ESTUDIANTE (Player)
   ========================================================================== */
.exam-container {
    padding-top: 2rem;
    width: 100%;
}

.exam-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.exam-text-center {
    text-align: center;
}

.exam-badge {
    display: inline-flex;
    align-items: center;
    background: #fee2e2;
    color: #dc2626;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.exam-title {
    font-size: 2rem;
    color: var(--text-color, #1e293b);
    margin: 0 0 1rem 0;
}

.exam-in-progress-title {
    font-size: 1.5rem;
    color: var(--text-color, #1e293b);
    margin: 0 0 0.5rem 0;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1rem;
}

.exam-stats-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.exam-stat-item {
    text-align: left;
}

.exam-stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: bold;
    text-transform: uppercase;
}

.exam-stat-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-color, #1e293b);
}

.exam-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef9c3;
    color: #a16207;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 2rem;
    border: 1px solid #fde047;
}

.btn-start-exam,
.btn-retry-exam,
.btn-submit-exam {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    width: auto;
}

.btn-retry-exam {
    background: #ef4444 !important;
    border-color: transparent !important;
    margin-top: 1rem;
}

.btn-submit-exam {
    background: #16a34a !important;
    border-color: transparent !important;
}

.exam-submit-actions {
    text-align: right;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

/* Cajas de Resultado */
.exam-success-box {
    margin-top: 2rem;
    padding: 3rem 2rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
}

.exam-icon-large {
    margin-bottom: 1rem;
}

.exam-success-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    color: #334155;
}

.exam-success-desc {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 0;
}

.exam-result-box {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid transparent;
}

.exam-result-box.passed {
    background: #f0fdf4;
    border-color: #86efac;
}

.exam-result-box.failed {
    background: #fef2f2;
    border-color: #fecaca;
}

.exam-result-title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.exam-result-box.passed .exam-result-title { color: #166534; }
.exam-result-box.failed .exam-result-title { color: #991b1b; }

.exam-result-score {
    font-size: 1.1rem;
    color: #334155;
    margin-bottom: 1.5rem;
}

.exam-feedback-box {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.exam-feedback-title {
    margin: 0 0 0.5rem 0;
    color: #475569;
    font-size: 0.95rem;
    text-transform: uppercase;
}

.exam-feedback-text {
    margin: 0;
    color: var(--text-color, #1e293b);
    font-style: italic;
}

.exam-limit-box {
    background: #fffbeb;
    color: #b45309;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #fcd34d;
    margin-top: 1.5rem;
}

.exam-limit-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.exam-limit-desc {
    margin: 0 0 1rem 0;
}

/* Tarjetas de Pregunta durante el examen */
.exam-question-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.exam-question-heading {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-color, #1e293b);
    line-height: 1.4;
}

.exam-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color, #2563eb);
    color: var(--btn-text-color, white);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.exam-question-points {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: normal;
    margin-left: 0.5rem;
}

.exam-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.exam-option-label {
    display: flex;
    align-items: flex-start; /* Cambio clave: alinear arriba en caso de textos largos */
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    background: #f8fafc;
}

.exam-option-label:hover {
    background: white;
    border-color: var(--primary-color, #2563eb);
}

.exam-input-check {
    accent-color: var(--primary-color, #2563eb);
    width: 18px;
    height: 18px;
    margin-top: 0.2rem; /* Alinea visualmente el checkbox con el inicio del texto */
    flex-shrink: 0;
}

.exam-option-text {
    color: var(--text-color, #334155);
    font-size: 1rem;
    line-height: 1.5;
    word-break: break-word; /* Previene el desbordamiento de textos largos */
}

.exam-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    resize: vertical;
    background: #f8fafc;
    box-sizing: border-box;
}

.exam-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #2563eb);
    background: white;
}

.exam-ordering-help {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.exam-ordering-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exam-ordering-item {
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.exam-error-box {
    text-align: center;
    padding: 3rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
}

.exam-error-box h3 { margin: 0 0 0.5rem 0; }
.exam-error-box p { margin: 0; }