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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #2c2c2e;
    overflow: hidden;
    color: #1d1d1f;
}

.presentation {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

.slide-container {
    /* 16:9 optimiert - nutzt Viewport besser aus */
    width: min(95vw, 160vh);  /* 16:9 Verhältnis */
    aspect-ratio: 16 / 9;
    max-width: 1920px;        /* Full HD optimiert */
    background: white;
    border-radius: clamp(16px, 1.5vw, 24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slide-content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Responsive Padding - skaliert mit Viewport */
    padding: clamp(30px, 4vh, 60px) clamp(40px, 4vw, 80px) clamp(50px, 5vh, 80px);
}

.slide-content-wrapper::-webkit-scrollbar {
    width: 8px;
}

.slide-content-wrapper::-webkit-scrollbar-track {
    background: #f5f5f7;
}

.slide-content-wrapper::-webkit-scrollbar-thumb {
    background: #d2d2d7;
    border-radius: 10px;
}

.slide-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #86868b;
}

.slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.slide.active {
    display: block;
}

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

h1 {
    font-size: clamp(36px, 4vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: clamp(20px, 2vw, 30px);
    color: #1d1d1f;
}

h2 {
    font-size: clamp(28px, 3vw, 48px);
    font-weight: 600;
    margin-bottom: clamp(20px, 2vw, 30px);
    color: #1d1d1f;
}

h3 {
    font-size: clamp(24px, 2.5vw, 32px);
    font-weight: 600;
    margin-bottom: clamp(15px, 1.5vw, 20px);
    color: #333;
}

h4 {
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 600;
    margin-bottom: clamp(12px, 1.2vw, 15px);
    color: #1d1d1f;
}

.subtitle {
    font-size: 28px;
    color: #6e6e73;
    margin-bottom: 20px;
    font-weight: 400;
}

.content {
    font-size: 20px;
    line-height: 1.6;
    color: #515154;
}

.highlight {
    color: #0071e3;
    font-weight: 600;
}

.badge {
    display: inline-block;
    background: linear-gradient(135deg, #4a7bc4 0%, #2F5599 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.phase-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4a7bc4 0%, #2F5599 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(47, 85, 153, 0.3);
}

ul {
    list-style: none;
    margin: 20px 0;
}

li {
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    color: #515154;
}

li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #0071e3;
    font-weight: 600;
}

code {
    background: #f5f5f7;
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 18px;
    color: #0071e3;
}

.code-block {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 30px;
    border-radius: 16px;
    margin: 20px 0;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    padding: 0;
    white-space: pre;
    line-height: 1.6;
}

.code-block code {
    background: transparent;
    padding: 0;
    color: #f5f5f7;
    font-size: 16px;
    display: block;
}

.code-block .keyword {
    color: #fc6be8;
}

.code-block .string {
    color: #fc8e65;
}

.code-block .comment {
    color: #6e7681;
}

.logo {
    position: absolute;
    top: 20px;
    right: 20px;
    height: 60px;
    z-index: 10;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px 40px;
    border-top: 1px solid #f5f5f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 0 24px 24px;
}

.navigation {
    font-size: 14px;
    color: #86868b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 30px;
}

.navigation a {
    color: #86868b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navigation a:hover {
    color: #515154;
}

.controls-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.controls-center .navigation {
    gap: 20px;
}

.progress {
    display: flex;
    gap: 8px;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d2d2d7;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #0071e3;
    width: 30px;
    border-radius: 5px;
}

.slide-number {
    font-size: 14px;
    color: #86868b;
    font-weight: 500;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 30px 0;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.card {
    background: #f5f5f7;
    padding: 30px;
    border-radius: 20px;
}

.card h4 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d1d1f;
}

.card p {
    font-size: 18px;
    line-height: 1.6;
    color: #515154;
}

.emoji {
    font-size: 48px;
    margin-bottom: 20px;
}

.emoji-small {
    font-size: 32px;
    margin-bottom: 20px;
}

.emoji-medium {
    font-size: 36px;
    margin-bottom: 20px;
}

.center {
    text-align: center;
}

.tech-stack {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.tech-stack.center {
    justify-content: center;
}

.tech-badge {
    background: #f5f5f7;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
}

/* ========================================
   UTILITY CLASSES - Spacing & Layout
   ======================================== */

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }
.mt-5vh { margin-top: 5vh; }
.mt-10vh { margin-top: 10vh; }

.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

/* ========================================
   CARD VARIANTS
   ======================================== */

.card-info {
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.08) 0%, rgba(0, 113, 227, 0.12) 100%);
    border: 2px solid rgba(0, 113, 227, 0.3);
}

.card-neutral {
    background: rgba(245, 245, 247, 0.8);
}

.card-dark {
    background: linear-gradient(135deg, #4a7bc4 0%, #2F5599 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(47, 85, 153, 0.35);
}

.card-dark h3,
.card-dark h4,
.card-dark p {
    color: white;
}

.card-dark .tech-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ========================================
   HEADER UTILITIES
   ======================================== */

h2.no-margin {
    margin: 0;
}

h3.no-margin {
    margin: 0;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 1024px) {
    .slide-container {
        /* Fallback für kleine Screens */
        aspect-ratio: auto;
        height: 90vh;
        width: 95vw;
    }

    .slide-content-wrapper {
        padding: 40px 50px 60px 50px;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .slide-content-wrapper {
        padding: 30px 30px 50px 30px;
    }
    
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    h3 { font-size: 24px; }
    
    .phase-number {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* ========================================
   LARGE DISPLAYS (4K+)
   ======================================== */

@media (min-width: 2560px) {
    .slide-container {
        max-width: 2560px;
    }
}

/* ========================================
   CLICKABLE NEXT-CARDS
   ======================================== */

.card-dark[data-next] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-dark[data-next]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(47, 85, 153, 0.5);
}

.card-dark[data-next]::after {
    content: " →";
}

/* ========================================
   PRINT STYLES - PDF Export
   ======================================== */

@media print {
    body {
        background: white;
        overflow: visible;
    }
    
    .presentation {
        padding: 0;
        width: 100%;
        height: auto;
    }
    
    .slide-container {
        width: 100%;
        max-width: none;
        height: auto;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    
    .slide-content-wrapper {
        overflow: visible;
        padding: 0;
        height: auto;
    }
    
    /* Alle Slides anzeigen */
    .slide {
        display: block !important;
        page-break-after: always;
        page-break-inside: avoid;
        padding: 40px;
        min-height: 100vh;
    }
    
    /* Letzte Slide ohne Page Break */
    .slide:last-child {
        page-break-after: auto;
    }
    
    /* Controls und Logo ausblenden */
    .controls,
    .logo {
        display: none !important;
    }
    
    /* Links schwarz für Druck */
    a {
        color: #1d1d1f;
        text-decoration: none;
    }
    
    /* Code-Blöcke optimieren */
    .code-block {
        page-break-inside: avoid;
        border: 1px solid #d2d2d7;
    }
    
    /* Cards optimieren */
    .card {
        page-break-inside: avoid;
        border: 1px solid #d2d2d7;
    }
    
    /* Grids für Druck anpassen */
    .grid-2,
    .grid-3 {
        page-break-inside: avoid;
    }
}
