/* Custom scrollbar - 使用 CSS 变量 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* Prose typography */
.prose-custom h1 { font-size: 2.25rem; font-weight: 700; margin-top: 2em; margin-bottom: 0.75em; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }
.prose-custom h2 { font-size: 1.875rem; font-weight: 600; margin-top: 1.75em; margin-bottom: 0.75em; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }
.prose-custom h3 { font-size: 1.5rem; font-weight: 600; margin-top: 1.5em; margin-bottom: 0.5em; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }
.prose-custom h4 { font-size: 1.25rem; font-weight: 600; margin-top: 1.25em; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }
.prose-custom h5 { font-size: 1.125rem; font-weight: 600; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }
.prose-custom h6 { font-size: 1rem; font-weight: 600; font-family: 'Crimson Pro', Georgia, serif; color: var(--text-primary); line-height: 1.3; }

.prose-custom p {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.2rem;
    line-height: 1.85;
    color: var(--text-secondary);
    margin-bottom: 1.5em;
}

.prose-custom a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: color 0.2s;
}
.prose-custom a:hover { color: var(--accent-dark); }

.prose-custom blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1.5rem;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-secondary);
}

.prose-custom ul, .prose-custom ol {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.15rem;
    line-height: 1.8;
    margin: 1.5em 0;
    padding-left: 1.5rem;
}
.prose-custom li { margin-bottom: 0.5em; color: var(--text-secondary); }
.prose-custom ul { list-style-type: disc; }
.prose-custom ol { list-style-type: decimal; }

.prose-custom img {
    border-radius: 4px;
    margin: 2em auto;
    max-width: 100%;
}

.prose-custom hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 3em 0;
}

.prose-custom table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
}
.prose-custom th, .prose-custom td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
}
.prose-custom th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

/* Code blocks - monokai inspired */
.prose-custom pre {
    background: var(--code-bg);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 2em 0;
    border: 1px solid var(--border-color);
}
.prose-custom pre code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--code-text);
    background: none;
    padding: 0;
}
.prose-custom code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--accent-dark);
}
.prose-custom pre code { background: none; color: inherit; padding: 0; border-radius: 0; }

/* Highlight.js override for goldmark-highlighting */
.chroma { background: var(--code-bg) !important; }
.chroma .hl { background: #49483e !important; }
.chroma .err { color: #960050; background-color: #1e0010 }
.chroma .tok-k { color: #66d9ef; font-weight: bold }
.chroma .tok-kd { color: #66d9ef; font-weight: bold }
.chroma .tok-kn { color: #f92672; font-weight: bold }
.chroma .tok-kp { color: #66d9ef; font-weight: bold }
.chroma .tok-kr { color: #66d9ef; font-weight: bold }
.chroma .tok-kt { color: #66d9ef; font-weight: bold }
.chroma .tok-na { color: #a6e22e }
.chroma .tok-nb { color: #f8f8f2 }
.chroma .tok-nc { color: #a6e22e; font-weight: bold }
.chroma .tok-no { color: #ae81ff }
.chroma .tok-nd { color: #a6e22e }
.chroma .tok-ni { color: #f8f8f2 }
.chroma .tok-ne { color: #a6e22e }
.chroma .tok-nf { color: #a6e22e }
.chroma .tok-nl { color: #f8f8f2 }
.chroma .tok-nn { color: #f8f8f2 }
.chroma .tok-nx { color: #a6e22e }
.chroma .tok-py { color: #f8f8f2 }
.chroma .tok-nt { color: #f92672 }
.chroma .tok-nv { color: #f8f8f2 }
.chroma .tok-w { color: #f8f8f2 }
.chroma .tok-c, .chroma .tok-c1, .chroma .tok-ch, .chroma .tok-cm, .chroma .tok-cs { color: #75715e }
.chroma .tok-s, .chroma .tok-sa, .chroma .tok-sb, .chroma .tok-sc, .chroma .tok-sd, .chroma .tok-s2, .chroma .tok-se, .chroma .tok-sh, .chroma .tok-si, .chroma .tok-sx, .chroma .tok-sr, .chroma .tok-s1, .chroma .tok-ss { color: #e6db74 }
.chroma .tok-m, .chroma .tok-mf, .chroma .tok-mh, .chroma .tok-mi, .chroma .tok-mo { color: #ae81ff }
.chroma .tok-o { color: #f92672 }
.chroma .tok-ow { color: #f92672 }
.chroma .tok-p { color: #f8f8f2 }
.chroma .tok-l { color: #ae81ff }
.chroma .tok-lc { color: #e6db74 }
.chroma .tok-lm { color: #ae81ff }
.chroma .tok-lv { color: #ae81ff }
.chroma .tok-ld { color: #e6db74 }
.chroma .tok-gd { color: #f92672 }
.chroma .tok-gi { color: #a6e22e }

/* Page transitions */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Decorative rule */
.ornament {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ornament::before, .ornament::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}
