/* --- Globale Variablen (Abgeleitet vom Bild) --- */
:root {
    --color-bg-main: #1C1C23;       /* Haupt-Hintergrund (Dunkelblau/Schwarz) */
    --color-bg-card: #25262E;       /* Karten-Hintergrund */
    --color-text-primary: #F0F0F0;
    --color-text-secondary: #aaaaaa;
    --color-accent-violet-pink: #C134DE; 
    --gradient-accent: linear-gradient(to bottom right, #918c8c, var(--color-accent-violet-pink));
    --color-accent-violet: #8F3DFF; /* Primäres Violett */
    --color-highlight: #A060FF;     /* Helles Violett für Hover/Border */
    --color-border-subtle: #404048;
    --color-input-bg: #35363D;      /* Dunkler Hintergrund für Input/Info-Box */
    --color-results-bg: #302A3D;    /* Dunkelvioletter Hintergrund (wie im Bild) */
    --color-divider: #505058;       /* Graue Trennlinie */
    --color-error: #E74C3C;
    --font-primary: 'Montserrat', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

/* --- Grundstruktur --- */
body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: var(--color-text-primary);
    line-height: 1.6;
}

.container {
    background-color: var(--color-bg-card);
    padding: 40px;
    border-radius: 10px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 1000px;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid var(--color-border-subtle);
}

/* --- Header und Logo --- */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.logo {
    width: 100px; 
    height: 100px;
    margin-right: 12px;
    border-radius: 50%;
}

h1 {
    margin-bottom: 0;
    font-size: 2.1em;
    font-weight: 700;
}

.accent {
    color: var(--color-accent-violet-pink); 
    font-weight: 600;
}
/* Für die Überschrift */
.header h1 .accent {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2rem;

    /* Farbverlauf */
    background: linear-gradient(to bottom right, #aaaeee, #C134DE);

    /* Wichtige Einstellungen, damit der Gradient auf Text angewendet wird */
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Optional: sanfte Übergänge bei Hover */
    transition: background 0.3s ease;
}

.description {
    color: var(--color-text-secondary);
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 1em;
}

/* --- Eingabebereich & Button --- */
.input-section {
    margin-bottom: 20px;
}

.button-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--color-border-subtle);
    background-color: var(--color-input-bg);
    color: var(--color-text-primary);
    border-radius: 6px;
    font-family: var(--font-mono); 
    font-size: 1em;
    box-sizing: border-box;
    resize: none; 
    min-height: 80px;
}

textarea:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 8px rgba(160, 96, 255, 0.5);
}

button {
    background-color: var(--color-accent-violet); 
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 200px; 
    box-shadow: 0 4px 10px rgba(143, 61, 255, 0.4);
}

button:hover {
    background-color: var(--color-highlight); 
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* --- Nachrichtenbereiche (Info, Loading, Error) --- */
.info-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px; 
    color: var(--color-text-secondary);
    background-color: var(--color-input-bg); 
    border: 1px solid var(--color-border-subtle);
    text-align: center;
    font-family: var(--font-mono); 
}

.error-message {
    color: #ffcccb;
    background-color: #582424;
    border: 1px solid var(--color-error);
}

/* --- Ergebnisbereich (results-section) --- */
.results-section {
    background-color: #1e1e2f; 
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid #4b2be1; 
}

.results-section h2 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #C134DE; 
    padding-bottom: 5px;
}

.results-section p {
    color: #dcdcdc;
    line-height: 1.5;
}

.results-section .section {
    margin-bottom: 20px;
}

.results-section .label {
    color: #C134DE;
    font-weight: 600;
    margin-right: 5px;
}

.results-section .content {
    background-color: #2a2a3f;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 5px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    color: #f0f0f0;
}

.results-section .tip {
    background-color: #3b3b5c;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 10px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    color: #ffffff;
    border-left: 4px solid #C134DE;
}


/* Innere Boxen (Emotion/Bedürfnis) */
.inner-box {
    background-color: #383141; 
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-top: 1px solid var(--color-divider);
    border-bottom: 1px solid var(--color-divider);
}

/* Horizontale Linie zwischen Blöcken (wie im Bild) */
.horizontal-divider {
    border-top: 1px solid var(--color-accent-violet); 
    margin: 15px 0;
}

/* 4. Konkrete Handlung (Code Block Stil) */
.action-instruction {
    background-color: var(--color-input-bg);
    border-left: 4px solid var(--color-accent-gold); 
    padding: 15px;
    margin-top: 10px;
    border-radius: 5px;
    font-family: var(--font-mono);
    color: var(--color-text-primary);
    font-size: 0.9em;
    white-space: pre-wrap;
}

.hidden {
    display: none;
}

/* --- Lade-Spinner --- */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border-left-color: var(--color-accent-gold); 
    animation: spin 1s ease infinite;
    margin: 8px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================================== */
/* 📱 Responsive Anpassungen (Mobile First) */
/* ==================================== */

/* Allgemeine Anpassungen für sehr kleine Bildschirme (Mobile First) */
body {
    /* Wichtig: Auf Mobilgeräten soll der Body nicht zentriert sein, sondern die gesamte Höhe nutzen */
    align-items: flex-start; /* Container oben ausrichten */
    min-height: 100dvh; /* Die korrekte Viewport-Höhe für mobile Browser verwenden */
    padding: 0; /* Kein Padding auf dem Body */
}

.container {
    padding: 20px; /* Weniger Padding auf Mobilgeräten */
    margin: 10px; /* Etwas Abstand zum Rand */
    border-radius: 0; /* Optionale Anpassung: Auf 100% Breite können abgerundete Ecken am Rand störend wirken, aber wir behalten sie bei 10px */
    width: auto; /* Die Breite wird durch margin/padding gesteuert */
    max-width: none; /* Keine maximale Breite für 100% Nutzung */
    min-height: calc(100dvh - 20px); /* Damit der Container die meiste Höhe ausnutzt */
    box-shadow: none; /* Weniger auffälliger Schatten auf Mobilgeräten */
}

/* Header/Logo Anpassungen */
.header {
    flex-direction: column; /* Logo und H1 untereinander */
    margin-bottom: 15px;
    text-align: center;
}

.logo {
    width: 70px; /* Kleineres Logo */
    height: 70px;
    margin: 0 auto 10px auto; /* Zentrieren und etwas Abstand nach unten */
}

h1 {
    font-size: 1.8em; /* Kleinere Überschrift */
}

.header h1 .accent {
    font-size: 1.8rem;
}

.description {
    font-size: 0.9em; /* Kleinere Beschreibung */
    margin-bottom: 20px;
}

/* Eingabebereich */
textarea {
    min-height: 100px; /* Etwas mehr Höhe für die Eingabe */
    font-size: 0.95em;
}

button {
    width: 100%; /* Button über die gesamte Breite */
    padding: 15px; /* Etwas mehr Padding für bessere Berührung */
    font-size: 1.1em;
}

/* Ergebnisbereich */
.results-section {
    padding: 15px;
}

.results-section h2 {
    font-size: 1.2rem;
}

.results-section .content,
.results-section .tip,
.action-instruction {
    font-size: 0.85rem;
}


/* ==================================== */
/* 💻 Media Query für größere Bildschirme (>= 768px) */
/* ==================================== */
@media (min-width: 768px) {
    body {
        /* Zurück zu Desktop-Einstellungen */
        align-items: center; 
        padding: 0;
    }

    .container {
        padding: 40px; 
        margin: 20px; /* Zurück zu normalem Rand */
        border-radius: 10px;
        max-width: 1000px; /* Maximale Breite für Desktop */
        min-height: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    /* Header/Logo zurück zur horizontalen Anordnung */
    .header {
        flex-direction: row;
        margin-bottom: 25px;
    }

    .logo {
        width: 100px; 
        height: 100px;
        margin: 0 12px 0 0;
    }

    h1 {
        font-size: 2.1em; 
    }
    
    .header h1 .accent {
        font-size: 2rem;
    }

    .description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    button {
        width: 200px; /* Button wieder schmaler machen */
        padding: 12px 30px;
        font-size: 1em;
    }

    .results-section {
        padding: 20px;
    }

    .results-section h2 {
        font-size: 1.3rem;
    }

    .results-section .content,
    .results-section .tip,
    .action-instruction {
        font-size: 0.95rem;
    }
}