/* ========== åŸºç¡€é‡ç½® ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    background: #f5f5f5;
}
a { color: #1a73e8; text-decoration: none; }
a:hover { color: #0d47a1; text-decoration: underline; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ========== é¡¶éƒ¨è”ç³»æ  ========== */
.top-bar {
    background: #1a1a1a;
    color: #ccc;
    font-size: 12px;
    padding: 6px 0;
}
.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: right;
}

/* ========== å¤´éƒ¨ ========== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-brand { display: flex; flex-direction: column; }
.site-logo {
    font-size: 22px;
    font-weight: bold;
    color: #1a1a1a;
    text-decoration: none;
    letter-spacing: 1px;
}
.site-desc {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* å¯¼èˆª */
.site-nav ul { display: flex; gap: 24px; }
.site-nav a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}
.site-nav a:hover {
    border-bottom-color: #1a73e8;
    color: #1a73e8;
    text-decoration: none;
}



/* ========== ä¸»ä½“å¸ƒå±€ ========== */
.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.content-wrapper {
    flex: 1;
    min-width: 0;
}

/* ========== æ–‡ç« å¡ç‰‡ ========== */
.post-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}
.post-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.post-category {
    font-size: 12px;
    color: #1a73e8;
    margin-bottom: 6px;
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}


/* ========== åˆ†é¡µ ========== */
.pagination {
    text-align: center;
    margin: 30px 0;
}
.page-nav span { margin: 0 4px; }
.page-nav a {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    font-size: 13px;
    background: #fff;
}
.page-nav a:hover { background: #1a73e8; color: #fff; border-color: #1a73e8; text-decoration: none; }
.page-nav .current {
    display: inline-block;
    padding: 6px 14px;
    background: #1a73e8;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
}

/* ========== æ–‡ç« è¯¦æƒ… ========== */
.post-detail {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 32px;
    margin-bottom: 20px;
}
.post-detail .post-title { font-size: 26px; margin-bottom: 12px; }
.post-detail .post-meta { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #eee; }
.post-content { font-size: 15px; line-height: 2; color: #333; }
.post-content h2 { font-size: 20px; margin: 28px 0 12px; padding-left: 12px; border-left: 3px solid #1a73e8; }
.post-content h3 { font-size: 17px; margin: 20px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 12px 0 16px 24px; }
.post-content li { margin-bottom: 6px; }
.post-content code {
    background: #f0f4f8;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: "Consolas", "Monaco", monospace;
}
.post-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
}
.post-content pre code { background: none; color: inherit; padding: 0; }
.post-content blockquote {
    border-left: 3px solid #1a73e8;
    background: #f0f7ff;
    padding: 12px 16px;
    margin: 16px 0;
    color: #555;
    font-style: italic;
}
.post-content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }

/* ä¸Šä¸‹ç¯‡æ–‡ç« å¯¼èˆª */
.post-nav {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    gap: 12px;
}
.post-nav .prev, .post-nav .next {
    flex: 1;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
}
.post-nav a { color: #333; text-decoration: none; }
.post-nav a:hover { color: #1a73e8; }

/* ========== å³ä¾§è¾¹æ  ========== */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}
.widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}
.widget-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid #1a73e8;
    display: inline-block;
}
.widget ul li {
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
    font-size: 13px;
}
.widget ul li a { color: #555; }
.widget ul li a:hover { color: #1a73e8; }

/* æ ‡ç­¾äº‘ */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-item {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f4f8;
    border-radius: 12px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}
.tag-item:hover {
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
}

/* ========== é¡µè„š ========== */
.site-footer {
    background: #1a1a1a;
    color: #999;
    padding: 30px 0;
    margin-top: 40px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}
.footer-links { margin-bottom: 12px; }
.footer-links a {
    color: #ccc;
    margin: 0 12px;
    font-size: 13px;
}
.footer-links a:hover { color: #fff; }
.footer-copy { font-size: 12px; }
.footer-copy a { color: #888; }
.footer-copy a:hover { color: #fff; }

/* ========== è¯„è®ºåŒº ========== */
.comments-area {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 24px;
    margin-top: 20px;
}
.comments-title { font-size: 16px; margin-bottom: 16px; color: #1a1a1a; }
.comment-list { margin-bottom: 24px; }
.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-meta { font-size: 12px; color: #999; margin-bottom: 6px; }
.comment-author { font-weight: 600; color: #333; }
.comment-content { font-size: 14px; color: #555; }
.comment-reply { font-size: 12px; color: #1a73e8; }

/* ========== ç§»åŠ¨ç«¯é€‚é… ========== */
@media (max-width: 768px) {
    .top-bar { display: none; }
    .header-inner { padding: 12px 16px; }
    .site-logo { font-size: 18px; }
    .site-desc { display: none; }
    .site-nav { display: none; }
    .site-nav.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #e0e0e0;
        padding: 12px 20px;
    }
    .site-nav.active ul {
        flex-direction: column;
        gap: 0;
    }
    .site-nav.active a {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .main-container {
        flex-direction: column;
        padding: 0 12px;
        margin: 12px auto;
        gap: 12px;
    }
    .sidebar { width: 100%; }
    .post-card { padding: 18px; }
    .post-detail { padding: 20px; }
    .post-detail .post-title { font-size: 16px; }
    .post-nav { flex-direction: column; }
}

@media (max-width: 480px) {
    .post-meta { flex-wrap: wrap; gap: 8px; }
    .tag-cloud { gap: 6px; }
    .tag-item { font-size: 11px; padding: 2px 8px; }
}