/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

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

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
}

.logo a {
    color: #4CAF50;
    text-decoration: none;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav li {
    margin-left: 20px;
}

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

.nav a:hover {
    color: #4CAF50;
}

/* 主内容区域 */
.main {
    padding: 40px 0;
}

.content-wrapper {
    display: flex;
    gap: 30px;
}

.content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* 文章列表 */
.post-list {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

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

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

.post-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #4CAF50;
}

.post-meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 15px;
}

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

.post-excerpt {
    color: #666;
    margin-bottom: 15px;
}

.post-thumbnail {
    margin-bottom: 15px;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-tags {
    margin-top: 15px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
    transition: background-color 0.3s;
}

.tag:hover {
    background-color: #e0e0e0;
}

/* 文章详情 */
.post-detail {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.post-detail .post-title {
    font-size: 24px;
    margin-bottom: 20px;
}

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

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

.post-content img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
}

/* 评论区域 */
.comments {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

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

.comment-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #45a049;
}

.comment-list {
    margin-top: 30px;
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

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

.comment-author {
    font-weight: bold;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.comment-content {
    color: #666;
}

/* 侧边栏 */
.sidebar-widget {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 10px;
}

.sidebar-widget a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-widget a:hover {
    color: #4CAF50;
}

/* 分类列表 */
.category-list li {
    display: flex;
    justify-content: space-between;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud a {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f5f5f5;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background-color: #4CAF50;
    color: #fff;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: #4CAF50;
    color: #fff;
}

.pagination .current {
    background-color: #4CAF50;
    color: #fff;
}

/* 底部 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.footer a {
    color: #4CAF50;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav {
        margin-top: 15px;
    }
    
    .nav ul {
        flex-wrap: wrap;
    }
    
    .nav li {
        margin: 0 10px 10px 0;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .post-detail {
        padding: 20px;
    }
    
    .comments {
        padding: 20px;
    }
}

/* 搜索表单 */
.search-form {
    display: flex;
    margin-bottom: 20px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.search-form button {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.search-form button:hover {
    background-color: #45a049;
}

/* 页面样式 */
.page-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.page-content h2 {
    margin-bottom: 20px;
}

.page-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 归档页面 */
.archive-title {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.archive-title h1 {
    font-size: 24px;
    color: #333;
}
