/* Beautiful Post Content Styling */

/* Main article container */
.post-content,
.post-body,
article {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #2c3e50;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Beautiful typography */
.post-content h1, .post-body h1 {
    font-size: 2.5em;
    font-weight: 700;
    color: #1a1a1a !important;
    margin: 1.5em 0 0.5em;
    line-height: 1.2;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.3em;
}

.post-content h2, .post-body h2 {
    font-size: 2em;
    font-weight: 600;
    color: #2c3e50 !important;
    margin: 1.3em 0 0.5em;
    line-height: 1.3;
}

.post-content h3, .post-body h3 {
    font-size: 1.5em;
    font-weight: 600;
    color: #34495e !important;
    margin: 1.2em 0 0.5em;
}

/* Paragraphs */
.post-content p, .post-body p {
    margin: 1em 0;
    color: #2c3e50 !important;
    background: transparent !important;
}

/* Links */
.post-content a, .post-body a {
    color: #3498db !important;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.post-content a:hover, .post-body a:hover {
    color: #2980b9 !important;
    border-bottom-color: #2980b9;
}

/* Lists - NO code block styling */
.post-content ul, .post-content ol, .post-body ul, .post-body ol {
    margin: 1em 0;
    padding-left: 2em;
    color: #2c3e50 !important;
}

.post-content li, .post-body li {
    margin: 0.5em 0;
    line-height: 1.8;
    color: #2c3e50 !important;
    background: transparent !important;
}

/* Prevent list items from being styled as code */
.post-content p[role="presentation"],
.post-body p[role="presentation"],
.post-content p[style*="list-style-type"],
.post-body p[style*="list-style-type"] {
    background: transparent !important;
    color: #2c3e50 !important;
    padding: 0 !important;
    margin: 0.5em 0 !important;
    box-shadow: none !important;
    border: none !important;
    font-family: inherit !important;
}

/* All spans in list items should be normal text */
.post-content p[role="presentation"] span,
.post-body p[role="presentation"] span,
.post-content p[style*="list-style-type"] span,
.post-body p[style*="list-style-type"] span {
    background: transparent !important;
    color: #2c3e50 !important;
    padding: 0 !important;
    font-family: inherit !important;
}

/* Code blocks - ONLY for actual code paragraphs with specific styling */
.post-content p[style*="margin-left: 36pt"][style*="Roboto Mono"],
.post-body p[style*="margin-left: 36pt"][style*="Roboto Mono"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    padding: 20px 24px !important;
    border-radius: 8px !important;
    margin: 1.5em 0 !important;
    overflow-x: auto !important;
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* All text inside code blocks should be white */
.post-content p[style*="margin-left: 36pt"][style*="Roboto Mono"] *,
.post-body p[style*="margin-left: 36pt"][style*="Roboto Mono"] * {
    color: #fff !important;
    background: transparent !important;
}

/* Standard pre and code tags */
.post-content pre, .post-body pre {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    padding: 20px 24px !important;
    border-radius: 8px !important;
    margin: 1.5em 0 !important;
    overflow-x: auto !important;
    font-family: 'Fira Code', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Inline code */
.post-content code, .post-body code {
    background-color: #f1f3f5 !important;
    color: #e83e8c !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    font-family: 'Fira Code', 'Monaco', 'Consolas', 'Courier New', monospace !important;
    font-size: 0.9em !important;
    border: 1px solid #e9ecef !important;
}

.post-content pre code, .post-body pre code {
    background: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    border: none !important;
}

/* Blockquotes */
.post-content blockquote, .post-body blockquote {
    border-left: 4px solid #3498db;
    padding: 12px 20px;
    margin: 1.5em 0;
    background-color: #f8f9fa !important;
    color: #555 !important;
    font-style: italic;
}

/* Tables */
.post-content table, .post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.post-content th, .post-body th {
    background-color: #3498db !important;
    color: white !important;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.post-content td, .post-body td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    color: #2c3e50 !important;
}

.post-content tr:hover, .post-body tr:hover {
    background-color: #f8f9fa !important;
}

/* Images */
.post-content img, .post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5em 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Horizontal rule */
.post-content hr, .post-body hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 2em 0;
}

/* Empty paragraphs - hide them */
.post-content p:empty, .post-body p:empty {
    display: none !important;
}

/* Paragraphs with only nbsp */
.post-content p:has(> br:only-child),
.post-body p:has(> br:only-child) {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .post-content, .post-body {
        font-size: 15px;
        padding: 15px;
    }
    
    .post-content h1, .post-body h1 {
        font-size: 2em;
    }
    
    .post-content h2, .post-body h2 {
        font-size: 1.6em;
    }
}
