/* ============================================================
   Blender 3D Kurs — Tag 2 — Slide-Stylesheet
   Dunkles Theme mit Blender-Orange Akzenten
   ============================================================ */

/* --- Reset & Basis ----------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: #0a0a0f;
    color: #e8e8ec;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* --- Slide-Container --------------------------------------- */
#slide-deck {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    padding: 3rem 4rem 5rem;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide.active {
    display: flex;
    opacity: 1;
}

.slide.fade-in {
    animation: fadeSlideIn 0.3s ease forwards;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Titelfolie -------------------------------------------- */
.slide.title-slide {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, #1a1520 0%, #0a0a0f 70%);
}

.slide.title-slide h1 {
    font-size: 3.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 0.4rem;
}

.slide.title-slide h1 span {
    color: #EA7600;
}

.slide.title-slide .subtitle {
    font-size: 1.25rem;
    color: #9a9aab;
    font-weight: 400;
    margin-bottom: 2rem;
}

.slide.title-slide .header-image {
    width: 100%;
    max-width: 720px;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(234, 118, 0, 0.15),
                0 2px 12px rgba(0, 0, 0, 0.4);
    margin-bottom: 2rem;
}

.slide.title-slide .header-image-placeholder {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/7;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e1a24 0%, #14121a 100%);
    border: 1px dashed #3a3a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a5a6a;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* --- Standard-Folien --------------------------------------- */
.slide h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #EA7600;
    letter-spacing: -0.01em;
}

.slide h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: #d8c8a0;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.slide h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c0b080;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.slide p {
    font-size: 1.05rem;
    color: #c8c8d4;
    margin-bottom: 1rem;
    max-width: 56rem;
}

.slide strong {
    color: #f0e8d0;
    font-weight: 600;
}

/* --- Listen ------------------------------------------------ */
.slide ul, .slide ol {
    margin: 0.5rem 0 1.2rem 1.5rem;
    max-width: 56rem;
}

.slide li {
    font-size: 1.05rem;
    color: #c8c8d4;
    margin-bottom: 0.45rem;
    line-height: 1.65;
}

.slide li::marker {
    color: #EA7600;
}

.slide ol li::marker {
    color: #EA7600;
    font-weight: 600;
}

/* --- Tabellen ---------------------------------------------- */
.slide table {
    width: 100%;
    max-width: 56rem;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 1rem;
}

.slide thead th {
    background: #1a1824;
    color: #EA7600;
    font-weight: 600;
    text-align: left;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid #EA7600;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.slide tbody td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #1e1e2a;
    color: #c8c8d4;
}

.slide tbody tr:hover {
    background: rgba(234, 118, 0, 0.04);
}

.slide tbody tr.pause td {
    color: #7a7a8a;
    font-style: italic;
}

/* --- Key-Caps (Tastaturkürzel) ----------------------------- */
kbd {
    display: inline-block;
    min-width: 1.8em;
    padding: 0.2em 0.55em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.88em;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    color: #f0f0f5;
    background: linear-gradient(180deg, #38384a 0%, #28283a 100%);
    border: 1px solid #4a4a5c;
    border-bottom: 3px solid #22222e;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
    white-space: nowrap;
    vertical-align: baseline;
}

kbd.accent {
    background: linear-gradient(180deg, #c05800 0%, #9a4500 100%);
    border-color: #EA7600;
    border-bottom-color: #7a3800;
    color: #fff;
}

/* --- Karten-Layout ----------------------------------------- */
.card-grid {
    display: grid;
    gap: 1.2rem;
    margin: 1rem 0 1.5rem;
}

.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #141420;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 1.3rem 1.4rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    border-color: #EA7600;
    box-shadow: 0 4px 20px rgba(234, 118, 0, 0.08);
}

.card h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #EA7600;
    font-size: 1.05rem;
}

.card p, .card ul {
    font-size: 0.95rem;
    color: #a8a8b8;
}

.card ul {
    margin-left: 1.2rem;
}

.card .card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0.3rem 0;
}

/* --- Screenshot-Platzhalter -------------------------------- */
.screenshot-placeholder {
    width: 100%;
    max-width: 48rem;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #14121c 0%, #0e0e18 100%);
    border: 1px dashed #3a3a4a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a5a6a;
    font-size: 0.9rem;
    margin: 1rem 0 1.5rem;
}

.screenshot-placeholder.small {
    max-width: 32rem;
    aspect-ratio: 4/3;
}

img.screenshot {
    width: 100%;
    max-width: 48rem;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    margin: 1rem 0 1.5rem;
}

img.slide-screenshot {
    float: right;
    width: 38%;
    max-width: 420px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    margin: 0 0 1rem 1.5rem;
    border: 1px solid #2a2a3a;
}

/* --- Info-Boxen -------------------------------------------- */
.info-box {
    max-width: 56rem;
    padding: 1rem 1.3rem;
    border-radius: 8px;
    margin: 1rem 0 1.2rem;
    font-size: 0.98rem;
    line-height: 1.6;
}

.info-box.tip {
    background: rgba(234, 118, 0, 0.08);
    border-left: 3px solid #EA7600;
    color: #e0d0b0;
}

.info-box.tip strong {
    color: #EA7600;
}

.info-box.note {
    background: rgba(80, 140, 220, 0.08);
    border-left: 3px solid #508cdc;
    color: #b0c8e8;
}

.info-box.note strong {
    color: #6ea8f0;
}

.info-box.success {
    background: rgba(60, 180, 100, 0.08);
    border-left: 3px solid #3cb464;
    color: #b0e0c0;
}

/* --- Code-Bloecke ------------------------------------------ */
code {
    font-family: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 0.9em;
    background: #1a1a2e;
    color: #e0c080;
    padding: 0.15em 0.4em;
    border-radius: 4px;
}

pre {
    background: #12121e;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    padding: 1rem 1.3rem;
    overflow-x: auto;
    margin: 0.8rem 0 1.2rem;
    max-width: 56rem;
}

pre code {
    background: none;
    padding: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #c8c8d8;
}

.syntax-keyword { color: #c084e8; }
.syntax-string  { color: #80c8a0; }
.syntax-number  { color: #e0a060; }
.syntax-comment { color: #5a6878; font-style: italic; }
.syntax-fn      { color: #70b8e8; }

/* --- Workflow-Schritte / Nummern --------------------------- */
.step-list {
    list-style: none;
    counter-reset: step-counter;
    margin: 0.8rem 0 1.2rem 0;
    padding: 0;
    max-width: 56rem;
}

.step-list li {
    counter-increment: step-counter;
    position: relative;
    padding: 0.7rem 0 0.7rem 3.2rem;
    margin-bottom: 0.3rem;
    border-bottom: 1px solid #1a1a26;
}

.step-list li:last-child {
    border-bottom: none;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #EA7600 0%, #c06000 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(234, 118, 0, 0.3);
}

/* --- Quiz -------------------------------------------------- */
.quiz-question {
    background: #141420;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 1.3rem 1.5rem;
    margin: 1rem 0;
    max-width: 48rem;
}

.quiz-question h4 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
}

.quiz-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quiz-options li {
    padding: 0.6rem 1rem;
    margin: 0.35rem 0;
    border-radius: 6px;
    border: 1px solid #2a2a3a;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-size: 1rem;
    color: #c8c8d8;
    user-select: none;
}

.quiz-options li:hover {
    background: rgba(234, 118, 0, 0.06);
    border-color: #4a4a5a;
}

.quiz-options li.selected {
    border-color: #EA7600;
    background: rgba(234, 118, 0, 0.1);
}

.quiz-options li.correct {
    border-color: #3cb464;
    background: rgba(60, 180, 100, 0.12);
    color: #b0e8c0;
}

.quiz-options li.wrong {
    border-color: #d04040;
    background: rgba(208, 64, 64, 0.1);
    color: #e8b0b0;
}

.quiz-options li.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.quiz-score {
    margin-top: 1.5rem;
    padding: 1rem 1.3rem;
    background: rgba(234, 118, 0, 0.08);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #EA7600;
    display: none;
    max-width: 48rem;
}

.quiz-score.visible {
    display: block;
}

/* --- Shortcuts-Tabelle ------------------------------------- */
.shortcuts-table {
    max-width: 56rem;
}

.shortcuts-table td:first-child {
    width: 160px;
    white-space: nowrap;
}

/* --- Vorher/Nachher ---------------------------------------- */
.compare-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
    max-width: 56rem;
}

.compare-box {
    background: #141420;
    border-radius: 10px;
    padding: 1.2rem;
    border: 1px solid #2a2a3a;
}

.compare-box .label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2em 0.6em;
    border-radius: 4px;
    margin-bottom: 0.8rem;
}

.compare-box.before .label {
    background: #2a2232;
    color: #a088b8;
}

.compare-box.after .label {
    background: #2a2818;
    color: #b8a860;
}

/* --- Shader-Kette (Pfeil-Diagramm) ------------------------ */
.shader-chain {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0 1.5rem;
    max-width: 56rem;
}

.shader-node {
    background: #1a1828;
    border: 1px solid #3a3a50;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.92rem;
    color: #d0d0e0;
    white-space: nowrap;
}

.shader-arrow {
    color: #EA7600;
    font-size: 1.2rem;
    font-weight: 700;
}

/* --- Ressourcen-Links -------------------------------------- */
.resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 56rem;
}

.resource-list li {
    padding: 0.8rem 1rem;
    margin: 0.4rem 0;
    background: #141420;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
}

.resource-list .resource-name {
    font-weight: 600;
    color: #EA7600;
    min-width: 140px;
}

.resource-list .resource-url {
    color: #8888a0;
    font-size: 0.92rem;
}

.resource-list .resource-desc {
    color: #a8a8b8;
    font-size: 0.95rem;
}

/* --- Navigation -------------------------------------------- */
#nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3.5rem;
    background: #0e0e16;
    border-top: 1px solid #1e1e2a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 100;
}

#progress-bar-track {
    position: fixed;
    bottom: 3.5rem;
    left: 0;
    right: 0;
    height: 3px;
    background: #1a1a26;
    z-index: 100;
}

#progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #EA7600, #f0a040);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.nav-btn {
    background: #1a1a28;
    border: 1px solid #2e2e40;
    color: #c8c8d8;
    padding: 0.45rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
}

.nav-btn:hover {
    background: #24243a;
    border-color: #4a4a60;
}

.nav-btn:active {
    background: #2e2e48;
}

.nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

#slide-counter {
    font-size: 0.88rem;
    color: #7a7a8c;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    min-width: 5rem;
    text-align: center;
}

/* --- Abschlussfolie ---------------------------------------- */
.slide.ending-slide {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 40%, #1a1520 0%, #0a0a0f 70%);
}

.ending-slide .brand {
    margin-top: 2rem;
    font-size: 0.88rem;
    color: #5a5a6a;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ending-slide .brand strong {
    color: #EA7600;
}

/* --- Separator --------------------------------------------- */
.divider {
    border: none;
    border-top: 1px solid #1e1e2a;
    margin: 1.5rem 0;
    max-width: 56rem;
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 1024px) {
    .slide {
        padding: 2rem 2.5rem 5rem;
    }

    .slide.title-slide h1 {
        font-size: 2.4rem;
    }

    .slide h2 {
        font-size: 1.65rem;
    }

    .card-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .slide {
        padding: 1.5rem 1.5rem 5rem;
    }

    .slide.title-slide h1 {
        font-size: 1.9rem;
    }

    .slide h2 {
        font-size: 1.4rem;
    }

    .slide h3 {
        font-size: 1.15rem;
    }

    .slide p, .slide li {
        font-size: 0.98rem;
    }

    img.slide-screenshot {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0.5rem 0 1rem;
    }

    .card-grid.cols-2,
    .card-grid.cols-3,
    .card-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    .compare-row {
        grid-template-columns: 1fr;
    }

    .shader-chain {
        flex-direction: column;
        align-items: flex-start;
    }

    .resource-list li {
        flex-direction: column;
        gap: 0.3rem;
    }

    .shortcuts-table td:first-child {
        width: auto;
    }

    #nav-bar {
        padding: 0 0.8rem;
    }
}

@media (max-width: 480px) {
    .slide {
        padding: 1rem 1rem 5rem;
    }

    .slide.title-slide h1 {
        font-size: 1.55rem;
    }

    .slide h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    kbd {
        font-size: 0.8em;
        padding: 0.15em 0.4em;
    }

    .step-list li {
        padding-left: 2.6rem;
    }

    .step-list li::before {
        width: 1.7rem;
        height: 1.7rem;
        font-size: 0.78rem;
    }
}

/* --- Print ------------------------------------------------- */
@media print {
    body {
        overflow: visible;
        height: auto;
        background: #fff;
        color: #222;
    }

    #slide-deck {
        height: auto;
    }

    .slide {
        position: relative;
        display: flex !important;
        opacity: 1 !important;
        page-break-after: always;
        padding: 1.5cm;
        min-height: auto;
        background: #fff !important;
    }

    .slide h2 {
        color: #222;
        border-bottom-color: #EA7600;
    }

    .slide h3, .slide h4 {
        color: #444;
    }

    .slide p, .slide li, .slide td {
        color: #333;
    }

    kbd {
        background: #eee;
        border-color: #ccc;
        border-bottom-color: #999;
        color: #222;
        box-shadow: none;
    }

    .card {
        background: #f8f8f8;
        border-color: #ddd;
    }

    .card h4 {
        color: #c06000;
    }

    .info-box.tip {
        background: #fff8f0;
        color: #664400;
    }

    .info-box.note {
        background: #f0f4ff;
        color: #334466;
    }

    pre, code {
        background: #f4f4f4;
        color: #333;
    }

    .screenshot-placeholder {
        background: #f0f0f0;
        border-style: solid;
        color: #888;
    }

    img.slide-screenshot {
        float: right;
        width: 35%;
        margin: 0 0 0.5cm 1cm;
        box-shadow: 0 1px 4px rgba(0,0,0,0.15);
        border: 1px solid #ddd;
    }

    .quiz-options li {
        border-color: #ccc;
        color: #333;
    }

    #nav-bar,
    #progress-bar-track {
        display: none !important;
    }

    .nav-btn {
        display: none;
    }

    #feedback-toggle,
    #feedback-panel {
        display: none !important;
    }
}

/* --- Feedback-System --------------------------------------- */
#feedback-toggle {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 200;
    background: #1e1e2a;
    color: #9a9aab;
    border: 1px solid #2a2a3a;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#feedback-toggle:hover {
    background: #EA7600;
    color: #fff;
    border-color: #EA7600;
}

#feedback-panel {
    position: fixed;
    bottom: 110px;
    right: 20px;
    z-index: 300;
    width: 360px;
    max-height: 70vh;
    background: #141420;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#feedback-panel.open {
    display: flex;
}

#feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #1a1a28;
    border-bottom: 1px solid #2a2a3a;
    font-size: 0.9rem;
    color: #c8c8d0;
}

#feedback-header strong {
    color: #EA7600;
}

#feedback-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

#feedback-close:hover {
    color: #fff;
}

#feedback-text {
    margin: 12px 16px 8px;
    padding: 10px 12px;
    background: #0a0a0f;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    color: #e0e0e0;
    font-family: inherit;
    font-size: 0.88rem;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
}

#feedback-text:focus {
    outline: none;
    border-color: #EA7600;
}

#feedback-text::placeholder {
    color: #555;
}

#feedback-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 10px;
}

#feedback-save {
    background: #EA7600;
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#feedback-save:hover {
    background: #ff8c1a;
}

#feedback-status {
    color: #6abf6a;
    font-size: 0.82rem;
}

#feedback-existing {
    max-height: 200px;
    overflow-y: auto;
    padding: 0 16px;
}

.feedback-entry {
    padding: 8px 0;
    border-top: 1px solid #1e1e2a;
    font-size: 0.84rem;
    color: #b0b0b8;
}

.feedback-entry small {
    color: #666;
    font-size: 0.75rem;
}

.feedback-entry p {
    margin: 4px 0 0;
    white-space: pre-wrap;
}

#feedback-export-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid #2a2a3a;
    margin-top: 8px;
}

#feedback-export {
    background: none;
    border: 1px solid #333;
    color: #888;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
}

#feedback-export:hover {
    border-color: #EA7600;
    color: #EA7600;
}

#feedback-count {
    font-size: 0.75rem;
    color: #555;
}
