/* 全局样式重置和基础样式 */
* {
    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;
}

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

/* 分类导航样式 */
.category-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
}

.category-nav .container {
    overflow: visible !important;
}

.category-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.category-nav-item {
    position: relative;
    white-space: nowrap;
}

.category-nav-item a {
    display: block;
    padding: 12px 15px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-nav-item a:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.category-nav-item.active a {
    color: #007bff;
    font-weight: 500;
    border-bottom: 2px solid #007bff;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.category-nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 三级菜单样式 */
.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: -1px;
}

/* 轮播图样式 */
.carousel {
    margin-bottom: 20px;
}

.carousel-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 15px;
}

.carousel-caption h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.carousel-caption p {
    margin: 0;
    font-size: 0.9rem;
}

/* 搜索显示样式 */
.search-display {
    background-color: #f0f2f5;
    padding: 15px 0;
    margin-bottom: 20px;
    border-radius: 8px;
}

.search-info {
    text-align: center;
}

.search-info h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.search-info p {
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

/* 页头样式 */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.site-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.site-description {
    font-size: 16px;
    color: #7f8c8d;
}

/* 文章列表样式 */
.article-list {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* 文章项样式 */
.article-item {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

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

.article-item:hover {
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 文章缩略图 */
.article-thumbnail {
    width: 200px;
    height: 120px;
    margin-right: 20px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .article-thumbnail img {
    transform: scale(1.05);
}

/* 文章内容 */
.article-content {
    flex: 1;
    min-width: 0;
}

/* 文章元数据 */
.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #7f8c8d;
}

/* 标签样式 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
}

.badge-top {
    background-color: #e74c3c;
    color: #fff;
}

.badge-featured {
    background-color: #3498db;
    color: #fff;
}

.badge-ad {
    background-color: #95a5a6;
    color: #fff;
}

.article-date {
    font-size: 14px;
    color: #95a5a6;
}

/* 文章标题 */
.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #3498db;
}

/* 文章摘要 */
.article-summary {
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标签链接 */
.article-tags {
    margin-bottom: 12px;
}

.tag-link {
    display: inline-block;
    padding: 4px 10px;
    background-color: #ecf0f1;
    color: #34495e;
    text-decoration: none;
    border-radius: 16px;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: #3498db;
    color: #fff;
}

/* 文章统计信息 */
.article-stats {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #95a5a6;
}

.stat-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.stat-icon {
    margin-right: 5px;
    font-size: 16px;
}

/* 分页样式 */
.pagination {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-link {
    display: inline-block;
    padding: 8px 14px;
    background-color: #ecf0f1;
    color: #34495e;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.pagination-link:hover {
    background-color: #3498db;
    color: #fff;
}

.pagination-link.active {
    background-color: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* 页脚样式 */
.site-footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
    font-size: 14px;
}

/* 空状态样式 */
.empty-state {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 60px 20px;
    text-align: center;
    color: #7f8c8d;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

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

.back-to-home {
    margin-bottom: 20px;
    font-size: 14px;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

.back-to-home a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.back-icon {
    margin-right: 5px;
    font-size: 16px;
    font-weight: bold;
}

.article-detail-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #7f8c8d;
    flex-wrap: wrap;
    gap: 15px;
}

.article-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-detail-tags {
    margin-bottom: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.article-detail-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #7f8c8d;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .article-item {
        flex-direction: column;
    }
    
    .article-thumbnail {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .article-title {
        font-size: 18px;
    }
    
    .pagination {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-detail {
        padding: 20px;
    }
    
    .article-detail-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 24px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .article-item {
        padding: 15px;
    }
    
    .article-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .stat-item {
        margin-right: 10px;
    }
    
    .pagination-links {
        flex-wrap: wrap;
    }
    
    .pagination-link {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* 分类导航样式 */
.category-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
    position: relative;
    z-index: 1000;
}

.category-nav .container {
    overflow: visible !important;
}

.category-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.category-nav-item {
    position: relative;
    white-space: nowrap;
}

.category-nav-item a {
    display: block;
    padding: 12px 15px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.category-nav-item a:hover {
    background-color: #e9ecef;
    color: #007bff;
}

.category-nav-item.active a {
    color: #007bff;
    font-weight: 500;
    border-bottom: 2px solid #007bff;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 200px;
    padding: 0;
    margin: 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
}

.category-nav-item:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    position: relative;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* 三级菜单样式 */
.dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: -1px;
}

/* 轮播图样式 */
.carousel {
    margin-bottom: 20px;
}

.carousel-wrapper {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 15px;
}

.carousel-caption h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}

.carousel-caption p {
    margin: 0;
    font-size: 0.9rem;
}