/* CMS前台样式表 */
/* 最后修改: 2026年2月28日16时40分00秒 */

/* 基础样式重置 */
* {
    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.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
}

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

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

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

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-menu li a {
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-menu li a:hover {
    background-color: #f0f0f0;
}

/* 主内容区 */
.main-content {
    padding: 30px 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

/* 内容列表 */
.content-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

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

.content-item h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.content-item h2 a {
    color: #333;
}

.content-item h2 a:hover {
    color: #0066cc;
}

.content-item .meta {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.content-item .excerpt {
    color: #666;
    line-height: 1.8;
}

.content-item .cover {
    float: right;
    width: 200px;
    height: 130px;
    margin-left: 20px;
    border-radius: 4px;
    object-fit: cover;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.sidebar-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

/* 分类列表 */
.category-list {
    list-style: none;
}

.category-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

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

.category-list li a {
    display: flex;
    justify-content: space-between;
    color: #666;
}

.category-list li a:hover {
    color: #0066cc;
}

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

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

.tag-cloud a:hover {
    background: #0066cc;
    color: #fff;
}

/* 评论列表 */
.comment-list {
    list-style: none;
}

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

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

.comment-item .author {
    font-weight: bold;
    color: #333;
}

.comment-item .content {
    color: #666;
    margin-top: 5px;
    font-size: 14px;
}

.comment-item .time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-widget h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

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

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget ul li a {
    color: #aaa;
}

.footer-widget ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
}

.pagination a:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.pagination .active {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.loading::after {
    content: "...";
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: "."; }
    40% { content: ".."; }
    60%, 100% { content: "..."; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .content-item .cover {
        float: none;
        width: 100%;
        height: auto;
        margin: 10px 0;
    }
}
