/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498db;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 顶部导航 ==================== */
.navbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.nav-brand a {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: #555;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

/* ==================== 站点头部 ==================== */
.site-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.site-title {
    font-size: 36px;
    margin-bottom: 15px;
}

.site-description {
    font-size: 18px;
    opacity: 0.9;
}

/* ==================== 面包屑导航 ==================== */
.breadcrumb {
    background: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb a:hover {
    color: #3498db;
}

.breadcrumb .separator {
    color: #ccc;
}

.breadcrumb .current {
    color: #999;
}

/* ==================== 主要内容区 ==================== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 40px 20px;
    margin-bottom: 40px;
}

/* ==================== 文章列表 ==================== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-item {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.post-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.post-title a {
    color: #2c3e50;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #888;
    margin-bottom: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-excerpt {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.post-more a {
    display: inline-block;
    color: #3498db;
    font-weight: 500;
}

.post-more a:hover {
    text-decoration: underline;
}

/* ==================== 文章内容 ==================== */
.article-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-title {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
}

.article-subtitle {
    font-size: 20px;
    color: #666;
    font-weight: normal;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 25px;
    font-size: 14px;
    color: #888;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.icon-calendar::before {
    content: '📅';
}

.icon-folder::before {
    content: '📁';
}

.icon-eye::before {
    content: '👁️';
}

.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.article-body p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin: 30px 0;
}

.tags-label {
    color: #888;
    font-size: 14px;
}

.article-tags a {
    display: inline-block;
    padding: 5px 15px;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s ease;
}

.article-tags a:hover {
    background: #3498db;
    color: #fff;
}

.article-footer {
    padding-top: 20px;
}

.article-copyright {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #3498db;
}

.article-copyright p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.article-copyright a {
    color: #3498db;
}

/* ==================== 上一篇/下一篇导航 ==================== */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-previous,
.nav-next {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.nav-title {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 500;
}

/* ==================== 相关文章 ==================== */
.related-posts {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.related-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.related-item:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.related-item-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.related-item-title a {
    color: #2c3e50;
}

.related-item-title a:hover {
    color: #3498db;
}

.related-item-excerpt {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.widget-title {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.widget-content p {
    color: #666;
    line-height: 1.8;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list li a {
    display: block;
    color: #555;
    transition: color 0.3s ease;
}

.widget-list li a:hover {
    color: #3498db;
    padding-left: 5px;
}

.widget-info-list {
    list-style: none;
}

.widget-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.widget-info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: #888;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-link,
.page-current,
.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-link {
    background: #fff;
    color: #555;
    border: 1px solid #e0e0e0;
}

.page-link:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

.page-current {
    background: #3498db;
    color: #fff;
    border: 1px solid #3498db;
}

.page-dots {
    background: transparent;
    color: #999;
    border: none;
}

/* ==================== 页脚 ==================== */
.site-footer {
    background: #2c3e50;
    color: #fff;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #bdc3c7;
}

.footer-links a:hover {
    color: #fff;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        padding: 10px 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .site-title {
        font-size: 28px;
    }
    
    .site-description {
        font-size: 16px;
    }
    
    .article {
        padding: 25px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-list {
        grid-template-columns: 1fr;
    }
    
    .widget {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 40px 0;
    }
    
    .site-title {
        font-size: 24px;
    }
    
    .site-description {
        font-size: 14px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    .article-subtitle {
        font-size: 16px;
    }
    
    .article {
        padding: 20px;
    }
    
    .post-item {
        padding: 20px;
    }
    
    .post-title {
        font-size: 20px;
    }
}
