/* 前台样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f5f5;
}

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

a:hover {
    color: #428bca;
}

.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);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #428bca;
}

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

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

.nav a {
    font-size: 16px;
    color: #333;
}

.nav a:hover,
.nav a.active {
    color: #428bca;
}

/* 主要内容样式 */
.main {
    padding: 40px 0;
}

.main .container {
    display: flex;
    gap: 30px;
}

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

.sidebar {
    width: 300px;
}

/* 文章列表样式 */
.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #428bca;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

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

.article-image {
    width: 200px;
    flex-shrink: 0;
}

.article-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.article-content {
    flex: 1;
}

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

.article-title a {
    color: #333;
}

.article-title a:hover {
    color: #428bca;
}

.article-summary {
    color: #666;
    margin-bottom: 10px;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

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

.sidebar .section-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.article-list {
    list-style: none;
}

.article-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.article-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.article-list a {
    display: block;
    margin-bottom: 5px;
}

.article-list .article-view {
    font-size: 12px;
    color: #999;
}

.category-list ul {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    display: block;
    padding: 5px 0;
}

.category-list a:hover,
.category-list a.active {
    color: #428bca;
}

/* 文章详情样式 */
.article-detail {
    margin-bottom: 30px;
}

.article-detail .article-title {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.article-detail .article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-cover {
    margin-bottom: 30px;
    text-align: center;
}

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

.article-body {
    font-size: 16px;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.related-articles {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

/* 分类页样式 */
.category-header {
    margin-bottom: 30px;
    text-align: center;
}

.category-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.category-description {
    color: #666;
}

.empty-tip {
    text-align: center;
    padding: 50px 0;
    color: #999;
}

/* 底部样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
}

.footer .container {
    text-align: center;
}

.copyright {
    font-size: 14px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .main .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .article-item {
        flex-direction: column;
    }
    
    .article-image {
        width: 100%;
    }
    
    .article-image img {
        height: 200px;
    }
}