/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0066cc;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    min-height: 100vh;
}

/* Header & Navigation */
.header {
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.nav {
    position: relative;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: 0.3s;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-item {
    display: inline-block;
}

.nav-link {
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0066cc;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 20px;
        flex-direction: column;
        gap: 10px;
    }

    .nav-menu.active {
        display: flex;
    }

    #menu-toggle:checked + span {
        background-color: #0066cc;
    }
}

/* Home Page */
.home {
    margin-top: 40px;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 60px;
}

.site-logo {
    display: block;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.site-title {
    font-size: 24px;
    margin-bottom: 5px;
    color: #333;
}

.site-description {
    font-size: 14px;
    color: #888;
}

/* Post List */
.post-list {
    margin-top: 30px;
}

.year-group {
    margin-bottom: 40px;
}

.year {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.post-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
}

.post-item:hover {
    background-color: #fafafa;
}

.post-date {
    min-width: 60px;
    font-size: 14px;
    color: #888;
    margin-right: 20px;
}

.post-link {
    font-size: 16px;
    color: #333;
    transition: color 0.3s ease;
}

.post-link:hover {
    color: #0066cc;
}

/* Post Layout */
.post {
    max-width: 800px;
    margin: 40px auto 0;
}

.post-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.post-title {
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.post-date {
    font-size: 14px;
    color: #888;
}

.post-content {
    line-height: 1.8;
    color: #333;
}

.post-content h2 {
    font-size: 24px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #0066cc;
    color: #666;
}

.post-content code {
    padding: 2px 6px;
    background-color: #f5f5f5;
    border-radius: 3px;
    font-family: "Monaco", "Menlo", "Courier New", monospace;
    font-size: 14px;
}

.post-content pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

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

.post-content a {
    color: #0066cc;
    text-decoration: underline;
}

.post-content a:hover {
    color: #0052a3;
}

/* Tags */
.post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: #0066cc;
    color: #fff;
}

/* Comments */
.comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.comments h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

/* List Page */
.list-page {
    margin-top: 40px;
}

.list-title {
    font-size: 28px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
    text-align: center;
}

.footer-content {
    font-size: 14px;
    color: #888;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-content a {
    color: #0066cc;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-item {
    display: inline-block;
}

.page-link {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    color: #333;
    transition: background-color 0.3s ease;
}

.page-link:hover {
    background-color: #0066cc;
    color: #fff;
}

.page-item.disabled .page-link {
    color: #ccc;
    cursor: not-allowed;
}

.page-item.active .page-link {
    background-color: #0066cc;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .post-title {
        font-size: 24px;
    }

    .post-date {
        min-width: 50px;
        margin-right: 15px;
        font-size: 13px;
    }

    .post-link {
        font-size: 15px;
    }
}
