/* Professional Content Formatting Styles */

/* Code Blocks */
.formatted-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.formatted-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formatted-list li strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Code Blocks */
pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: #333;
}

/* Inline Code */
code {
    background-color: #f1f3f4;
    color: #d73a49;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875em;
    font-weight: 500;
}

/* Syntax Highlighting */
.hljs {
    background: #f8f9fa !important;
    color: #333 !important;
}

.hljs-keyword {
    color: #d73a49;
    font-weight: 600;
}

.hljs-string {
    color: #032f62;
}

.hljs-comment {
    color: #6a737d;
    font-style: italic;
}

.hljs-number {
    color: #005cc5;
}

.hljs-function {
    color: #6f42c1;
}

.hljs-variable {
    color: #e36209;
}

.hljs-built_in {
    color: #005cc5;
}

.hljs-type {
    color: #d73a49;
}

/* Mathematical Expressions */
.math-inline {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    border: 1px solid #e9ecef;
}

.math-block {
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
    font-size: 1.1em;
}

/* Tables */
.table-responsive {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* Blockquotes */
.blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

/* Headers in Content */
.formatted-content h1,
.formatted-content h2,
.formatted-content h3,
.formatted-content h4,
.formatted-content h5,
.formatted-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
}

.formatted-content h1 {
    font-size: 1.75rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.formatted-content h2 {
    font-size: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.25rem;
}

.formatted-content h3 {
    font-size: 1.25rem;
}

/* Links */
.formatted-content a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px dotted #007bff;
    transition: all 0.2s ease;
}

.formatted-content a:hover {
    color: #0056b3;
    border-bottom-style: solid;
}

/* Paragraphs */
.formatted-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Strong and Emphasis */
.formatted-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.formatted-content em {
    font-style: italic;
    color: #495057;
}

/* Responsive Design */
@media (max-width: 768px) {
    pre {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .formatted-list {
        padding-left: 1rem;
    }
    
    .math-block {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    .formatted-content h1 {
        font-size: 1.5rem;
    }
    
    .formatted-content h2 {
        font-size: 1.25rem;
    }
    
    .formatted-content h3 {
        font-size: 1.1rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    pre {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    code {
        background-color: #4a5568;
        color: #e2e8f0;
    }
    
    .math-inline,
    .math-block {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .blockquote {
        background-color: #2d3748;
        color: #a0aec0;
        border-left-color: #4299e1;
    }
}