* {
    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;
}

/* Floating Logo Branding */
.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-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.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;
    overflow: visible;
}

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

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

/* Controls */
.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);
}

/* Highlight boxes */
.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;
}

/* Section Separator Slides */
.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 */
.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 */
.section-nav {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 148, 136, 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(13, 148, 136, 1);
    padding-right: 12px;
}

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

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

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

.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(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 */
.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(13, 148, 136, 0.1) !important;
    color: #0f766e !important;
}

.nav-section-btn.active {
    background: rgba(13, 148, 136, 0.15) !important;
    color: #0d9488 !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);
}

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

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

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

/* Diagram Container */
.diagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-height: 65vh;
    overflow: visible;
}

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

.two-col img {
    max-height: 50vh;
    width: auto;
    object-fit: contain;
}

/* Screenshot styling for visual slides */
.screenshot {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 100%;
    height: auto;
}

.screenshot-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Icon grid for visual lists */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.icon-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.icon-item:hover {
    background: #f0fdfa;
    transform: translateY(-2px);
}

.icon-item .icon {
    font-size: 2em;
}

.icon-item .label {
    font-size: 1.1em;
    color: #2d3748;
    font-weight: 500;
}

/* Center content helper */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ===== ANIMATIONS ===== */

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}


/* Animate slide content when active */
.slide.active h1 {
    animation: fadeInUp 0.5s ease-out;
}

.slide.active .content {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

/* Animated cards */
.animated-card {
    transition: all 0.3s ease;
}

.animated-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Smooth fade-in animation for cards */
@keyframes smoothFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered card animations - smooth fade effect */
.slide.active .animated-card:nth-child(1) { animation: smoothFadeIn 0.5s ease-out 0.05s backwards; }
.slide.active .animated-card:nth-child(2) { animation: smoothFadeIn 0.5s ease-out 0.1s backwards; }
.slide.active .animated-card:nth-child(3) { animation: smoothFadeIn 0.5s ease-out 0.15s backwards; }
.slide.active .animated-card:nth-child(4) { animation: smoothFadeIn 0.5s ease-out 0.2s backwards; }
.slide.active .animated-card:nth-child(5) { animation: smoothFadeIn 0.5s ease-out 0.25s backwards; }
.slide.active .animated-card:nth-child(6) { animation: smoothFadeIn 0.5s ease-out 0.3s backwards; }
.slide.active .animated-card:nth-child(7) { animation: smoothFadeIn 0.5s ease-out 0.35s backwards; }
.slide.active .animated-card:nth-child(8) { animation: smoothFadeIn 0.5s ease-out 0.4s backwards; }

/* Animated icons */
.animated-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.animated-card:hover .animated-icon {
    animation: float 1s ease-in-out infinite;
}

/* Logo animation */
.animated-logo {
    animation: scaleIn 0.6s ease-out;
}

/* Tagline animation */
.animated-tagline {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
    background: linear-gradient(90deg, #0d9488 0%, #0d9488 40%, #5eead4 50%, #0d9488 60%, #0d9488 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide.active .animated-tagline {
    animation: fadeInUp 0.8s ease-out 0.5s backwards, sweepGlow 2.5s ease-in-out 1s infinite;
}

@keyframes sweepGlow {
    0%, 100% {
        background-position: 100% 0;
    }
    50% {
        background-position: 0% 0;
    }
}

/* Flow step animations for "How It Works" */
.flow-step {
    transition: all 0.3s ease;
}

.flow-step:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
