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

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

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

/* 头部导航 */
.header {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

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

.logo a {
    font-size: 24px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav {
    display: flex;
    gap: 5px;
}

.nav a {
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.weather {
    font-size: 14px;
}

.refresh-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

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

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

.main-content .container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

.content-left {
    min-width: 0;
}

/* 头条轮播 */
.headline-slider {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.slider-container {
    position: relative;
    height: 400px;
}

.slides {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    position: relative;
}

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

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 40px 20px 20px;
    color: white;
}

.slide-content h2 {
    font-size: 22px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.slide-content p {
    font-size: 14px;
    opacity: 0.9;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: rgba(0,0,0,0.7);
}

.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

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

.dot.active {
    background: white;
}

/* 热门新闻 */
.hot-news {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c41e3a;
}

.section-header h2 {
    font-size: 18px;
    color: #c41e3a;
}

.hot-news-list {
    display: grid;
    gap: 12px;
}

.hot-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s;
    cursor: pointer;
}

.hot-item:hover {
    background: #f8f8f8;
}

.hot-rank {
    width: 28px;
    height: 28px;
    background: #e0e0e0;
    color: #666;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.hot-item:nth-child(1) .hot-rank { background: #c41e3a; color: white; }
.hot-item:nth-child(2) .hot-rank { background: #ff6b6b; color: white; }
.hot-item:nth-child(3) .hot-rank { background: #ffa502; color: white; }

.hot-title {
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

/* 分类新闻区块 */
.category-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-section .section-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    border: 1px solid #eee;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

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

.news-card-content {
    padding: 15px;
}

.news-card-content h3 {
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-content p {
    font-size: 13px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.widget h3 {
    font-size: 16px;
    color: #c41e3a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c41e3a;
}

/* 汇率 */
.rate-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rate-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
}

.rate-value {
    font-weight: 700;
    color: #c41e3a;
}

/* 快讯列表 */
.quick-news-list,
.finance-list,
.realestate-list {
    list-style: none;
}

.quick-news-list li,
.finance-list li,
.realestate-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
    transition: color 0.3s;
}

.quick-news-list li:hover,
.finance-list li:hover,
.realestate-list li:hover {
    color: #c41e3a;
}

.quick-news-list li:last-child,
.finance-list li:last-child,
.realestate-list li:last-child {
    border-bottom: none;
}

/* 底部 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

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

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

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

.footer-info {
    text-align: center;
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.footer-info p {
    margin: 5px 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding: 10px 0;
    }

    .nav a {
        white-space: nowrap;
    }

    .slider-container {
        height: 280px;
    }

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

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

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #c41e3a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 加载更多按钮 */
.load-more-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
    padding: 20px;
    gap: 10px;
}

.load-more-btn {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

.more-icon {
    font-size: 14px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(3px); }
    60% { transform: translateY(2px); }
}

.load-more-info {
    color: #888;
    font-size: 13px;
}

.news-count {
    color: #888;
    font-size: 14px;
    font-weight: normal;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* 更多链接 */
.more-link {
    color: #c41e3a;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 12px;
    border-radius: 15px;
    background: rgba(196, 30, 58, 0.1);
}

.more-link:hover {
    background: #c41e3a;
    color: white;
}

