.post-content, .entry-content, .article-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    line-height: 1.8;
    color: #24292e;
    word-wrap: break-word;
}

.post-content h1, .entry-content h1, .article-content h1,
.post-content h2, .entry-content h2, .article-content h2,
.post-content h3, .entry-content h3, .article-content h3,
.post-content h4, .entry-content h4, .article-content h4,
.post-content h5, .entry-content h5, .article-content h5,
.post-content h6, .entry-content h6, .article-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
    color: #24292e;
}

.post-content h1, .entry-content h1, .article-content h1 { font-size: 2em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
.post-content h2, .entry-content h2, .article-content h2 { font-size: 1.5em; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
.post-content h3, .entry-content h3, .article-content h3 { font-size: 1.25em; }
.post-content h4, .entry-content h4, .article-content h4 { font-size: 1em; }
.post-content h5, .entry-content h5, .article-content h5 { font-size: 0.875em; }
.post-content h6, .entry-content h6, .article-content h6 { font-size: 0.85em; color: #6a737d; }

.post-content p, .entry-content p, .article-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

.post-content a, .entry-content a, .article-content a {
    color: #0366d6;
    text-decoration: none;
}
.post-content a:hover, .entry-content a:hover, .article-content a:hover {
    text-decoration: underline;
}

.post-content blockquote, .entry-content blockquote, .article-content blockquote {
    padding: 0 1em;
    color: #6a737d;
    border-left: 0.25em solid #dfe2e5;
    margin: 0 0 16px 0;
    background-color: #f6f8fa;
    padding-top: 8px;
    padding-bottom: 8px;
}

.post-content ul, .entry-content ul, .article-content ul,
.post-content ol, .entry-content ol, .article-content ol {
    padding-left: 2em;
    margin-top: 0;
    margin-bottom: 16px;
}

.post-content table, .entry-content table, .article-content table {
    display: block;
    width: 100%;
    overflow: auto;
    margin-top: 0;
    margin-bottom: 16px;
    border-spacing: 0;
    border-collapse: collapse;
}
.post-content table tr, .entry-content table tr, .article-content table tr {
    background-color: #fff;
    border-top: 1px solid #c6cbd1;
}
.post-content table tr:nth-child(2n), .entry-content table tr:nth-child(2n), .article-content table tr:nth-child(2n) {
    background-color: #f6f8fa;
}
.post-content table th, .entry-content table th, .article-content table th,
.post-content table td, .entry-content table td, .article-content table td {
    padding: 6px 13px;
    border: 1px solid #dfe2e5;
}
.post-content table th, .entry-content table th, .article-content table th {
    font-weight: 600;
}

.post-content img, .entry-content img, .article-content img {
    max-width: 100%;
    box-sizing: content-box;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-content hr, .entry-content hr, .article-content hr {
    height: 0.25em;
    padding: 0;
    margin: 24px 0;
    background-color: #e1e4e8;
    border: 0;
}

.post-content code, .entry-content code, .article-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27,31,35,0.05);
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

.post-content pre, .entry-content pre, .article-content pre {
    position: relative;
    word-wrap: normal;
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f6f8fa;
    border-radius: 3px;
    margin-bottom: 16px;
}
.post-content pre code, .entry-content pre code, .article-content pre code {
    display: inline;
    max-width: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    line-height: inherit;
    word-wrap: normal;
    background-color: transparent;
    border: 0;
}

/* Copy Button Styles */
.copy-code-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 6px;
    font-size: 12px;
    color: #586069;
    background-color: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

.post-content pre:hover .copy-code-btn,
.entry-content pre:hover .copy-code-btn,
.article-content pre:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    background-color: #f3f4f6;
    border-color: #1b1f2326;
}

.copy-code-btn.copied {
    color: #22863a;
    border-color: #22863a;
}
/* Floating TOC Styles */
#vditor-floating-toc {
    position: fixed;
    right: 20px;
    top: 100px;
    width: 250px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 15px;
    font-size: 14px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#vditor-floating-toc .toc-title {
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#vditor-floating-toc .toc-close-btn {
    cursor: pointer;
    color: #999;
    font-size: 18px;
    line-height: 1;
}

#vditor-floating-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#vditor-floating-toc li {
    margin-bottom: 6px;
    line-height: 1.4;
}

#vditor-floating-toc a {
    color: #586069;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    transition: color 0.2s;
}

#vditor-floating-toc a:hover,
#vditor-floating-toc a.active {
    color: #0366d6;
    font-weight: 500;
}

#vditor-floating-toc .toc-level-1 { margin-left: 0; }
#vditor-floating-toc .toc-level-2 { margin-left: 10px; }
#vditor-floating-toc .toc-level-3 { margin-left: 20px; }
#vditor-floating-toc .toc-level-4 { margin-left: 30px; }
#vditor-floating-toc .toc-level-5 { margin-left: 40px; }
#vditor-floating-toc .toc-level-6 { margin-left: 50px; }

/* Mobile Toggle Button */
#vditor-toc-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: #0366d6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    font-size: 20px;
    transition: transform 0.2s;
}

#vditor-toc-toggle:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 1200px) {
    #vditor-floating-toc {
        display: none; /* Hidden by default on smaller screens */
        right: 20px;
        bottom: 70px;
        top: auto;
        max-height: 50vh;
    }
    
    #vditor-floating-toc.show {
        display: block;
    }
}

@media (min-width: 1201px) {
    #vditor-toc-toggle {
        display: none; /* Hide toggle on desktop */
    }
}