    :root {
        --primary-color: #1a2b5f;
        --secondary-color: #f8f9fa;
        --accent-color: #2c4ecf;
        --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
        --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
        --surface-color: #f8fafc;
        --card-bg: #ffffff;
        --text-dark: #1e293b;
        --text-muted: #64748b;
    }
    body { background-color: #f4f6f9;}

    .courses h1, .courses h2, .courses h3, .courses h4, .courses h5, .courses h6 {
        color: white;
    }
    /* Custom styles to match the reference image */
    .course-header-title { color: #1a2b5f; font-weight: 800; }
    .progress-card { border-radius: 15px; border: 1px solid #eef0f7; }

    /* MERGED: .custom-progress defined once with all properties */
    .custom-progress {
        height: 12px;
        border-radius: 10px;
        background-color: #e2e8f0;
        overflow: hidden;
    }

    /* MERGED: .custom-progress .progress-bar defined once with all properties */
    .custom-progress .progress-bar {
        background: var(--secondary-gradient);
        border-radius: 10px;
    }

     /* Hero Section */
    .modern-hero {
        background: var(--primary-gradient);
        border-radius: 0 0 30px 30px;
        padding: 6rem 1rem 6rem 1rem; /* Extra bottom padding for overlap */
        color: white;
        margin-bottom: -2rem; /* Negative margin to pull content up */
        position: relative;
        z-index: 1;
    }

    .glass-nav-btn {
        background: rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white;
        transition: all 0.3s ease;
    }
    .glass-nav-btn:hover {
        background: rgba(255, 255, 255, 0.3);
        color: white;
        transform: translateX(-3px);
    }

    /* Progress Card */
    .progress-widget {
        background: white;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        position: relative;
        z-index: 2;
        border: 1px solid rgba(0,0,0,0.03);
    }

    /* --- Scrollable Tabs Container --- */
    .scroll-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        scrollbar-width: none;
        border-radius: 25px;
        z-index: 9;
        position: relative;
    }
    .scroll-container::-webkit-scrollbar { 
        display: none; /* Chrome */
    }

    /* --- Updated Tabs Style --- */
    .modern-tabs {
        background: #e2e8f0;
        padding: 5px;
        border-radius: 50px;
        display: inline-flex;
        flex-wrap: nowrap !important;
        position: relative;
        z-index: 9999;
    }

    .modern-tabs .nav-link {
        white-space: nowrap;
        color: var(--text-muted);
        font-weight: 600;
        border-radius: 50px;
        padding: 0.75rem 2rem;
        transition: all 0.3s ease;
        background: transparent;
    }
    
    .modern-tabs .nav-link.active {
        background-color: #fff;
        color: #4f46e5;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    /* Modern Card */
    .modern-card {
        border-radius: 20px;
        border: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        background: var(--card-bg);
        overflow: hidden;
    }

    .modern-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    .card-img-wrapper {
        height: 200px;
        overflow: hidden;
        position: relative;
    }

    .modern-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .modern-card:hover .modern-img {
        transform: scale(1.05);
    }

    /* Play Button Overlay */
    .play-overlay {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modern-card:hover .play-overlay {
        opacity: 1;
    }

    .play-icon-glass {
        width: 60px;
        height: 60px;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(4px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
        transition: transform 0.2s ease;
    }
    
    .modern-card:hover .play-icon-glass {
        transform: scale(1.1);
    }

    /* Badges */
    .status-badge {
        position: absolute;
        top: 1rem;
        left: 1rem;
        padding: 0.35rem 0.75rem;
        border-radius: 8px;
        font-size: 0.75rem;
        font-weight: 700;
        backdrop-filter: blur(4px);
    }
    .status-badge.completed {
        background: rgba(220, 252, 231, 0.9);
        color: #166534;
    }
    .status-badge.new {
        background: rgba(255, 255, 255, 0.9);
        color: #4f46e5;
    }

    /* Buttons */
    .btn-modern-primary {
        background: var(--primary-gradient);
        color: white;
        border: none;
        border-radius: 12px;
        box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
        transition: all 0.2s;
    }
    .btn-modern-primary:hover {
        filter: brightness(110%);
        transform: translateY(-1px);
        color: white;
        box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
    }

    .btn-modern-outline {
        background: transparent;
        color: #4f46e5;
        border: 2px solid #e0e7ff;
        border-radius: 12px;
    }
    .btn-modern-outline:hover {
        background: #e0e7ff;
        color: #4338ca;
    }

    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ── Activity Score Strip ── */
    .activity-score-strip {
        display: flex;
        align-items: center;
        background: #f8faff;
        border: 1px solid #e8edf7;
        border-radius: 12px;
        padding: 9px 10px;
        margin-bottom: 14px;
        gap: 2px;
    }
    .score-item {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }
    .score-icon {
        width: 26px;
        height: 26px;
        border-radius: 7px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        flex-shrink: 0;
    }
    .score-value {
        font-size: 0.82rem;
        font-weight: 700;
        line-height: 1.1;
        white-space: nowrap;
    }
    .score-label {
        font-size: 0.63rem;
        color: #9ca3af;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.4px;
    }
    .score-divider {
        width: 1px;
        height: 26px;
        background: #e2e8f0;
        flex-shrink: 0;
        margin: 0 2px;
    }
    
    /* Animation */
    .fade-in-up {
        animation: fadeInUp 0.5s ease-out forwards;
        opacity: 0;
    }
    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .fade-in-up:nth-child(1) { animation-delay: 0.1s; }
    .fade-in-up:nth-child(2) { animation-delay: 0.2s; }
    .fade-in-up:nth-child(3) { animation-delay: 0.3s; }
    
    .hover-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
    .hover-lift:hover { transform: translateY(-5px); box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important; }
    
    .btn-dark { background-color: #1a2b5f; border-color: #1a2b5f; }
    .btn-dark:hover { background-color: #132048; border-color: #132048; }
    .badge.bg-dark { background-color: #1a2b5f !important; }
    
    /* YouTube Button Style */
    .yt-play-btn {
        width: 68px;
        height: 48px;
        background-color: rgba(33, 33, 33, 0.8); /* Dark background */
        border-radius: 25% / 25%; /* Iconic soft curve */
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    /* Parent card hover effect: Button turns Red */
    .course-card:hover .yt-play-btn {
        background-color: #ff0000; /* YouTube Red */
        box-shadow: 0 8px 15px rgba(255, 0, 0, 0.3);
    }

    /* The triangle icon inside */
    .yt-play-btn i {
        font-size: 1.5rem; /* Adjust size of the triangle */
        margin-left: 3px; /* Visual optical alignment */
    }

    /* --- Header Area --- */
    .lesson-header-card {
        background: white;
        border-radius: 15px;
        border: none;
        box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    }
    .back-link { color: #6c757d; font-weight: 500; transition: color 0.2s; }
    .back-link:hover { color: var(--primary-color); }

    .next-button {
        background: linear-gradient(to right, rgb(74, 0, 224), rgb(142, 45, 226));
        color: rgb(255, 255, 255);
        padding: 12px 28px;
        border: none;
        border-radius: 100px;
        font-size: 17px;
        font-weight: 600;
        box-shadow: rgba(0, 0, 0, 0.25) 0px 6px 20px;
        cursor: pointer;
        transition: 0.3s ease-in-out;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        letter-spacing: 0.5px;
    }

    /* --- 1. Listening Module Styles --- */
    .vocab-list-group { border-radius: 12px; overflow: hidden; border: 1px solid #eef0f7; }
    .vocab-item {
        border: none;
        border-bottom: 1px solid #f0f0f0;
        padding: 20px 25px;
        transition: background-color 0.2s;
        background: white;
    }
    .vocab-item:last-child { border-bottom: none; }
    .vocab-item:hover { background-color: #fbfbfb; }
    
    .audio-btn-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: #eef2ff;
        color: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
    }
    .audio-btn-circle:hover {
        background-color: var(--primary-color);
        color: white;
        transform: scale(1.1);
    }

    /* --- 2. Conversation Module Styles --- */
    .ai-card {
        background: linear-gradient(135deg, #1a2b5f 0%, #2c4ecf 100%);
        color: white;
        border-radius: 15px;
        overflow: hidden;
    }
    .ai-icon-circle {
        width: 80px;
        height: 80px;
        background: rgba(255,255,255,0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 20px;
    }

    /* --- 3. Quiz Module Styles --- */
    .quiz-container { background: white; border-radius: 15px; box-shadow: 0 2px 15px rgba(0,0,0,0.03); }
    .quiz-option-label { display: block; cursor: pointer; width: 100%; margin-bottom: 15px; }
    .quiz-option-input { display: none; }
    
    .quiz-card-option {
        border: 2px solid #eaedf5;
        border-radius: 12px;
        padding: 18px 20px;
        background: white;
        font-weight: 600;
        color: #495057;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
    }
    
    /* Checked State */
    .quiz-option-input:checked + .quiz-card-option {
        border-color: var(--primary-color);
        background-color: #f4f6fc;
        color: var(--primary-color);
    }

    /* Feedback States */
    .quiz-card-option.correct { border-color: #198754 !important; background-color: #d1e7dd !important; color: #0f5132 !important; }
    .quiz-card-option.incorrect { border-color: #dc3545 !important; background-color: #f8d7da !important; color: #842029 !important; }

    .progress-bar-quiz { background-color: var(--primary-color); }

    /* ── Accent Info Modal ── */
    .accent-modal-backdrop {
        position: fixed; inset: 0;
        background: rgba(15, 23, 42, 0.55);
        backdrop-filter: blur(3px);
        z-index: 1080;
        display: flex; align-items: center; justify-content: center;
        padding: 20px;
        animation: accentFadeIn .2s ease;
    }
    @keyframes accentFadeIn { from { opacity: 0; } to { opacity: 1; } }
    .accent-modal {
        background: #fff;
        border-radius: 18px;
        max-width: 540px;
        width: 100%;
        max-height: 88vh;
        overflow-y: auto;
        box-shadow: 0 24px 60px rgba(15,23,42,0.18);
        animation: accentSlideUp .25s cubic-bezier(.4,0,.2,1);
    }
    @keyframes accentSlideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
    .accent-modal-header {
        background: linear-gradient(135deg, #1a4a6e 0%, #1a7a5e 100%);
        border-radius: 18px 18px 0 0;
        padding: 24px 28px 20px;
        color: #fff;
        text-align: center;
    }
    .accent-modal-header .modal-flag { font-size: 2rem; display: block; margin-bottom: 8px; }
    .accent-modal-header h5 { font-family: 'Playfair Display', serif; font-size: 1.35rem; margin: 0 0 4px; }
    .accent-modal-header p  { font-size: 0.82rem; opacity: .8; margin: 0; line-height: 1.5; }
    .accent-modal-body { padding: 24px 28px; }
    .accent-section { margin-bottom: 20px; }
    .accent-section h6 {
        font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: .8px; color: #1a4a6e; margin-bottom: 10px;
    }
    .accent-rule {
        background: #f4f8fc;
        border-left: 3px solid #1a4a6e;
        border-radius: 0 8px 8px 0;
        padding: 10px 14px;
        margin-bottom: 8px;
        font-size: 0.86rem;
        color: #2c3e50;
        line-height: 1.55;
    }
    .accent-rule strong { color: #1a4a6e; }
    .accent-rule.green  { border-left-color: #1a7a5e; background: #f0faf5; }
    .accent-rule.green strong { color: #1a7a5e; }
    .accent-policy-row {
        display: flex; align-items: flex-start; gap: 10px;
        font-size: 0.86rem; color: #2c3e50; line-height: 1.5;
        margin-bottom: 8px;
    }
    .accent-policy-row .policy-icon {
        width: 22px; height: 22px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 0.7rem; flex-shrink: 0; margin-top: 1px;
    }
    .accent-policy-row .policy-icon.green { background: #dcfce7; color: #15803d; }
    .accent-modal-footer {
        padding: 16px 28px 24px;
        text-align: center;
    }
    .btn-accent-got-it {
        background: linear-gradient(135deg, #1a4a6e 0%, #1a7a5e 100%);
        color: #fff; border: none; border-radius: 99px;
        padding: 12px 40px; font-size: 0.95rem; font-weight: 700;
        cursor: pointer; letter-spacing: .02em;
        transition: opacity .15s;
        font-family: inherit;
    }
    .btn-accent-got-it:hover { opacity: .88; }

    /* ── Video Timer Widget ── */
    .video-timer-widget {
        display: flex;
        align-items: center;
        gap: 10px;
        background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
        border: 1px solid #dde4f7;
        border-radius: 14px;
        padding: 12px 20px;
        margin-top: 18px;
        box-shadow: 0 2px 8px rgba(80,100,200,0.06);
    }
    .video-timer-widget .timer-icon {
        width: 38px; height: 38px;
        background: var(--bs-primary, #0d6efd);
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        color: #fff;
        font-size: 1rem;
        flex-shrink: 0;
    }
    .video-timer-widget .timer-label { font-size: 0.78rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
    .video-timer-widget .timer-value { font-size: 1.4rem; font-weight: 800; color: #1e293b; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
    .video-timer-widget .timer-status {
        margin-left: auto;
        font-size: 0.75rem;
        font-weight: 600;
        padding: 4px 12px;
        border-radius: 20px;
    }
    .video-timer-widget .timer-status.active   { background: #dcfce7; color: #15803d; }
    .video-timer-widget .timer-status.inactive { background: #f1f5f9; color: #64748b; }

    /* ── Listen Progress Bar ── */
    .listen-progress-header {
        background: linear-gradient(135deg, #f8faff 0%, #eef2ff 100%);
        border-bottom: 1px solid #e5eaf7;
        padding: 16px 20px;
        border-radius: 12px 12px 0 0;
    }
    .listen-counter-badge {
        background: var(--bs-primary, #0d6efd);
        color: #fff;
        border-radius: 20px;
        padding: 4px 14px;
        font-size: 0.82rem;
        font-weight: 700;
        white-space: nowrap;
    }
    .listen-mini-progress {
        height: 6px;
        border-radius: 10px;
        background: #e5e7eb;
        margin-top: 8px;
        overflow: hidden;
    }
    .listen-mini-progress-bar {
        height: 100%;
        border-radius: 10px;
        background: linear-gradient(90deg, #6366f1, #3b82f6);
        transition: width 0.4s cubic-bezier(.4,0,.2,1);
        width: 0%;
    }
    /* Mark audio button as listened */
    .audio-btn-circle.listened {
        background: #dcfce7 !important;
        color: #15803d !important;
        border-color: #86efac !important;
    }
    .audio-btn-circle.listened i::before { content: "\f058"; /* fa-check-circle */ }

    /* ════════════════════════════════════════════
    QUIZ MODULE — ola-portuguese style
    Scoped under #quiz-tab-panel to avoid
    clashing with site Bootstrap styles.
    ════════════════════════════════════════════ */
    #quiz-tab-panel {
        font-family: 'Source Sans 3', sans-serif;
        font-weight: 300;
        color: #2c3e50;
    }
    #quiz-tab-panel .qz-card {
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 22px rgba(26,74,110,0.09);
        padding: 28px 30px;
        margin-bottom: 16px;
        border: none;
    }
    /* Progress */
    #quiz-tab-panel .qz-progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
    #quiz-tab-panel .qz-progress-track { flex: 1; background: #e8eef4; border-radius: 99px; height: 6px; }
    #quiz-tab-panel .qz-progress-fill  { background: #1a7a5e; height: 6px; border-radius: 99px; transition: width 0.4s ease; }
    #quiz-tab-panel .qz-progress-label { font-size: 12px; color: #8a9bac; white-space: nowrap; font-weight: 400; }
    /* Part tag */
    #quiz-tab-panel .qz-part-tag {
        display: inline-block;
        font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
        color: #1a4a6e; background: #e6f0fb;
        padding: 3px 10px; border-radius: 99px; margin-bottom: 14px;
    }
    /* Tip box */
    #quiz-tab-panel .qz-tip-box {
        background: #fdf6e8; border-left: 3px solid #c8972a;
        border-radius: 0 8px 8px 0; padding: 11px 14px;
        font-size: 13px; color: #7a5a1a; line-height: 1.55; margin-bottom: 16px;
    }
    #quiz-tab-panel .qz-tip-box strong { color: #5a3e0a; font-weight: 600; }
    /* Context box */
    #quiz-tab-panel .qz-ctx-box {
        font-size: 13px; color: #6b7c8d; font-style: italic;
        background: #f4f7fa; border-radius: 8px;
        padding: 10px 14px; margin-bottom: 14px; line-height: 1.5;
    }
    /* Question text */
    #quiz-tab-panel .qz-q-text { font-size: 16px; color: #1e2d3d; line-height: 1.6; margin-bottom: 18px; font-weight: 400; }
    #quiz-tab-panel .qz-q-text em { font-style: normal; font-weight: 600; color: #1a4a6e; background: #e6f0fb; border-radius: 4px; padding: 1px 5px; }
    /* Options */
    #quiz-tab-panel .qz-opts { display: flex; flex-direction: column; gap: 9px; }
    #quiz-tab-panel .qz-opt {
        display: flex; align-items: flex-start; gap: 12px;
        padding: 12px 15px; border-radius: 10px; border: 1.5px solid #dde6ef;
        background: #fff; cursor: pointer; font-size: 14px; color: #2c3e50;
        line-height: 1.5; text-align: left; width: 100%;
        font-family: 'Source Sans 3', sans-serif; font-weight: 300;
        transition: border-color 0.15s, background 0.15s;
    }
    #quiz-tab-panel .qz-opt:hover:not(:disabled) { border-color: #a0bcd4; background: #f4f8fc; }
    #quiz-tab-panel .qz-opt .qz-letter {
        font-size: 11px; font-weight: 600; color: #8a9bac;
        min-width: 20px; height: 20px; border-radius: 50%; background: #f0f4f8;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0; margin-top: 1px;
    }
    #quiz-tab-panel .qz-opt.qz-selected           { border-color: #1a4a6e; background: #eaf1f9; }
    #quiz-tab-panel .qz-opt.qz-selected .qz-letter { background: #1a4a6e; color: #fff; }
    #quiz-tab-panel .qz-opt.qz-correct            { border-color: #1a7a5e; background: #eaf5f0; color: #1a3d2e; }
    #quiz-tab-panel .qz-opt.qz-correct .qz-letter { background: #1a7a5e; color: #fff; }
    #quiz-tab-panel .qz-opt.qz-wrong              { border-color: #c0392b; background: #fdf0ee; color: #7a1f18; }
    #quiz-tab-panel .qz-opt.qz-wrong .qz-letter   { background: #c0392b; color: #fff; }
    #quiz-tab-panel .qz-opt.qz-missed             { border-color: #1a7a5e; background: #d4ede5; color: #1a3d2e; }
    #quiz-tab-panel .qz-opt.qz-missed .qz-letter  { background: #1a7a5e; color: #fff; }
    #quiz-tab-panel .qz-opt:disabled { cursor: default; }
    /* Feedback box — shown after user picks an answer */
    #quiz-tab-panel .qz-feedback {
        margin-top: 14px;
        padding: 11px 14px;
        border-radius: 0 8px 8px 0;
        font-size: 13px;
        line-height: 1.55;
    }
    #quiz-tab-panel .qz-feedback.qz-fb-correct {
        background: #eaf5f0;
        color: #1a5a3e;
        border-left: 3px solid #1a7a5e;
    }
    #quiz-tab-panel .qz-feedback.qz-fb-wrong {
        background: #fdf0ee;
        color: #7a2a20;
        border-left: 3px solid #c0392b;
    }
    #quiz-tab-panel .qz-feedback strong { font-weight: 600; }

    /* Button row */
    #quiz-tab-panel .qz-btn-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
    #quiz-tab-panel .qz-btn-skip {
        background: none; border: none; font-size: 13px; color: #8a9bac;
        cursor: pointer; padding: 6px 4px;
        font-family: 'Source Sans 3', sans-serif; font-weight: 300;
    }
    #quiz-tab-panel .qz-btn-skip:hover { color: #4a6a8a; }
    #quiz-tab-panel .qz-btn-next {
        background: #1a4a6e; color: #fff; border: none; border-radius: 99px;
        padding: 10px 28px; font-size: 14px;
        font-family: 'Source Sans 3', sans-serif; font-weight: 600;
        cursor: pointer; letter-spacing: 0.02em; transition: background 0.15s;
    }
    #quiz-tab-panel .qz-btn-next:hover:not(:disabled) { background: #163d5c; }
    #quiz-tab-panel .qz-btn-next:disabled { background: #c5d3de; cursor: default; }
    /* Start / outline buttons */
    #quiz-tab-panel .qz-btn-start {
        background: #1a4a6e; color: #fff; border: none; border-radius: 99px;
        padding: 12px 36px; font-size: 15px;
        font-family: 'Source Sans 3', sans-serif; font-weight: 600;
        cursor: pointer; margin-top: 8px; letter-spacing: 0.02em; transition: background 0.15s;
    }
    #quiz-tab-panel .qz-btn-start:hover { background: #163d5c; }
    #quiz-tab-panel .qz-btn-outline {
        background: #fff; border: 1.5px solid #1a4a6e; color: #1a4a6e;
        border-radius: 99px; padding: 10px 24px; font-size: 13px;
        font-family: 'Source Sans 3', sans-serif; font-weight: 600;
        cursor: pointer; transition: background 0.15s;
    }
    #quiz-tab-panel .qz-btn-outline:hover { background: #eaf1f9; }
    /* Chips */
    #quiz-tab-panel .qz-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 14px 0 22px; }
    #quiz-tab-panel .qz-chip  { font-size: 12px; font-weight: 400; color: #4a6a8a; background: #e8f0f8; border-radius: 99px; padding: 5px 14px; }
    /* Parts list on start screen */
    #quiz-tab-panel .qz-parts-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 22px; text-align: left; }
    #quiz-tab-panel .qz-part-row {
        display: flex; align-items: center; gap: 12px;
        background: #f4f8fc; border: 1.5px solid #dde6ef;
        border-radius: 10px; padding: 10px 14px;
    }
    #quiz-tab-panel .qz-part-num {
        font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
        color: #fff; background: #1a4a6e;
        border-radius: 99px; padding: 3px 10px; white-space: nowrap; flex-shrink: 0;
    }
    #quiz-tab-panel .qz-part-row-label { font-size: 13px; color: #2c3e50; font-weight: 400; }
    #quiz-tab-panel .qz-part-row-count { font-size: 11px; color: #8a9bac; margin-left: auto; white-space: nowrap; flex-shrink: 0; }
    /* Score circle */
    #quiz-tab-panel .qz-score-circle {
        width: 120px; height: 120px; border-radius: 50%;
        background: linear-gradient(135deg, #1a4a6e, #1a7a5e);
        margin: 0 auto 18px;
        display: flex; flex-direction: column; align-items: center; justify-content: center;
    }
    #quiz-tab-panel .qz-score-pct  { font-family: 'Playfair Display', serif; font-size: 32px; color: #fff; line-height: 1; }
    #quiz-tab-panel .qz-score-frac { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }
    #quiz-tab-panel .qz-result-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: #1a4a6e; margin-bottom: 8px; }
    #quiz-tab-panel .qz-result-msg   { font-size: 14px; color: #6b7c8d; line-height: 1.65; max-width: 400px; margin: 0 auto 20px; }
    /* Breakdown */
    #quiz-tab-panel .qz-breakdown { border-top: 1px solid #e8eef4; margin-top: 16px; padding-top: 14px; }
    #quiz-tab-panel .qz-bd-label-hd { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: #8a9bac; margin-bottom: 10px; }
    #quiz-tab-panel .qz-bd-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f4f8; font-size: 13px; }
    #quiz-tab-panel .qz-bd-row:last-child { border-bottom: none; }
    #quiz-tab-panel .qz-bd-label { color: #4a6a8a; }
    #quiz-tab-panel .qz-bd-score         { font-weight: 600; }
    #quiz-tab-panel .qz-bd-score.qz-good { color: #1a7a5e; }
    #quiz-tab-panel .qz-bd-score.qz-mid  { color: #c8972a; }
    #quiz-tab-panel .qz-bd-score.qz-low  { color: #c0392b; }
    /* Result buttons */
    #quiz-tab-panel .qz-result-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
    /* Screens */
    #quiz-tab-panel .qz-screen        { display: none; }
    #quiz-tab-panel .qz-screen.active { display: block; }
    /* Review */
    #quiz-tab-panel .qz-rev-item { margin-bottom: 14px; }
    #quiz-tab-panel .qz-rev-part { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #8a9bac; margin-bottom: 8px; }
    #quiz-tab-panel .qz-rev-q    { font-size: 14px; color: #1e2d3d; margin-bottom: 10px; line-height: 1.5; }
    #quiz-tab-panel .qz-rev-q em { font-style: normal; font-weight: 600; color: #1a4a6e; }
    #quiz-tab-panel .qz-back-link {
        font-size: 13px; color: #1a4a6e; background: none; border: none;
        cursor: pointer; font-family: 'Source Sans 3', sans-serif;
        padding: 0 0 20px 0; display: block; font-weight: 600;
    }
    .qz-back-link:hover { color: #163d5c; }
    /* Previous attempt banner */
    .qz-prev-banner {
        display: flex; align-items: flex-start; gap: 10px;
        border-radius: 10px; padding: 11px 14px; margin-bottom: 18px;
        font-size: 13px; line-height: 1.5;
    }
    .qz-prev-banner.passed { background: #f0fdf4; border: 1px solid #86efac; color: #166634; align-items: center; }
    .qz-prev-banner.failed { background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; }
    .qz-prev-banner strong { font-weight: 600; }
    /* Empty state */
    #quiz-tab-panel .qz-empty { text-align: center; padding: 40px 20px; color: #8a9bac; font-size: 14px; }

    /* ── Part intro / transition screen ── */
    #quiz-tab-panel .qz-part-intro-card {
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 4px 22px rgba(26,74,110,0.09);
        padding: 36px 30px;
        margin-bottom: 16px;
        text-align: center;
    }
    #quiz-tab-panel .qz-part-intro-label {
        font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
        text-transform: uppercase; color: #8a9bac; margin-bottom: 8px;
    }
    #quiz-tab-panel .qz-part-intro-title {
        font-family: 'Playfair Display', serif;
        font-size: 1.4rem; color: #1a4a6e;
        margin-bottom: 10px; line-height: 1.3;
    }
    #quiz-tab-panel .qz-part-intro-meta  { font-size: 13px; color: #8a9bac; margin-bottom: 24px; }
    #quiz-tab-panel .qz-part-intro-tip {
        background: #fdf6e8; border-left: 3px solid #c8972a;
        border-radius: 0 8px 8px 0; padding: 11px 14px;
        font-size: 13px; color: #7a5a1a; line-height: 1.55;
        text-align: left; margin-bottom: 24px;
    }
    #quiz-tab-panel .qz-part-intro-tip strong { color: #5a3e0a; font-weight: 600; }
    /* Part progress pips */
    #quiz-tab-panel .qz-part-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; }
    #quiz-tab-panel .qz-part-pip { height: 5px; border-radius: 99px; background: #e8eef4; flex: 1; max-width: 60px; transition: background 0.3s; }
    #quiz-tab-panel .qz-part-pip.done    { background: #1a7a5e; }
    #quiz-tab-panel .qz-part-pip.current { background: #1a4a6e; }

    #lv-cel-overlay {
        position:fixed; inset:0; z-index:9999;
        background:rgba(0,0,0,0.55); backdrop-filter:blur(4px);
        display:none; align-items:center; justify-content:center; padding:20px;
    }
    #lv-cel-overlay.cel-visible  { display:flex; animation:lvFadeIn  .4s ease both; }
    #lv-cel-overlay.cel-hiding   { display:flex; animation:lvFadeOut .35s ease both; }
    @keyframes lvFadeIn  { from{opacity:0} to{opacity:1} }
    @keyframes lvFadeOut { from{opacity:1} to{opacity:0} }

    #lv-cel-card {
        position:relative; width:100%; max-width:560px;
        background:#efefed; border-radius:16px;
        border:0.5px solid rgba(0,0,0,0.1); overflow:hidden;
        padding:40px 30px 36px; text-align:center;
    }
    #lv-cel-card.cel-card-in  { animation:lvCardPop  .45s cubic-bezier(0.34,1.56,0.64,1) .1s both; }
    @keyframes lvCardPop { from{transform:scale(.85);opacity:0} to{transform:scale(1);opacity:1} }

    #lv-cel-canvas { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }

    #lv-cel-close {
        position:absolute; top:14px; right:16px; background:none; border:none;
        font-size:1.3rem; color:#888; cursor:pointer; z-index:2; line-height:1;
        padding:4px 6px; border-radius:6px; transition:color .15s,background .15s;
    }
    #lv-cel-close:hover { color:#333; background:rgba(0,0,0,.07); }

    .lv-cel-badge { position:relative; z-index:2; margin-bottom:16px; }
    .lv-cel-badge svg { display:block; margin:0 auto; }
    .cel-card-in .lv-cel-badge svg { animation:lvShimmer 2.4s ease-in-out 1s infinite; }
    @keyframes lvShimmer { 0%,100%{transform:rotate(-4deg) scale(1)} 50%{transform:rotate(4deg) scale(1.06)} }

    .lv-cel-title {
        font-family:Georgia,'Times New Roman',serif; font-size:1.9rem; font-weight:700;
        color:#1a4a6e; margin:0 0 8px; position:relative; z-index:2;
    }
    .lv-cel-sub {
        font-size:1rem; color:#5f5e5a; margin:0 0 22px; position:relative; z-index:2; line-height:1.6;
    }
    .lv-cel-pills {
        display:flex; gap:8px; flex-wrap:wrap; justify-content:center;
        margin-bottom:24px; position:relative; z-index:2;
    }
    .lv-cel-pill {
        font-size:12px; font-weight:600; padding:5px 14px; border-radius:999px;
        border:0.5px solid rgba(0,0,0,.18); background:#fff; color:#5f5e5a;
    }
    #lv-cel-timer-bar {
        position:absolute; bottom:0; left:0; height:3px;
        background:linear-gradient(90deg,#1a7a5e,#1a4a6e);
        width:100%; transform-origin:left; transform:scaleX(1);
    }
    #lv-cel-timer-bar.cel-ticking { animation:lvTimerShrink 8s linear .5s both; }
    @keyframes lvTimerShrink { from{transform:scaleX(1)} to{transform:scaleX(0)} }
    .lv-cel-btns {
        display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
        position:relative; z-index:2;
    }
    .lv-cel-btn-primary {
        background:#1a4a6e; color:#fff; border:none; border-radius:999px;
        padding:11px 30px; font-size:14px; font-weight:600; cursor:pointer; transition:background .15s;
    }
    .lv-cel-btn-primary:hover { background:#163d5c; }
    .lv-cel-btn-outline {
        background:transparent; border:1.5px solid #1a4a6e; color:#1a4a6e;
        border-radius:999px; padding:10px 24px; font-size:14px; font-weight:600;
        cursor:pointer; transition:background .15s;
    }
    .lv-cel-btn-outline:hover { background:#eaf1f9; }

    @media (max-width: 768px) {
        .custom-nav-pills .nav-link { width: 46%; padding: 10px 10px; }
        .custom-nav-pills .mobileQuizBtn { width: 100%; margin-top: 8px; }
        .vocab-list-group .vocab-list-titles { display: block !important;}
        .modern-hero { padding: 2rem 1rem 2rem 1rem; }
    }

    .qz-feedback {
        margin-top: 14px;
        padding: 12px 16px;
        border-radius: 0 8px 8px 0;
        font-size: 13px;
        line-height: 1.55;
        display: block;
    }
    .qz-feedback.correct {
        background: #eaf5f0;
        color: #1a5a3e;
        border-left: 4px solid #1a7a5e;
    }
    .qz-feedback.wrong {
        background: #fdf0ee;
        color: #7a2a20;
        border-left: 4px solid #c0392b;
    }
    #quiz-tab-panel .qz-opt.correct {
        border-color: #1a7a5e;
        background: #eaf5f0;
        color: #1a3d2e;
    }
    #quiz-tab-panel .qz-opt.correct .qz-letter {
        background: #1a7a5e;
        color: #fff;
    }
    #quiz-tab-panel .qz-opt.wrong {
        border-color: #c0392b;
        background: #fdf0ee;
        color: #7a1f18;
    }
    .qz-opt.wrong .qz-letter {
        background: #c0392b;
        color: #fff;
    }
    #quiz-tab-panel .qz-opt.missed {
        border-color: #1a7a5e;
        background: #d4ede5;
        color: #1a3d2e;
    }
    #quiz-tab-panel .qz-opt.missed .qz-letter {
        background: #1a7a5e;
        color: #fff;
    }
    /* ── Locked card ──────────────────────────────────────────────────────── */
    .card-locked {
        opacity: 0.72;
        filter: grayscale(35%);
        transition: opacity 0.2s, filter 0.2s;
    }
    .card-locked:hover {
        opacity: 0.82;
        filter: grayscale(20%);
    }

    /* Lock icon on thumbnail (mirrors play-icon-glass style) */
    .locked-overlay {
        background: rgba(0, 0, 0, 0.45) !important;
    }
    .lock-icon-glass {
        background: rgba(255, 255, 255, 0.18);
        backdrop-filter: blur(6px);
        border: 1.5px solid rgba(255, 255, 255, 0.35);
        border-radius: 50%;
        width: 56px;
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        color: #fff;
    }

    /* Locked button */
    .btn-modern-locked {
        background: #e5e7eb;
        color: #9ca3af;
        border: none;
        cursor: not-allowed;
    }
    .btn-modern-locked:hover {
        background: #e5e7eb;
        color: #9ca3af;
    }

    /* Hint text under locked button */
    .locked-hint {
        font-size: 0.78rem;
        color: #9ca3af !important;
    }