/* Comprehensive Markdown Content Styling */
.markdown-content {
    line-height: 1.6;
    font-size: 1rem;
}

/* Headings */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-content h1 {
    font-size: 2rem;
}

.markdown-content h2 {
    font-size: 1.5rem;
}

.markdown-content h3 {
    font-size: 1.25rem;
}

.markdown-content h4 {
    font-size: 1.1rem;
}

.markdown-content h5,
.markdown-content h6 {
    font-size: 1rem;
}

/* Paragraphs and spacing */
.markdown-content p {
    margin-bottom: 1rem;
}

/* Lists - Critical Fix */
.markdown-content ul,
.markdown-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
    list-style-position: outside;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
}

.markdown-content ul ul {
    list-style-type: circle;
    margin: 0.5rem 0;
}

.markdown-content ol ol,
.markdown-content ul ol {
    list-style-type: lower-alpha;
    margin: 0.5rem 0;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    display: list-item;
}

.markdown-content li > p {
    margin-top: 0.5rem;
}

/* Table styling - Adding vertical borders */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

/* Responsive table wrapper */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.markdown-content table th,
.markdown-content table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0; /* Light border for light theme */
    text-align: left;
}

.markdown-content table th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.05);
}

.markdown-content table thead {
    border-bottom: 2px solid #e2e8f0;
}

.dark .markdown-content table th,
.dark .markdown-content table td {
    border-color: #2d3748; /* Darker border for dark theme */
}

.dark .markdown-content table th {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Code blocks */
.markdown-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.markdown-content pre {
    margin: 1rem 0;
    border-radius: 6px;
    background-color: #f3f3f3;
    overflow-x: auto;
}

.markdown-content pre code {
    padding: 0;
    background-color: transparent;
}

/* Blockquotes */
.markdown-content blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid #cbd5e1;
    background-color: rgba(0, 0, 0, 0.03);
}

.dark .markdown-content blockquote {
    border-left-color: #4b5563;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Links */
.markdown-content a {
    color: #3b82f6;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* Horizontal Rule */
.markdown-content hr {
    height: 1px;
    background-color: #e2e8f0;
    border: none;
    margin: 2rem 0;
}

.dark .markdown-content hr {
    background-color: #4b5563;
}

/* Images */
.markdown-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 6px;
}
