
    /* ========================================
       ESTILOS CSS COMPLETOS CON MODO OSCURO
       ======================================== */
    :root {
        --bg-color: #ffffff;
        --text-color: #1a1a1a;
        --primary-color: #0056b3;
        --secondary-color: #e9ecef;
        --accent-color: #ffc107;
        --code-bg: #282c34;
        --code-text: #abb2bf;
        --success: #28a745;
        --error: #dc3545;
        --border-radius: 8px;
        --transition: all 0.3s ease;
    }

    [data-theme="dark"] {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --primary-color: #4dabf7;
        --secondary-color: #1e1e1e;
        --accent-color: #ffd43b;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
        font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        background-color: var(--bg-color);
        color: var(--text-color);
        line-height: 1.6;
        transition: var(--transition);
    }

    .container { max-width: 900px; margin: 0 auto; padding: 20px; }

    .skip-link {
        position: absolute; top: -40px; left: 0; background: var(--primary-color);
        color: white; padding: 8px; z-index: 100; transition: top 0.3s;
    }
    .skip-link:focus { top: 0; }

    .page-header { border-bottom: 2px solid var(--primary-color); margin-bottom: 30px; padding-bottom: 15px; }
    .subtitle { font-style: italic; opacity: 0.8; }

    .theme-toggle-container { display: flex; justify-content: flex-end; margin-bottom: 20px; }
    .theme-toggle-btn {
        background: var(--secondary-color); border: 1px solid var(--primary-color);
        color: var(--text-color); padding: 10px 15px; border-radius: 20px; cursor: pointer;
        display: flex; align-items: center; gap: 8px; font-weight: bold;
    }

    .highlight-box {
        background: var(--secondary-color); border-left: 5px solid var(--primary-color);
        padding: 20px; margin: 25px 0; border-radius: var(--border-radius);
    }
    .highlight-title { font-weight: bold; color: var(--primary-color); margin-bottom: 10px; font-size: 1.2rem; }

    .python-code-box {
        background: var(--code-bg); color: var(--code-text);
        padding: 20px; border-radius: var(--border-radius); overflow-x: auto;
        font-family: 'Fira Code', 'Courier New', monospace; margin: 20px 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    .python-code-title { color: #61afef; margin-bottom: 10px; font-weight: bold; border-bottom: 1px solid #3e4451; }

    .python-prompt-box {
        background: #2c3e50; color: white; padding: 25px; border-radius: var(--border-radius);
        margin: 30px 0; border: 2px dashed var(--accent-color);
    }
    .python-prompt-content {
        background: rgba(255,255,255,0.1); padding: 15px; border-radius: 4px;
        font-family: monospace; margin: 15px 0; user-select: all;
    }

    .exercise-container {
        background: var(--bg-color); border: 2px solid var(--secondary-color);
        padding: 25px; border-radius: var(--border-radius); margin: 30px 0;
    }
    .option-btn {
        display: block; width: 100%; text-align: left; padding: 12px; margin: 10px 0;
        border: 1px solid var(--primary-color); background: transparent; color: var(--text-color);
        border-radius: 5px; cursor: pointer; transition: var(--transition);
    }
    .option-btn:hover:not(:disabled) { background: var(--secondary-color); }
    .option-btn.selected { background: var(--primary-color); color: white; }
    .option-letter { font-weight: bold; margin-right: 8px; }
    .option-letter::after { content: ")"; }
    
    .check-btn {
        background: var(--success); color: white; border: none; padding: 12px 25px;
        border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 15px; transition: background 0.3s;
    }
    .check-btn:hover:not(:disabled) { background: #218838; }
    .check-btn:disabled { opacity: 0.5; cursor: not-allowed; }

    .solution-area { display: none; margin-top: 15px; padding: 15px; border-radius: var(--border-radius); }
    .solution-correct { background: rgba(40, 167, 69, 0.1); border-left: 4px solid var(--success); }
    .solution-incorrect { background: rgba(220, 53, 69, 0.1); border-left: 4px solid var(--error); }

    .img-container { text-align: center; margin: 30px 0; }
    .img-container img { max-width: 100%; height: auto; border-radius: var(--border-radius); }
    .img-caption { font-size: 0.9rem; margin-top: 10px; opacity: 0.8; }

    .nav-container { display: flex; justify-content: space-between; margin-top: 50px; border-top: 1px solid var(--secondary-color); padding-top: 20px; }
    .nav-btn { text-decoration: none; padding: 10px 20px; background: var(--primary-color); color: white; border-radius: 5px; transition: opacity 0.3s; }
    .nav-btn:hover { opacity: 0.8; }

    section, .highlight-box, .exercise-container { margin-bottom: 60px !important; padding: 40px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border-radius: 8px; }
    [data-theme="dark"] section, [data-theme="dark"] .exercise-container { box-shadow: 0 4px 15px rgba(255,255,255,0.05); border-color: #333; }
    h2 { margin-bottom: 30px; padding-bottom: 10px; border-bottom: 3px solid var(--primary-color); counter-reset: subsection; }
    h3 { margin-bottom: 20px; color: var(--primary-color); }
    h3:not(.exercise-title):not(.resources-title)::before { counter-increment: subsection; content: "2.11.1." counter(subsection) ". "; }
    p { margin-bottom: 20px; }

    .mermaid { background: white; padding: 10px; border-radius: 5px; margin: 20px 0; overflow-x: auto;}
    [data-theme="dark"] .mermaid { filter: invert(0.9) hue-rotate(180deg); }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

