/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498db;
}

/* 布局容器 */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px 0;
    margin-bottom: 30px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 25px;
}

/* 主内容区 */
.main-content {
    flex: 2;
    margin-right: 40px;
}

/* 侧边栏 */
.sidebar {
    flex: 1;
}

.sidebar-widget {
    background: #fff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.widget-title i {
    margin-right: 10px;
    color: #3498db;
}

/* 关于我 */
.about-me {
    line-height: 1.8;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
}

.category-list li:last-child {
    border-bottom: none;
}

/* 最新文章 */
.recent-posts {
    list-style: none;
}

.recent-posts li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-posts li:last-child {
    border-bottom: none;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
}

.tag {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 3px;
    margin: 0 5px 5px 0;
    font-size: 0.85rem;
    transition: background 0.3s ease;
}

.tag:hover {
    background: #e0e0e0;
}

/* 详情页样式 */
.post-detail {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.detail-header {
    margin-bottom: 25px;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.detail-meta {
    color: #777;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.detail-meta i {
    margin-right: 5px;
}

.detail-meta > span {
    margin-right: 20px;
}

.detail-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-content h2 {
    margin: 30px 0 15px;
    color: #2c3e50;
}

.detail-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #555;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
    padding: 10px 20px;
    background: #f0f0f0;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-to-home:hover {
    background: #e0e0e0;
}

.back-to-home i {
    margin-right: 8px;
}

/* 上一篇下一篇导航 */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.nav-previous, .nav-next {
    flex: 1;
    padding: 15px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.nav-previous:hover, .nav-next:hover {
    background: #f9f9f9;
}

.nav-previous {
    margin-right: 15px;
}

.nav-next {
    margin-left: 15px;
    text-align: right;
}

.nav-label {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 5px;
}

.nav-title {
    font-weight: 500;
    color: #2c3e50;
}

/* 文章标签 */
.post-tags {
    display: flex;
    align-items: center;
    margin: 25px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.tags-label {
    font-weight: 500;
    margin-right: 15px;
    color: #555;
}

.post-tag {
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 20px;
    margin-right: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: #3498db;
    color: white;
}

/* 相关推荐 */
.related-posts {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.related-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-3px);
}

.related-title {
    font-size: 1rem;
    margin-bottom: 8px;
}

.related-meta {
    color: #777;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.related-meta i {
    margin-right: 3px;
}

.related-meta > span {
    margin-right: 10px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #777;
    font-size: 0.9rem;
    margin-top: 50px;
    border-top: 1px solid #eee;
}

.social-links {
    margin-bottom: 15px;
}

.social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .main-content {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .nav-links {
        display: none;
    }

    .detail-title {
        font-size: 1.6rem;
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-previous, .nav-next {
        margin: 0 0 15px 0;
        text-align: left;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .post-tags {
        flex-wrap: wrap;
    }

    .tags-label {
        margin-bottom: 10px;
        width: 100%;
    }
}