/* ==========================================================================
   DER CHATBOT: RAHMEN & TEXT-EXPLOSION (PERFEKT INTEGRIERT)
   ========================================================================== */

/* Die Hauptbox: Exakt das gleiche Verhalten und Margins wie die AI-Box darüber */
.crazy-bot-section {
    border: var(--content-border-width, 2px) solid var(--content-border-color, #eeeeee) !important;
    padding: 1.5rem !important; /* Standard-Padding der .box-Klasse */
    margin-bottom: 2rem !important; /* Standard-Margin der .box-Klasse */
    background: #ffffff !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: visible !important; /* WICHTIG: Erlaubt Text-Explosionen über den Rand hinaus! */
}

/* Zentrierter innerer Container mit Atemraum nach oben/unten */
.crazy-bot-container {
    max-width: 800px;
    margin: 0 auto !important;
    text-align: center;
    padding: 2.5rem 1rem !important; /* Gibt dem Inhalt innerhalb des Kastens Luft */
}

/* Verspielter Header mit dezent zitterndem Avatar (Zwingend GERADE/NICHT KURSIV) */
.crazy-bot-header {
    margin-bottom: 2rem;
}

.crazy-bot-avatar {
    font-size: 3rem;
    display: inline-block;
    cursor: pointer;
    font-style: normal !important; /* Killt das Kursive aus dem Haupt-Template */
    transition: transform 0.1s ease;
    margin-bottom: 1rem;
}

/* Wenn man über den Roboter fährt, fängt er leicht an zu zittern */
.crazy-bot-container:hover .crazy-bot-avatar {
    animation: jitter 0.3s infinite linear;
}

/* Das Eingabefeld: Schön zentriert und clean */
.crazy-input-wrapper {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 3rem;
}

#ai-input {
    border: none !important;
    border-bottom: 2px solid #1e252d !important;
    background: transparent !important;
    width: 100%;
    max-width: 500px;
    margin: 0 auto !important;
    font-family: inherit;
    font-size: 2rem !important;
    font-style: italic;
    color: #1e252d !important;
    padding: 0.5rem 0;
    outline: none;
    text-align: center;
}

/* Der Output-Bereich: Hier sitzt der Text zentriert und bricht ggf. aus */
.crazy-response-box {
    font-family: 'Rauschen BBold', Helvetica, sans-serif !important;
    font-size: 2.2rem !important; /* Etwas größer, da Display-Schriften Platz brauchen */
    font-weight: bold !important;
    font-style: normal !important; /* Zwingt auch die Antwort, NICHT kursiv zu sein */
    text-transform: uppercase !important; /* Macht den Brutalismus-Look perfekt */
    line-height: 1.3 !important;
    color: #1e252d;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Zentriert die explodierenden Buchstaben im Raum */
    align-items: center;
    gap: 0.02em; /* Knapperes Spacing für fetten Schriftsatz */
    overflow: visible !important;
    margin-top: 1rem;
    word-break: keep-all !important;
    white-space: normal !important;
}

/* ==========================================================================
   DIE ANIMATIONS-EFFEKTE (DIE EXPLOSION)
   ========================================================================== */

/* Jeder einzelne Buchstabe wird zu einem eigenständig animierten Partikel */
.exploding-letter {
    display: inline-block;
    font-style: normal !important; /* Doppelte Absicherung gegen das Kursiv-Template */
    backface-visibility: hidden;
    animation: explode-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Verrückte Keyframe-Animation: Buchstaben fliegen wild ein und pendeln sich aus */
@keyframes explode-in {
    0% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(2);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
        filter: blur(0);
    }
}

/* Kleines Roboter-Zittern */
@keyframes jitter {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 1px) rotate(-1deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    60% { transform: translate(-1px, -2px) rotate(0deg); }
    80% { transform: translate(2px, 2px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Smartphone-Optimierung */
@media screen and (max-width: 736px) {
    .crazy-bot-section {
        padding: 2.5rem 1.5rem !important;
    }
    #ai-input {
        font-size: 1.5rem !important;
    }
}