/* Reset and base styles */
html {
    box-sizing: border-box;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #f8f9fa;
}

/* Typography reset */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    font-weight: 600;
    line-height: 1.2;
    color: #2c3e50;
}

h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 0.3rem;
}

h3 { font-size: 1.5rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Links */
a {
    color: #2980b9;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1a5276;
    text-decoration: underline;
}

/* Paragraphs and text elements */
p {
    margin-bottom: 1.2rem;
}

blockquote {
    margin: 1.5rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid #dfe2e5;
    color: #6a737d;
    background-color: #f6f8fa;
}

/* Lists */
ul, ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.4rem;
}

/* Code blocks */
pre {
    background-color: #f6f8fa;
    border-radius: 6px;
    padding: 1rem;
    overflow: auto;
    line-height: 1.45;
    margin: 1.5rem 0;
    border-left: 4px solid #3498db;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
}

th, td {
    border: 1px solid #dfe2e5;
    padding: 0.6rem 1rem;
}

th {
    background-color: #f6f8fa;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f6f8fa;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

/* Horizontal rule */
hr {
    height: 1px;
    border: 0;
    background-color: #e1e4e8;
    margin: 2rem 0;
}

/* Pandoc-specific classes */
.footnotes {
    font-size: 0.9rem;
    color: #6a737d;
    border-top: 1px solid #eaecef;
    margin-top: 2rem;
    padding-top: 1rem;
}

.footnote-back {
    display: inline-block;
    margin-left: 0.5rem;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    pre {
        font-size: 0.8rem;
        padding: 0.8rem;
    }
}

/* Additional Pandoc elements */
div.sourceCode {
    margin: 1.5rem 0;
}

.sourceCode {
    background-color: #f6f8fa;
    border-radius: 6px;
}

/* Python syntax highlighting */
.sourceCode.python .kw { color: #d73a49; } /* keywords */
.sourceCode.python .im { color: #6f42c1; } /* import */
.sourceCode.python .bu { color: #d73a49; } /* built-in */
.sourceCode.python .st { color: #032f62; } /* string */
.sourceCode.python .op { color: #666666; } /* operator */
.sourceCode.python .co { color: #6a737d; font-style: italic; } /* comment */
.sourceCode.python .dv { color: #005cc5; } /* number */

/* 在原有样式基础上添加 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

details {
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

summary {
    padding: 12px 15px;
    background-color: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px 5px 0 0;
    user-select: none;
    transition: background-color 0.2s;
}

summary:hover {
    background-color: #e9ecef;
}

details[open] summary {
    border-bottom: 1px solid #ddd;
    border-radius: 5px 5px 0 0;
}

.file-list {
    padding: 15px;
    background-color: #fff;
    max-height: 400px;
    overflow-y: auto;
}

.file-list ul {
    margin: 0;
    padding-left: 20px;
}

.file-list li {
    margin: 8px 0;
    word-break: break-all;
}

.expand-all, .collapse-all {
    margin: 10px 5px;
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.expand-all:hover, .collapse-all:hover {
    background-color: #0056b3;
}

