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

body {
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

header {
    background-color: #5b7a9d;
    color: white;
    padding: 20px 0;
}

header h1 {
    font-size: 2.5em;
    padding: 0 40px;
    margin-bottom: 20px;
}

nav {
    background-color: #e8e8e8;
    padding: 10px 40px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* 导航激活状态 */
.nav-btn.active {
    background-color: #d0d0d0;
    font-weight: bold;
}

/* 分类标题 */
.category-title {
    font-size: 1.8em;
    color: #5b7a9d;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #5b7a9d;
}

/* 标签计数 */
.categories a {
    display: flex;
    justify-content: space-between;
}

/* About 页面样式 */
.page-content {
    line-height: 1.8;
}

.page-content h1 {
    color: #5b7a9d;
    margin-bottom: 20px;
}

.page-content h2 {
    color: #5b7a9d;
    margin-top: 30px;
    margin-bottom: 15px;
}

.page-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.tag-item {
    background-color: #5b7a9d;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.95em;
}

.tag-item:hover {
    background-color: #4a6a8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.nav-btn {
    color: #333;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-btn:hover {
    background-color: #d0d0d0;
}

.content-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 30px auto;
    gap: 30px;
    padding: 0 40px;
}

.posts-section {
    flex: 1;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.year-title {
    font-size: 2em;
    color: white;
    background-color: #5b7a9d;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.post-item {
    background-color: #f9f9f9;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

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

.post-date {
    background-color: #5b7a9d;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    margin-right: 15px;
    font-size: 0.9em;
    white-space: nowrap;
}

.post-title {
    flex: 1;
    color: #333;
    text-decoration: none;
    font-size: 1.1em;
}

.post-title:hover {
    color: #5b7a9d;
}

.sidebar {
    width: 300px;
}

.categories {
    background-color: #5b7a9d;
    color: white;
    padding: 20px;
    border-radius: 8px;
}

.categories h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.categories ul {
    list-style: none;
}

.categories li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.categories li:last-child {
    border-bottom: none;
}

.categories a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.categories a:hover {
    opacity: 0.8;
}

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    color: #5b7a9d;
    text-decoration: none;
    padding: 8px 15px;
    border: 1px solid #5b7a9d;
    border-radius: 4px;
    transition: all 0.3s;
}

.back-btn:hover {
    background-color: #5b7a9d;
    color: white;
}

.post-content {
    line-height: 1.8;
}

.post-content h1 {
    color: #5b7a9d;
    margin-bottom: 10px;
    font-size: 2.2em;
}

.post-meta {
    color: #666;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8e8e8;
}

.post-meta span {
    margin-right: 20px;
}

.post-content h2 {
    color: #5b7a9d;
    margin: 30px 0 15px;
    font-size: 1.6em;
}

.post-content h3 {
    color: #5b7a9d;
    margin: 25px 0 10px;
    font-size: 1.3em;
}

.post-content p {
    margin: 15px 0;
}

.post-content code {
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 20px 0;
}

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

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

.post-content li {
    margin: 8px 0;
}

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

.post-content blockquote {
    border-left: 4px solid #5b7a9d;
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        padding: 0 20px;
    }
    
    .sidebar {
        width: 100%;
    }
    
    header h1 {
        font-size: 1.8em;
        padding: 0 20px;
    }
    
    nav {
        padding: 10px 20px;
    }
}