/* Markdown Content Styling */

.markdown-content {
    line-height: 1.7;
    color: #e5e7eb;
}

/* Headers */
.markdown-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid #3b82f6;
    color: #60a5fa;
}

.markdown-content h1:first-child {
    margin-top: 0;
}

.markdown-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4b5563;
    color: #93c5fd;
}

.markdown-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 1rem;
    color: #bfdbfe;
}

.markdown-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.875rem;
    color: #dbeafe;
}

.markdown-content h5,
.markdown-content h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    color: #dbeafe;
}

/* Paragraphs */
.markdown-content p {
    margin-bottom: 1.25rem;
    color: #d1d5db;
}

/* Lists */
.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
}

.markdown-content li {
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

.markdown-content li > p {
    margin-bottom: 0.5rem;
}

/* Nested lists */
.markdown-content ul ul,
.markdown-content ol ul {
    list-style-type: circle;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.markdown-content ul ul ul,
.markdown-content ol ul ul,
.markdown-content ol ol ul {
    list-style-type: square;
}

/* Strong/Bold */
.markdown-content strong {
    font-weight: 700;
    color: #f3f4f6;
}

/* Emphasis/Italic */
.markdown-content em {
    font-style: italic;
    color: #e5e7eb;
}

/* Code */
.markdown-content code {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875em;
    color: #fbbf24;
}

.markdown-content pre {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.25rem;
}

.markdown-content pre code {
    background-color: transparent;
    border: none;
    padding: 0;
    color: #e5e7eb;
}

/* Blockquotes */
.markdown-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1.25rem;
    font-style: italic;
    color: #9ca3af;
    background-color: #1f2937;
    padding: 1rem;
    border-radius: 0.25rem;
}

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

/* Links */
.markdown-content a {
    color: #60a5fa;
    text-decoration: underline;
    text-decoration-color: #3b82f6;
    text-underline-offset: 2px;
}

.markdown-content a:hover {
    color: #93c5fd;
    text-decoration-color: #60a5fa;
}

/* Horizontal Rules */
.markdown-content hr {
    border: 0;
    border-top: 2px solid #4b5563;
    margin: 2rem 0;
}

/* Tables */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid #4b5563;
    padding: 0.75rem;
    text-align: left;
}

.markdown-content th {
    background-color: #1f2937;
    font-weight: 600;
    color: #f3f4f6;
}

.markdown-content td {
    color: #d1d5db;
}

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

/* Images */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Strikethrough */
.markdown-content del {
    color: #6b7280;
    text-decoration: line-through;
}

/* Task Lists */
.markdown-content input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Definition Lists */
.markdown-content dl {
    margin-bottom: 1.25rem;
}

.markdown-content dt {
    font-weight: 600;
    margin-top: 1rem;
    color: #f3f4f6;
}

.markdown-content dd {
    margin-left: 2rem;
    margin-bottom: 0.5rem;
    color: #d1d5db;
}

/* Footnotes */
.markdown-content .footnotes {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #4b5563;
    font-size: 0.875rem;
    color: #9ca3af;
}

/* Better spacing for consecutive elements */
.markdown-content h1 + h2,
.markdown-content h2 + h3,
.markdown-content h3 + h4 {
    margin-top: 1rem;
}

/* Special styling for numbered headers (common in summaries) */
.markdown-content h2:has(+ p) {
    margin-bottom: 0.75rem;
}

/* Improve readability for long content */
.markdown-content {
    max-width: 100%;
}

@media (min-width: 768px) {
    .markdown-content {
        font-size: 1rem;
    }
}
