* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; padding: 20px; }
.navbar { background: #2c3e50; color: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-radius: 8px; }
.nav-links a { color: white; text-decoration: none; margin-left: 1rem; padding: 0.5rem 1rem; border-radius: 4px; }
.nav-links a.active { background: #34495e; }
.container { max-width: 1200px; margin: 0 auto; }
.card { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.form-row input, .form-row select { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
.btn-primary { background: #3498db; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }
.btn-danger { background: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 15px 0; }
.provider-card { border: 1px solid #ddd; padding: 10px; border-radius: 4px; display: flex; flex-direction: column; gap: 5px; }
.chat-box { min-height: 400px; display: flex; flex-direction: column; }
.messages { flex: 1; overflow-y: auto; margin-bottom: 15px; }
.message { padding: 10px; margin-bottom: 10px; border-radius: 4px; }
.message.user { background: #3498db; color: white; }
.message.assistant { background: #ecf0f1; }
.input-area { display: flex; gap: 10px; }
.input-area textarea { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; resize: none; }
.input-area button { padding: 10px 20px; background: #27ae60; color: white; border: none; border-radius: 4px; cursor: pointer; }
.badge-success { background: #27ae60; color: white; padding: 5px 10px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.badge-info { background: #3498db; color: white; padding: 5px 10px; border-radius: 4px; display: inline-block; margin-bottom: 10px; }
.quorum-response { border-left: 3px solid #3498db; padding-left: 10px; margin: 10px 0; }

/* ============================================
   MARKDOWN CONTENT STYLES
   ============================================ */

.llm-content, .message-content {
    line-height: 1.7;
    color: #2c3e50;
    font-size: 0.95em;
}

/* Headings */
.llm-content h1, .llm-content h2, .llm-content h3, .llm-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.8em;
    color: #1a252f;
    font-weight: 700;
    line-height: 1.3;
}

.llm-content h1 { font-size: 1.8em; border-bottom: 2px solid #e0e0e0; padding-bottom: 0.3em; }
.llm-content h2 { font-size: 1.5em; border-bottom: 1px solid #e0e0e0; padding-bottom: 0.3em; }
.llm-content h3 { font-size: 1.2em; }
.llm-content h4 { font-size: 1em; }

/* Paragraphs */
.llm-content p {
    margin: 0.8em 0;
}

/* Lists */
.llm-content ul, .llm-content ol {
    margin: 0.8em 0;
    padding-left: 2em;
}

.llm-content li {
    margin: 0.4em 0;
    line-height: 1.6;
}

.llm-content ul { list-style-type: disc; }
.llm-content ol { list-style-type: decimal; }

/* Bold and Italic */
.llm-content strong {
    font-weight: 700;
    color: #1a252f;
}

.llm-content em {
    font-style: italic;
    color: #555;
}

/* Code */
.llm-content pre {
    background-color: #f6f8fa;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1em 0;
    border: 1px solid #e1e4e8;
}

.llm-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85em;
    line-height: 1.45;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.llm-content code {
    background-color: rgba(27,31,35,0.05);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e83e8c;
}

.llm-content pre code {
    background: none;
    color: inherit;
}

/* Blockquotes */
.llm-content blockquote {
    border-left: 3px solid #ddd;
    padding-left: 1em;
    margin: 1em 0;
    color: #555;
    background-color: #fafbfc;
    padding: 1em;
    border-radius: 0 4px 4px 0;
}

/* Tables */
.llm-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    overflow-x: auto;
    display: block;
}

.llm-content th, .llm-content td {
    border: 1px solid #dfe2e5;
    padding: 10px 14px;
    text-align: left;
}

.llm-content th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.llm-content tr:nth-child(even) {
    background-color: #fbfcfd;
}

/* Horizontal Rule */
.llm-content hr {
    border: none;
    border-top: 1px solid #e1e4e8;
    margin: 2em 0;
}

/* Links */
.llm-content a {
    color: #007bff;
    text-decoration: none;
}

.llm-content a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .llm-content {
        font-size: 0.9em;
    }

    .llm-content pre {
        padding: 12px;
        font-size: 0.8em;
    }

    .llm-content table {
        font-size: 0.85em;
    }
}

/* ============================================
   QUORUM RESPONSE IMPROVEMENTS
   ============================================ */

.quorum-response {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.quorum-response strong {
    color: #007bff;
    display: block;
    margin-bottom: 12px;
    font-size: 1.1em;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
}

.quorum-response .llm-content {
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* ============================================
   FIX: LEFT PADDING AND BORDERS
   ============================================ */

/* Add left padding for orchestrator content */
.message.assistant .message-content,
.llm-content {
    padding-left: 10px;
    padding-right: 10px;
}

/* Remove blue border from blockquote completely */
.llm-content blockquote {
    border-left: none !important;
    background-color: #f8f9fa !important;
    padding: 12px 16px !important;
    margin: 1em 0 !important;
}

/* Fix padding for lists inside blockquote */
.llm-content blockquote ul,
.llm-content blockquote ol {
    padding-left: 1.5em !important;
    margin-left: 0 !important;
}

/* Improve quorum response cards appearance */
.quorum-response {
    border-left: 4px solid #007bff !important;
    padding-left: 16px !important;
}

/* Remove duplicate borders */
.quorum-response .llm-content blockquote {
    border-left: none !important;
}

