* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
    height: 100vh;
}

.presentation-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    padding: 50px 70px;
    background: white;
    animation: fadeIn 0.5s ease-in;
    overflow-y: auto;
}

.slide.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide h1 {
    font-size: 3em;
    color: #2d3748;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide h2 {
    font-size: 2.2em;
    color: #2d3748;
    margin-bottom: 20px;
    border-left: 6px solid #667eea;
    padding-left: 20px;
}

.slide h3 {
    font-size: 1.6em;
    color: #4a5568;
    margin: 20px 0 12px 0;
}

.slide p, .slide li {
    font-size: 1.2em;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 12px;
}

.slide ul, .slide ol {
    margin-left: 35px;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    margin: 15px 0;
    overflow-x: auto;
    border-left: 4px solid #667eea;
}

.code-inline {
    background: #e2e8f0;
    color: #e53e3e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

.highlight {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
}

.box {
    background: linear-gradient(135deg, #f6f8fb 0%, #e9ecf5 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.box h4 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 12px;
}

.navigation {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.nav-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.nav-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.slide-counter {
    position: fixed;
    bottom: 30px;
    left: 25px;
    color: #667eea;
    font-size: 1.1em;
    font-weight: bold;
    background: white;
    padding: 10px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.title-slide {
    text-align: center;
    justify-content: center !important;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.title-slide h1 {
    font-size: 3.5em;
    color: white;
    -webkit-text-fill-color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.title-slide p {
    font-size: 1.5em;
    color: rgba(255,255,255,0.9);
}

.output-block {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    margin: 10px 0;
    color: #22543d;
}

.warning-box {
    background: #fffaf0;
    border-left: 4px solid #ed8936;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.tip-box {
    background: #e6fffa;
    border-left: 4px solid #319795;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 1.05em;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f7fafc;
}

.keyword {
    color: #c678dd;
    font-weight: bold;
}

.string {
    color: #98c379;
}

.comment {
    color: #5c6370;
    font-style: italic;
}

.function {
    color: #61afef;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.mini-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.section-badge {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    display: inline-block;
    margin-bottom: 15px;
}

.success-box {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: #667eea;
}

.card h4 {
    color: #667eea;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.diagram {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.visual-block {
    background: linear-gradient(135deg, #667eea10 0%, #764ba210 100%);
    border: 2px dashed #667eea;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.timeline {
    position: relative;
    padding: 20px 0;
    margin: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 40px;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 17px;
    width: 2px;
    height: calc(100% + 5px);
    background: #cbd5e0;
}

.timeline-item:last-child::after {
    display: none;
}

.comparison-table {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.comparison-item {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    border-top: 3px solid #667eea;
}

.comparison-item h5 {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.math-block {
    background: #fffef0;
    border-left: 4px solid #f6ad55;
    padding: 20px;
    margin: 15px 0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
}

.arrow-right {
    display: inline-block;
    margin: 0 10px;
    color: #667eea;
    font-size: 1.5em;
}

.big-number {
    font-size: 3em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin: 20px 0;
}


.error-box {
    background: #fff5f5;
    border-left: 4px solid #fc8181;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.prompt-example {
    background: #f7fafc;
    border: 2px solid #cbd5e0;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.prompt-label {
    background: #667eea;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.output-example {
    background: #e6fffa;
    border: 2px solid #319795;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
}

.vs-divider {
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: center;
    margin: 20px 0;
}

.bad-example {
    background: #fff5f5;
    border: 2px solid #fc8181;
    border-radius: 8px;
    padding: 15px;
}

.good-example {
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 8px;
    padding: 15px;
}

.formula-box {
    background: #fef5e7;
    border: 2px dashed #f6ad55;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.formula-box .formula {
    font-size: 1.4em;
    font-weight: bold;
    color: #c05621;
    margin: 15px 0;
}

.interactive-demo {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border: 3px solid #667eea;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.steps-container {
    counter-reset: step-counter;
}

.step-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 25px;
}

.step-item::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 0;
    top: 0;
    width: 35px;
    height: 35px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

.template-box {
    background: #f7fafc;
    border-left: 5px solid #667eea;
    padding: 20px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.tag {
    display: inline-block;
    background: #e2e8f0;
    color: #2d3748;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin: 3px;
}

.metric-box {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.metric-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #667eea;
}

.metric-label {
    font-size: 1em;
    color: #718096;
    margin-top: 5px;
}

.architecture-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
}

.arrow {
    text-align: center;
    font-size: 2em;
    color: #667eea;
    margin: 10px 0;
}

.component-box {
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    flex-wrap: wrap;
}

.flow-box {
    flex: 1;
    min-width: 150px;
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 8px;
    padding: 15px;
    margin: 5px;
    text-align: center;
}

.flow-arrow {
    font-size: 2em;
    color: #667eea;
    margin: 0 10px;
}

.icon-large {
    font-size: 3em;
    margin: 10px 0;
}


.vector-visual {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
}

.comparison-box {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin: 20px 0;
}

.vs-text {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
    text-align: center;
}

.pipeline-step {
    background: white;
    border-left: 4px solid #667eea;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.pipeline-step h4 {
    color: #667eea;
    margin-bottom: 8px;
}

/*ethics*/

.info-box {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.case-study {
    background: #f7fafc;
    border: 2px solid #cbd5e0;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.case-study h4 {
    color: #c53030;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.principle-box {
    background: linear-gradient(135deg, #e6fffa 0%, #b2f5ea 100%);
    border: 2px solid #319795;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
}

.principle-box h4 {
    color: #234e52;
    margin-bottom: 10px;
}

.quote-box {
    background: #fef5e7;
    border-left: 5px solid #f6ad55;
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    font-size: 1.1em;
}

.framework-section {
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
}

.checklist {
    list-style: none;
    margin-left: 0;
}

.checklist li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 10px;
}

.checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
    font-size: 1.3em;
}

/* Add these at the end of your existing styles */

/* Course layout */
.course-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #4c51bf 0%, #5a3f8c 100%);   /* darker indigo-purple */
    color: white;
    padding: 2rem 1rem;
    overflow-y: auto;
    flex-shrink: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.2);   /* subtle depth */
}

.sidebar h2 {
    color: white;
    margin-bottom: 2rem;
    text-align: center;
}

.unit-list {
    list-style: none;
    padding: 0;
}

.unit-list li {
    margin: 0.8rem 0;
}

.unit-list a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.unit-list a:hover,
.unit-list a.active {
    background: rgba(255,255,255,0.2);
    transform: translateX(8px);
}

.main-content {
    flex: 1;
    overflow-y: auto;
    background: #f8fafc;
}

/* Mobile responsive */
@media (max-width: 992px) {
    .course-wrapper {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
    }
}

.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(255,255,255,0.15);
    z-index: 9999;
}

#progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.4s ease-out;
}

/* ────────────────────────────────────────
   Collapsible Sidebar – Simple & Mobile-first
───────────────────────────────────────── */

/* Hide checkbox visually but keep it functional */
.sidebar-toggle-checkbox {
    display: none;
}

/* Hamburger icon – only visible when sidebar can be toggled */
.hamburger {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: none;               /* hidden by default on large screens */
}

.hamburger span {
    position: absolute;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.35s ease;
}

.hamburger span:nth-child(1) { top: 10px; }
.hamburger span:nth-child(2) { top: 18px; }
.hamburger span:nth-child(3) { top: 26px; }

/* When checked → X icon */
.sidebar-toggle-checkbox:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 18px;
}
.sidebar-toggle-checkbox:checked + .hamburger span:nth-child(2) {
    opacity: 0;
}
.sidebar-toggle-checkbox:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 18px;
}

/* Sidebar behavior */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #4c51bf 0%, #5a3f8c 100%); /* your darker suggestion or keep original */
    color: white;
    padding: 2rem 1rem;
    overflow-y: auto;
    flex-shrink: 0;
    transition: transform 0.35s ease, width 0.35s ease;
    position: relative;
    z-index: 1000;
}

/* On large screens*/
@media (min-width: 993px) {
    .hamburger {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%); /* hidden off-screen */
        width: 280px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* When toggled open */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper .sidebar {
        transform: translateX(0);
    }

    /* Push main content right when sidebar is open (optional nice effect) */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper .main-content {
        transform: translateX(280px);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Optional: dim background when sidebar open */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 900;
        opacity: 0;
        transition: opacity 0.4s;
        pointer-events: none;
    }
    .sidebar-toggle-checkbox:checked ~ .course-wrapper::after {
        opacity: 1;
        pointer-events: all;
    }
}

/* On smaller screens or when collapsible: hidden by default */
@media (max-width: 992px) {
    .hamburger {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%); /* hidden off-screen */
        width: 280px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* When toggled open */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper .sidebar {
        transform: translateX(0);
    }

    /* Push main content right when sidebar is open (optional nice effect) */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper .main-content {
        transform: translateX(280px);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Optional: dim background when sidebar open */
    .sidebar-toggle-checkbox:checked ~ .course-wrapper::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 900;
        opacity: 0;
        transition: opacity 0.4s;
        pointer-events: none;
    }
    .sidebar-toggle-checkbox:checked ~ .course-wrapper::after {
        opacity: 1;
        pointer-events: all;
    }
}