/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 导航栏样式 */
.navbar {
    background: linear-gradient(135deg, #8B4513, #D2691E, #CD853F);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo img {
    height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 主要内容 */
.main-content {
    min-height: calc(100vh - 120px);
    padding-bottom: 2rem;
}

/* 轮播图样式 */
.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 15px;
    margin: 20px auto;
    max-width: 1200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

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

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 0 20px 40px 20px;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: bold;
}

.slide-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3; /* 限制行数为3 */
    line-clamp: 3;
    overflow: hidden;
}

.slide-btn {
    display: inline-block;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.slide-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
    background: linear-gradient(135deg, #D2691E, #8B4513);
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active,
.indicator:hover {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* 轮播控制按钮 */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 热门资讯部分 */
.featured-news {
    padding: 4rem 0;
    background-color: white;
}

.featured-news h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #000;
}

.news-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-content h3 a:hover {
    color: #8B4513;
}

.news-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10; /* 限制行数为10 */
    line-clamp: 10;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.news-meta .category {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}


/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}


/* 资讯列表 */
.news-list {
    padding: 2rem 0;
    background: white;
}

.news-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-item {
    display: flex;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.news-image {
    flex-shrink: 0;
    width: 300px;
    padding: 12px;
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.news-info {
    padding: 1.5rem;
    flex: 1;
}

.news-info h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #000;
}

.news-info h2 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-info h2 a:hover {
    color: #8B4513;
}

.news-summary {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4; /* 限制行数为4 */
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #888;
}

.news-meta .category {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn,
.page-num {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.page-btn:hover,
.page-num:hover {
    background: #f8f9fa;
}

.page-num.active {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border-color: #8B4513;
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 1rem 0;
}

.breadcrumb-nav {
    color: #666;
}

.breadcrumb-nav a {
    color: #8B4513;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span {
    margin: 0 0.5rem;
}

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

/* 文章详情 */
.article-detail {
    background: white;
    padding: 2rem 0;
}

.article-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.article-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #333;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.9rem;
}

.article-meta .category {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
}

.article-content {
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.8;
}

.featured-image {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.image-caption {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

.content-text p {
    text-indent: 4ch;
    margin-bottom: 1.5rem;
    text-align: justify;
    line-height: 2.5;
}

.content-text p img{
    display: block;
    margin: auto;
}

.content-text h2 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem 0;
    color: #333;
    border-left: 4px solid #8B4513;
    padding-left: 1rem;
}

.content-text h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem 0;
    color: #444;
}

.content-text h4 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem 0;
    color: #555;
}

.content-text ul,
.content-text ol {
    margin: 1rem 0 1.5rem 2rem;
}

.content-text li {
    margin-bottom: 0.5rem;
}

.content-image {
    text-align: center;
    margin: 2rem 0;
}

.content-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.character-stats {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid #8B4513;
}

.character-stats h4 {
    margin-bottom: 1rem;
    color: #333;
}

.character-stats ul {
    margin-left: 1rem;
}

.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.article-tags h3 {
    margin-bottom: 1rem;
    color: #333;
}

.tag {
    display: inline-block;
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

.tag:hover {
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
}

/* 相关推荐 */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.related-articles h2 {
    margin-bottom: 2rem;
    color: #333;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-item {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.related-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
    margin: 10px;
}

.related-content {
    padding: 1rem;
    flex: 1;
}

.related-content h3 {
    color: #000;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.related-content h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h3 a:hover {
    color: #8B4513;
}

.related-date {
    font-size: 0.8rem;
    color: #666;
}


/* 页脚 */
.footer {
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .carousel-control {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-control.prev {
        left: 10px;
    }

    .carousel-control.next {
        right: 10px;
    }

    .news-item {
        flex-direction: column;
    }

    .news-image {
        width: 100%;
        padding: 10px;
    }

    .news-image img {
        height: 200px;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .content-text h2 {
        font-size: 1.4rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-item {
        flex-direction: column;
    }

    .related-item img {
        width: 100%;
        height: 120px;
    }

    .filter-list {
        gap: 1rem;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-carousel {
        height: 350px;
        margin: 10px;
        border-radius: 10px;
    }

    .slide-content h2 {
        font-size: 1.8rem;
    }

    .slide-content {
        padding: 0 15px 40px 15px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

}

/* 移动端菜单样式 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        display: none;
    }

    .nav-menu.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #8B4513, #D2691E);
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.back-to-top:hover {
    transform: scale(1.1);
}


/* 加载动画样式 */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    border-radius: 10px;
    z-index: 9999;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 9999;
    transition: all 0.3s ease;
    transform: translateX(100%);
}

.message.success {
    background-color: #4CAF50;
}

.message.error {
    background-color: #f44336;
}

.message.warning {
    background-color: #ff9800;
}

.message.info {
    background-color: #2196F3;
}

.message.show {
    transform: translateX(0);
}


/* 动画关键帧 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

img.loaded {
    opacity: 1;
}

/* 新闻卡片动画 */
.animate-ready {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}


