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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #000;
    color: #e0e0e0;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

.hidden {
    display: none !important;
}

/* LAYER SYSTEM */
.layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

.layer.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   LAYER 0: KOMPOST A + SCHWARZE KUGEL
   ============================================ */

#layer0 {
    background: #000;
}

.compost-start {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.compost-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.6s;
}

.compost-start.orb-active .compost-photo {
    filter: brightness(0.7);
}

/* Schwarze Kugel */
.black-orb {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #1a1a1a, #000000);
    box-shadow: 
        0 0 40px rgba(0,0,0,0.9),
        inset 0 -20px 40px rgba(0,0,0,0.8);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    animation: orb-pulse 3s ease-in-out infinite;
}

@keyframes orb-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0,0,0,0.9); }
    50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(0,0,0,1); }
}

.black-orb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 80px rgba(46, 125, 50, 0.4);
}

.orb-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.1), transparent 50%);
}

/* Buchcover Reveal */
.book-reveal {
    position: absolute;
    width: 220px;
    height: 330px;
    cursor: pointer;
    transition: all 0.6s ease;
    z-index: 15;
    opacity: 0;
    transform: scale(0.8);
}

.book-reveal.visible {
    opacity: 1;
    transform: scale(1);
    animation: book-float 4s ease-in-out infinite;
}

@keyframes book-float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.02); }
}

.book-cover-reveal {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 50px rgba(0,0,0,0.9));
    border-radius: 4px;
    transition: all 0.4s;
}

.book-reveal:hover .book-cover-reveal {
    transform: scale(1.05);
    filter: drop-shadow(0 25px 60px rgba(46, 125, 50, 0.5));
}

/* ============================================
   LAYER 1: BUCH LESEN
   ============================================ */

#layer1 {
    background: #000;
}

.compost-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.6s;
}

.compost-background:hover {
    opacity: 0.6;
}

.compost-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buch-Fenster (wie vorher) */
.book-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 300px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 4s ease-in-out infinite;
}

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

.book-icon:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.book-cover {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
    border-radius: 4px;
}

.book-glow {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(46, 125, 50, 0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.6s;
    pointer-events: none;
}

.book-icon:hover .book-glow {
    opacity: 1;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* ============================================
   LAYER 1: BUCH LESEN
   ============================================ */

#layer1 {
    background: #0a0a0a;
}

/* Kompost-Hintergrund (clickbar) */
.compost-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.6s;
}

.compost-background:hover {
    opacity: 0.5;
}

.compost-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buch-Fenster */
.book-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 900px;
    height: 85%;
    background: linear-gradient(160deg, #1a2a1a, #0f1f0f);
    border-radius: 12px;
    box-shadow: 
        0 0 60px rgba(46, 125, 50, 0.3),
        inset 0 2px 0 rgba(255,255,255,0.1);
    z-index: 10;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: window-appear 1s ease-out;
}

@keyframes window-appear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Book Header */
.book-header {
    padding: 30px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2), rgba(39, 174, 96, 0.1));
    border-bottom: 2px solid rgba(46, 125, 50, 0.3);
}

.book-header h1 {
    font-size: 2em;
    color: #c4d4c4;
    margin-bottom: 10px;
}

.book-subtitle {
    font-size: 1.1em;
    color: #a4b4a4;
    font-style: italic;
}

/* Inhaltsverzeichnis */
.table-of-contents {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.table-of-contents h2 {
    color: #2ecc71;
    margin-bottom: 20px;
    font-size: 1.5em;
}

#toc-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toc-part {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid rgba(46, 125, 50, 0.5);
}

.part-title {
    font-size: 1.2em;
    color: #a4b4a4;
    margin-bottom: 10px;
    font-weight: 600;
}

.chapter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 20px;
}

.chapter-item {
    padding: 12px 15px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(39, 174, 96, 0.05));
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.chapter-item:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2), rgba(39, 174, 96, 0.1));
    border-left-color: #2ecc71;
    transform: translateX(5px);
}

.chapter-number {
    color: #2ecc71;
    font-weight: 600;
    margin-right: 10px;
}

.chapter-preview {
    color: #c4d4c4;
    font-size: 0.95em;
}

/* Lese-Ansicht */
.reading-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.reading-view.hidden {
    display: none;
}

.chapter-header {
    padding: 20px 30px;
    background: rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(46, 125, 50, 0.3);
}

.chapter-header h2 {
    color: #2ecc71;
    font-size: 1.3em;
}

.nav-btn {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2), rgba(39, 174, 96, 0.1));
    border: 1px solid rgba(46, 125, 50, 0.4);
    color: #c4d4c4;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9em;
}

.nav-btn:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.4), rgba(39, 174, 96, 0.2));
    border-color: #2ecc71;
    transform: translateY(-2px);
}

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

.chapter-content {
    flex: 1;
    padding: 40px 50px;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 1.1em;
    color: #d4e4d4;
}

.chapter-content p {
    margin-bottom: 1.2em;
}

.chapter-footer {
    padding: 20px 30px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(46, 125, 50, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background: rgba(46, 125, 50, 0.2);
    border: 1px solid rgba(46, 125, 50, 0.4);
    color: #c4d4c4;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-secondary:hover {
    background: rgba(46, 125, 50, 0.3);
    border-color: #2ecc71;
}

.chapter-meta {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2ecc71, #27ae60);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #27ae60, #229954);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .book-window {
        width: 95%;
        height: 95%;
    }
    
    .book-header h1 {
        font-size: 1.5em;
    }
    
    .chapter-content {
        padding: 20px;
        font-size: 1em;
    }
    
    .book-icon {
        width: 150px;
        height: 225px;
    }
}

/* ============================================
   LAYER 2: PARAMETER
   ============================================ */

#layer2 {
    background: #000;
}

.compost-background-deep {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    transition: opacity 0.6s;
}

.compost-background-deep:hover {
    opacity: 0.8 !important;
}

.compost-background-deep img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: breathe-slow 12s ease-in-out infinite;
}

@keyframes breathe-slow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.03) rotate(0.5deg); }
}

.layer2-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px;
    animation: sink-in 2s ease-out;
}

@keyframes sink-in {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.layer-title {
    font-size: 3em;
    color: #2ecc71;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(46, 125, 50, 0.5);
    animation: pulse-text 3s ease-in-out infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; text-shadow: 0 0 30px rgba(46, 125, 50, 0.8); }
}

.layer-subtitle {
    font-size: 1.3em;
    color: #a4b4a4;
    margin-bottom: 60px;
    font-style: italic;
}

.param-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
    max-width: 800px;
}

.param-box {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.15), rgba(39, 174, 96, 0.08));
    padding: 30px;
    border-radius: 12px;
    border: 2px solid rgba(46, 125, 50, 0.3);
    transition: all 0.4s;
}

.param-box:hover {
    border-color: #2ecc71;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(46, 125, 50, 0.3);
}

.param-box h3 {
    color: #2ecc71;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.param-slider {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.3), rgba(46, 125, 50, 0.3));
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    margin-bottom: 15px;
}

.param-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, #2ecc71, #27ae60);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.5);
}

.param-value {
    color: #c4d4c4;
    font-size: 1.1em;
    font-weight: 600;
}

.param-select {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(46, 125, 50, 0.4);
    border-radius: 6px;
    color: #c4d4c4;
    font-size: 1em;
    font-family: inherit;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.btn-kompost,
.btn-deeper {
    padding: 20px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s;
    font-family: inherit;
}

.btn-kompost {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.4);
}

.btn-kompost:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(46, 125, 50, 0.6);
}

.btn-deeper {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.3), rgba(39, 174, 96, 0.2));
    color: #2ecc71;
    border: 2px solid #2ecc71;
}

.btn-deeper:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.5), rgba(39, 174, 96, 0.3));
    transform: translateY(-3px);
}

.layer-hint {
    color: #7f8c8d;
    font-size: 0.95em;
    font-style: italic;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .param-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .layer-title {
        font-size: 2em;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-kompost,
    .btn-deeper {
        width: 100%;
    }
}

/* ============================================
   LAYER 3: SPLIT-VIEW + PARAMETER
   ============================================ */

#layer3 {
    background: #000;
}

.compost-background-darker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
}

.compost-background-darker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-container {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 28% 20% 28%;
    gap: 2%;
    justify-content: center;
    height: 100vh;
    padding: 40px 20px;
}

.split-left,
.split-left,
.split-right {
    background: linear-gradient(160deg, rgba(26, 42, 26, 0.9), rgba(15, 31, 15, 0.85));
    border-radius: 12px;
    padding: 25px;
    border: 2px solid rgba(46, 125, 50, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.split-middle {
    background: linear-gradient(160deg, rgba(26, 42, 26, 0.9), rgba(15, 31, 15, 0.85));
    border-radius: 12px;
    padding: 25px;
    border: 2px solid rgba(46, 125, 50, 0.3);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 80px);
}

.split-left h3,
.split-middle h3,
.split-right h3 {
    color: #2ecc71;
    margin-bottom: 20px;
    font-size: 1.2em;
}

.chapter-dropdown {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(46, 125, 50, 0.4);
    border-radius: 6px;
    color: #c4d4c4;
    font-size: 1em;
    font-family: inherit;
    margin-bottom: 20px;
}

.text-display {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    line-height: 1.7;
    color: #d4e4d4;
}

.param-control {
    margin-bottom: 25px;
}

.param-control label {
    display: block;
    color: #2ecc71;
    margin-bottom: 8px;
    font-weight: 600;
}

.param-control input[type="range"] {
    width: 100%;
    margin-bottom: 8px;
}

.param-control span {
    color: #c4d4c4;
    font-size: 0.95em;
}

.btn-generate {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 125, 50, 0.5);
}

.hint {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    margin-top: 40px;
}

/* ============================================
   LAYER 4: TRANSFORMATION
   ============================================ */

#layer4 {
    background: #000;
}

.compost-background-darkest {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: pointer;
    animation: glitch-subtle 8s ease-in-out infinite;
}

@keyframes glitch-subtle {
    0%, 100% { filter: blur(2px) hue-rotate(0deg); }
    50% { filter: blur(3px) hue-rotate(5deg); }
}

.compost-background-darkest img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transformation-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px;
}

.output-large {
    width: 60%;
    max-width: 900px;
    height: 60vh;
    background: linear-gradient(160deg, rgba(26, 42, 26, 0.95), rgba(15, 31, 15, 0.9));
    border-radius: 12px;
    padding: 40px;
    border: 2px solid rgba(46, 125, 50, 0.4);
    overflow-y: auto;
    line-height: 1.8;
    color: #d4e4d4;
    margin-bottom: 30px;
    animation: pulse-border 4s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(46, 125, 50, 0.4); }
    50% { border-color: rgba(46, 125, 50, 0.7); }
}

.transform-params {
    width: 60%;
    max-width: 900px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.2), rgba(39, 174, 96, 0.1));
    padding: 30px;
    border-radius: 12px;
    border: 2px solid rgba(46, 125, 50, 0.3);
}

.transform-params h3 {
    color: #2ecc71;
    margin-bottom: 25px;
    font-size: 1.3em;
    text-align: center;
}

.transform-params .param-control {
    margin-bottom: 20px;
}

.btn-transform {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-transform:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.6);
}

/* Mobile für Layer 3 + 4 */
@media (max-width: 768px) {
    .split-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        overflow-y: auto;
    }
    
    .output-large,
    .transform-params {
        width: 90%;
    }
}

/* Humus Button */
.btn-humus {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.3), rgba(39, 174, 96, 0.2));
    color: #2ecc71;
    border: 2px solid rgba(46, 125, 50, 0.5);
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
    font-family: inherit;
}

.btn-humus:hover {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.5), rgba(39, 174, 96, 0.3));
    border-color: #2ecc71;
    transform: translateY(-2px);
}

/* Humus View */
.humus-view {
    position: relative;
    z-index: 10;
    padding: 40px;
    height: 100vh;
    overflow-y: auto;
}

.humus-container {
    position: relative;
    width: 80%;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 400px;
}

/* Verbessertes TOC für viele Kapitel */
.chapter-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.chapter-number {
    color: #2ecc71;
    font-weight: 700;
    min-width: 40px;
}

.chapter-title {
    color: #c4d4c4;
    font-size: 0.95em;
}

.chapter-words {
    color: #7f8c8d;
    font-size: 0.85em;
    font-style: italic;
}

.section-header {
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.25), rgba(39, 174, 96, 0.15)) !important;
    border-left-color: #27ae60 !important;
    font-weight: 600;
}

.section-header .chapter-title {
    color: #2ecc71;
    font-weight: 600;
}

/* LAYER 2: Bio-Parameter */
.corpus-dropdown {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    background: rgba(46, 204, 113, 0.1);
    border: 1px solid #2ecc71;
    border-radius: 5px;
    color: #c4d4c4;
    font-size: 0.9em;
}

.param-control {
    margin-bottom: 20px;
}

.param-control label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.param-value {
    color: #2ecc71;
    font-weight: bold;
}

.param-control input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.param-hint {
    font-size: 0.75em;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
}

.btn-humus {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    margin-top: 10px;
}

.btn-humus:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.btn-humus:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.humus-status {
    margin-top: 15px;
    padding: 10px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 5px;
    text-align: center;
    color: #2ecc71;
}

/* LAYER 3: KI */
.ki-input-select {
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
}

.ki-text-area textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #3498db;
    border-radius: 8px;
    color: #c4d4c4;
    font-family: Georgia, serif;
    font-size: 1em;
    resize: vertical;
}

.ki-params {
    background: rgba(52, 152, 219, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.ki-output-area {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    min-height: 200px;
}

.btn-transform {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

.btn-transform:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
}

/* LAYER 4: Humus Canvas */
.compost-background-black {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#humus-canvas {
    display: block;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    border: 2px solid rgba(46, 204, 113, 0.3);
}

.btn-export {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
}

.btn-export:hover {
    background: linear-gradient(135deg, #7f8c8d, #5d6d7e);
}

.hidden {
    display: none !important;
}

/* GENERIERTE TEXT-BOX: Schwebt, pulsiert, neongrün flackert */
#generated-text {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: float-pulse 4s ease-in-out infinite, neon-flicker 2s ease-in-out infinite;
    border: 2px solid #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

#generated-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.8);
}

/* Schwebe-Animation */
@keyframes float-pulse {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
    }
    50% {
        transform: translateY(-8px);
        box-shadow: 0 0 20px rgba(46, 204, 113, 0.7);
    }
}

/* Neon-Flacker-Animation */
@keyframes neon-flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        border-color: #2ecc71;
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.5),
                    0 0 20px rgba(46, 204, 113, 0.3);
    }
    20%, 24%, 55% {
        border-color: #27ae60;
        box-shadow: 0 0 5px rgba(46, 204, 113, 0.2);
    }
}

/* ============================================
   LAYER 3: KI-FERMENTIERUNG - NEU
   ============================================ */

/* Container 25% kleiner */
.ki-container {
    position: relative;
    z-index: 10;
    transform: scale(0.75);
    transform-origin: top center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ki-section {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Input Box - schwebt sanft, blauer Rand */
.ki-input-box {
    flex: 2;
    min-width: 400px;
    max-width: 600px;
    background: linear-gradient(160deg, rgba(20, 30, 50, 0.95), rgba(10, 20, 40, 0.9));
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 25px;
}

.ki-input-box h3 {
    color: #3498db;
    margin-bottom: 15px;
}

.ki-input-box textarea {
    width: 100%;
    height: 300px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    color: #d4e4d4;
    padding: 15px;
    font-family: Georgia, serif;
    font-size: 1em;
    resize: none;
    cursor: not-allowed;
}

.readonly-hint {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 10px;
    font-style: italic;
}

/* Parameter Box */
.ki-params-box {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: linear-gradient(160deg, rgba(20, 30, 50, 0.95), rgba(10, 20, 40, 0.9));
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 12px;
    padding: 25px;
}

.ki-params-box h3 {
    color: #3498db;
    margin-bottom: 20px;
}

.param-row {
    margin-bottom: 20px;
}

.param-row label {
    display: block;
    color: #3498db;
    margin-bottom: 8px;
    font-weight: 600;
}

.param-row select,
.param-row input[type="range"] {
    width: 100%;
}

.param-row select {
    padding: 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(52, 152, 219, 0.5);
    border-radius: 6px;
    color: #c4d4c4;
    font-size: 1em;
}

/* Fermentieren Button */
.btn-ferment {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse-blue 2s ease-in-out infinite;
}

.btn-ferment:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 10px rgba(52, 152, 219, 0.5); }
    50% { box-shadow: 0 0 25px rgba(52, 152, 219, 0.8); }
}

/* Output Box - stärker schwebend, glitcht */
.ki-output-box {
    flex: 2;
    min-width: 500px;
    max-width: 800px;
    background: linear-gradient(160deg, rgba(20, 30, 50, 0.95), rgba(10, 20, 40, 0.9));
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
}

.ki-output-box h3 {
    color: #3498db;
    margin-bottom: 15px;
}

.output-text {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    color: #d4e4d4;
    line-height: 1.7;
}

.ki-actions {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.btn-humus-blue {
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-humus-blue:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

.click-hint {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Floating Animations */
.floating-blue {
    animation: float-blue 4s ease-in-out infinite, flicker-blue 3s ease-in-out infinite;
}

.floating-blue-strong {
    animation: float-blue-strong 3s ease-in-out infinite, flicker-blue-strong 2s ease-in-out infinite;
}

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

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

@keyframes flicker-blue {
    0%, 90%, 100% { 
        border-color: #3498db;
        box-shadow: 0 0 10px rgba(52, 152, 219, 0.4);
    }
    92%, 94% { 
        border-color: #2980b9;
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.2);
    }
}

@keyframes flicker-blue-strong {
    0%, 85%, 100% { 
        border-color: #3498db;
        box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
    }
    87%, 89%, 91%, 93% { 
        border-color: #1abc9c;
        box-shadow: 0 0 20px rgba(26, 188, 156, 0.6);
    }
}

/* Glitch Overlay */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(52, 152, 219, 0.03) 2px,
        rgba(52, 152, 219, 0.03) 4px
    );
    animation: glitch-lines 8s linear infinite;
}

@keyframes glitch-lines {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

/* Loading Text Animation */
.loading-text {
    color: #3498db;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================================
   LAYER 3: KI-FERMENTIERUNG - KOMPLETT NEU
   ============================================ */

/* Container 75% Zoom */
.ki-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    transform: scale(0.75);
    transform-origin: center center;
}

/* KI-Box Basis */
.ki-box {
    background: linear-gradient(160deg, rgba(20, 40, 60, 0.95), rgba(15, 30, 50, 0.9));
    border-radius: 15px;
    padding: 35px;
    border: 2px solid #3498db;
    width: 90%;
    max-width: 1000px;
    margin: 20px 0;
}

.ki-box h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* Input Textarea - READONLY */
#ki-input-text {
    width: 100%;
    height: 150px;
    background: rgba(0,0,0,0.5);
    border: 1px solid #3498db;
    border-radius: 8px;
    color: #a4c4e4;
    font-family: Georgia, serif;
    font-size: 1em;
    padding: 15px;
    resize: none;
    cursor: not-allowed;
}

#ki-input-text::placeholder {
    color: #5a7a9a;
    font-style: italic;
}

.readonly-hint {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 8px;
    font-style: italic;
}

/* KI Parameter */
.ki-params {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(52, 152, 219, 0.3);
}

.param-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.param-row label {
    color: #3498db;
    min-width: 120px;
}

.param-row select,
.param-row input[type="range"] {
    flex: 1;
}

.param-row select {
    padding: 8px;
    background: rgba(0,0,0,0.4);
    border: 1px solid #3498db;
    border-radius: 5px;
    color: #a4c4e4;
}

/* Fermentieren Button */
.btn-ferment {
    width: 100%;
    padding: 15px 30px;
    margin-top: 15px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    animation: pulse-blue 2s ease-in-out infinite;
}

.btn-ferment:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.5);
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 10px rgba(52, 152, 219, 0.5); }
    50% { box-shadow: 0 0 25px rgba(52, 152, 219, 0.8); }
}

/* Floating Animation - Input (sanft) */
.floating-blue {
    animation: float-blue 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

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

/* Floating Animation - Output (stärker + Glitch) */
.floating-blue-strong {
    animation: float-blue-strong 3s ease-in-out infinite, glitch-subtle 5s ease-in-out infinite;
    box-shadow: 0 0 25px rgba(52, 152, 219, 0.6);
    cursor: pointer;
}

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

@keyframes glitch-subtle {
    0%, 90%, 100% { 
        border-color: #3498db;
        transform: translateY(0);
    }
    92% { 
        border-color: #e74c3c;
        transform: translateX(3px);
    }
    94% { 
        border-color: #2ecc71;
        transform: translateX(-3px);
    }
    96% {
        border-color: #3498db;
        transform: translateY(0);
    }
}

/* Fade Out Animation */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

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

/* Output Text */
.output-text {
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    color: #d4e4f4;
    line-height: 1.7;
    font-size: 1.05em;
}

/* Glitch Character */
.glitch-char {
    color: #e74c3c;
    animation: glitch-char 0.3s ease-in-out;
}

@keyframes glitch-char {
    0% { opacity: 0; transform: translateX(-10px); }
    50% { opacity: 1; color: #2ecc71; }
    100% { opacity: 1; transform: translateX(0); color: inherit; }
}

/* Loading Text */
.loading-text {
    color: #3498db;
    animation: pulse-loading 1s ease-in-out infinite;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* KI Info */
.ki-info {
    margin-top: 20px;
    padding: 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    font-size: 0.9em;
    color: #7fb3d5;
}

/* Humus Button Blue */
.btn-humus-blue {
    padding: 12px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.btn-humus-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* KI Actions */
.ki-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

#ki-humus-status {
    color: #3498db;
    font-size: 0.95em;
}

#ki-humus-status.saved {
    color: #2ecc71;
    animation: saved-flash 0.5s ease-out;
}

@keyframes saved-flash {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: #27ae60; }
    100% { transform: scale(1); }
}

/* Click Hint */
.click-hint {
    color: #7f8c8d;
    font-size: 0.85em;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
}

/* Glitch Overlay */
.glitch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    animation: scanlines 10s linear infinite;
}

@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* Error Text */
.error-text {
    color: #e74c3c;
    padding: 15px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
}

/* Error und Info Styles */
.error-text {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
}

.ki-info {
    margin-top: 20px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 5px;
    font-size: 0.9em;
    color: #3498db;
}

/* Glitch Character */
.glitch-char {
    color: #1abc9c;
    text-shadow: 1px 1px 2px rgba(26, 188, 156, 0.8);
}

/* ============================================
   LAYER 4: HUMUS - VOLLBILD
   ============================================ */

.humus-fullscreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#humus-canvas {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
}

.btn-export-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.8), rgba(39, 174, 96, 0.8));
    color: white;
    border: 2px solid #2ecc71;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s;
    animation: pulse-export 3s ease-in-out infinite;
}

.btn-export-float:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.6);
}

@keyframes pulse-export {
    0%, 100% { box-shadow: 0 0 10px rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 20px rgba(46, 204, 113, 0.6); }
}

/* ═══════════════════════════════════════════════════════════
   BIO-GENERATOR V2 STYLES
   ═══════════════════════════════════════════════════════════ */

.button-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.button-group .btn-generate {
    flex: 1;
}

.btn-reroll {
    background: rgba(46, 204, 113, 0.3);
    border: 1px solid var(--kompost-green);
    color: var(--kompost-green);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.btn-reroll:hover {
    background: var(--kompost-green);
    color: #000;
    transform: rotate(180deg);
}

.btn-reroll:active {
    transform: rotate(360deg);
}

/* Vereinfachte Param-Hints */
.param-hint {
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
    color: rgba(255,255,255,0.4);
    margin-top: 3px;
}

/* Generated Content Styling */
.generated-content {
    line-height: 1.8;
    white-space: pre-wrap;
}

.bio-meta {
    margin-top: 20px;
    padding: 10px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 5px;
    font-size: 0.85em;
    border-left: 3px solid var(--kompost-green);
}

.bio-meta .param {
    display: inline-block;
    margin-right: 15px;
    padding: 2px 8px;
    background: rgba(46, 204, 113, 0.2);
    border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════
   KOMPOST-SAMMLER & OUTPUT BOX STYLES
   ═══════════════════════════════════════════════════════════ */

/* Sammler Status */
.sammler-status {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}

.sammler-status span {
    color: var(--kompost-green);
    font-weight: bold;
}

/* Kompost-Sammler Box */
.kompost-sammler {
    transition: all 0.3s ease;
    min-height: 200px;
}

.kompost-sammler.clickable {
    cursor: pointer;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.kompost-sammler.clickable:hover {
    border-color: var(--kompost-green);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

.sammler-text {
    line-height: 1.6;
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
}

/* Output Box */
.output-box {
    transition: all 0.3s ease;
    min-height: 200px;
}

.output-box.has-content {
    cursor: pointer;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.output-box.has-content:hover {
    border-color: #3498db;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.2);
}

/* Hints */
.hint {
    color: rgba(255,255,255,0.4);
    text-align: center;
    font-style: italic;
}

.hint small {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
}

/* Sammler Items */
.sammler-item {
    padding: 8px 10px;
    margin-bottom: 8px;
    background: rgba(46, 204, 113, 0.1);
    border-left: 2px solid var(--kompost-green);
    font-size: 0.85em;
    line-height: 1.4;
}

.sammler-item small {
    color: var(--kompost-green);
    font-weight: bold;
    margin-right: 5px;
}

/* Output Box Meta */
.bio-meta {
    margin-top: 15px;
    padding: 8px 12px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 4px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.6);
    text-align: center;
}

/* Sammler voll */
.kompost-sammler.full {
    border-color: var(--kompost-green) !important;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.3);
    animation: pulse-green 1.5s ease-in-out infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 15px rgba(46, 204, 113, 0.2); }
    50% { box-shadow: 0 0 25px rgba(46, 204, 113, 0.4); }
}

/* ═══════════════════════════════════════════════════════════
   BAKTERIUM NAVIGATION (Mobile only)
   ═══════════════════════════════════════════════════════════ */

.btn-nav-bakterium {
    display: none; /* Versteckt auf Desktop */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--kompost-green);
    color: var(--kompost-green);
    font-size: 1.8em;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
    animation: bakterium-pulse 2s ease-in-out infinite;
}

.btn-nav-bakterium:hover {
    background: var(--kompost-green);
    color: #000;
    box-shadow: 0 0 25px rgba(46, 204, 113, 0.6);
}

@keyframes bakterium-pulse {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
        transform: scale(1.05);
    }
}

/* Mobile: Bakterium sichtbar */
@media (max-width: 768px) {
    .btn-nav-bakterium {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Alte Nav-Buttons verstecken (falls noch vorhanden) */
.btn-nav {
    display: none !important;
}
