/* Basic CSS for SSG */
:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-color: #333;
    --border-color: #e1e4e8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    background: #fff;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    margin-bottom: 40px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

header h1 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

header nav a {
    margin-left: 28px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

header nav a:hover {
    color: var(--accent-color);
}

/* Post List */
.post-list ul,
.archive-list ul {
    list-style: none;
    padding: 0;
}

.post-list li,
.archive-list li {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

/* Thumbnail Images */
.post-list img.thumbnail,
.archive-list img.thumbnail,
.category-post-list img.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.post-list .date,
.archive-list .date {
    font-family: monospace;
    color: #888;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 4px;
}

.post-info {
    flex: 1;
    min-width: 0;
}

.post-list a,
.archive-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.post-list a:hover,
.archive-list a:hover {
    color: var(--accent-color);
}

.category-label {
    font-size: 0.78rem;
    background: #eee;
    padding: 3px 7px;
    border-radius: 4px;
    color: #555;
    margin-left: 12px;
}

.more-link {
    margin-top: 24px;
    text-align: right;
}

.more-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

/* Category Page */
.category-page h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.category-count {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.category-page .post-list {
    list-style: none;
    padding: 0;
}

/* Category Post List */
.category-post-list {
    list-style: none;
    padding: 0;
}

.category-post-list li {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.category-post-list .date {
    font-family: monospace;
    color: #888;
    font-size: 0.92rem;
    display: block;
    margin-bottom: 4px;
}

/* Categories List Page */
.categories-list h2 {
    font-size: 1.8rem;
    margin-bottom: 32px;
}

.categories-grid {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.category-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.category-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-item a {
    display: block;
    padding: 24px;
    text-decoration: none;
    color: var(--text-color);
}

.category-name {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.category-item:hover .category-name {
    color: var(--accent-color);
}

.category-item .category-count {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin: 0;
}

/* Article */
article header {
    margin-bottom: 32px;
    border-bottom: none;
}

article h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.article-meta {
    color: #777;
    font-size: 0.9rem;
}

.article-meta .separator {
    margin: 0 8px;
}

.content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 48px;
}

.content p {
    margin: 1.6em 0;
}

.content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 48px 0 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 36px 0 16px;
    color: var(--primary-color);
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 32px 0;
    display: block;
}

.content pre {
    background: #f6f8fa;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
}

.content code {
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
}

.content pre code {
    background: none;
    padding: 0;
}

/* Related Posts */
.related-posts {
    margin: 48px 0;
    padding: 24px;
    background: #f9f9f9;
    border-radius: 4px;
}

.related-posts h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.related-posts ul {
    list-style: none;
    padding: 0;
}

.related-posts li {
    margin: 8px 0;
}

.related-posts a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-posts a:hover {
    color: var(--accent-color);
}

.article-footer-nav {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.article-footer-nav a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 12px;
}

/* Page Content */
.page-content header {
    margin-bottom: 32px;
}

.page-content h1 {
    font-size: 2rem;
    margin-bottom: 24px;
}

/* Footer */
footer {
    margin-top: 80px;
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #777;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 1rem;
    }
    
    header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    header nav {
        margin-top: 16px;
    }
    
    header nav a {
        margin-left: 0;
        margin-right: 20px;
    }
    
    .post-list li,
    .archive-list li,
    .category-post-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .post-list img.thumbnail,
    .archive-list img.thumbnail,
    .category-post-list img.thumbnail {
        width: 100%;
        height: auto;
    }
    
    .post-list .date,
    .archive-list .date,
    .category-post-list .date {
        min-width: auto;
    }
    
    .category-label {
        margin-left: 0;
        margin-top: 8px;
        display: inline-block;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}
