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

:root {
    /* Primary Colors */
    --orange: #ff6b35;
    --orange-light: #ff8c5a;
    --orange-dark: #e55a2b;
    --orange-glow: rgba(255, 107, 53, 0.4);
    --orange-subtle: rgba(255, 107, 53, 0.12);

    /* Background Colors */
    --deep: #050505;
    --charcoal: #141414;
    --surface: #1a1a1a;
    --surface-light: #222222;

    /* Text Colors */
    --silver: #c0c0c0;
    --silver-light: #e8e8e8;
    --silver-muted: #888888;
    --silver-dark: #555555;
    --white: #ffffff;

    /* Accent Colors */
    --blue: #4a9eff;
    --blue-subtle: rgba(74, 158, 255, 0.15);
    --green: #4ade80;
    --green-subtle: rgba(74, 222, 128, 0.15);
    --red: #ef4444;
    --red-subtle: rgba(239, 68, 68, 0.15);
    --purple: #a78bfa;
    --purple-subtle: rgba(167, 139, 250, 0.15);

    /* PowerPoint Slide Dimensions (16:9) */
    --slide-width: 1920px;
    --slide-height: 1080px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #1a1a1a;
    font-family: 'DM Sans', sans-serif;
    color: var(--silver-light);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Font Families */
.font-syne { font-family: 'Syne', sans-serif; }
.font-dm { font-family: 'DM Sans', sans-serif; }

/* Font Weights */
.weight-300 { font-weight: 300; }
.weight-400 { font-weight: 400; }
.weight-500 { font-weight: 500; }
.weight-600 { font-weight: 600; }
.weight-700 { font-weight: 700; }
.weight-800 { font-weight: 800; }

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-orange { color: var(--orange); }
.text-white { color: var(--white); }
.text-muted { color: var(--silver-muted); }
.uppercase { text-transform: uppercase; letter-spacing: 2px; }

/* Slideshow Container */
.slideshow-container {
    width: 100%;
    max-width: var(--slide-width);
    position: relative;
}

/* Individual Slide - PowerPoint 16:9 dimensions */
.slide {
    width: var(--slide-width);
    height: var(--slide-height);
    max-width: 100%;
    aspect-ratio: 16 / 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0d0d0d 0%, #050505 50%, #0a0a0a 100%);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.slide-content {
    max-width: 1600px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Slide Number */
.slide-number {
    position: absolute;
    bottom: 30px;
    right: 40px;
    font-size: 0.9rem;
    color: var(--silver-dark);
    font-family: 'Syne', sans-serif;
}

/* Grid Systems */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    width: 100%;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    width: 100%;
}

/* Cards */
.card {
    background: linear-gradient(145deg, var(--surface), var(--charcoal));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-highlight {
    border-color: var(--orange);
    box-shadow: 0 0 30px var(--orange-subtle);
}

/* Buttons */
.btn {
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--orange-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--orange-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--silver-dark);
}

.btn-secondary:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Badges */
.badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-orange {
    background: var(--orange);
    color: var(--white);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--silver-dark);
    color: var(--silver-muted);
}

/* Navigation */
.nav-controls {
    position: fixed;
    bottom: 30px;
    left: 40px;
    display: flex;
    gap: 16px;
    z-index: 1000;
    background: rgba(20, 20, 20, 0.9);
    padding: 12px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed;
    top: 30px;
    left: 40px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
}

.hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Slide Navigator Sidebar */
.slide-navigator {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: 100px 20px 100px;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.slide-navigator.open {
    left: 0;
}

.slide-navigator h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--silver-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.slide-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide-nav-item {
    margin-bottom: 4px;
}

.slide-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--silver-light);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.slide-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.slide-nav-link.active {
    background: var(--orange-subtle);
    border-color: var(--orange);
    color: var(--orange);
}

.slide-nav-num {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
}

.slide-nav-link.active .slide-nav-num {
    background: var(--orange);
    color: var(--white);
}

/* Sidebar Action Buttons */
.sidebar-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--silver-light);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-action-btn:hover {
    background: var(--orange-subtle);
    border-color: var(--orange);
    color: var(--orange);
}

.sidebar-action-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Sidebar Extra Links */
.sidebar-extra-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-extra-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--silver-muted);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-extra-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--silver-light);
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: var(--orange);
    border-color: var(--orange);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slide-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--silver-muted);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

.animate-in { animation: fadeUp 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

/* Responsive Scaling for Slides */
@media (max-width: 1920px) {
    .slide {
        width: 100%;
        height: auto;
    }
}

/* Print & PDF Export Styles */
@media print {
    /* Hide all navigation and UI elements */
    .nav-controls,
    .hamburger-btn,
    .slide-navigator,
    .back-nav,
    #pdf-loading-overlay,
    #pdf-download-modal {
        display: none !important;
        visibility: hidden !important;
    }

    /* Reset body for clean capture */
    body {
        padding: 0 !important;
        margin: 0 !important;
        background: #0a0a0a !important;
    }

    /* Make slide full page */
    .slideshow-container {
        width: 100% !important;
        max-width: none !important;
    }

    .slide {
        width: 100vw !important;
        height: 100vh !important;
        max-width: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        page-break-after: always;
    }

    /* For diagram pages */
    .container {
        padding: 20px !important;
    }
}

/* PDF Export Mode - Applied via JavaScript */
[data-pdf-export="true"] {
    .nav-controls,
    .hamburger-btn,
    .slide-navigator,
    .back-nav {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

    body {
        padding: 0 !important;
        overflow: visible !important;
    }
}