.lesson-intro {
    padding: 32px 0 30px;
    border-bottom: 1px solid var(--border);
}

.module-label {
    color: var(--teal-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.lesson-intro h2 {
    margin: 9px 0 10px;
    font-size: 20px;
}

.lesson-intro p {
    max-width: 800px;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.exercise-section {
    padding-top: 30px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section-heading span {
    font-size: 19px;
    font-weight: 800;
}

.section-heading small {
    color: var(--muted);
    font-size: 11px;
}

.exercise-card {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--panel);
}

.exercise-number {
    color: #b7c3d0;
    font-size: 13px;
    font-weight: 800;
}

.exercise-card h3 {
    margin: 8px 0 16px;
    font-size: 15px;
    line-height: 1.55;
}

.quiz-options {
    display: grid;
    gap: 8px;
    margin-bottom: 13px;
}

.quiz-option {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: transparent;
    color: #d5dee8;
    padding: 11px 12px;
    text-align: left;
    font-size: 12px;
}

.quiz-option:hover {
    background: var(--panel-2);
}

.quiz-option.selected {
    border-color: var(--teal-bright);
    background: #0d292b;
}

.feedback {
    min-height: 20px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
}

.feedback.success {
    color: var(--green);
}

.feedback.error {
    color: var(--danger);
}

.code-card {
    padding: 0;
    overflow: hidden;
}

.exercise-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--border);
}

.terminal-label {
    color: #dbe4ed;
    font-size: 12px;
    font-weight: 800;
}

.exercise-top h3 {
    margin: 5px 0 0;
}

.expected {
    display: grid;
    gap: 4px;
    padding: 15px 20px 12px;
    color: #cbd5df;
    font-size: 11px;
}

.expected span {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #070d13;
    padding: 9px 11px;
    color: white;
    font-family: Consolas, monospace;
}

#codeEditor {
    display: block;
    width: calc(100% - 28px);
    min-height: 180px;
    margin: 12px 14px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    resize: vertical;
    background: #1e1e1e;
    color: #e6edf3;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
}

#codeEditor:focus {
    border-color: var(--teal-bright);
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 14px 12px;
}

.shortcut {
    color: #718092;
    font-size: 10px;
    margin-left: 4px;
}

.output {
    min-height: 48px;
    margin: 0 14px 14px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #0a1118;
    color: #93a1b0;
    font-family: Consolas, monospace;
    font-size: 11px;
    white-space: pre-wrap;
}

.lesson-navigation {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 28px;
}

/* =========================================
   MENU LATERAL DO CURSO
========================================= */

.course-module {
    margin-bottom: 22px;
}

.course-module-title {
    display: flex;
    flex-direction: column;
    gap: 3px;

    margin-bottom: 8px;
    padding: 0 4px;
}

.course-module-title span {
    color: var(--teal-bright);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.course-module-title strong {
    color: #dce5ee;
    font-size: 11px;
    font-weight: 700;
}

.course-lesson {
    width: 100%;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 10px 9px;
    margin-bottom: 4px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;
    color: var(--muted);

    text-align: left;
    cursor: pointer;

    transition: .2s ease;
}

.course-lesson:hover {
    background: var(--panel);
    color: var(--text);
}

.course-lesson.active {
    background: rgba(10, 167, 162, .10);
    border-color: rgba(10, 167, 162, .30);
    color: white;
}

.course-lesson.completed {
    color: #dbe7e5;
}

.course-lesson-number {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: var(--panel-2);

    color: var(--teal-bright);
    font-size: 10px;
    font-weight: 800;
}

.course-lesson.completed .course-lesson-number {
    background: rgba(34, 197, 94, .14);
    color: var(--green);
}

.course-lesson-title {
    padding-top: 3px;

    font-size: 11px;
    line-height: 1.45;
}

.course-progress-fill {
    transition: width .35s ease;
}

/* =========================================
   BOTÃO MINHA ÁREA
========================================= */

#backToDashboard {
    width: 100%;
    height: 42px;

    display: flex;
    align-items: center;
    gap: 11px;

    margin: 6px 0 22px;
    padding: 0 13px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;
    color: #91a0b1;

    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


/* Ícone */

#backToDashboard span:first-child {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: rgba(249, 115, 22, 0.12);
    color: var(--orange);

    font-size: 14px;
}


/* Texto */

#backToDashboard span:last-child {
    flex: 1;
    text-align: left;
}


/* Hover */

#backToDashboard:hover {
    background: var(--panel);
    border-color: var(--border);

    color: white;

    transform: translateX(2px);
}


/* Hover do ícone */

#backToDashboard:hover span:first-child {
    background: rgba(249, 115, 22, 0.20);
}


/* Clique */

#backToDashboard:active {
    transform: translateX(2px) scale(0.98);
}

/* =========================================
   CODE&TALK — SCROLLBAR
========================================= */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #263746 #0b141d;
}


/* Chrome, Edge e Safari */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}


/* Fundo da barra */
::-webkit-scrollbar-track {
    background: #0b141d;
}


/* Parte que se movimenta */
::-webkit-scrollbar-thumb {
    background: #263746;
    border-radius: 20px;
    border: 2px solid #0b141d;
}


/* Quando passa o mouse */
::-webkit-scrollbar-thumb:hover {
    background: var(--teal-bright);
}


/* Cantinho quando existem
   scroll horizontal e vertical */
::-webkit-scrollbar-corner {
    background: #0b141d;
}

/* Scroll da sidebar */

.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #1e4b4c transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #1e4b4c;
    border-radius: 20px;
    border: none;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--teal-bright);
}

/* =========================================
   CODE&TALK — CONTEÚDO COMPLETO DA AULA
========================================= */

.lesson-content {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lesson-content > #lessonTheory {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.learning-block {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.learning-block:empty {
    display: none;
}

.learning-block h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 16px;
}

.learning-block p {
    margin: 0 0 12px;
    color: #b7c2ce;
    font-size: 14px;
    line-height: 1.8;
}

.learning-block p:last-child {
    margin-bottom: 0;
}

.learning-block ul {
    margin: 0;
    padding-left: 22px;
}

.learning-block li {
    margin-bottom: 9px;
    color: #b7c2ce;
    font-size: 14px;
    line-height: 1.7;
}

.learning-block code {
    padding: 2px 6px;
    border-radius: 5px;
    background: #081019;
    color: var(--teal-bright);
    font-family: Consolas, monospace;
}

.code-example {
    margin-top: 14px;
    padding: 18px;
    overflow-x: auto;

    background: #071018;
    border: 1px solid #263746;
    border-radius: 10px;

    color: #dce7ef;

    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
}

.learning-highlight {
    border-left: 3px solid var(--teal-bright);
}

.learning-warning {
    border-left: 3px solid var(--orange);
}

/* =========================================
   CODE&TALK — AULA COMPLETA
========================================= */

.lesson-topic {
    padding: 0 0 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--border);
}

.lesson-topic:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.lesson-topic h3 {
    margin-bottom: 14px;
    font-size: 18px;
}

.lesson-topic h4 {
    margin-bottom: 10px;
    color: var(--text);
}

.lesson-steps {
    padding-left: 22px;
    margin: 16px 0;
}

.lesson-steps li {
    margin-bottom: 10px;
    color: #b7c2ce;
    line-height: 1.7;
}

.lesson-note {
    margin-top: 16px;
    padding: 15px 17px;

    background: rgba(10, 167, 162, 0.08);
    border-left: 3px solid var(--teal-bright);
    border-radius: 7px;
}

.lesson-note strong {
    color: var(--teal-bright);
}

.lesson-note p {
    margin: 7px 0 0;
}

.common-errors-list {
    display: grid;
    gap: 12px;
}

.common-error {
    padding: 15px 17px;

    background: rgba(249, 115, 22, 0.06);
    border: 1px solid rgba(249, 115, 22, 0.16);
    border-radius: 9px;
}

.common-error strong {
    color: var(--orange);
}

.common-error p {
    margin: 6px 0 0;
}


/* VIDEO */

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;

    margin-top: 16px;

    overflow: hidden;
    border-radius: 12px;

    background: #05090d;
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.lesson-video {
    width: 100%;
    margin-top: 16px;

    border-radius: 12px;
    background: black;
}

.video-placeholder {
    min-height: 150px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin-top: 16px;
    padding: 25px;

    background: #071018;
    border: 1px dashed #30404f;
    border-radius: 12px;
}

.video-placeholder > span {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(249, 115, 22, 0.14);
    color: var(--orange);

    font-size: 20px;
}

.video-placeholder strong {
    color: var(--text);
}

.video-placeholder p {
    margin: 5px 0 0;
    color: var(--muted);
}

/* =========================================
   ENUNCIADO DOS DESAFIOS
========================================= */

.challenge-instructions {
    margin: 0 0 24px;
    padding: 18px 20px;

    background: rgba(10, 167, 162, 0.055);
    border: 1px solid rgba(10, 167, 162, 0.18);
    border-left: 3px solid var(--teal-bright);
    border-radius: 10px;
}

.challenge-instructions-title {
    display: flex;
    align-items: center;
    gap: 8px;

    margin-bottom: 10px;

    color: var(--teal-bright);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

#challengeInstructions {
    margin: 0;

    color: #c8d3dd;
    font-size: 14px;
    line-height: 1.8;

    white-space: pre-line;
}

/* =========================================
   CODE&TALK LAB V3 — MONACO + TERMINAL
========================================= */

.code-editor-shell {
    margin: 12px 14px;
    overflow: hidden;
    border: 1px solid #263746;
    border-radius: 10px;
    background: #1e1e1e;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
}

.code-editor-shell:focus-within {
    border-color: var(--teal-bright);
}

.code-editor-toolbar {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid #2a2d2e;
    background: #181818;
    color: #c8d3dd;
    font-size: 11px;
}

.editor-file {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 10px;
    border-top: 2px solid var(--teal-bright);
    background: #1f1f1f;
}

.python-icon { font-size: 13px; }
.editor-language { color: #8d9aa8; }

.monaco-editor-host {
    width: 100%;
    height: 300px;
    min-height: 220px;
    text-align: left;
}

.editor-actions {
    padding-top: 2px;
}

.terminal-shell {
    margin: 0 14px 14px;
    overflow: hidden;
    border: 1px solid #263746;
    border-radius: 10px;
    background: #090d12;
    font-family: Consolas, "Courier New", monospace;
}

.terminal-toolbar {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid #202832;
    background: #0d131a;
    color: #7f8d9c;
    font-size: 10px;
    letter-spacing: .04em;
}

.terminal-toolbar > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.terminal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal-bright);
    box-shadow: 0 0 10px rgba(10, 167, 162, .5);
}

.terminal-command {
    padding: 12px 14px 2px;
    color: #8b98a7;
    font-size: 11px;
}

.terminal-prompt {
    margin-right: 8px;
    color: var(--teal-bright);
    font-weight: 800;
}

.terminal-shell .output {
    min-height: 72px;
    margin: 0;
    padding: 10px 14px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d7e0e8;
    font-size: 12px;
    line-height: 1.65;
}

.terminal-shell.running .output { color: #facc15; }
.terminal-shell.success .output { color: #86efac; }
.terminal-shell.error .output { color: #fca5a5; }
.terminal-shell.info .output { color: #93c5fd; }

.challenge-navigation {
    display: flex;
    gap: 7px;
    padding: 0 14px 4px;
}

.challenge-tab {
    min-width: 34px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0b141d;
    color: #aab7c4;
    font-weight: 800;
    cursor: pointer;
}

.challenge-tab:hover,
.challenge-tab.active {
    border-color: var(--teal-bright);
    color: white;
    background: rgba(10, 167, 162, .12);
}

.challenge-tab.completed {
    border-color: rgba(34, 197, 94, .4);
    color: var(--green);
}

@media (max-width: 720px) {
    .monaco-editor-host { height: 260px; }
    .terminal-toolbar > span { display: none; }
}


/* =========================================
   CODE&TALK LAB V3.1 — CORREÇÃO DO HOST MONACO
   Neutraliza estilos herdados do antigo textarea
========================================= */
#codeEditor.monaco-editor-host {
    display: block;
    width: 100%;
    height: 300px;
    min-height: 220px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    resize: none;
    background: #1e1e1e;
    color: inherit;
    font-size: inherit;
    line-height: normal;
    box-sizing: border-box;
}

#codeEditor.monaco-editor-host:focus {
    border-color: transparent;
}

.code-editor-toolbar,
.terminal-toolbar {
    box-sizing: border-box;
}
