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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px; /* NEU: Kleinere Schrift */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 900px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

header h1 {
    font-size: 24px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
    background: #f9fafb;
}

.welcome-message {
    text-align: center;
    color: #6b7280;
    padding: 40px 20px;
}

.welcome-message h2 {
    color: #1f2937;
    margin-bottom: 20px;
}

.welcome-message ul {
    list-style: none;
    margin: 20px 0;
    text-align: left;
    display: inline-block;
}

.welcome-message li {
    padding: 8px 0;
}

.message {
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 14px; /* NEU: Kleinere Schrift */
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message.assistant .message-content {
    background: white;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    font-style: italic;
    padding: 12px 18px;
}

.input-container {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    border-radius: 0 0 20px 20px;
}

.icon-button {
    padding: 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    cursor: pointer;
}

#messageInput {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px; /* GEÄNDERT: 15px → 14px */
    resize: none;
    font-family: inherit;
    min-height: 44px; /* NEU: Touch-Target */
    box-sizing: border-box; /* NEU: Wichtig! */
}

#messageInput:focus {
    outline: none;
    border-color: #667eea;
}

#sendButton {
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px; /* GEÄNDERT: 15px → 14px */
    cursor: pointer;
}

.loader {
    border: 3px solid #f3f4f6;
    border-top: 3px solid white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    #messageInput {
        font-size: 16px !important; /* Verhindert Zoom auf iPhone */
        min-height: 50px;
        padding: 14px 18px;
    }
    
    .message-content {
        font-size: 13px; /* Noch kleiner auf Mobile */
        max-width: 85%;
    }
    
    body {
        font-size: 13px;
    }
}
/* Status Fix - kein Pseudo-Element */
.status span::before,
.status span::after {
    content: none !important;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative; /* Fix für Positionierung */
}
