:root {
    --primary: #1a365d;
    --secondary: #2d3748;
    --accent: #3182ce;
    --light: #f7fafc;
    --dark: #1a202c;
    --success: #38a169;
    --warning: #d69e2e;
    --error: #e53e3e;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: var(--light); color: var(--dark); line-height: 1.6; }
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
header { background: var(--primary); color: white; padding: 1rem 0; margin-bottom: 1.5rem; border-radius: 8px; }
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
h1 { font-size: 1.8rem; font-weight: 300; }
.main-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "controls chat"; gap: 20px; min-height: 70vh; }
.left-column { grid-area: controls; display: flex; flex-direction: column; gap: 20px; }
.right-column { grid-area: chat; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.control-card { background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 20px; }
.response-area { flex: 1; padding: 20px; overflow-y: auto; max-height: 65vh; }
.mode-selector { margin-bottom: 15px; }
.mode-selector label { font-weight: 600; color: var(--primary); display: block; margin-bottom: 8px; }
.mode-selector select { width: 100%; padding: 10px; border: 1px solid #cbd5e0; border-radius: 6px; }
.tabs { display: flex; border-bottom: 1px solid #cbd5e0; margin-bottom: 15px; }
.tab { padding: 10px 20px; cursor: pointer; border-bottom: 3px solid transparent; color: var(--secondary); }
.tab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 500; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.chat-input { display: flex; flex-direction: column; gap: 10px; }
textarea { width: 100%; padding: 12px; border: 1px solid #cbd5e0; border-radius: 6px; resize: vertical; min-height: 100px; }
button { padding: 12px 24px; background: var(--accent); color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; }
button:hover { background: #2c5aa0; }
.secondary-btn { background: var(--secondary); }
.secondary-btn:hover { background: #4a5568; }
h3 { margin-bottom: 10px; color: var(--secondary); font-size: 1.1rem; }
select, input { width: 100%; padding: 10px; border: 1px solid #cbd5e0; border-radius: 6px; margin-bottom: 10px; }
.message { margin-bottom: 20px; padding: 15px; border-radius: 8px; max-width: 90%; }
.user-message { background: var(--light); border-left: 4px solid var(--accent); }
.assistant-message { background: #f8f9fa; border-left: 4px solid var(--success); }
.message-content { word-wrap: break-word; }
.message-content table { border-collapse: collapse; width: 100%; margin: 10px 0; font-size: 0.9rem; }
.message-content table th, .message-content table td { border: 1px solid #e2e8f0; padding: 7px 14px; text-align: left; vertical-align: top; }
.message-content table th { background: #f1f5f9; font-weight: 600; color: #0f172a; }
.message-content table tr:nth-child(even) { background: #f8fafc; }
.message-content table tr:hover { background: #f1f5f9; }
.message-content h3 { margin: 14px 0 6px; color: #0f172a; font-size: 1rem; }
.message-content h4 { margin: 10px 0 4px; color: #334155; font-size: 0.95rem; }
.message-content ul, .message-content ol { padding-left: 18px; margin: 6px 0; }
.message-content li { margin-bottom: 3px; }
.message-content code { background: #f1f5f9; border-radius: 4px; padding: 1px 5px; font-size: 0.85rem; color: #0369a1; }
.message-content strong { color: #0f172a; }
.thinking { opacity: 0.7; font-style: italic; }
.sou-content { white-space: pre-line; }
.session-tools { display: flex; gap: 10px; margin-top: 15px; }
.session-tools button { flex: 1; }
.hidden { display: none !important; }
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay:not(.hidden) { display: flex !important; }
.modal-content { background: white; border-radius: 8px; padding: 20px; width: 90%; max-width: 600px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; padding-top: 15px; border-top: 1px solid #e2e8f0; }
.danger-btn { background: var(--error); }
.danger-btn:hover { background: #c53030; }

/* NEU: Dropdown Logik */
.dropdown { position: relative; display: inline-block; flex: 1; }
.dropdown-menu { 
    display: none; position: absolute; bottom: 100%; left: 0; 
    background: white; min-width: 180px; box-shadow: 0 8px 16px rgba(0,0,0,0.2); 
    z-index: 100; border-radius: 4px; padding: 5px 0; 
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-item { 
    width: 100%; padding: 10px 15px; border: none; background: none; 
    text-align: left; cursor: pointer; color: var(--dark); font-size: 14px; 
}
.dropdown-item:hover { background-color: var(--light); }