/* 基础样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar {
    background-color: #0f3460;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #e94560;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #e94560;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

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

/* 头条新闻样式 */
.headline {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.headline:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.headline-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.headline-content {
    padding: 1.5rem;
}

.headline-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #0f3460;
}

.headline-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.headline-excerpt {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    background-color: #e94560;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.read-more:hover {
    background-color: #d13650;
    transform: translateY(-2px);
}

/* 市场指数样式 */
.market-indices {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.market-indices h2 {
    color: #0f3460;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.indices-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.index-card {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border-radius: 6px;
    background-color: #f0f4f8;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.index-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.index-name {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #0f3460;
}

.index-value {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.index-change.up {
    color: #28a745;
}

.index-change.down {
    color: #dc3545;
}

/* 新闻网格样式 */
.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #0f3460;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 9px;
    width: 110px;
    height: 3px;
    background-color: #e94560;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.news-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

.news-content {
    padding: 1.2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    font-size: 0.8rem;
    color: #e94560;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 0.7rem;
    color: #0f3460;
    flex-grow: 1;
}

.news-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* 列表页样式 */
.list-container {
    display: flex;
    gap: 2rem;
}

.main-list {
    flex: 3;
}

.category-filter {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    align-self: flex-start;
    position: sticky;
    top: 90px;
}

.category-filter h3 {
    color: #0f3460;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
}

.category-list a:hover {
    color: #e94560;
    padding-left: 5px;
}

.category-list .active {
    color: #e94560;
    font-weight: 500;
}

.news-list-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.news-list-image {
    width: 200px;
    flex-shrink: 0;
}

.news-list-content {
    padding: 1.2rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a {
    color: #0f3460;
    padding: 0.8rem 1.2rem;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 0.3rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination a.active {
    background-color: #0f3460;
    color: white;
    border-color: #0f3460;
}

.pagination a:hover:not(.active) {
    background-color: #f1f1f1;
}

/* 详情页样式 */
.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.2rem;
    color: #0f3460;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 2rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h3 {
    color: #0f3460;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.related-news {
    margin-top: 3rem;
}

/* 页脚样式 */
.footer {
    background-color: #0f3460;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #e94560;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #e94560;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .list-container {
        flex-direction: column;
    }

    .category-filter {
        position: static;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-direction: column;
    }

    .nav-links {
        margin-top: 1rem;
    }

    .nav-links li {
        margin: 0 0.5rem;
    }

    .headline-image {
        height: 300px;
    }

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

    .news-list-image {
        width: 100%;
        height: 200px;
    }

    .article-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .headline-image {
        height: 200px;
    }

    .headline-content h2 {
        font-size: 1.5rem;
    }

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

    .indices-container {
        flex-direction: column;
    }
}
