/* ================================================================
   MI PRIMERA ENCARTA — Course Viewer  (cursos.css)
   Exact visual clone of the Google Studio "Mi Primera Encarta" app
   ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body.cv-body, div.cv-body {
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #111;
    background: #FF9933;          /* Encarta orange */
    overflow: hidden;
}

/* ── Root layout ──────────────────────────────────────────────── */
body.cv-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 0;
}

/* When cv-body is a div embedded inside a layout shell */
div.cv-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* ================================================================
   HEADER
   ================================================================ */
.cv-header {
    background: #00CC00;
    border-bottom: 4px solid #009900;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    flex-shrink: 0;
}

/* ── Home button ──────────────────────────────────────────────── */
.cv-btn-home {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(180deg, #ffff66, #ffcc00);
    border: 2px solid #ccaa00;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 900;
    font-size: 11px;
    color: #1e3a5f;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    line-height: 1;
}
.cv-btn-home:hover { background: linear-gradient(180deg, #ffcc00, #ff9900); }
.cv-btn-home:active { transform: translateY(1px); }
.cv-btn-icon { font-size: 16px; }
.cv-btn-text { font-size: 10px; font-weight: 900; }

/* ── Nav group (back/forward) ─────────────────────────────────── */
.cv-nav-group {
    display: flex;
    align-items: center;
    background: rgba(0,80,0,0.25);
    border: 1px solid rgba(0,60,0,0.2);
    border-radius: 20px;
    padding: 2px 4px;
    gap: 2px;
}
.cv-nav-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px 8px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 16px;
    transition: background 0.15s, transform 0.1s;
}
.cv-nav-btn:hover:not(:disabled) { background: rgba(255,255,255,0.15); }
.cv-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.cv-nav-btn svg { flex-shrink: 0; }

/* ── Generic header buttons (Print, Share) ────────────────────── */
.cv-header-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    transition: background 0.15s;
    white-space: nowrap;
}
.cv-header-btn:hover { background: rgba(255,255,255,0.15); }
.cv-header-btn svg { flex-shrink: 0; }

/* ── Audio controls ───────────────────────────────────────────── */
.cv-audio-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,80,0,0.25);
    border: 1px solid rgba(0,60,0,0.2);
    border-radius: 20px;
    padding: 4px 10px;
}
.cv-audio-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.cv-audio-btn:hover { background: rgba(255,255,255,0.3); }
.cv-audio-btn.muted { background: rgba(220,50,50,0.3); }

/* ── Read aloud button ────────────────────────────────────────── */
.cv-read-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
}
.cv-read-btn:hover  { background: rgba(255,255,255,0.25); }
.cv-read-btn.reading {
    background: rgba(59,130,246,0.45);
    border-color: rgba(147,197,253,0.6);
    animation: cv-read-pulse 2s ease-in-out infinite;
}
.cv-read-btn.paused {
    background: rgba(245,158,11,0.4);
    border-color: rgba(253,211,77,0.6);
}
@keyframes cv-read-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    50%      { box-shadow: 0 0 0 5px rgba(59,130,246,0); }
}
.cv-volume-slider {
    width: 54px; height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    accent-color: #ffcc00;
}
.cv-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #ffcc00;
    cursor: pointer;
}

/* ── Left group ───────────────────────────────────────────────── */
.cv-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Search bar ───────────────────────────────────────────────── */
.cv-header-search {
    flex: 1;
    max-width: 380px;
    position: relative;
    margin: 0 8px;
}
.cv-search-input {
    width: 100%;
    padding: 6px 36px 6px 14px;
    border: 2px solid #009900;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    outline: none;
    transition: box-shadow 0.2s;
}
.cv-search-input:focus { box-shadow: 0 0 0 3px rgba(255,200,0,0.5); }
.cv-search-icon {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    color: #009900;
    pointer-events: none;
}
.cv-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border: 2px solid #009900;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 200;
    max-height: 280px;
    overflow-y: auto;
}
.cv-search-result-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}
.cv-search-result-item:last-child { border-bottom: none; }
.cv-search-result-item:hover { background: #e8f5e9; }
.cv-search-result-item strong { color: #1565c0; }
.cv-search-result-mod { font-size: 10px; color: #888; margin-top: 1px; }

/* ── User chip ────────────────────────────────────────────────── */
.cv-header-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cv-user-chip {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 2px solid #fff;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #c8e6c9;
    color: #1b5e20;
    font-weight: 900; font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.cv-user-avatar { width: 100%; height: 100%; object-fit: cover; }
.cv-user-initial { font-size: 16px; font-weight: 900; color: #1b5e20; }

/* ================================================================
   PROGRESS BAR
   ================================================================ */
.cv-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 32px;
    background: rgba(0,60,0,0.08);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.cv-progress-track {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.55);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.1);
    position: relative;
}
.cv-progress-fill {
    height: 100%;
    background: #facc15;
    border-radius: 7px;
    transition: width 0.8s cubic-bezier(0.34,1.56,0.64,1), background-color 0.3s;
    position: relative;
    box-shadow: 0 0 12px rgba(250,204,21,0.55);
}
.cv-progress-fill.complete { background: #22c55e; box-shadow: 0 0 12px rgba(34,197,94,0.55); }
.cv-progress-shine {
    position: absolute;
    top: 0; bottom: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: cv-shine 2s linear infinite;
}
@keyframes cv-shine {
    0%   { left: -40%; }
    100% { left: 110%; }
}
.cv-progress-label {
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
    color: #1b5e20;
    background: rgba(255,255,255,0.45);
    padding: 2px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    letter-spacing: 0.04em;
}

/* ================================================================
   BODY LAYOUT
   ================================================================ */
.cv-body-wrap {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-height: 0;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.cv-sidebar {
    width: 300px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(6px);
    border-right: 4px solid rgba(0,0,0,0.08);
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
}
.cv-course-meta { margin-bottom: 4px; }
.cv-course-title {
    font-size: 19px;
    font-weight: 900;
    color: #1e3a8a;
    font-style: italic;
    line-height: 1.2;
    letter-spacing: -0.03em;
}
.cv-plan-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(30,58,138,0.45);
    margin-top: 4px;
}

/* ── Loading spinner ──────────────────────────────────────────── */
.cv-sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #888;
    font-size: 12px;
}
.cv-spinner {
    width: 28px; height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #00CC00;
    border-radius: 50%;
    animation: cv-spin 0.8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }

/* ── Module group ──────────────────────────────────────────────── */
.cv-module {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 6px;
}
.cv-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f9fafb;
    cursor: pointer;
    user-select: none;
    border: none;
    width: 100%;
    text-align: left;
    transition: background 0.15s;
    gap: 8px;
}
.cv-module-header:hover { background: #f3f4f6; }
.cv-module-icon { font-size: 18px; flex-shrink: 0; }
.cv-module-name {
    flex: 1;
    font-size: 12px;
    font-weight: 900;
    color: #374151;
    line-height: 1.3;
}
.cv-module-chevron {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.25s;
}
.cv-module.open .cv-module-chevron { transform: rotate(180deg); }

/* ── Module lessons list (accordion) ──────────────────────────── */
.cv-lessons-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
    padding: 0 8px;
}
.cv-module.open .cv-lessons-list { max-height: 1000px; padding: 6px 8px; }

/* ── Individual lesson / quiz button in sidebar ───────────────── */
.cv-lesson-btn, .cv-quiz-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    margin-bottom: 2px;
    background: none;
    border: none;
    border-radius: 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.cv-lesson-btn:hover   { background: #eff6ff; color: #1d4ed8; }
.cv-quiz-btn:hover     { background: #fef9c3; color: #92400e; }

.cv-lesson-btn.active  {
    background: #3b82f6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}
.cv-quiz-btn.active    {
    background: #eab308;
    color: #fff;
    box-shadow: 0 2px 8px rgba(234,179,8,0.4);
}

.cv-lesson-status { flex-shrink: 0; }
.cv-lesson-status svg { display: block; }
.cv-checkbox-empty { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d1d5db; }
.cv-checkbox-done  { color: #22c55e; }

/* Preview tooltip (hover on lesson) */
.cv-lesson-btn:hover .cv-preview-tip { display: block; }
.cv-preview-tip {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    z-index: 300;
    width: 180px;
    background: #fff;
    border: 2px solid #bfdbfe;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    pointer-events: none;
    font-size: 10px;
    color: #374151;
    line-height: 1.4;
}
.cv-preview-tip strong { display: block; color: #1e3a8a; font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 3px; }

/* ── Type badge ───────────────────────────────────────────────── */
.cv-type-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e5e7eb;
    color: #374151;
    margin-left: auto;
    flex-shrink: 0;
}
.cv-type-badge.video       { background: #fee2e2; color: #991b1b; }
.cv-type-badge.lectura     { background: #dbeafe; color: #1d4ed8; }
.cv-type-badge.ejercicio   { background: #d1fae5; color: #065f46; }
.cv-type-badge.cuestionario{ background: #fef3c7; color: #92400e; }
.cv-type-badge.proyecto    { background: #ede9fe; color: #5b21b6; }

/* ================================================================
   MAIN CONTENT AREA
   ================================================================ */
.cv-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: rgba(255,153,0,0.15);
    min-width: 0;
}

/* ── Panel transitions ─────────────────────────────────────────── */
.cv-panel {
    animation: cv-panel-in 0.3s ease;
}
@keyframes cv-panel-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   WELCOME SCREEN
   ================================================================ */
.cv-welcome {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    background: rgba(255,255,255,0.42);
    border-radius: 28px;
    border: 4px dashed rgba(255,255,255,0.65);
    min-height: 340px;
}
.cv-welcome-icon { font-size: 80px; margin-bottom: 20px; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.2)); }
.cv-welcome-title {
    font-size: 38px;
    font-weight: 900;
    color: #1e3a8a;
    font-style: italic;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 12px;
}
.cv-welcome-desc { font-size: 16px; color: rgba(30,58,138,0.65); font-weight: 500; max-width: 380px; line-height: 1.6; }
.cv-welcome-tema { font-size: 13px; color: rgba(0,0,0,0.5); }

.cv-stats-row { display: flex; gap: 16px; margin-top: 28px; }
.cv-stat-card {
    padding: 16px 24px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    text-align: center;
    min-width: 100px;
}
.cv-stat-blue  { border-color: #bfdbfe; }
.cv-stat-yellow{ border-color: #fde68a; }
.cv-stat-value { font-size: 32px; font-weight: 900; line-height: 1; }
.cv-stat-blue  .cv-stat-value { color: #3b82f6; }
.cv-stat-yellow.cv-stat-value { color: #eab308; }
.cv-stat-yellow .cv-stat-value{ color: #eab308; }
.cv-stat-lbl   { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #9ca3af; margin-top: 3px; }

.cv-objectives {
    margin-top: 24px;
    padding: 14px 20px;
    background: rgba(255,255,255,0.6);
    border-radius: 14px;
    border: 2px solid rgba(0,150,0,0.2);
    text-align: left;
    width: 100%;
}
.cv-objectives-title { font-size: 13px; font-weight: 900; color: #15803d; margin-bottom: 6px; }
.cv-objectives-text  { font-size: 12px; color: #374151; line-height: 1.5; }

/* ================================================================
   LESSON VIEW
   ================================================================ */
.cv-lesson-view {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.cv-lesson-header {
    background: #3b82f6;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    gap: 12px;
}
.cv-lesson-header-left { display: flex; align-items: center; gap: 12px; }
.cv-lesson-header-icon { flex-shrink: 0; }
.cv-lesson-title {
    font-size: 26px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.03em;
}
.cv-lesson-share-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}
.cv-lesson-share-btn:hover { background: rgba(255,255,255,0.3); }

/* ── Lesson body ──────────────────────────────────────────────── */
.cv-lesson-body { padding: 28px 32px; }

/* ── Markdown prose styles ─────────────────────────────────────── */
.cv-prose { color: #374151; }
.cv-prose h1 { font-size: 28px; font-weight: 900; color: #1e3a8a; margin-bottom: 16px; }
.cv-prose h2 { font-size: 22px; font-weight: 900; color: #1e40af; margin-bottom: 12px; margin-top: 24px; }
.cv-prose h3 { font-size: 18px; font-weight: 900; color: #2563eb; margin-bottom: 10px; margin-top: 20px; }
.cv-prose p  { font-size: 16px; line-height: 1.7; color: #374151; font-weight: 500; margin-bottom: 14px; }
.cv-prose ul, .cv-prose ol { margin-left: 20px; margin-bottom: 14px; }
.cv-prose li { font-size: 15px; color: #374151; font-weight: 500; margin-bottom: 5px; line-height: 1.5; }
.cv-prose strong { font-weight: 900; color: #2563eb; }
.cv-prose em    { font-style: italic; color: #4b5563; }
.cv-prose code  { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #7c3aed; }
.cv-prose blockquote {
    border-left: 4px solid #93c5fd;
    padding: 10px 18px;
    background: #eff6ff;
    border-radius: 0 10px 10px 0;
    margin: 14px 0;
}
.cv-prose hr { border: none; border-top: 2px solid #e5e7eb; margin: 20px 0; }

/* ── Main Video Player ────────────────────────────────────────── */
.cv-main-video-section {
    margin: 20px 0 30px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cv-main-video-label {
    font-size: 13px;
    font-weight: 900;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cv-main-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.cv-main-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Complete button ───────────────────────────────────────────── */
.cv-complete-wrap { text-align: center; margin-top: 36px; padding-top: 20px; border-top: 2px solid #f0f0f0; }
.cv-complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-size: 18px;
    font-weight: 900;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.cv-complete-btn.ready {
    background: #22c55e;
    color: #fff;
}
.cv-complete-btn.ready:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(34,197,94,0.4);
}
.cv-complete-btn.done {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: default;
}

/* ================================================================
   EXERCISE / QUIZ BLOCKS
   ================================================================ */
.cv-exercises-section { margin-top: 28px; }

.cv-exercises-trigger {
    display: flex;
    justify-content: center;
    padding: 24px;
}
.cv-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #3b82f6;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(59,130,246,0.4);
    transition: background 0.2s, transform 0.15s;
}
.cv-start-btn:hover { background: #2563eb; transform: translateY(-2px); }

.cv-exercises-label {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

/* ── Single exercise card ─────────────────────────────────────── */
.cv-exercise {
    background: rgba(239,246,255,0.6);
    border: 2px solid #bfdbfe;
    border-radius: 18px;
    padding: 20px 22px;
    margin-bottom: 16px;
    animation: cv-panel-in 0.25s ease;
}
.cv-ex-question {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    font-weight: 900;
    color: #1e3a8a;
    margin-bottom: 16px;
}
.cv-ex-question svg { flex-shrink: 0; margin-top: 2px; color: #3b82f6; }

/* ── Options grid ─────────────────────────────────────────────── */
.cv-options { display: flex; flex-direction: column; gap: 10px; }
.cv-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid #dbeafe;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.cv-option-btn:hover:not(:disabled) { background: #eff6ff; border-color: #93c5fd; }
.cv-option-btn.selected { background: #3b82f6; color: #fff; border-color: #2563eb; box-shadow: 0 2px 8px rgba(59,130,246,0.35); }
.cv-option-btn:disabled { cursor: default; }
.cv-option-btn.correct:disabled  { background: #dcfce7; border-color: #86efac; color: #14532d; }
.cv-option-btn.incorrect:disabled{ background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }

.cv-option-letter {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 900;
    background: #dbeafe;
    color: #1d4ed8;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.cv-option-btn.selected   .cv-option-letter { background: rgba(255,255,255,0.25); color: #fff; }
.cv-option-btn.correct    .cv-option-letter { background: #86efac; color: #14532d; }
.cv-option-btn.incorrect  .cv-option-letter { background: #fca5a5; color: #7f1d1d; }

/* ── True/False buttons ────────────────────────────────────────── */
.cv-tf-row { display: flex; gap: 14px; }
.cv-tf-btn {
    flex: 1;
    padding: 16px;
    font-size: 17px;
    font-weight: 900;
    border: 2px solid #dbeafe;
    border-radius: 14px;
    background: #fff;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.15s;
}
.cv-tf-btn:hover:not(:disabled)  { background: #eff6ff; border-color: #93c5fd; }
.cv-tf-btn.selected { background: #3b82f6; color: #fff; border-color: #2563eb; }
.cv-tf-btn.correct:disabled  { background: #dcfce7; border-color: #86efac; color: #14532d; }
.cv-tf-btn.incorrect:disabled{ background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }

/* ── Sorting exercise ──────────────────────────────────────────── */
.cv-sorting-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cv-sorting-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #dbeafe;
    border-radius: 12px;
    transition: border-color 0.15s, background 0.15s;
}
.cv-sorting-item:hover { border-color: #93c5fd; }
.cv-sorting-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 900;
    flex-shrink: 0;
}
.cv-sorting-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.cv-sorting-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}
.cv-sort-arrow-btn {
    width: 28px; height: 22px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    color: #3b82f6;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.cv-sort-arrow-btn:hover:not(:disabled) { background: #dbeafe; }
.cv-sort-arrow-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Matching exercise ─────────────────────────────────────────── */
.cv-matching-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: start;
}
.cv-matching-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cv-matching-left-item {
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #dbeafe;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
}
.cv-matching-select {
    padding: 12px 14px;
    background: #fff;
    border: 2px solid #dbeafe;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s;
    width: 100%;
}
.cv-matching-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

/* ── Related games section (inside lesson) ─────────────────────── */
.cv-games-section {
    margin: 24px 0;
    padding: 18px 20px;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-left: 4px solid #22c55e;
    border-radius: 14px;
    animation: cv-panel-in 0.3s ease;
}
.cv-games-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #166534;
    margin-bottom: 14px;
}
.cv-games-grid-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cv-game-inline-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.1s;
}
.cv-game-inline-card:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
}
.cv-game-inline-icon {
    width: 42px; height: 42px;
    background: #dcfce7;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.cv-game-inline-info { flex: 1; min-width: 0; }
.cv-game-inline-title {
    font-size: 13px;
    font-weight: 700;
    color: #166534;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cv-game-inline-type {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cv-game-inline-play {
    width: 32px; height: 32px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(34,197,94,0.3);
}

/* ── Feedback analogy ──────────────────────────────────────────── */
.cv-feedback-analogy {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 10px;
}
.cv-feedback-analogy-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.cv-feedback-analogy-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    color: #92400e;
    margin-bottom: 2px;
}
.cv-feedback-analogy-text {
    font-size: 12px;
    font-weight: 600;
    color: #78350f;
    line-height: 1.45;
}

/* ── YouTube extra material (inside lesson) ────────────────────── */
.cv-yt-extra {
    margin: 24px 0;
    padding: 18px 20px;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 14px;
    animation: cv-panel-in 0.3s ease;
}
.cv-yt-extra-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #991b1b;
    margin-bottom: 14px;
}
.cv-yt-extra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.cv-yt-extra-card {
    background: #fff;
    border: 2px solid #fecaca;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s, transform 0.1s;
}
.cv-yt-extra-card:hover {
    border-color: #ef4444;
    transform: translateY(-2px);
}
.cv-yt-extra-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}
.cv-yt-extra-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}
.cv-yt-extra-thumb:hover img { opacity: 0.8; }
.cv-yt-extra-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.cv-yt-extra-play:hover { background: rgba(239,68,68,0.6); }
.cv-yt-extra-title {
    padding: 8px 10px 2px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cv-yt-extra-channel {
    padding: 0 10px 8px;
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
}

/* ── Open text exercise ────────────────────────────────────────── */
.cv-open-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dbeafe;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.15s;
}
.cv-open-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

/* ── Check answer button ───────────────────────────────────────── */
.cv-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 24px;
    background: #3b82f6;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(59,130,246,0.4);
    transition: background 0.15s;
}
.cv-check-btn:hover  { background: #2563eb; }
.cv-check-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Feedback card ─────────────────────────────────────────────── */
.cv-feedback {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 2px solid;
    margin-top: 14px;
    animation: cv-panel-in 0.25s ease;
}
.cv-feedback.correct  { background: #f0fdf4; border-color: #bbf7d0; }
.cv-feedback.incorrect{ background: #fef2f2; border-color: #fecaca; }
.cv-feedback-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}
.cv-feedback.correct   .cv-feedback-icon { background: #bbf7d0; }
.cv-feedback.incorrect .cv-feedback-icon { background: #fecaca; }
.cv-feedback-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 4px;
}
.cv-feedback.correct   .cv-feedback-title { color: #166534; }
.cv-feedback.incorrect .cv-feedback-title { color: #991b1b; }
.cv-feedback-text  { font-size: 13px; font-weight: 600; color: #374151; line-height: 1.5; }
.cv-retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,0.5);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.cv-retry-btn:hover { background: rgba(255,255,255,0.8); }

/* ================================================================
   FEEDBACK MODAL
   ================================================================ */
.cv-feedback-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: cv-fade-in 0.2s ease;
}

.cv-feedback-modal-backdrop.show {
    display: flex;
}

.cv-feedback-modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 520px;
    width: 90%;
    padding: 32px;
    text-align: center;
    animation: cv-modal-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.cv-feedback-modal.correct {
    border-top: 5px solid #10b981;
}

.cv-feedback-modal.incorrect {
    border-top: 5px solid #ef4444;
}

.cv-feedback-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    font-size: 40px;
    animation: cv-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cv-feedback-modal.correct .cv-feedback-modal-icon {
    background: #d1fae5;
    color: #10b981;
}

.cv-feedback-modal.incorrect .cv-feedback-modal-icon {
    background: #fee2e2;
    color: #ef4444;
}

.cv-feedback-modal-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.2;
}

.cv-feedback-modal.correct .cv-feedback-modal-title {
    color: #166534;
}

.cv-feedback-modal.incorrect .cv-feedback-modal-title {
    color: #991b1b;
}

.cv-feedback-modal-text {
    font-size: 15px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 20px;
    line-height: 1.6;
}

.cv-feedback-modal-analogy {
    background: #f8fafb;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.cv-feedback-modal-analogy-label {
    display: block;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 6px;
    font-size: 13px;
}

.cv-feedback-modal-analogy-text {
    display: block;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.cv-feedback-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.cv-feedback-modal-btn {
    padding: 10px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cv-feedback-modal-btn-close {
    background: #e5e7eb;
    color: #374151;
}

.cv-feedback-modal-btn-close:hover {
    background: #d1d5db;
}

.cv-feedback-modal-btn-retry {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cv-feedback-modal-btn-retry:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

@keyframes cv-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cv-modal-pop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes cv-bounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ================================================================
   QUIZ VIEW (cuestionario mode)
   ================================================================ */
.cv-quiz-view {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.cv-quiz-header {
    background: #eab308;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    gap: 12px;
}
.cv-quiz-header-left { display: flex; align-items: center; gap: 12px; }
.cv-quiz-title  { font-size: 26px; font-weight: 900; font-style: italic; letter-spacing: -0.03em; }
.cv-quiz-body   { padding: 28px 32px; }

.cv-quiz-counter { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(30,58,138,0.5); margin-bottom: 10px; }
.cv-quiz-question { font-size: 22px; font-weight: 700; color: #1e3a8a; line-height: 1.4; margin-bottom: 24px; }
.cv-quiz-options { display: flex; flex-direction: column; gap: 12px; }

.cv-quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
    width: 100%;
}
.cv-quiz-option:hover { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
.cv-quiz-option-letter {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6;
    font-size: 13px; font-weight: 900;
    color: #6b7280; flex-shrink: 0;
}

/* Quiz result screen */
.cv-quiz-result { text-align: center; padding: 12px 0 24px; }
.cv-result-emoji { font-size: 72px; margin-bottom: 12px; line-height: 1; }
.cv-result-title { font-size: 36px; font-weight: 900; color: #1e3a8a; margin-bottom: 8px; }
.cv-result-sub   { font-size: 15px; color: #6b7280; font-weight: 600; margin-bottom: 24px; }

.cv-result-feedback {
    padding: 20px 24px;
    border-radius: 18px;
    border: 2px solid;
    text-align: left;
    margin-bottom: 24px;
}
.cv-result-feedback.correct   { background: #f0fdf4; border-color: #bbf7d0; }
.cv-result-feedback.incorrect { background: #fef2f2; border-color: #fecaca; }
.cv-rf-label  { font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.cv-result-feedback.correct   .cv-rf-label { color: #166534; }
.cv-result-feedback.incorrect .cv-rf-label { color: #991b1b; }
.cv-rf-text   { font-size: 14px; color: #374151; font-weight: 600; line-height: 1.6; }
.cv-rf-analogy { margin-top: 10px; padding: 10px 14px; background: rgba(255,255,255,0.4); border-radius: 10px; font-size: 12px; color: #374151; font-style: italic; font-weight: 700; }

.cv-quiz-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.cv-quiz-retry-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px;
    background: #fff; color: #3b82f6;
    border: 2px solid #3b82f6;
    border-radius: 24px; font-size: 14px; font-weight: 900;
    cursor: pointer; transition: background 0.15s;
}
.cv-quiz-retry-btn:hover { background: #eff6ff; }
.cv-quiz-next-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px;
    background: #3b82f6; color: #fff;
    border: none; border-radius: 24px;
    font-size: 14px; font-weight: 900;
    cursor: pointer; box-shadow: 0 3px 12px rgba(59,130,246,0.4);
    transition: background 0.15s;
}
.cv-quiz-next-btn:hover { background: #2563eb; }

/* ── Fusion diagram (special for nuclear fusion quiz) ─────────── */
.cv-fusion-diagram {
    display: flex; align-items: center; justify-content: center;
    gap: 18px; margin-top: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.5);
    border-radius: 12px; border: 1px solid rgba(134,239,172,0.5);
    overflow: hidden;
}
.cv-atom {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: 10px; font-weight: 700;
}
.cv-atom-ball {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 900; color: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.cv-atom-ball.hydrogen { background: #60a5fa; }
.cv-atom-ball.helium   {
    background: #f97316;
    width: 44px; height: 44px;
    font-size: 13px;
    position: relative;
}
.cv-atom-ball.helium::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(251,146,60,0.3);
    animation: cv-glow-pulse 1s ease-in-out infinite;
}
@keyframes cv-glow-pulse { 0%,100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.15); } }
.cv-atom-op { font-size: 20px; font-weight: 900; }
.cv-atom-op.plus  { color: #22c55e; animation: cv-blink 1s ease-in-out infinite; }
.cv-atom-op.arrow { color: #eab308; }
@keyframes cv-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ================================================================
   FOOTER
   ================================================================ */
.cv-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: rgba(0,80,0,0.5);
    background: rgba(255,255,255,0.12);
    border-top: 1px solid rgba(0,0,0,0.06);
    flex-shrink: 0;
}

/* ================================================================
   VIDEO EMBED SECTION (in video-type lessons)
   ================================================================ */
.cv-video-embed-section {
    margin: 24px 0;
    animation: cv-panel-in 0.3s ease;
}
.cv-video-embed-label {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #dc2626;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cv-video-embed-label svg { fill: #dc2626; }
.cv-video-embed-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 3px solid #008000;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    background: #000;
    overflow: hidden;
}
.cv-video-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.cv-video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}
.cv-video-channel {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}
.cv-video-yt-link {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    text-decoration: none;
}
.cv-video-yt-link:hover { text-decoration: underline; }

/* Video lesson header variant (red) */
.cv-lesson-header--video { background: #dc2626; }

/* ================================================================
   RELATED GAMES SECTION (Welcome screen)
   ================================================================ */
.cv-welcome-games-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 2px dashed rgba(0,0,0,0.08);
}
.cv-welcome-games-title {
    font-size: 14px;
    font-weight: 900;
    color: #1e3a5f;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.cv-welcome-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.cv-welcome-game-card {
    background: #fff;
    border: 3px solid #008000;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 14px;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.cv-welcome-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 4px 7px 0 rgba(0,0,0,0.2);
}
.cv-welcome-game-icon {
    font-size: 36px;
    line-height: 1;
}
.cv-welcome-game-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    line-height: 1.35;
}
.cv-welcome-game-type {
    font-size: 10px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cv-welcome-game-play {
    margin-top: 4px;
    padding: 5px 18px;
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    border-radius: 14px;
    text-transform: uppercase;
}

/* ================================================================
   SCROLLBARS
   ================================================================ */
.cv-sidebar::-webkit-scrollbar,
.cv-content::-webkit-scrollbar { width: 10px; }
.cv-sidebar::-webkit-scrollbar-track,
.cv-content::-webkit-scrollbar-track { background: #E3F2FD; border-radius: 6px; }
.cv-sidebar::-webkit-scrollbar-thumb { background: #64B5F6; border-radius: 6px; }
.cv-content::-webkit-scrollbar-thumb  { background: #64B5F6; border-radius: 6px; }
.cv-sidebar::-webkit-scrollbar-thumb:hover,
.cv-content::-webkit-scrollbar-thumb:hover { background: #42A5F5; }

/* ================================================================
   LESSON INFO PANEL — educational header for each lesson
   ================================================================ */

/* Info panel wrapper */
.cv-info-panel {
    margin-bottom: 24px;
    animation: cv-panel-in 0.3s ease;
}

/* Type tag row */
.cv-info-type-row { margin-bottom: 14px; }
.cv-info-type-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #e5e7eb;
    color: #374151;
}
.cv-info-type-tag.video       { background: #fee2e2; color: #991b1b; }
.cv-info-type-tag.lectura     { background: #dbeafe; color: #1d4ed8; }
.cv-info-type-tag.ejercicio   { background: #d1fae5; color: #065f46; }
.cv-info-type-tag.cuestionario{ background: #fef3c7; color: #92400e; }
.cv-info-type-tag.proyecto    { background: #ede9fe; color: #5b21b6; }

/* Objective banner */
.cv-info-objective {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
    border-left: 5px solid #3b82f6;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 3px 3px 0 rgba(59,130,246,0.12);
}
.cv-info-obj-icon { font-size: 30px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.cv-info-obj-body { flex: 1; }
.cv-info-obj-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1d4ed8;
    margin-bottom: 6px;
}
.cv-info-obj-text {
    font-size: 15px;
    color: #1e40af;
    font-weight: 600;
    line-height: 1.6;
    margin: 0;
}

/* Topic cards grid */
.cv-info-topics { margin-bottom: 22px; }
.cv-info-slabel {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b7280;
    margin-bottom: 10px;
}
.cv-info-topics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 8px;
}
.cv-info-topic-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.05);
    animation: cv-panel-in 0.25s ease;
}
.cv-info-topic-num {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.cv-info-topic-text {
    font-size: 12px; font-weight: 700;
    color: #374151; line-height: 1.3;
}

/* Content section heading */
.cv-content-section { margin-bottom: 0; }
.cv-content-slabel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    margin-bottom: 18px;
}
.cv-content-slabel::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* Vocabulary pill box */
.cv-vocab-box {
    margin: 24px 0;
    padding: 16px 20px;
    background: #fffbeb;
    border: 2px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    animation: cv-panel-in 0.3s ease;
}
.cv-vocab-label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #92400e;
    margin-bottom: 12px;
}
.cv-vocab-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.cv-vocab-pill {
    display: inline-block;
    padding: 5px 14px;
    background: #fff;
    border: 2px solid #fbbf24;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #78350f;
    transition: background 0.15s;
    cursor: default;
}
.cv-vocab-pill:hover { background: #fef3c7; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .cv-sidebar { width: 240px; }
    .cv-header-btn span, .cv-nav-btn span { display: none; }
    .cv-audio-group .cv-volume-slider { width: 36px; }
}
@media (max-width: 680px) {
    .cv-body-wrap { flex-direction: column; }
    .cv-sidebar {
        width: 100%;
        max-height: 220px;
        border-right: none;
        border-bottom: 4px solid rgba(0,0,0,0.08);
    }
    .cv-content { padding: 14px; }
    .cv-welcome-title { font-size: 26px; }
    .cv-lesson-title, .cv-quiz-title { font-size: 18px; }
    .cv-lesson-body  { padding: 16px; }
    .cv-quiz-body    { padding: 16px; }
    .cv-header-search { max-width: 160px; }
    /* hide less critical header items */
    .cv-audio-group  { display: none; }
    .cv-read-btn     { display: none !important; }
}
@media print {
    .cv-header, .cv-progress-wrap, .cv-sidebar, .cv-footer { display: none !important; }
    .cv-body-wrap { display: block; }
    .cv-content   { overflow: visible; padding: 0; background: #fff; }
    .cv-lesson-view { border: none; box-shadow: none; border-radius: 0; }
}
