/* Dark Mode CSS for Jupyter Notebooks */
body {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 20px;
    font-size: 18px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #161b22;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid #30363d;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    border-bottom: 2px solid #21262d;
    padding-bottom: 12px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 16px;
}

h1 {
    font-size: 2.8em;
    margin-bottom: 30px;
    text-align: center;
    color: #58a6ff !important;
    border-bottom: 3px solid #21262d;
    padding-bottom: 20px;
}

h2 {
    color: #7ee787 !important;
    font-size: 2em;
    margin-top: 40px;
    border-bottom: 2px solid #21262d;
}

h3 {
    color: #79c0ff !important;
    font-size: 1.6em;
    border-bottom: 1px solid #21262d;
}

/* Code cells */
.input_area {
    background-color: #0d1117 !important;
    border: 2px solid #30363d;
    border-radius: 8px;
    margin: 16px 0;
}

.code_cell {
    margin: 24px 0;
}

.highlight {
    background-color: #0d1117 !important;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #30363d;
}

pre {
    background-color: #0d1117 !important;
    color: #e6edf3 !important;
    border: 2px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
}

code {
    background-color: #161b22 !important;
    color: #79c0ff !important;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    border: 1px solid #30363d;
}

/* Syntax highlighting for Python */
.highlight .k { color: #ff7b72; font-weight: 600; } /* Keywords */
.highlight .s { color: #a5d6ff; } /* Strings */
.highlight .c { color: #8b949e; font-style: italic; } /* Comments */
.highlight .n { color: #e6edf3; } /* Names */
.highlight .o { color: #ff7b72; } /* Operators */
.highlight .p { color: #e6edf3; } /* Punctuation */
.highlight .nb { color: #d2a8ff; font-weight: 600; } /* Built-in functions */
.highlight .mi { color: #79c0ff; } /* Numbers */
.highlight .mf { color: #79c0ff; } /* Float numbers */

/* Output cells */
.output_area {
    background-color: #0d1117 !important;
    border: 2px solid #30363d;
    border-radius: 8px;
    margin: 16px 0;
    padding: 20px;
}

.output_text {
    color: #e6edf3 !important;
    font-family: 'SF Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.6;
}

/* Text content */
p {
    color: #e6edf3 !important;
    font-size: 1.1em;
    line-height: 1.8;
    margin: 16px 0;
}

/* Tables */
table {
    background-color: #161b22 !important;
    border-collapse: collapse;
    width: 100%;
    margin: 24px 0;
    font-size: 1em;
}

th, td {
    border: 2px solid #30363d;
    padding: 16px;
    text-align: left;
    color: #e6edf3 !important;
}

th {
    background-color: #21262d !important;
    color: #58a6ff !important;
    font-weight: 600;
    font-size: 1.1em;
}

tr:nth-child(even) {
    background-color: #161b22;
}

tr:nth-child(odd) {
    background-color: #0d1117;
}

tr:hover {
    background-color: #1c2128;
}

/* Links */
a {
    color: #58a6ff !important;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: #79c0ff !important;
    text-decoration: underline;
}

/* Lists */
ul, ol {
    color: #e6edf3 !important;
    font-size: 1.1em;
    line-height: 1.8;
}

li {
    margin: 12px 0;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #58a6ff;
    margin: 24px 0;
    padding: 16px 24px;
    background-color: #161b22;
    border-radius: 0 8px 8px 0;
    color: #e6edf3 !important;
    font-size: 1.05em;
}

/* Navigation */
.nav-link {
    display: inline-block;
    padding: 12px 24px;
    margin: 8px;
    background-color: #21262d;
    color: #58a6ff !important;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    border: 2px solid #30363d;
    font-size: 1em;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #30363d;
    color: #79c0ff !important;
    text-decoration: none;
    border-color: #58a6ff;
}

        /* Responsive design */
        @media (max-width: 768px) {
            body {
                font-size: 16px;
                padding: 12px;
            }
            
            .container {
                padding: 20px;
                margin: 0;
                border-radius: 8px;
            }
            
            h1 {
                font-size: 2em;
                margin-bottom: 20px;
                line-height: 1.3;
            }
            
            h2 {
                font-size: 1.6em;
                margin-top: 30px;
            }
            
            h3 {
                font-size: 1.3em;
            }
            
            p {
                font-size: 1em;
                line-height: 1.7;
            }
            
            pre {
                font-size: 14px;
                padding: 16px;
                overflow-x: auto;
            }
            
            code {
                font-size: 0.85em;
                padding: 3px 6px;
            }
            
            .lecture-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }
            
            .lecture-card {
                padding: 16px;
            }
            
            .step-section {
                padding: 16px;
                margin: 20px 0;
            }
            
            .step-title {
                font-size: 1.4em;
            }
            
            .stats {
                padding: 16px;
                margin: 20px 0;
            }
            
            .stat-number {
                font-size: 1.8em;
            }
            
            .back-button {
                top: 12px;
                left: 12px;
                padding: 10px 16px;
                font-size: 14px;
            }
            
            th, td {
                padding: 12px;
                font-size: 0.95em;
            }
            
            ul, ol {
                font-size: 1em;
            }
        }
        
        @media (max-width: 480px) {
            body {
                font-size: 15px;
                padding: 8px;
            }
            
            .container {
                padding: 16px;
                margin: 0;
                border-radius: 6px;
            }
            
            h1 {
                font-size: 1.6em;
                line-height: 1.3;
            }
            
            h2 {
                font-size: 1.4em;
            }
            
            h3 {
                font-size: 1.2em;
            }
            
            p {
                font-size: 1em;
            }
            
            pre {
                font-size: 13px;
                padding: 12px;
            }
            
            code {
                font-size: 0.8em;
            }
            
            .lecture-card {
                padding: 14px;
            }
            
            .step-section {
                padding: 14px;
            }
            
            .back-button {
                top: 8px;
                left: 8px;
                padding: 8px 14px;
                font-size: 13px;
            }
            
            th, td {
                padding: 10px;
                font-size: 0.9em;
            }
        }
