* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    background-color: #f6f8fa;
    margin: 0;
    padding: 0;
    color: #24292f;
    line-height: 1.5;
}

.container {
    max-width: 1012px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    background-color: #f6f8fa;
    border-bottom: 1px solid #d0d7de;
    padding: 16px 0;
    margin-bottom: 24px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(8px);
    background-color: rgba(246, 248, 250, 0.96);
    z-index: 10;
}

.nav-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #24292f;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    text-decoration: none;
    transition: 0.1s ease;
    cursor: pointer;
}

.nav-btn:hover {
    background-color: #eaeef2;
    border-color: #eaeef2;
    text-decoration: none;
}

.nav-btn.active {
    background-color: #ffffff;
    border-color: #d0d7de;
    font-weight: 600;
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    color: #0969da;
    text-decoration: none;
    margin-right: 16px;
    white-space: nowrap;
}

.blog-title:hover {
    text-decoration: underline;
}

/* 搜索栏样式 */
.search-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 0 4px 0 8px;
    transition: 0.1s ease;
}

.search-form:focus-within {
    border-color: #0969da;
    box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.2);
}

#searchInput {
    border: none;
    padding: 5px 0;
    font-size: 14px;
    width: 140px;
    background: transparent;
    outline: none;
    color: #24292f;
}

#searchInput::placeholder {
    color: #6e7781;
}

.search-btn {
    background: transparent;
    border: none;
    color: #57606a;
    font-size: 14px;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.1s;
}

.search-btn:hover {
    color: #0969da;
    background-color: #eaeef2;
}

.content-card {
    background-color: #ffffff;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.article-list-item {
    border-bottom: 1px solid #eaeef2;
    padding: 20px 0;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.article-title a {
    color: #0969da;
    text-decoration: none;
}

.article-title a:hover {
    text-decoration: underline;
}

.article-meta {
    font-size: 12px;
    color: #57606a;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-badge {
    background-color: #eaeef2;
    color: #0969da;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 2em;
    text-decoration: none;
    transition: 0.1s;
    border: 1px solid #d0d7de;
}

.tag-badge:hover {
    background-color: #e1e4e8;
    text-decoration: none;
}

.article-summary {
    font-size: 14px;
    color: #24292f;
    margin-top: 8px;
}

.loading, .error-msg {
    text-align: center;
    padding: 48px 20px;
    color: #57606a;
}

.error-msg {
    color: #cf222e;
}

.markdown-body {
    box-sizing: border-box;
    min-width: 200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.archives-group {
    margin-bottom: 28px;
}

.archives-year {
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #d0d7de;
    padding-bottom: 6px;
    margin-bottom: 16px;
}

.archives-list {
    list-style: none;
    padding-left: 0;
}

.archives-list li {
    margin-bottom: 8px;
}

.archives-list a {
    text-decoration: none;
    color: #0969da;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.tag-cloud-item {
    background-color: #f6f8fa;
    padding: 6px 14px;
    border-radius: 24px;
    border: 1px solid #d0d7de;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #0969da;
}

.tag-cloud-item:hover {
    background-color: #eaeef2;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-outline {
    background: none;
    border: 1px solid #d0d7de;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    color: #0969da;
}

footer {
    text-align: center;
    margin: 48px 0 24px;
    font-size: 12px;
    color: #57606a;
    border-top: 1px solid #d0d7de;
    padding-top: 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }
    .content-card {
        padding: 16px;
    }
    .article-title {
        font-size: 18px;
    }
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }
    .search-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .search-form {
        width: 100%;
    }
    #searchInput {
        flex: 1;
        width: auto;
    }
}
