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

/* Madfu Brand Colors */
:root {
    --madfu-primary: #100ca1;
    --madfu-dark: #101440;
    --madfu-accent-blue: #b2e2ff;
    --madfu-teal: #2fd7c0;
    --madfu-light-blue: #e8f4f9;
    --madfu-bg-gradient: linear-gradient(135deg, #f5fbff 0%, #e8f4f9 50%, #b2e2ff 100%);
    --madfu-section-gradient: linear-gradient(135deg, #100ca1 0%, #101440 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--madfu-bg-gradient);
    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 var(--madfu-primary);
}

.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(16, 12, 161, 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: var(--madfu-primary);
    margin-bottom: 12px;
    line-height: 1.15;
}

.slide h2 {
    font-size: 1.8em;
    color: var(--madfu-primary);
    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.2em;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

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

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

.slide strong {
    color: #2d3748;
}

.content {
    flex: 1;
    overflow-y: auto;
}

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

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

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

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

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

.controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(16, 12, 161, 0.5);
}

.controls button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 10px rgba(16, 12, 161, 0.1);
}

.controls button:disabled:focus {
    outline: none;
    box-shadow: 0 2px 10px rgba(16, 12, 161, 0.1);
}

/* Highlight boxes - Madfu Accent Blue */
.highlight {
    background: #e8f4f9;
    padding: 20px;
    border-left: 4px solid var(--madfu-primary);
    margin: 20px 0;
    border-radius: 4px;
}

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

.good {
    color: var(--madfu-teal);
}

.bad {
    color: #e74c3c;
}

code {
    background: var(--madfu-light-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--madfu-dark);
}

pre {
    background: var(--madfu-dark);
    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: var(--madfu-primary);
}

.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(16, 12, 161, 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 - Madfu Blue Gradient */
.section-separator {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--madfu-section-gradient);
}

.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 - Madfu styled */
.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: var(--madfu-dark);
    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, var(--madfu-primary), var(--madfu-teal));
    border-radius: 2px;
}

.sub-section-separator .section-subtitle {
    font-size: 1.4em;
    color: var(--madfu-primary);
    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, #f5fbff 0%, var(--madfu-light-blue) 100%);
    border-radius: 12px;
    border: 1px solid var(--madfu-accent-blue);
}

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

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

/* Collapsed indicator bar */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 12, 161, 0.9);
    color: white;
    border: none;
    padding: 12px 8px;
    border-radius: 0 8px 8px 0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 400;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    width: 32px;
    height: auto;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

.nav-toggle:hover {
    background: rgba(16, 12, 161, 1);
    padding-right: 12px;
}

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

/* Nav buttons container - hidden by default, shown on hover */
.nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Show menu on hover over the entire nav area */
.section-nav:hover .nav-buttons,
.nav-buttons:hover {
    max-width: 280px;
    opacity: 1;
    padding: 8px 12px;
    max-height: 85vh;
    overflow-y: auto;
}

.section-nav:hover .nav-toggle {
    border-radius: 0;
}

/* Hide toggle text when menu is expanded */
.section-nav:hover .nav-toggle {
    width: 6px;
    padding: 12px 2px;
    font-size: 0;
}

.nav-buttons.collapsed {
    max-width: 0;
    opacity: 0;
    padding: 8px 0;
}

.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(16, 12, 161, 0.1);
    color: var(--madfu-dark);
}

.section-nav button:not(.nav-toggle):focus {
    outline: none;
    background: rgba(16, 12, 161, 0.1);
}

.section-nav button.active {
    background: rgba(16, 12, 161, 0.15);
    color: var(--madfu-primary);
    font-weight: 600;
}

.section-nav button.active:hover {
    background: rgba(16, 12, 161, 0.2);
}

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

.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(16, 12, 161, 0.1) !important;
    color: var(--madfu-dark) !important;
}

.nav-section-btn.active {
    background: rgba(16, 12, 161, 0.15) !important;
    color: var(--madfu-primary) !important;
}

.nav-section-label {
    flex: 1;
}

.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,
.nav-section.active .nav-slides-menu {
    max-height: 500px;
}

.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(16, 12, 161, 0.08) !important;
    color: var(--madfu-dark) !important;
}

.nav-slide-btn.active {
    background: rgba(16, 12, 161, 0.12) !important;
    color: var(--madfu-primary) !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: var(--madfu-primary);
    color: white;
}

/* Logout button styling */
.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: var(--madfu-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.slide a:hover {
    color: var(--madfu-dark);
    text-decoration: underline;
}

/* Evolution Timeline Styles - Madfu Blue */
.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(16, 12, 161, 0.08), rgba(16, 20, 64, 0.08));
    border: 2px solid var(--madfu-primary);
    box-shadow: 0 4px 15px rgba(16, 12, 161, 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: var(--madfu-primary);
    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: var(--madfu-primary);
    margin-top: 10px;
}

.evolution-arrow {
    font-size: 2em;
    color: var(--madfu-primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* Three Column Comparison Styles - Madfu Blue */
.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(16, 12, 161, 0.08), rgba(16, 20, 64, 0.08));
    border: 2px solid var(--madfu-primary);
    box-shadow: 0 4px 15px rgba(16, 12, 161, 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 var(--madfu-primary);
    padding-bottom: 5px;
}

.comparison-card .comparison-subtitle {
    font-size: 0.9em;
    color: var(--madfu-primary);
    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 - Madfu Blue */
.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(16, 12, 161, 0.08), rgba(16, 20, 64, 0.08));
    border: 2px solid var(--madfu-primary);
}

.workflow-step .step-number {
    position: absolute;
    top: -12px;
    left: 10px;
    background: var(--madfu-primary);
    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: var(--madfu-primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* Stat Card Styles - Madfu Blue */
.stat-card {
    background: linear-gradient(135deg, rgba(16, 12, 161, 0.08), rgba(16, 20, 64, 0.08));
    border: 2px solid var(--madfu-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 15px 0;
}

.stat-card h2 {
    margin: 0;
    color: var(--madfu-primary);
}

.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;
}
