/* 全局样式 */
body {
    background-color: #f5f5f5;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 容器宽度控制 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 顶部导航优化 */
.top-nav {
    background: #0066b3;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 20px;
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 40px;
    width: auto;
}
img{
    max-width: 100%;
}
.nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    padding: 8px 16px;
    text-decoration: none;
    font-size: 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* 面包屑导航优化 */
.breadcrumb-nav {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.breadcrumb-nav .container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #999;
    gap: 8px;
}

.breadcrumb-nav a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: #0066b3;
}

.breadcrumb-nav span {
    color: #333;
    font-weight: 500;
}

.breadcrumb-nav .separator {
    margin: 0;
    color: #ccc;
}

/* 文章内容区 */
.article-container {
    margin: 20px auto;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.main-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.article-meta {
    color: #999;
    font-size: 14px;
    margin-bottom: 20px;
}

.article-content {
    color: #666;
    line-height: 1.8;
    overflow-wrap: break-word;
word-break: break-word;
overflow: hidden;
white-space: normal;
}

/* 相关文章区域 */
.related-articles {
    margin-top: 20px;
}

.related-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.related-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.5s ease;
}

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

.related-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.related-item-content h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.related-item-content a {
    color: #333;
    text-decoration: none;
}

.related-item-content a:hover {
    color: #0066b3;
}

.related-item-meta {
    color: #999;
    font-size: 12px;
}

/* 侧边栏 */
.sidebar {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.hot-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f5f5f5;
    color: #666;
    border-radius: 15px;
    margin: 0 8px 8px 0;
    font-size: 14px;
    text-decoration: none;
}

.hot-tag:hover {
    background: #0066b3;
    color: #fff;
}

.news-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.news-item a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.news-item a:hover {
    color: #0066b3;
}

.news-date {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

/* 页脚样式优化 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 15px;
}

.footer-logo p {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #bdc3c7;
}

.footer-bottom a {
    color: #bdc3c7;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #3498db;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    padding: 8px 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.back-to-top i {
    margin-right: 5px;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2980b9;
}

/* 响应式布局 */
@media (max-width: 1200px) {
    .container,
    .nav-wrapper,
    .article-container,
    .footer-content,
    .footer-bottom {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .article-container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    /* 导航栏移动端优化 */
    .nav-wrapper {
        flex-direction: column;
        padding: 10px;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 14px;
        margin: 2px;
    }

    /* 内容区移动端优化 */
    .main-content {
        padding: 15px;
    }

    .related-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .related-item img {
        width: 100%;
        height: 180px;
    }

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

    .article-meta {
        flex-wrap: wrap;
    }

    .article-meta span {
        margin-right: 15px;
        margin-bottom: 5px;
    }

    /* 页脚移动端优化 */
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        padding: 0 15px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .statistics {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    /* 超小屏幕优化 */
    .container {
        padding: 0 10px;
    }

    .breadcrumb-nav {
        font-size: 12px;
        padding: 10px 0;
    }
    
    .main-content {
        padding: 12px;
    }

    .article-title {
        font-size: 18px;
    }

    .article-meta {
        font-size: 12px;
    }

    .related-item img {
        height: 160px;
    }

    .sidebar-title {
        font-size: 16px;
    }

    .pagination-wrapper a,
    .pagination-wrapper span {
        padding: 5px 10px;
        margin: 0 2px;
        font-size: 13px;
    }

    .hot-tag {
        padding: 3px 10px;
        margin: 0 5px 5px 0;
        font-size: 12px;
    }

    .back-to-top {
        right: 15px;
        bottom: 15px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 移动端导航菜单优化 */
@media (max-width: 480px) {
    .nav-menu {
        gap: 5px;
    }

    .nav-link {
        padding: 5px 10px;
        font-size: 13px;
    }

    .footer-links a {
        font-size: 13px;
    }

    .footer-contact p {
        font-size: 13px;
    }
}

/* 列表页分页样式 */
.pagination-wrapper {
    margin-top: 30px;
    text-align: center;
}

/* 移除分页列表项的点 */
.pagination-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.pagination-wrapper li {
    display: inline-block;
}

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

.pagination-wrapper span.current {
    background: #0066b3;
    color: #fff;
    border-color: #0066b3;
}

.pagination-wrapper a:hover {
    background: #f5f5f5;
}

/* 移动端分页样式调整 */
@media (max-width: 576px) {
    .pagination-wrapper a,
    .pagination-wrapper span {
        padding: 5px 10px;
        font-size: 13px;
    }
    
    .pagination-wrapper ul {
        gap: 2px;
    }
}

/* 列表页文章项样式 */
.article-list .related-item {
    padding: 20px 0;
}

.article-list .related-item-meta span {
    margin-right: 20px;
    color: #999;
}

.article-list .related-item-meta i {
    margin-right: 5px;
}

/* 侧边栏分类列表样式 */
.category-list .news-item a {
    display: block;
    padding: 10px;
    border-radius: 4px;
}

.category-list .news-item a:hover,
.category-list .news-item a.active {
    background: #f5f5f5;
    color: #0066b3;
}

/* 首页轮播图样式 */
.banner-section {
    margin-bottom: 30px;
}

.carousel-inner img {
    height: 400px;
    object-fit: cover;
}

.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

/* 首页标题样式 */
.section-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 4px;
    background: #0066b3;
    border-radius: 2px;
}

/* 加载更多按钮 */
.load-more {
    padding: 8px 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.load-more:disabled {
    background: #ccc;
    border-color: #ccc;
}

/* 标签云样式 */
.tag-cloud {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-inner img {
        height: 200px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

/* 加载更多按钮样式 */
.load-more-wrapper {
    margin: 30px 0;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background: #0066b3;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 150px;
}

.btn-load-more:hover {
    background: #005091;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-load-more .loading-icon {
    display: none;
    margin-left: 8px;
}

.btn-load-more.loading .loading-icon {
    display: inline-block;
}

.btn-load-more.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-load-more.disabled {
    background: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* 加载动画 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 列表项淡入动画 */
.related-item {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索框样式 */
.search-form-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
}

.search-input input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #eee;
    border-radius: 25px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-input input:focus {
    outline: none;
    border-color: #0066b3;
    box-shadow: 0 0 0 3px rgba(0,102,179,0.1);
}

.search-form-wrapper .btn-load-more {
    min-width: 120px;
    padding: 12px 25px;
}

.search-form-wrapper .btn-load-more i {
    margin-right: 5px;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .search-form-wrapper {
        padding: 15px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-input input {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .search-form-wrapper .btn-load-more {
        width: 100%;
    }
}

/* 搜索结果为空时的样式 */
.no-result {
    padding: 40px 20px;
}

.no-result i {
    display: block;
    margin-bottom: 15px;
    color: #ddd;
}

.no-result p {
    font-size: 15px;
    color: #999;
}