/**
 * GLOBAL LESSON STYLES - Fizyka
 * Wspólne style dla wszystkich lekcji fizyki
 * v2.0 - Improved spacing & readability
 */

/* ============================================
   BASE LESSON CONTAINER
   ============================================ */
.lesson {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: #ffffff;
    color: #111827;
    padding: 60px 56px;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    font-size: 18px;
    line-height: 2;
}

body.dark-mode .lesson,
body:not(.light-mode) .lesson {
    background: #111827;
    color: #f3f4f6;
}

/* ============================================
   HEADER & TITLE
   ============================================ */
.lesson-header {
    text-align: center;
    margin-bottom: 56px;
}

.lesson-title {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
    padding-bottom: 16px;
    border-bottom: 4px solid var(--lesson-accent, #4f46e5);
}

body.dark-mode .lesson-title,
body:not(.light-mode) .lesson-title {
    color: #fff;
    border-color: var(--lesson-accent-dark, #7c3aed);
}

.lesson-subtitle {
    font-size: 19px;
    color: #6b7280;
    margin: 20px 0 0;
    line-height: 1.6;
}

body.dark-mode .lesson-subtitle,
body:not(.light-mode) .lesson-subtitle {
    color: #9ca3af;
}

/* ============================================
   META INFO (Badges, Time, etc.)
   ============================================ */
.lesson-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    margin-bottom: 48px;
    border-bottom: 2px solid #e5e7eb;
}

body.dark-mode .lesson-meta,
body:not(.light-mode) .lesson-meta {
    border-color: #374151;
}

.lesson-badge {
    background: var(--lesson-accent, #4f46e5);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.lesson-info {
    color: #9ca3af;
    font-size: 15px;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 72px 0 36px;
    text-align: center;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}

body.dark-mode .section-title,
body:not(.light-mode) .section-title {
    color: #fff;
    border-color: #1f2937;
}

.section-title-left {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 64px 0 32px;
    padding-left: 20px;
    border-left: 5px solid var(--lesson-accent, #4f46e5);
}

body.dark-mode .section-title-left,
body:not(.light-mode) .section-title-left {
    color: #fff;
    border-color: var(--lesson-accent-dark, #7c3aed);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.lesson p {
    color: #374151;
    margin-bottom: 28px;
    font-size: 18px;
    line-height: 2;
}

body.dark-mode .lesson p,
body:not(.light-mode) .lesson p {
    color: #d1d5db;
}

.lesson strong {
    color: #111827;
    font-weight: 600;
}

body.dark-mode .lesson strong,
body:not(.light-mode) .lesson strong {
    color: #fff;
}

.lesson ul, .lesson ol {
    margin: 28px 0;
    padding-left: 32px;
    color: #374151;
}

body.dark-mode .lesson ul,
body:not(.light-mode) .lesson ul,
body.dark-mode .lesson ol,
body:not(.light-mode) .lesson ol {
    color: #d1d5db;
}

.lesson li {
    margin-bottom: 14px;
    line-height: 1.8;
}

/* ============================================
   INFO BOXES (różne kolory)
   ============================================ */
.info-box {
    background: #f0f9ff;
    border-left: 5px solid #0ea5e9;
    padding: 28px 32px;
    border-radius: 0 20px 20px 0;
    margin: 40px 0;
}

body.dark-mode .info-box,
body:not(.light-mode) .info-box {
    background: rgba(14,165,233,0.1);
}

.info-box.yellow {
    background: #fffbeb;
    border-color: #f59e0b;
}

body.dark-mode .info-box.yellow,
body:not(.light-mode) .info-box.yellow {
    background: rgba(245,158,11,0.1);
}

.info-box.green {
    background: #ecfdf5;
    border-color: #10b981;
}

body.dark-mode .info-box.green,
body:not(.light-mode) .info-box.green {
    background: rgba(16,185,129,0.1);
}

.info-box.purple {
    background: #faf5ff;
    border-color: #8b5cf6;
}

body.dark-mode .info-box.purple,
body:not(.light-mode) .info-box.purple {
    background: rgba(139,92,246,0.1);
}

.info-box.red {
    background: #fef2f2;
    border-color: #ef4444;
}

body.dark-mode .info-box.red,
body:not(.light-mode) .info-box.red {
    background: rgba(239,68,68,0.1);
}

.info-box.indigo {
    background: #eef2ff;
    border-color: #6366f1;
}

body.dark-mode .info-box.indigo,
body:not(.light-mode) .info-box.indigo {
    background: rgba(99,102,241,0.1);
}

.info-box-title {
    font-weight: 700;
    font-size: 17px;
    color: #0369a1;
    margin-bottom: 12px;
}

body.dark-mode .info-box-title,
body:not(.light-mode) .info-box-title {
    color: #38bdf8;
}

.info-box.yellow .info-box-title { color: #b45309; }
body.dark-mode .info-box.yellow .info-box-title,
body:not(.light-mode) .info-box.yellow .info-box-title { color: #fbbf24; }

.info-box.green .info-box-title { color: #059669; }
body.dark-mode .info-box.green .info-box-title,
body:not(.light-mode) .info-box.green .info-box-title { color: #34d399; }

.info-box.purple .info-box-title { color: #7c3aed; }
body.dark-mode .info-box.purple .info-box-title,
body:not(.light-mode) .info-box.purple .info-box-title { color: #a78bfa; }

.info-box.red .info-box-title { color: #dc2626; }
body.dark-mode .info-box.red .info-box-title,
body:not(.light-mode) .info-box.red .info-box-title { color: #f87171; }

.info-box.indigo .info-box-title { color: #4338ca; }
body.dark-mode .info-box.indigo .info-box-title,
body:not(.light-mode) .info-box.indigo .info-box-title { color: #a5b4fc; }

.info-box p {
    margin-bottom: 12px;
    line-height: 1.9;
}

.info-box ul, .info-box ol {
    margin: 16px 0;
}

.info-box li {
    margin-bottom: 10px;
}

/* ============================================
   FORMULA BOX
   ============================================ */
.formula-box {
    background: #fafafa;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 32px 36px;
    margin: 40px 0;
    text-align: center;
}

body.dark-mode .formula-box,
body:not(.light-mode) .formula-box {
    background: #1f2937;
    border-color: #374151;
}

.formula-box.accent {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(139,92,246,0.06));
    border-color: var(--lesson-accent, #6366f1);
    border-width: 3px;
}

body.dark-mode .formula-box.accent,
body:not(.light-mode) .formula-box.accent {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
}

.formula-main {
    font-size: 26px;
    margin-bottom: 16px;
    color: #111827;
    line-height: 1.6;
}

body.dark-mode .formula-main,
body:not(.light-mode) .formula-main {
    color: #fff;
}

.formula-legend {
    font-size: 15px;
    color: #6b7280;
    line-height: 2;
    margin-top: 8px;
}

body.dark-mode .formula-legend,
body:not(.light-mode) .formula-legend {
    color: #9ca3af;
}

/* ============================================
   DEFINITION CARDS
   ============================================ */
.definition-card {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px 36px;
    margin: 40px 0;
}

body.dark-mode .definition-card,
body:not(.light-mode) .definition-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-color: #334155;
}

.definition-term {
    font-size: 22px;
    font-weight: 700;
    color: var(--lesson-accent, #4f46e5);
    margin-bottom: 16px;
}

body.dark-mode .definition-term,
body:not(.light-mode) .definition-term {
    color: var(--lesson-accent-dark, #818cf8);
}

.definition-text {
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

body.dark-mode .definition-text,
body:not(.light-mode) .definition-text {
    color: #d1d5db;
}

/* ============================================
   INTERACTIVE CONTAINERS
   ============================================ */
.interactive-container {
    margin: 48px 0;
    padding: 36px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
}

body.dark-mode .interactive-container,
body:not(.light-mode) .interactive-container {
    background: #1e293b;
    border-color: #374151;
}

.interactive-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 24px;
}

body.dark-mode .interactive-title,
body:not(.light-mode) .interactive-title {
    color: #e5e7eb;
}

.interactive-hint {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

body.dark-mode .interactive-hint,
body:not(.light-mode) .interactive-hint {
    color: #9ca3af;
}

/* ============================================
   GRAPH AREAS & SVG
   ============================================ */
.graph-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
    align-items: start;
}

.graph-area {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    padding: 24px;
    position: relative;
}

body.dark-mode .graph-area,
body:not(.light-mode) .graph-area {
    background: #0f172a;
    border-color: #334155;
}

/* SVG improvements */
.task-graph {
    background: #f8fafc;
    border-radius: 16px;
    padding: 32px;
    margin: 24px 0 28px;
}

body.dark-mode .task-graph,
body:not(.light-mode) .task-graph {
    background: #0f172a;
}

.task-graph svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* SVG Dark Mode Fixes */
body.dark-mode .graph-area text,
body:not(.light-mode) .graph-area text,
body.dark-mode .task-graph text,
body:not(.light-mode) .task-graph text {
    fill: #94a3b8 !important;
}

body.dark-mode .graph-area line[stroke="#e5e7eb"],
body:not(.light-mode) .graph-area line[stroke="#e5e7eb"],
body.dark-mode .task-graph line[stroke="#e5e7eb"],
body:not(.light-mode) .task-graph line[stroke="#e5e7eb"] {
    stroke: #334155 !important;
}

body.dark-mode .graph-area polygon,
body:not(.light-mode) .graph-area polygon,
body.dark-mode .task-graph polygon,
body:not(.light-mode) .task-graph polygon {
    fill: #94a3b8 !important;
}

/* ============================================
   PARAMS DISPLAY (Values boxes)
   ============================================ */
.params-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.param-box {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
}

body.dark-mode .param-box,
body:not(.light-mode) .param-box {
    background: #1e293b;
    border-color: #374151;
}

.param-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

body.dark-mode .param-label,
body:not(.light-mode) .param-label {
    color: #9ca3af;
}

.param-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

body.dark-mode .param-value,
body:not(.light-mode) .param-value {
    color: #fff;
}

.param-unit {
    font-size: 14px;
    color: #6b7280;
}

/* ============================================
   TASK CARDS (Zadania)
   ============================================ */
.task-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    margin: 40px 0;
    overflow: hidden;
}

body.dark-mode .task-card,
body:not(.light-mode) .task-card {
    background: #1f2937;
    border-color: #374151;
}

.task-card.done {
    border-color: #10b981;
    border-width: 3px;
}

.task-header {
    padding: 20px 28px;
    background: #eef2ff;
    border-bottom: 2px solid #c7d2fe;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

body.dark-mode .task-header,
body:not(.light-mode) .task-header {
    background: rgba(99,102,241,0.15);
    border-color: #4f46e5;
}

.task-num {
    font-weight: 700;
    font-size: 14px;
    color: #4338ca;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 6px 14px;
    background: rgba(67, 56, 202, 0.1);
    border-radius: 8px;
}

body.dark-mode .task-num,
body:not(.light-mode) .task-num {
    color: #a5b4fc;
    background: rgba(165, 180, 252, 0.1);
}

.task-question {
    flex: 1;
    font-size: 17px;
    color: #312e81;
    line-height: 1.7;
    min-width: 200px;
}

body.dark-mode .task-question,
body:not(.light-mode) .task-question {
    color: #e0e7ff;
}

.task-status {
    font-size: 13px;
    color: #4338ca;
    white-space: nowrap;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(67, 56, 202, 0.1);
    border-radius: 8px;
}

body.dark-mode .task-status,
body:not(.light-mode) .task-status {
    color: #a5b4fc;
    background: rgba(165, 180, 252, 0.1);
}

.task-card.done .task-status {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.task-body {
    padding: 28px 32px;
}

/* ============================================
   TASK OPTIONS (Multiple choice)
   ============================================ */
.task-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 700px) {
    .task-options {
        grid-template-columns: 1fr;
    }
}

.opt {
    padding: 18px 22px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 16px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    line-height: 1.6;
}

body.dark-mode .opt,
body:not(.light-mode) .opt {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}

.opt:hover:not(.locked) {
    border-color: var(--lesson-accent, #4f46e5);
    background: #eef2ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

body.dark-mode .opt:hover:not(.locked),
body:not(.light-mode) .opt:hover:not(.locked) {
    border-color: var(--lesson-accent, #6366f1);
    background: #1e1b4b;
}

.opt.correct {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
}

body.dark-mode .opt.correct,
body:not(.light-mode) .opt.correct {
    background: rgba(16,185,129,0.2) !important;
    color: #6ee7b7 !important;
}

.opt.wrong {
    background: #fee2e2 !important;
    border-color: #ef4444 !important;
    animation: shake 0.3s;
}

body.dark-mode .opt.wrong,
body:not(.light-mode) .opt.wrong {
    background: rgba(239,68,68,0.2) !important;
}

.opt.locked {
    cursor: default;
    opacity: 0.7;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ============================================
   SOLUTION / EXPLANATION BOX
   ============================================ */
.solution {
    display: none;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 20px;
}

body.dark-mode .solution,
body:not(.light-mode) .solution {
    background: rgba(16,185,129,0.1);
    border-color: #10b981;
}

.solution.show {
    display: block;
}

.solution-title {
    font-weight: 700;
    color: #166534;
    margin-bottom: 12px;
    font-size: 16px;
}

body.dark-mode .solution-title,
body:not(.light-mode) .solution-title {
    color: #6ee7b7;
}

.solution p {
    color: #166534;
    margin: 0;
    font-size: 16px;
    line-height: 1.8;
}

body.dark-mode .solution p,
body:not(.light-mode) .solution p {
    color: #bbf7d0;
}

/* ============================================
   EXAMPLE CARDS
   ============================================ */
.example-card {
    background: linear-gradient(135deg, #fefce8, #fef9c3);
    border: 2px solid #fde047;
    border-radius: 20px;
    padding: 32px 36px;
    margin: 40px 0;
}

body.dark-mode .example-card,
body:not(.light-mode) .example-card {
    background: linear-gradient(135deg, rgba(253,224,71,0.1), rgba(250,204,21,0.1));
    border-color: #ca8a04;
}

.example-title {
    font-weight: 700;
    color: #a16207;
    margin-bottom: 20px;
    font-size: 18px;
}

body.dark-mode .example-title,
body:not(.light-mode) .example-title {
    color: #fde047;
}

.example-content {
    color: #713f12;
    line-height: 1.9;
}

body.dark-mode .example-content,
body:not(.light-mode) .example-content {
    color: #fef9c3;
}

.example-content p {
    margin-bottom: 16px;
}

/* ============================================
   UNITS TABLE
   ============================================ */
.units-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 40px 0;
    font-size: 16px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

body.dark-mode .units-table,
body:not(.light-mode) .units-table {
    border-color: #374151;
}

.units-table th,
.units-table td {
    padding: 18px 24px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .units-table th,
body:not(.light-mode) .units-table th,
body.dark-mode .units-table td,
body:not(.light-mode) .units-table td {
    border-color: #374151;
}

.units-table tr:last-child td {
    border-bottom: none;
}

.units-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #374151;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

body.dark-mode .units-table th,
body:not(.light-mode) .units-table th {
    background: #1e293b;
    color: #e5e7eb;
}

.units-table td {
    color: #374151;
    background: #fff;
}

body.dark-mode .units-table td,
body:not(.light-mode) .units-table td {
    color: #d1d5db;
    background: #111827;
}

/* ============================================
   STEP-BY-STEP (Kroki rozwiązania)
   ============================================ */
.steps-container {
    margin: 40px 0;
}

.step-item {
    display: flex;
    gap: 20px;
    margin-bottom: 28px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--lesson-accent, #4f46e5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.step-content {
    flex: 1;
    padding-top: 10px;
}

.step-content strong {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 17px;
}

body.dark-mode .step-content strong,
body:not(.light-mode) .step-content strong {
    color: #fff;
}

/* ============================================
   VISUALIZATION BOXES (Side by side)
   ============================================ */
.viz-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin: 40px 0;
}

.viz-box {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
}

body.dark-mode .viz-box,
body:not(.light-mode) .viz-box {
    background: #1e293b;
    border-color: #374151;
}

.viz-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

body.dark-mode .viz-title,
body:not(.light-mode) .viz-title {
    color: #fff;
}

.viz-box p {
    margin-bottom: 12px;
    line-height: 1.8;
}

.viz-description {
    font-size: 15px;
    color: #6b7280;
    margin-top: 20px;
    line-height: 1.7;
}

body.dark-mode .viz-description,
body:not(.light-mode) .viz-description {
    color: #9ca3af;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--lesson-accent, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79,70,229,0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: transparent;
    color: var(--lesson-accent, #4f46e5);
    border: 2px solid var(--lesson-accent, #4f46e5);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--lesson-accent, #4f46e5);
    color: #fff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .lesson {
        padding: 32px 20px;
    }
    
    .lesson-title {
        font-size: 26px;
    }
    
    .section-title {
        font-size: 22px;
        margin: 56px 0 28px;
    }
    
    .lesson p {
        font-size: 17px;
    }
    
    .graph-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .params-display {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .formula-main {
        font-size: 20px;
    }
    
    .viz-grid {
        grid-template-columns: 1fr;
    }
    
    .info-box {
        padding: 24px;
    }
    
    .formula-box {
        padding: 24px;
    }
    
    .task-body {
        padding: 20px;
    }
}

/* ============================================
   COLOR THEMES (Variables per lesson)
   ============================================ */

/* Blue theme */
.lesson.theme-blue {
    --lesson-accent: #0ea5e9;
    --lesson-accent-dark: #38bdf8;
}

/* Purple theme */
.lesson.theme-purple {
    --lesson-accent: #8b5cf6;
    --lesson-accent-dark: #a78bfa;
}

/* Indigo theme */
.lesson.theme-indigo {
    --lesson-accent: #6366f1;
    --lesson-accent-dark: #818cf8;
}

/* Green theme */
.lesson.theme-green {
    --lesson-accent: #10b981;
    --lesson-accent-dark: #34d399;
}

/* Orange theme */
.lesson.theme-orange {
    --lesson-accent: #f97316;
    --lesson-accent-dark: #fb923c;
}

/* Red theme */
.lesson.theme-red {
    --lesson-accent: #ef4444;
    --lesson-accent-dark: #f87171;
}

/* Cyan theme */
.lesson.theme-cyan {
    --lesson-accent: #06b6d4;
    --lesson-accent-dark: #22d3ee;
}

/* ============================================
   CONGRATULATIONS SECTION
   ============================================ */
.congrats-section {
    text-align: center;
    padding: 56px 32px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(52,211,153,0.1));
    border-radius: 24px;
    margin-top: 64px;
}

body.dark-mode .congrats-section,
body:not(.light-mode) .congrats-section {
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(52,211,153,0.15));
}

.congrats-emoji {
    font-size: 72px;
    margin-bottom: 20px;
}

.congrats-title {
    font-size: 36px;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 16px;
}

.congrats-text {
    font-size: 18px;
    color: #059669;
    line-height: 1.8;
}

body.dark-mode .congrats-text,
body:not(.light-mode) .congrats-text {
    color: #6ee7b7;
}

/* ============================================
   NEXT LESSON SECTION
   ============================================ */
.next-section {
    margin-top: 64px;
    padding: 40px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 24px;
    text-align: center;
}

body.dark-mode .next-section,
body:not(.light-mode) .next-section {
    background: linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.05) 100%);
}

.next-section h3 {
    font-size: 24px;
    color: #065f46;
    margin: 0 0 12px;
}

body.dark-mode .next-section h3,
body:not(.light-mode) .next-section h3 {
    color: #6ee7b7;
}

.next-section p {
    color: #047857;
    margin-bottom: 28px;
    font-size: 17px;
}

body.dark-mode .next-section p,
body:not(.light-mode) .next-section p {
    color: #a7f3d0;
}

.btn-next {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--lesson-accent, #10b981);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(16,185,129,0.3);
}

.btn-next:hover {
    filter: brightness(1.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16,185,129,0.4);
}

.btn-next i {
    transition: transform 0.2s;
}

.btn-next:hover i {
    transform: translateX(5px);
}

/* ============================================
   PROGRESS BOX (Fixed position)
   ============================================ */
.progress-box {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background: #fff;
    border: 3px solid var(--lesson-accent, #10b981);
    border-radius: 20px;
    padding: 20px 24px;
    width: 220px;
    box-shadow: 0 8px 32px rgba(16,185,129,0.25);
    z-index: 1000;
}

body.dark-mode .progress-box,
body:not(.light-mode) .progress-box {
    background: #1f2937;
}

.progress-label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
}

body.dark-mode .progress-label,
body:not(.light-mode) .progress-label {
    color: #e5e7eb;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

body.dark-mode .progress-bar,
body:not(.light-mode) .progress-bar {
    background: #374151;
}

.progress-fill {
    height: 100%;
    background: var(--lesson-accent, #10b981);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-count {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    font-weight: 600;
}

body.dark-mode .progress-count,
body:not(.light-mode) .progress-count {
    color: #9ca3af;
}

@media (max-width: 768px) {
    .progress-box {
        bottom: 16px;
        right: 16px;
        width: 180px;
        padding: 16px 20px;
    }
}

/* ============================================
   SOLUTION TOGGLE BUTTON
   ============================================ */
.solution-toggle {
    display: block;
    margin: 20px auto 0;
    padding: 12px 24px;
    border-radius: 999px;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

body.dark-mode .solution-toggle,
body:not(.light-mode) .solution-toggle {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

.solution-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

body.dark-mode .solution-toggle:hover,
body:not(.light-mode) .solution-toggle:hover {
    background: #374151;
}

/* ============================================
   TASK SOLUTION (Expandable)
   ============================================ */
.task-solution {
    background: #fffbeb;
    border-top: 2px solid #fcd34d;
    padding: 24px 28px;
    display: none;
    margin-top: 16px;
    border-radius: 0 0 20px 20px;
}

.task-solution.visible {
    display: block;
}

body.dark-mode .task-solution,
body:not(.light-mode) .task-solution {
    background: rgba(252,211,77,0.1);
    border-color: #ca8a04;
}

.task-solution .solution-title {
    font-weight: 700;
    font-size: 15px;
    color: #92400e;
    margin-bottom: 12px;
}

body.dark-mode .task-solution .solution-title,
body:not(.light-mode) .task-solution .solution-title {
    color: #fcd34d;
}

.task-solution .solution-content {
    font-size: 16px;
    color: #78350f;
    line-height: 1.8;
}

body.dark-mode .task-solution .solution-content,
body:not(.light-mode) .task-solution .solution-content {
    color: #fef3c7;
}

/* ============================================
   SPACER UTILITY CLASSES
   ============================================ */
.mt-sm { margin-top: 16px; }
.mt-md { margin-top: 32px; }
.mt-lg { margin-top: 48px; }
.mt-xl { margin-top: 64px; }

.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 32px; }
.mb-lg { margin-bottom: 48px; }
.mb-xl { margin-bottom: 64px; }

.text-center { text-align: center; }
.text-muted { color: #6b7280; }
body.dark-mode .text-muted { color: #9ca3af; }
