/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

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

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a237e;
    margin-left: 10px;
}

.logo span {
    color: #e53935;
}

.logo-icon {
    font-size: 2rem;
    color: #1a237e;
}

/* 用户操作区域 */
.user-actions {
    display: flex;
    gap: 15px;
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: transparent;
    color: #1a237e;
    border: 1px solid #1a237e;
}

.btn-login:hover {
    background-color: #f5f5f5;
}

.btn-register {
    background-color: #1a237e;
    color: white;
    border: 1px solid #1a237e;
}

.btn-register:hover {
    background-color: #283593;
}

/* 主导航 */
nav {
    background-color: #1a237e;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.main-nav {
    display: flex;
    list-style: none;
    transition: all 0.3s ease;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: white;
    font-weight: 500;
    transition: background-color 0.3s;
}

.main-nav a:hover {
    background-color: #283593;
}

.active a {
    background-color: #283593;
}

.search-container {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: white;
    width: 200px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background-color: transparent;
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
}

/* 移动端菜单切换按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

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

/* 头条新闻区域 - 左侧轮播 + 右侧文章 */
.featured-news {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

/* 左侧轮播 */
.news-carousel {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    height: 400px;
}

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

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

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

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

.slide-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 30px;
    width: 100%;
}

.slide-overlay h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.slide-overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.tag {
    display: inline-block;
    background-color: #e53935;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.carousel-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.indicator.active {
    background-color: white;
}

/* 右侧文章列表 */
.secondary-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.secondary-feature {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    height: 125px;
}

.secondary-feature img {
    width: 40%;
    object-fit: cover;
}

.secondary-feature-content {
    padding: 15px;
    flex: 1;
}

.secondary-feature-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.secondary-feature-content p {
    font-size: 0.85rem;
    color: #666;
}

.secondary-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
}

.secondary-views {
    color: #e53935;
    font-weight: 600;
}

/* 热门文章板块 */
.hot-articles {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 40px;
}

.hot-articles h2 {
    color: #1a237e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.hot-articles h2 i {
    margin-right: 10px;
    color: #e53935;
}

.hot-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.hot-article {
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: #fafafa;
}

.hot-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.hot-article-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.hot-article-content {
    padding: 20px;
}

.hot-article-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.hot-article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.hot-article-views {
    color: #e53935;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.hot-article-views i {
    margin-right: 5px;
}

.hot-article-tag {
    display: inline-block;
    background-color: #e8eaf6;
    color: #1a237e;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.hot-article-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.highlight-view {
    border: 2px solid #e53935;
    position: relative;
}

.highlight-view::before {
    content: '热门';
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e53935;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* 新闻分类区块 */
.news-sections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.news-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    background-color: #1a237e;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-size: 1.2rem;
}

.section-header a {
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.section-header a:hover {
    opacity: 1;
}

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

.news-list li {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.news-list li:hover {
    background-color: #f9f9f9;
}

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

.news-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

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

.news-views {
    color: #e53935;
    font-weight: 600;
}

/* 新闻列表页主要内容 */
.list-main-content {
    padding: 30px 0;
}

.list-page-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* 左侧新闻列表区域 */
.list-left-column {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.list-section-header {
    background-color: #1a237e;
    color: white;
    padding: 20px;
}

.list-section-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.list-section-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* 新闻列表项 */
.list-news-container {
    padding: 0;
}

.list-news-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    display: block;
}

.list-news-item:hover {
    background-color: #f9f9f9;
}

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

/* 带缩略图的新闻项 */
.list-item-with-thumb {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: flex-start;
}

.list-item-thumb {
    border-radius: 6px;
    overflow: hidden;
    height: 120px;
}

.list-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.list-news-item:hover .list-item-thumb img {
    transform: scale(1.05);
}

.list-item-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.list-item-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.5;
}

.list-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
}

.list-item-date {
    display: flex;
    align-items: center;
}

.list-item-date i {
    margin-right: 5px;
}

.list-item-views {
    color: #e53935;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.list-item-views i {
    margin-right: 5px;
}

/* 不带缩略图的新闻项 */
.list-item-no-thumb .list-item-content h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.list-item-no-thumb .list-item-excerpt {
    margin-bottom: 15px;
}

/* 列表页分页 */
.list-pagination {
    padding: 25px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #eee;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.pagination-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    color: #555;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-item a:hover {
    background-color: #f0f0f0;
}

.pagination-item.active a {
    background-color: #1a237e;
    color: white;
}

.pagination-prev, .pagination-next {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.3s;
}

.pagination-prev:hover, .pagination-next:hover {
    background-color: #f0f0f0;
}

/* 右侧边栏 */
.list-right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 热门文章侧边栏 */
.list-sidebar-widget {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.list-widget-header {
    background-color: #1a237e;
    color: white;
    padding: 15px 20px;
}

.list-widget-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.list-widget-header i {
    margin-right: 8px;
    color: #e53935;
}

.list-widget-content {
    padding: 0;
}

.list-sidebar-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    display: block;
}

.list-sidebar-item:hover {
    background-color: #f9f9f9;
}

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

.list-sidebar-item h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.list-sidebar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
}

/* 分类侧边栏 */
.list-category-widget .list-widget-content {
    padding: 15px 20px;
}

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

.list-category-item {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-category-item:last-child {
    margin-bottom: 0;
}

.list-category-item a {
    color: #333;
    transition: color 0.3s;
    flex-grow: 1;
}

.list-category-item a:hover {
    color: #1a237e;
}

.list-category-count {
    background-color: #e8eaf6;
    color: #1a237e;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 标签侧边栏 */
.list-tags-widget .list-widget-content {
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.list-tag {
    display: inline-block;
    background-color: #f5f5f5;
    color: #555;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.list-tag:hover {
    background-color: #1a237e;
    color: white;
}

/* 底部样式 */
footer {
    background-color: #1a237e;
    color: white;
    padding: 40px 0 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .featured-news {
        grid-template-columns: 1fr;
    }
    
    .news-carousel {
        height: 350px;
    }
    
    .hot-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .news-sections {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .list-page-container {
        grid-template-columns: 1fr;
    }
    
    .list-item-with-thumb {
        grid-template-columns: 150px 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .user-actions {
        margin-top: 15px;
        align-self: flex-end;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* 移动端菜单样式 */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #1a237e;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        display: flex;
        max-height: 500px;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .main-nav a {
        padding: 12px 15px;
    }
    
    .search-box {
        width: 100%;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .secondary-feature {
        height: auto;
        flex-direction: column;
    }
    
    .secondary-feature img {
        width: 100%;
        height: 150px;
    }
    
    .hot-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .news-sections {
        grid-template-columns: 1fr;
    }
    
    .list-item-with-thumb {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .list-item-thumb {
        height: 180px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .news-carousel {
        height: 300px;
    }
    
    .slide-overlay h2 {
        font-size: 1.4rem;
    }
    
    .slide-overlay p {
        font-size: 0.9rem;
    }
    
    .list-item-thumb {
        height: 150px;
    }
}