body {
    background-color: #f9fafb;
}

.qa-container {
    max-width: 800px;
    margin: 30px auto;
}

.question-card,
.answer-card {
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 15px;
}

.question-card {
    background-color: #e7f1ff;
    border-left: 5px solid #0d6efd;
}

.answer-card {
    background-color: #f8f9fa;
    border-left: 5px solid #198754;
}

/* Answer formatting */
.answer-card h1,
.answer-card h2,
.answer-card h3 {
    color: #198754;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
}

.answer-card p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.answer-card ul {
    margin-left: 20px;
    padding-left: 20px;
    list-style-type: disc;
}

.answer-card ol {
    margin-left: 20px;
    padding-left: 20px;
    list-style-type: decimal;
}

.answer-card code {
    background-color: #f1f3f5;
    border-radius: 5px;
    padding: 2px 6px;
    font-family: monospace;
    color: #d63384;
}


code:has(.arabic) {
    background-color: #f8f9fa;
}

.answer-card pre {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    overflow-x: auto;
    font-family: monospace;
}

.answer-card table {
    border-collapse: collapse;
    width: 100%;
    margin: 15px 0;
}

.answer-card table th,
.answer-card table td {
    border: 1px solid #dee2e6;
    padding: 8px 12px;
}

.answer-card table th {
    background-color: #e9ecef;
    font-weight: bold;
}

.answer-card details {
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.answer-card details summary {
    font-weight: bold;
    cursor: pointer;
}

/* Arabic text */
 .answer-card .arabic {
    font-family: 'Noto Naskh Arabic', serif;
    font-size: 1.2em;
    direction: rtl;
    text-align: right;
    color: #2c3e50;
}

/* Style placeholder for contenteditable */
#highlighted-input:empty:before {
    content: attr(placeholder);
    color: #6c757d;
    pointer-events: none;
}

/* Highlight colors */
.highlight-book1 { color: #0d6efd; font-weight: bold; }
.highlight-book2 { color: #d63384; font-weight: bold; }
.highlight-book3 { color: #198754; font-weight: bold; }
.highlight-lesson { color: #fd7e14; font-weight: bold; }

.try-link {
    margin-left: 8px;
    font-size: 0.9em;
}