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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #faf8f5 0%, #e8f4f3 50%, #d4ebe9 100%);
    overflow: hidden;
}

.slide-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-logo {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 500;
    background: white;
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0d9488;
}

.slide-logo span {
    font-size: 0.9em;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
}

.slide {
    background: white;
    width: 94%;
    max-width: 1400px;
    height: 90%;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    padding: 35px 60px 40px;
    display: none;
    flex-direction: column;
    position: relative;
    margin-left: 0;
}

.slide.active {
    display: flex;
}

.slide h1 {
    font-size: 2.8em;
    color: #0d9488;
    margin-bottom: 12px;
    line-height: 1.15;
}

.slide h2 {
    font-size: 1.8em;
    color: #0d9488;
    margin-bottom: 15px;
    margin-top: 10px;
}

.slide h3 {
    font-size: 1.4em;
    color: #4a5568;
    margin-top: 12px;
    margin-bottom: 10px;
}

.slide p {
    font-size: 1.35em;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

.slide ul, .slide ol {
    margin-left: 10px;
    padding-left: 20px;
    margin-bottom: 20px;
}

.slide li {
    font-size: 1.15em;
    color: #4a5568;
    line-height: 1.8;
    margin-bottom: 10px;
}

.slide strong {
    color: inherit;
}

/* Dark background utility — forces all text inside to be light/white */
.dark-bg,
.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4,
.dark-bg p, .dark-bg li, .dark-bg span, .dark-bg strong,
.dark-bg a, .dark-bg label {
    color: white;
}

.dark-bg li {
    color: rgba(255, 255, 255, 0.9);
}

.slide .slide-subtitle {
    text-align: center;
    color: #0d9488;
    font-size: 1.45em;
    font-weight: 500;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
}

.slide-number {
    position: absolute;
    bottom: 30px;
    right: 40px;
    color: #a0aec0;
    font-size: 1em;
}

/* Controls - Updated for light background */
.controls {
    position: fixed;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.controls button {
    background: rgba(13, 148, 136, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(13, 148, 136, 0.3);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.2);
    transition: all 0.2s ease;
    font-weight: 500;
    color: white;
}

.controls button:hover {
    background: rgba(13, 148, 136, 1);
    border-color: rgba(13, 148, 136, 0.5);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.controls button:focus {
    outline: none;
    background: rgba(13, 148, 136, 1);
    border-color: rgba(13, 148, 136, 0.6);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.3);
}

.controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(13, 148, 136, 0.5);
}

.controls button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.1);
}

.controls button:disabled:focus {
    outline: none;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.1);
}

/* Highlight boxes - Updated to amber/gold */
.highlight {
    background: #fffbeb;
    padding: 20px;
    border-left: 4px solid #f59e0b;
    margin: 20px 0;
    border-radius: 4px;
}

.highlight ol,
.highlight ul {
    padding-left: 1.5em;
}

.good {
    color: #0d9488;
}

.bad {
    color: #e74c3c;
}

code {
    background: #f0fdfa;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #0f766e;
}

pre {
    background: #0a1628;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.95em;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.title-slide {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.title-slide h1 {
    font-size: 4em;
    margin-bottom: 20px;
}

.title-slide p {
    font-size: 1.5em;
    color: #0d9488;
}

.title-slide img {
    width: 200px;
    height: 200px;
    margin-bottom: 30px;
    object-fit: cover;
    border-radius: 50%;
    animation: fadeInScale 1s ease-out;
    filter: drop-shadow(0 10px 25px rgba(13, 148, 136, 0.3));
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Section Separator Slides - Updated to teal gradient */
.section-separator {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
}

.section-separator h1 {
    font-size: 4.5em;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.section-separator .section-subtitle {
    font-size: 1.8em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    font-weight: 300;
}

.section-separator .section-description {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.85);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Sub-Section Separator Slides - Lighter style for within-section dividers */
.sub-section-separator {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: white;
}

.sub-section-separator h1 {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: #0f766e;
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
}

.sub-section-separator h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    border-radius: 2px;
}

.sub-section-separator .section-subtitle {
    font-size: 1.4em;
    color: #0d9488;
    margin-bottom: 25px;
    font-weight: 500;
}

.sub-section-separator .section-description {
    font-size: 1.15em;
    color: #4a5568;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    padding: 20px 30px;
    background: linear-gradient(135deg, #f0fdfa 0%, #e6fffa 100%);
    border-radius: 12px;
    border: 1px solid #99f6e4;
}

.sub-section-separator .section-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    display: block;
}

/* Section Navigation - Always visible, expandable on hover */
.section-nav {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
}

/* Toggle button - always visible */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 148, 136, 0.9);
    color: white;
    border: none;
    padding: 10px 6px;
    border-radius: 0 8px 8px 0;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    width: 28px;
    flex-shrink: 0;
    z-index: 1;
}

.nav-toggle:hover {
    background: rgba(13, 148, 136, 1);
    width: 32px;
}

.nav-toggle:focus {
    outline: none;
}

/* Nav buttons container - hidden by default, shown via toggle */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed - hide the nav panel */
.nav-buttons.collapsed {
    max-width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

/* General button styling */
.section-nav button:not(.nav-toggle) {
    display: block;
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #4a5568;
    font-weight: 500;
    white-space: nowrap;
    text-align: left;
}

.section-nav button:not(.nav-toggle):hover {
    background: rgba(13, 148, 136, 0.1);
    color: #0f766e;
}

.section-nav button:not(.nav-toggle):focus {
    outline: none;
    background: rgba(13, 148, 136, 0.1);
}

.section-nav button.active {
    background: rgba(13, 148, 136, 0.15);
    color: #0d9488;
    font-weight: 600;
}

.section-nav button.active:hover {
    background: rgba(13, 148, 136, 0.2);
}

/* Nested Navigation - Section containers */
.nav-section {
    margin-bottom: 2px;
}

/* Section button */
.nav-section-btn {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 0.85em !important;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #4a5568 !important;
    font-weight: 600 !important;
    white-space: nowrap;
    text-align: left !important;
}

.nav-section-btn:hover {
    background: rgba(13, 148, 136, 0.1) !important;
    color: #0f766e !important;
}

.nav-section-btn.active {
    background: rgba(13, 148, 136, 0.15) !important;
    color: #0d9488 !important;
}

/* Section number indicator - always visible in collapsed state */
.nav-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.nav-section.active .nav-section-num {
    background: #0d9488;
    color: white;
}

/* Section label */
.nav-section-label {
    flex: 1;
    margin-left: 8px;
}

/* Section arrow */
.nav-section-arrow {
    font-size: 0.9em;
    transition: transform 0.2s ease;
    margin-left: 8px;
    color: #a0aec0;
}

.nav-section.expanded .nav-section-arrow {
    transform: rotate(90deg);
}

/* Slides submenu */
.nav-slides-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 8px;
    border-left: 2px solid #e2e8f0;
    margin-left: 10px;
}

.nav-section.expanded .nav-slides-menu {
    max-height: 70vh;
    overflow-y: auto;
}

/* Slide buttons */
.nav-slide-btn {
    display: flex !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: transparent !important;
    border: none !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 0.75em !important;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #718096 !important;
    font-weight: 400 !important;
    white-space: nowrap;
    text-align: left !important;
}

.nav-slide-btn:hover {
    background: rgba(13, 148, 136, 0.08) !important;
    color: #0f766e !important;
}

.nav-slide-btn.active {
    background: rgba(13, 148, 136, 0.12) !important;
    color: #0d9488 !important;
    font-weight: 500 !important;
}

.nav-slide-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    background: #e2e8f0;
    color: #4a5568;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.nav-slide-btn.active .nav-slide-num {
    background: #0d9488;
    color: white;
}

/* Logout button */
.nav-logout-btn {
    border-top: 2px solid rgba(0,0,0,0.1) !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
}

.slide a {
    color: #0d9488;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.slide a:hover {
    color: #0f766e;
    text-decoration: underline;
}

/* Evolution Timeline Styles - Updated to teal */
.evolution-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
}

.evolution-stage {
    flex: 1;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.evolution-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.evolution-stage.highlight {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(15, 118, 110, 0.08));
    border: 2px solid #0d9488;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
}

.evolution-stage h2 {
    font-size: 1.3em;
    color: #2d3748;
    margin: 10px 0 5px 0;
}

.evolution-stage .stage-description {
    font-size: 0.9em;
    color: #0d9488;
    font-weight: 600;
    margin-bottom: 15px;
}

.evolution-stage ul {
    text-align: left;
    margin: 15px 0;
    font-size: 0.95em;
}

.evolution-stage li {
    font-size: 0.95em;
    margin-bottom: 8px;
}

.evolution-stage .stage-time {
    font-size: 1em;
    font-weight: 700;
    color: #0d9488;
    margin-top: 10px;
}

.evolution-arrow {
    font-size: 2em;
    color: #0d9488;
    font-weight: bold;
    flex-shrink: 0;
}

/* Three Column Comparison Styles - Updated to teal */
.three-col-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px 0;
}

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

.comparison-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.comparison-card.highlight-card {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(15, 118, 110, 0.08));
    border: 2px solid #0d9488;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.2);
}

.comparison-card h2 {
    font-size: 1.3em;
    color: #2d3748;
    margin: 0 0 5px 0;
    text-align: center;
}

.comparison-card h4 {
    font-size: 1em;
    color: #4a5568;
    margin: 15px 0 8px 0;
    border-bottom: 2px solid #0d9488;
    padding-bottom: 5px;
}

.comparison-card .comparison-subtitle {
    font-size: 0.9em;
    color: #0d9488;
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.comparison-card ul {
    margin: 8px 0 8px 20px;
    font-size: 0.9em;
}

.comparison-card li {
    font-size: 0.9em;
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Workflow Diagram Styles - Updated to teal */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.workflow-step {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    flex: 1;
    min-width: 150px;
    position: relative;
}

.workflow-step.ai-step {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(15, 118, 110, 0.08));
    border: 2px solid #0d9488;
}

.workflow-step .step-number {
    position: absolute;
    top: -12px;
    left: 10px;
    background: #0d9488;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85em;
}

.workflow-step h4 {
    margin: 8px 0 8px 0;
    color: #2d3748;
    font-size: 1em;
}

.workflow-step p {
    font-size: 0.85em;
    color: #4a5568;
    line-height: 1.4;
    margin: 0;
}

.workflow-arrow {
    font-size: 2em;
    color: #0d9488;
    font-weight: bold;
    flex-shrink: 0;
}

/* Stat Card Styles - Updated to teal */
.stat-card {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(15, 118, 110, 0.08));
    border: 2px solid #0d9488;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

.stat-card h2 {
    margin: 0;
    color: #0d9488;
}

.stat-card p {
    margin: 10px 0 0 0;
    font-size: 0.95em;
    color: #4a5568;
}

/* Diagram Container - Consistent sizing for SVG diagrams */
.diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 65vh;
    overflow: hidden;
}

.diagram-container img {
    max-width: 100%;
    max-height: 65vh;
    height: auto;
    width: auto;
    object-fit: contain;
}

/* Constrain images in two-column layouts */
.two-col img {
    max-height: 50vh;
    width: auto;
    object-fit: contain;
}

/* ===== Review Mode ===== */

/* Toggle button - top right */
.review-toggle-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2002;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #0d9488;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.review-toggle-btn:hover {
    background: rgba(13, 148, 136, 0.12);
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.25);
}

.review-toggle-btn.active {
    background: #0d9488;
}

.review-toggle-btn.active .review-toggle-icon {
    color: white;
}

.review-toggle-icon {
    font-size: 1.25em;
    color: #0d9488;
    line-height: 1;
}

.review-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 0.7em;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Panel - slides in from right */
.review-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 340px;
    height: 100vh;
    z-index: 2001;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.review-panel.open {
    right: 0;
}

.review-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.review-panel-header h3 {
    margin: 0;
    font-size: 1.1em;
    color: #0d9488;
    font-weight: 700;
}

.review-close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #a0aec0;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}

.review-close-btn:hover {
    color: #4a5568;
}

/* Slide info */
.review-slide-info {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.review-slide-num {
    font-size: 0.8em;
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.review-slide-title {
    font-size: 1.05em;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.review-slide-section {
    font-size: 0.8em;
    color: #0d9488;
    font-weight: 500;
}

/* Textarea */
.review-textarea {
    flex: 1;
    margin: 16px 20px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    color: #2d3748;
    resize: none;
    outline: none;
    transition: border-color 0.2s;
    line-height: 1.5;
}

.review-textarea:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.review-textarea::placeholder {
    color: #a0aec0;
}

/* Action buttons */
.review-actions {
    padding: 12px 20px 20px;
    display: flex;
    gap: 10px;
}

.review-export-btn {
    flex: 1;
    padding: 10px 16px;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.review-export-btn:hover {
    background: #0f766e;
}

.review-clear-btn {
    padding: 10px 16px;
    background: transparent;
    color: #a0aec0;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.review-clear-btn:hover {
    color: #ef4444;
    border-color: #ef4444;
}

/* Toast notification */
.review-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 3000;
    background: #0d9488;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.review-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback export modal */
.review-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.review-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.review-modal-header h3 {
    margin: 0;
    color: #0d9488;
}

.review-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #a0aec0;
    cursor: pointer;
}

.review-modal-textarea {
    flex: 1;
    min-height: 300px;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.85em;
    color: #2d3748;
    resize: none;
}

.review-modal-hint {
    margin-top: 10px;
    font-size: 0.85em;
    color: #a0aec0;
    text-align: center;
}

/* ===== Fragment / Progressive Reveal System ===== */

[data-fragment] {
    display: none;
}

[data-fragment].fragment-visible {
    display: block;
    animation: fragmentReveal 0.4s ease;
}

@keyframes fragmentReveal {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vertical centering intentionally not applied to .content globally
   because many slides have content that fills or exceeds the available height. */

/* ===== Chat Interface Styles ===== */

.chat-container {
    background: #f8fafc;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.chat-header-icon {
    width: 32px;
    height: 32px;
    background: #0d9488;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8em;
}

.chat-header-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1em;
}

.chat-messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-sender {
    font-size: 0.75em;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-bubble-user {
    align-self: flex-end;
    background: #0d9488;
    color: white;
    padding: 12px 16px;
    border-radius: 14px 14px 4px 14px;
    max-width: 85%;
    font-size: 1em;
    line-height: 1.4;
}

.chat-bubble-ai {
    align-self: flex-start;
    background: white;
    color: #2d3748;
    padding: 12px 16px;
    border-radius: 14px 14px 14px 4px;
    max-width: 85%;
    border: 1px solid #e2e8f0;
    font-size: 1em;
    line-height: 1.4;
}

.chat-bubble-user p,
.chat-bubble-ai p {
    margin: 0;
    font-size: 1em;
}

/* ===== API Payload Panel ===== */

.api-payload-panel {
    position: relative;
    min-height: 100%;
}

.api-payload-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 10px;
    padding: 14px;
    border: 2px solid #e2e8f0;
}

.api-payload-state.fragment-visible {
    display: block;
    animation: fragmentReveal 0.4s ease;
}

.payload-label {
    font-size: 0.85em;
    font-weight: 700;
    color: #0d9488;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.payload-msg {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    margin-bottom: 4px;
    border-left: 3px solid #94a3b8;
    color: #4a5568;
}

.payload-msg.payload-current {
    border-left-color: #0d9488;
    background: #f0fdfa;
    font-weight: 500;
}

.payload-msg.payload-history {
    opacity: 0.6;
}

.payload-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.82em;
    font-weight: 600;
}

/* ===== System Prompt Reveal ===== */

.system-prompt-code {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d4d4d4;
    line-height: 1.5;
}

.system-prompt-code .sp-key { color: #9cdcfe; }
.system-prompt-code .sp-str { color: #ce9178; }
.system-prompt-code .sp-comment { color: #6a9955; }
.system-prompt-code .sp-keyword { color: #c586c0; }

/* ===== Takeaway Callout ===== */

.takeaway-callout {
    padding: 14px 18px;
    border-radius: 0 8px 8px 0;
    margin-top: 16px;
}

.takeaway-callout p {
    margin: 0;
    font-size: 1em;
}

/* ===== Context Formula ===== */

.context-formula-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.context-formula-num {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8em;
    flex-shrink: 0;
}

.context-formula-bar {
    flex: 1;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.95em;
}

.context-formula-plus {
    text-align: center;
    color: #94a3b8;
    font-size: 1.2em;
    font-weight: bold;
}

.context-formula-equals {
    text-align: center;
    color: #0d9488;
    font-size: 1.5em;
    font-weight: bold;
    margin: 4px 0;
}

.context-formula-result {
    background: linear-gradient(135deg, #0d9488, #0f766e);
    padding: 10px 16px;
    border-radius: 8px;
    text-align: center;
}

.context-formula-result strong {
    color: white;
    font-size: 1em;
}

/* ===== Why Tokens Matter Cards ===== */

.token-reason-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 15px;
    flex-wrap: wrap;
}

.token-reason-card {
    flex: 1;
    min-width: 180px;
    max-width: 250px;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.token-reason-card h4 {
    margin: 0 0 6px 0;
    font-size: 1em;
}

.token-reason-card p {
    margin: 0;
    font-size: 0.85em;
    color: #64748b;
    line-height: 1.4;
}

/* ===== Auto-Regressive Generation Demo ===== */

.autoreg-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 700px;
    margin: 0 auto;
}

.autoreg-demo-section {
    text-align: center;
    width: 100%;
}

.autoreg-demo-label {
    font-size: 0.75em;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.autoreg-demo-tokens {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.3s;
}

.autoreg-demo-tokens.active {
    border-color: #0d9488;
    background: #f0fdfa;
}

.autoreg-demo-token {
    background: #f0fdfa;
    border: 1.5px solid #0d9488;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: #0f766e;
    font-family: 'Courier New', monospace;
    animation: tokenAppear 0.3s ease;
}

.autoreg-demo-token.new-token {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    animation: tokenPop 0.4s ease;
}

.autoreg-demo-arrow {
    line-height: 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.autoreg-demo-arrow.active {
    opacity: 1;
}

.autoreg-llm-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    padding: 10px 28px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.2);
    transition: box-shadow 0.3s, transform 0.3s;
}

.autoreg-llm-box.processing {
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.5);
    transform: scale(1.03);
}

.autoreg-llm-icon {
    font-size: 1.1em;
    opacity: 0.85;
}

.autoreg-llm-box.processing .autoreg-llm-icon {
    animation: spin 0.8s linear infinite;
}

.autoreg-demo-output {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autoreg-demo-output .autoreg-demo-token {
    font-size: 1em;
    padding: 5px 14px;
}

.autoreg-demo-loop {
    font-size: 0.85em;
    font-weight: 600;
    color: #0d9488;
    opacity: 0;
    transition: opacity 0.3s;
}

.autoreg-demo-loop.visible {
    opacity: 1;
    animation: loopFlash 0.6s ease;
}

.autoreg-demo-result-section {
    width: 100%;
    text-align: center;
}

.autoreg-demo-result {
    padding: 10px 16px;
    background: #f0fdfa;
    border: 2px solid #0d9488;
    border-radius: 10px;
    min-height: 40px;
    font-size: 1em;
    color: #1e293b;
    line-height: 1.6;
    font-weight: 500;
    text-align: left;
}

@keyframes tokenAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes tokenPop {
    0% { opacity: 0; transform: scale(0.5) translateY(-8px); }
    60% { transform: scale(1.1) translateY(0); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes loopFlash {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== Interactive LLM Tabs & Sliders ===== */

.llm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.llm-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.llm-tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #334155;
}

.llm-tab.active {
    background: white;
    color: var(--tab-color, #3b82f6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.llm-tab-panel {
    display: none;
    animation: fadeInPanel 0.25s ease;
}

.llm-tab-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.llm-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 16px;
    background: #f8fafc;
    border-radius: 10px;
}

.llm-slider-label {
    font-weight: 600;
    color: #475569;
    font-size: 0.9em;
    min-width: 90px;
}

.llm-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.llm-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--slider-color, #3b82f6);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease;
}

.llm-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.llm-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: var(--slider-color, #3b82f6);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.llm-slider-value {
    font-weight: 700;
    font-size: 1.1em;
    min-width: 36px;
    text-align: center;
}

.llm-creativity-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 12px;
    min-width: 90px;
    text-align: center;
}

/* Bar chart */

.llm-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.llm-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 26px;
}

.llm-bar-label {
    font-size: 0.8em;
    font-weight: 600;
    color: #475569;
    min-width: 60px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

.llm-bar-track {
    flex: 1;
    height: 18px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.llm-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.35s ease, background 0.25s ease, opacity 0.25s ease;
    min-width: 0;
}

.llm-usage-hint {
    margin-top: 10px;
    padding: 8px 14px;
    background: #f8fafc;
    border-left: 3px solid;
    border-radius: 0 6px 6px 0;
    font-size: 0.8em;
    color: #475569;
    line-height: 1.4;
}

.llm-usage-hint code {
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

.llm-bar-pct {
    font-size: 0.75em;
    color: #334155;
    min-width: 44px;
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* ===== Streaming Demo ===== */

.stream-demo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stream-demo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stream-demo-btn-red {
    background: #ef4444;
    color: white;
}

.stream-demo-btn-green {
    background: #10b981;
    color: white;
}

.stream-demo-btn-reset {
    background: #e2e8f0;
    color: #475569;
}

.stream-spinner {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 16px 0;
}

.stream-spinner-circle {
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #ef4444;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.stream-cursor {
    background: #0d9488;
    color: white;
    padding: 0 3px;
    border-radius: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}
