:root {
    --primary: #1a73e8; 
    --ai-color: #8e24aa; 
    --hybrid-color: #fbbc04;
    --mission-color: #0f9d58; 
    --lab-color: #00f2ea; 
    --lab-bg: #0f172a;
    --bg-color: #f8f9fa;
    --surface: #ffffff;
    --border: #dadce0;
    --text: #202124;
    --instruction-bg: #fff8e1;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* HEADER */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10;
}
.logo-area h1 { margin: 0; font-size: 1.2rem; color: #444; }
.logo-area small { color: #666; }

/* STEPPER NAV */
.stepper { display: flex; gap: 5px; align-items: center; }
.step-btn {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: #f1f3f4;
    color: #5f6368;
    cursor: pointer;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.2s;
}
.step-btn:hover { background: #e8e8e8; }
.step-btn.active {
    opacity: 1; transform: scale(1.05); box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: white; border: none;
}
/* Farben für aktive Steps */
.step-btn.active[data-target="start"] { background: #444; }
.step-btn.active[data-target="google"] { background: var(--primary); }
.step-btn.active[data-target="ai"] { background: var(--ai-color); }
.step-btn.active[data-target="lab"] { background: var(--lab-bg); color: var(--lab-color); }
.step-btn.active[data-target="hybrid"] { background: var(--hybrid-color); color: #333; }
.step-btn.active[data-target="mission"] { background: var(--mission-color); }
.step-btn.active[data-target="school"] { background: #ff5722; }
.step-btn.active[data-target="freunde"] { background: #e91e8c; }

/* LAYOUTS */
main {
    flex: 1;
    overflow: hidden;
    display: none; 
    width: 100%;
    height: 100%;
    animation: fadeIn 0.3s ease-in-out;
}

/* NEU: Split Layout ist jetzt 50/50 */
main.active.split-layout {
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Text Links, Interaktion Rechts */
}

main.active.hybrid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

main.active.single-layout {
    display: block; 
    overflow-y: auto;
    background: white;
    padding: 0;
}

/* CONTENT BLOCKS */
.col-text { padding: 30px; overflow-y: auto; border-right: 1px solid var(--border); background: white; font-size: 1.05rem; line-height: 1.6; }
.col-text h2 { margin-top: 0; color: #202124; }
.col-text h3 { margin-top: 20px; font-size: 1.1rem; color: var(--primary); }
body .col-text h3.ai-title { color: var(--ai-color); }

/* INTERACTIVE AREA (Rechts) */
.interactive-area {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    height: 100%;
    overflow-y: auto;
}

/* Tools (Oben) */
.col-tools { 
    background: #fff; 
    padding: 20px; 
    border-bottom: 2px dashed var(--border);
    flex-shrink: 0; 
}
.tool-header { font-weight: bold; color: #555; margin-bottom: 10px; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

.toolbox-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    min-height: 50px;
}

.arrow-separator {
    text-align: center;
    font-size: 1.5rem;
    color: #999;
    padding: 5px 0;
    background: #f1f3f4;
}

/* Puzzle (Unten) */
.col-puzzle { 
    flex: 1; /* Nimmt den restlichen Platz */
    background: #f1f3f4; 
    padding: 20px; 
    display: flex; flex-direction: column; align-items: center; 
    gap: 5px;
}

.col-right-stack {
    background: #f8f9fa;
    padding: 20px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: 20px; align-items: center;
}

/* ITEMS */
.arrow-down { font-size: 1.2rem; color: #bdc1c6; margin: 0; }

.drop-zone { 
    width: 90%; min-height: 60px; 
    background: rgba(255,255,255,0.8); 
    border: 3px dashed #9aa0a6; 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    position: relative; font-weight: bold; color: #5f6368; 
    transition: all 0.2s;
}
.drop-zone::before { content: attr(data-label); position: absolute; top: 2px; left: 10px; font-size: 0.65rem; text-transform: uppercase; color: #999; letter-spacing: 1px; }
.drop-zone.hovered { background: #e8f0fe; border-color: var(--primary); transform: scale(1.02); }
.drop-zone.correct { background: #e6f4ea; border: 3px solid #34a853; color: #0d652d; border-style: solid; }

.draggable-item { 
    background: white; border: 1px solid #dadce0; border-left: 5px solid #555; 
    padding: 8px 15px; border-radius: 8px; 
    cursor: grab; font-weight: 600; font-size: 0.95rem; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
    user-select: none;
}
.draggable-item:active { cursor: grabbing; transform: scale(0.98); }

/* HYBRID */
.hybrid-box { background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%); border: 2px solid #fbbc04; padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.hybrid-visual { 
    width: 100%; max-width: 600px; aspect-ratio: 16 / 9; 
    background: #fff; border: 3px solid #fbbc04; border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; color: #888;
    background-image: url('https://www.eology.net/wp-content/uploads/2025/10/Bildschirmfoto-2025-10-14-um-13.30.06.png'); 
    background-size: cover; background-position: top center; box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.hybrid-quiz-container {
    width: 100%; max-width: 600px; border: 1px solid #fbbc04; border-left: 5px solid #fbbc04; border-radius: 12px; background: white; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.quiz-option { padding:12px; border:1px solid #ccc; margin-bottom:8px; cursor:pointer; border-radius:8px; transition: background 0.2s; font-size: 0.9rem;}
.quiz-option:hover { background: #f1f1f1; }

/* MISSION & SCHOOL */
.mission-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.mission-card { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 25px; margin-bottom: 25px; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.mission-badge { position: absolute; top: 0; right: 0; background: var(--mission-color); color: white; padding: 5px 15px; border-bottom-left-radius: 12px; font-weight: bold; }
.copy-box { background: #f1f3f4; padding: 15px; border-radius: 6px; border: 1px dashed #999; margin: 15px 0; display: flex; justify-content: space-between; align-items: center; font-family: monospace; font-size: 0.95rem; }
.ai-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin: 30px 0; }
.ai-tool-card { border: 1px solid var(--border); border-radius: 12px; padding: 15px; text-align: center; transition: all 0.2s; background: #fff; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.ai-tool-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: var(--primary); }

/* SCHOOL GRID */
.school-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 50px; }
.prompt-card { background: white; border: 1px solid #ddd; border-radius: 12px; padding: 20px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s; }
.prompt-card:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #ff5722; }
.prompt-card h3 { margin-top: 0; color: #ff5722; display: flex; align-items: center; gap: 8px; }
.prompt-card p { font-size: 0.9rem; color: #666; min-height: 40px; }

/* FOOTER */
.footer-nav { background: white; border-top: 1px solid var(--border); padding: 15px 40px; display: flex; align-items: center; justify-content: space-between; height: 70px; z-index: 100; flex-shrink: 0; }
.task-hint { flex: 1; background: var(--instruction-bg); padding: 12px 20px; border-left: 5px solid #fbbc04; border-radius: 4px; font-size: 0.95rem; margin-right: 20px; color: #5d4037; font-weight: 500; }
.next-btn { background: #202124; color: white; border: none; padding: 12px 30px; font-size: 1rem; border-radius: 8px; cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 10px; transition: background 0.2s; }
.next-btn:hover { background: #000; }

/* ===== FREUNDE MODUL ===== */
.freunde-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.freunde-section h2 {
    margin-top: 0;
    color: #e91e8c;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}
.freunde-section h3 {
    color: #333;
    margin-top: 0;
}

/* Karten-Spiel */
.karten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.karte-item {
    background: #f8f9fa;
    border: 2px solid #dadce0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}
.karte-item.karte-richtig {
    background: #e6f4ea;
    border-color: #34a853;
}
.karte-item.karte-falsch {
    background: #fce8e6;
    border-color: #ea4335;
}
.karte-text {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 14px;
    line-height: 1.4;
}
.karte-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.karte-btn {
    flex: 1;
    min-width: 110px;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
}
.karte-btn:hover { opacity: 0.85; transform: scale(1.03); }
.karte-btn-ki { background: #8e24aa; color: white; }
.karte-btn-freund { background: #e91e8c; color: white; }
.karte-feedback {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
    display: none;
}
.karte-feedback.richtig-fb { background: #e6f4ea; color: #0d652d; }
.karte-feedback.falsch-fb  { background: #fce8e6; color: #c62828; }
.karten-score {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #e91e8c;
    margin-bottom: 12px;
    padding: 10px;
    background: #fce4f1;
    border-radius: 10px;
}

/* Dialog Simulation */
.dialog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}
@media (max-width: 600px) {
    .dialog-grid { grid-template-columns: 1fr; }
    .karten-grid { grid-template-columns: 1fr; }
}
.dialog-panel {
    border-radius: 14px;
    padding: 20px;
    border: 2px solid;
}
.dialog-panel-ki {
    background: #f3e5f5;
    border-color: #8e24aa;
}
.dialog-panel-freund {
    background: #fce4f1;
    border-color: #e91e8c;
}
.dialog-panel h3 {
    margin-top: 0;
    font-size: 1rem;
}
.dialog-option {
    background: white;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.45;
    transition: all 0.15s;
    text-align: left;
    width: 100%;
    font-family: inherit;
}
.dialog-option:hover { border-color: #e91e8c; background: #fdf0f8; }
.dialog-option:disabled { cursor: default; opacity: 1; }
.dialog-explanation {
    display: none;
    background: #fff3e0;
    border-left: 4px solid #fb8c00;
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #5d4037;
}

/* Quiz */
.quiz-frage-block {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}
.quiz-frage-block p { font-weight: 600; color: #333; margin: 0 0 12px 0; font-size: 1rem; }
.quiz-option-freunde {
    display: block;
    padding: 10px 14px;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    background: white;
    text-align: left;
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
    transition: all 0.15s;
}
.quiz-option-freunde:hover:not(:disabled) { background: #fce4f1; border-color: #e91e8c; }
.quiz-option-freunde.richtig { background: #e6f4ea; border-color: #34a853; color: #0d652d; font-weight: bold; }
.quiz-option-freunde.falsch  { background: #fce8e6; border-color: #ea4335; color: #c62828; }
.quiz-score-box {
    display: none;
    text-align: center;
    padding: 28px;
    background: linear-gradient(135deg, #fce4f1 0%, #ede7f6 100%);
    border-radius: 16px;
    margin-top: 20px;
    border: 2px solid #e91e8c;
}
.quiz-score-box .score-zahl {
    font-size: 3rem;
    font-weight: 900;
    color: #e91e8c;
    display: block;
    margin-bottom: 8px;
}
.quiz-score-box p { color: #555; font-size: 1rem; margin: 0; }

/* Reflexion */
.reflexion-textarea {
    width: 100%;
    min-height: 110px;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s;
    line-height: 1.5;
}
.reflexion-textarea:focus { outline: none; border-color: #e91e8c; }
.btn-tipp {
    background: #e91e8c;
    color: white;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 14px;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
    display: inline-block;
}
.btn-tipp:hover { background: #c2185b; transform: scale(1.04); }
.tipp-box {
    display: none;
    margin-top: 18px;
    background: linear-gradient(135deg, #fce4f1 0%, #ede7f6 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 5px solid #e91e8c;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4a148c;
}

/* Outro */
.outro-box {
    background: linear-gradient(135deg, #880e4f 0%, #4a148c 100%);
    color: white;
    border-radius: 16px;
    padding: 36px 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}
.outro-box h2 { font-size: 1.5rem; margin: 0 0 16px 0; }
.outro-box p { font-size: 1.05rem; line-height: 1.7; margin: 0; opacity: 0.95; }
.outro-icon { font-size: 4rem; margin-bottom: 12px; animation: float 3s infinite ease-in-out; display: block; }

/* ===== END FREUNDE ===== */
/* Start, Lab, etc. unverändert */
.term { border-bottom: 2px dotted var(--primary); cursor: help; color: var(--primary); font-weight: bold; }
#term-popup { display: none; position: fixed; background: #202124; color: #fff; padding: 15px; border-radius: 8px; z-index: 1000; max-width: 250px; font-size: 0.9rem; pointer-events: none; }
.start-container { max-width: 800px; margin: 40px auto; text-align: center; padding: 20px; }
.hero-icon { font-size: 5rem; margin-bottom: 10px; animation: float 3s infinite ease-in-out; }
.start-btn { background: var(--primary); color: white; border: none; padding: 15px 40px; font-size: 1.2rem; border-radius: 50px; cursor: pointer; margin-top: 30px; box-shadow: 0 5px 15px rgba(26, 115, 232, 0.3); transition: transform 0.2s; }
.lab-container { max-width: 900px; margin: 0 auto; padding: 40px 20px; }
.lab-card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 30px; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.simulator-box { background: #1e293b; color: #e2e8f0; border-radius: 12px; padding: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
input[type=range] { width: 100%; cursor: pointer; margin-bottom: 5px; }
.bar-container { background: #333; height: 15px; border-radius: 10px; margin: 10px 0; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.3s; }

/* GAME LAUNCHER CARD */
.game-launcher {
    background: linear-gradient(135deg, #0288d1 0%, #01579b 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    margin-bottom: 40px;
    border: 1px solid #4fc3f7;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: float 3s infinite ease-in-out;
}

.mute-warning {
    background: rgba(0,0,0,0.3);
    color: #ffcc00;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid #ffcc00;
}

.launch-btn {
    display: inline-block;
    background: #ffcc00;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.launch-btn:hover {
    transform: scale(1.05);
    background: #ffd633;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}