@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #020617;
    --bg-card: rgba(15, 23, 42, 0.4);
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --secondary: #d946ef;
    --secondary-glow: rgba(217, 70, 239, 0.4);
    --accent: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-slow: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* Cinematic Background */
.presentation-container {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    overflow: hidden;
}

.bg-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.4;
}

.blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    animation: blobFloat 20s infinite alternate;
}

.blob-1 { background: var(--primary-glow); top: -10%; left: -10%; }
.blob-2 { background: var(--secondary-glow); bottom: -10%; right: -10%; animation-delay: -5s; }

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.2); }
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    box-shadow: 0 0 20px var(--primary);
    transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Slide Counter & Navigation */
.slide-counter {
    position: fixed;
    bottom: 2.5rem;
    left: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.2em;
    z-index: 1000;
}

.nav-controls {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    display: flex;
    gap: 0.75rem;
    z-index: 1000;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Slides Wrapper */
.slides-wrapper {
    flex: 1;
    position: relative;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
    filter: blur(10px);
    transition: var(--transition-slow);
    padding: 2rem 10vw;
}

.slide.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
    filter: blur(0);
}

.slide-content {
    width: 100%;
    max-width: 1400px;
}

/* Typography Overhaul */
h1, h2, h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 70%, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 800px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 99px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2rem;
}

/* Components */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 2rem;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05));
    opacity: 0;
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.6);
}

.feature-card:hover::before { opacity: 1; }

.icon-box {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.icon-box i { width: 1.5rem; height: 1.5rem; }

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Comparison Table */
.comparison-container {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    overflow: hidden;
    margin-top: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    padding: 1.5rem 2rem;
    text-align: left;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.02);
}

.comparison-table td {
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.comparison-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
}

/* Animations */
.stagger-in > * {
    opacity: 0;
    transform: translateY(20px);
}

.active .stagger-in > * {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.active .stagger-in > *:nth-child(1) { animation-delay: 0.1s; }
.active .stagger-in > *:nth-child(2) { animation-delay: 0.2s; }
.active .stagger-in > *:nth-child(3) { animation-delay: 0.3s; }
.active .stagger-in > *:nth-child(4) { animation-delay: 0.4s; }

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

/* Keyboard Hints */
.keyboard-hints {
    position: fixed;
    bottom: 2.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.keyboard-hints:hover { opacity: 1; }

/* Diagram Specifics */
.diagram-slide {
    padding: 2rem 5vw !important;
}

.diagram-container {
    width: 100%;
    height: 70vh;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    overflow: auto;
    padding: 1rem;
    display: flex;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.mermaid {
    color: #fff;
    width: 100% !important;
    height: auto !important;
}

.mermaid svg {
    max-width: 100% !important;
    height: auto !important;
}

/* Cinematic Flow Components */
.flow-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 3rem 0;
    width: 100%;
    position: relative;
    gap: 2rem;
}

.flow-node {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 1.5rem;
    text-align: center;
    min-width: 200px;
    position: relative;
    z-index: 2;
    transition: var(--transition-fast);
    backdrop-filter: blur(10px);
}

.flow-node.active {
    border-color: var(--primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.flow-node i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.flow-node h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.flow-node p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.flow-connector {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    position: relative;
    opacity: 0.4;
    min-width: 50px;
}

.flow-connector::after {
    content: '';
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid var(--secondary);
    filter: drop-shadow(0 0 5px var(--secondary-glow));
}

.hub-spoke-container {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-hub {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 0 50px var(--primary-glow);
    animation: pulse 4s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 50px var(--primary-glow); }
    50% { transform: scale(1.05); box-shadow: 0 0 80px var(--primary-glow); }
}

.spoke-node {
    position: absolute;
    width: 150px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    font-size: 0.8rem;
    text-align: center;
}

/* Query Examples */
.query-example {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    border-left: 3px solid var(--primary);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: var(--text-main);
}

.query-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.25rem;
    font-weight: 700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .slide {
        padding: 1.5rem 5vw !important;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .nav-controls {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .nav-btn {
        width: 3rem;
        height: 3rem;
    }

    .slide-counter {
        bottom: 1.5rem;
        left: 1.5rem;
    }

    .keyboard-hints {
        display: none;
    }

    .flow-container {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .flow-connector {
        width: 2px;
        height: 30px;
        flex: none;
    }

    .flow-connector::after {
        content: '↓';
        right: -8px;
        /* top: 20px; */
    }

    .hub-spoke-container {
        height: auto;
        flex-direction: column;
        padding-top: 1rem;
    }

    .center-hub {
        width: 130px;
        height: 130px;
        position: relative;
        margin-bottom: 2rem;
    }

    .spoke-node {
        position: relative !important;
        width: 100% !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        margin-bottom: 0.75rem;
        padding: 1rem;
    }

    .grid-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .comparison-container {
        overflow-x: auto;
    }

    .comparison-table {
        min-width: 500px;
    }
}

@media (max-height: 700px) {
    .slide-content {
        transform: scale(0.85);
    }
    
    .grid-cards {
        gap: 0.75rem;
        margin-top: 0.75rem;
    }
}
