/**
 * KI-Assistent Chat Interface v5.1 - Styles
 * Mit Bildintegration, Lightbox und Support-Anfragen
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --user-message-bg: #2563eb;
    --user-message-text: #ffffff;
    --assistant-message-bg: #f1f5f9;
    --assistant-message-text: #1e293b;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Chat Container ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--surface-color);
    box-shadow: var(--shadow-lg);
}

/* ===== Header ===== */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, light, #F1F5F9);
    color: dark;
    box-shadow: var(--shadow-md);
}

.header-content {
    flex: 1;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.header-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* Export-Button im Header - DEACTIVATED in Phase 1 */
/*
.export-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: rgba(103, 136, 169, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.export-button:hover:not(:disabled) {
    background-color: rgba(103, 136, 169, 0.5);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.export-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.export-button svg {
    flex-shrink: 0;
}
*/

/* ===== Session Bar (DEACTIVATED - Not used in Phase 1) ===== */
/*
.session-bar {
    display: none;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background-color: var(--assistant-message-bg);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.session-bar.support-mode {
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-bottom-color: #fbbf24;
}

.session-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.support-badge {
    padding: 0.25rem 0.75rem;
    background-color: #dc2626;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
*/

/* LLM Context Badge */
.llm-context-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    animation: pulse-badge 2s ease-in-out infinite;
}

.llm-context-badge svg {
    flex-shrink: 0;
    opacity: 0.9;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Session Actions (Support-Mode Button Container) */
.session-actions {
    display: none;
    align-items: center;
    gap: 0.75rem;
}

.session-upload-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #6788a9;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.session-upload-button:hover {
    background-color: #547290;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.session-upload-button svg {
    flex-shrink: 0;
}

.session-send-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #16a34a;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.session-send-button:hover {
    background-color: #15803d;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.session-send-button svg {
    flex-shrink: 0;
}

/* File Upload Area */
.file-upload-area {
    display: none;
    padding: 1rem 2rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
}

.uploaded-files {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.uploaded-files-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.file-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e3f2fd;
    border-radius: 0.375rem;
    color: #1976d2;
    font-size: 1.25rem;
}

.file-icon.image {
    background-color: #e8f5e9;
    color: #388e3c;
}

.file-icon.pdf {
    background-color: #ffebee;
    color: #d32f2f;
}

.file-icon.document {
    background-color: #fff3e0;
    color: #f57c00;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.file-delete {
    flex-shrink: 0;
    padding: 0.375rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.file-delete:hover {
    background-color: #ffebee;
    color: #d32f2f;
}

.file-delete svg {
    width: 18px;
    height: 18px;
}

.upload-progress {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #e3f2fd;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #1565c0;
}

.no-files-message {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
}

/* ===== Chat Main ===== */
.chat-main {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: var(--bg-color);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Welcome Message ===== */
.welcome-message {
    text-align: center;
    padding: 0rem 2rem;
    max-width: 700px;
    margin: 2rem auto;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display:none;
}

.welcome-message h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.welcome-message > p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.welcome-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.welcome-option {
    padding: 1.5rem;
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    text-align: left;
    transition: all 0.2s;
}

.welcome-option:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.option-label {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display:none;
}

.option-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.welcome-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
}

.welcome-divider::before,
.welcome-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.welcome-divider span {
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.support-button:hover {
    background-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== Messages ===== */
.message {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    max-width: 85%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    align-self: flex-end;
    background-color: var(--user-message-bg);
    color: var(--user-message-text);
}

.message-assistant {
    align-self: flex-start;
    background-color: var(--assistant-message-bg);
    color: var(--assistant-message-text);
    border: 1px solid var(--border-color);
}

.message-error {
    align-self: center;
    background-color: #fee2e2;
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.message-role {
    font-weight: 600;
}

.message-time {
    color: currentColor;
    opacity: 0.7;
    font-size: 0.75rem;
}

.message-provider {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.message-content {
    line-height: 1.6;
}

.message-user .message-content {
    color: var(--user-message-text);
}

.message-footer {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Markdown Content */
.markdown-content p {
    margin-bottom: 0.75rem;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.markdown-content li {
    margin-bottom: 0.25rem;
}

.markdown-content code {
    padding: 0.125rem 0.375rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.markdown-content pre {
    padding: 1rem;
    background-color: #1e293b;
    color: #f1f5f9;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 0.75rem;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

.markdown-content a {
    color: #2563eb;
    text-decoration: underline;
}

.markdown-content a:hover {
    color: #1d4ed8;
}

/* Message Images */
.message-image-container {
    margin: 0.75rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
}

.message-image {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.message-image:hover {
    transform: scale(1.02);
}

.image-caption {
    padding: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
}

/* Thinking Indicator */
.thinking-indicator {
    opacity: 0.7;
}

.thinking-animation {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.thinking-animation span {
    width: 8px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 50%;
    animation: thinking 1.4s ease-in-out infinite;
}

.thinking-animation span:nth-child(1) {
    animation-delay: 0s;
}

.thinking-animation span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-animation span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    40% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ===== Footer & Input ===== */
.chat-footer {
    padding: 1rem 2rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    position: relative;
}

.message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    resize: none;
    min-height: 50px;
    max-height: 200px;
    transition: border-color 0.2s;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.message-input:disabled {
    background-color: var(--bg-color);
    cursor: not-allowed;
}

.send-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-button:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Upload Button (links im Input) ===== */
.upload-button {
    padding: 0.75rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upload-button:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-button svg {
    flex-shrink: 0;
}

/* ===== Options Button (rechts neben Input) ===== */
.options-button {
    padding: 0.75rem;
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.options-button:hover {
    background-color: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.options-button svg {
    flex-shrink: 0;
}

/* ===== Support Actions (unter Input) ===== */
.support-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-start;
}

.support-send-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.support-send-button:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.support-send-button svg {
    flex-shrink: 0;
}

/* ===== File Preview Area (Ã¼ber Input) ===== */
.file-preview-area {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
}

.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.file-preview-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.file-preview-clear {
    padding: 0.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.file-preview-clear:hover {
    background-color: var(--error-color);
    color: white;
}

.uploaded-files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.file-tag-remove {
    padding: 0.125rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 0.25rem;
    transition: all 0.2s;
    line-height: 1;
}

.file-tag-remove:hover {
    background-color: var(--error-color);
    color: white;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.char-count {
    transition: color 0.2s;
}

.char-count-warning {
    color: var(--error-color);
    font-weight: 600;
}

.powered-by {
    font-style: italic;
}

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background-color: var(--surface-color);
    border-radius: 0.75rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: var(--bg-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.modal-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.modal-btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.modal-btn-secondary {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.modal-btn-secondary:hover {
    background-color: var(--border-color);
}

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-close {
    position: absolute;
    top: -2rem;
    right: -2rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#lightboxImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-caption {
    margin-top: 1rem;
    color: white;
    text-align: center;
    font-size: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .chat-header {
        padding: 1rem;
    }
    
    .header-title {
        font-size: 1.25rem;
    }
    
    .header-subtitle {
        font-size: 0.75rem;
    }
    
    .export-button span {
        display: none;
    }
    
    .session-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .session-actions {
        width: 100%;
    }
    
    .session-send-button {
        width: 100%;
        justify-content: center;
    }
    
    .chat-main {
        padding: 0.75rem;
    }
    
    .chat-footer {
        padding: 1rem;
    }
    
    .message {
        max-width: 95%;
    }
    
    .welcome-message {
        padding: 2rem 1rem;
    }
    
    .welcome-icon {
        font-size: 3rem;
    }
    
    .welcome-message h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
    }
}

/* ===== Scrollbar ===== */
.chat-main::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.chat-main::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.chat-main::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chat-main::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ========== SYSTEM MESSAGES (File Upload Info) ========== */
.message.system {
    background-color: #f0f4ff;
    border-left: 3px solid #667eea;
    align-self: center;
    max-width: 90%;
    font-size: 0.875rem;
    color: #4c5c7a;
    padding: 0.875rem 1rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
}

.message.system .message-header {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message.system .file-list {
    margin-top: 0.5rem;
    padding-left: 1rem;
}

.message.system .file-list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
    font-size: 0.8125rem;
}

.message.system .file-icon-small {
    font-size: 1rem;
}

/***************************/
.welcome-options {
        display: flex;
        flex-direction: column; /* Standardmäßig untereinander für kleine Screens */
        gap: 20px; /* Abstand zwischen den Optionen */
    }

    .welcome-option {
        padding: 15px;
        border: 1px solid #ddd; /* Optional: Rahmen für bessere Sichtbarkeit */
        border-radius: 8px;
        background-color: #f9f9f9;
    }

    /* Für Desktop, Notebook und Tablet Landscape (ab 1024px Breite) nebeneinander */
    @media (min-width: 1024px) {
        .welcome-options {
            flex-direction: row;
            justify-content: space-between;
        }

        .welcome-option {
            flex: 1; /* Gleichmäßige Verteilung */
            margin: 0 10px; /* Abstand zwischen den Boxen */
        }

        .welcome-option:first-child {
            margin-left: 0;
        }

        .welcome-option:last-child {
            margin-right: 0;
        }
    }

    /* Für Tablet Portrait (hochkant, typisch 768px - 1023px) untereinander */
    @media (max-width: 1023px) and (min-width: 768px) and (orientation: portrait) {
        .welcome-options {
            flex-direction: column;
        }
    }

    /* Für Smartphone (unter 768px) untereinander */
    @media (max-width: 767px) {
        .welcome-options {
            flex-direction: column;
        }
    }
