/* 资讯频道样式 */
.news-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    min-height: calc(100vh - 200px);
}

/* 页面标题 */
.page-header {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.page-header p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

/* 头条新闻 */
.featured-news {
    grid-column: 1 / -1;
    margin-bottom: 30px;
}

.featured-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.featured-content {
    display: flex;
    padding: 30px;
    gap: 20px;
}

.featured-icon {
    font-size: 3rem;
    opacity: 0.7;
    flex-shrink: 0;
}

.featured-text {
    flex: 1;
}

.featured-text h2 {
    font-size: 1.8rem;
    margin: 0 0 15px 0;
    color: #2c3e50;
    line-height: 1.4;
}

.featured-text p {
    font-size: 1.1rem;
    color: #7f8c8d;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.featured-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #95a5a6;
}

.featured-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 分类导航 */
.category-nav {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.category-tab {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #6c757d;
}

.category-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.category-tab.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 搜索区域 */
.search-section {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #667eea;
}

.search-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5a6fd8;
}

/* 资讯列表 */
.news-list {
    grid-column: 1;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-icon {
    font-size: 2rem;
    opacity: 0.7;
    flex-shrink: 0;
    margin-top: 5px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 1.3rem;
    margin: 0 0 10px 0;
    color: #2c3e50;
    line-height: 1.4;
    font-weight: 600;
}

.news-summary {
    font-size: 1rem;
    color: #7f8c8d;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #95a5a6;
    flex-wrap: wrap;
}

.news-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.hot-tag {
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.load-more-btn:hover {
    background: #5a6fd8;
}

.load-more-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* 右侧热门资讯 */
.hot-news-sidebar {
    grid-column: 2;
}

.sidebar-header {
    background: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid #667eea;
}

.sidebar-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.hot-news-list {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
}

.hot-news-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: background 0.3s ease;
}

.hot-news-item:last-child {
    border-bottom: none;
}

.hot-news-item:hover {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 0 -15px;
}

.hot-rank {
    background: #667eea;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.hot-content {
    flex: 1;
}

.hot-content h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #2c3e50;
    line-height: 1.4;
    font-weight: 500;
}

.hot-meta {
    font-size: 0.8rem;
    color: #95a5a6;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.news-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #6c757d;
}

.news-detail-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c3e50;
}

.news-detail-link {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.news-detail-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.news-detail-link a:hover {
    text-decoration: underline;
}

/* 搜索结果 */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-result-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-result-item:hover {
    background: #e9ecef;
}

.search-result-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.search-result-summary {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
}

/* 加载状态 */
.loading-placeholder {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #495057;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .news-main {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .featured-content {
        flex-direction: column;
        text-align: center;
    }
    
    .featured-icon {
        font-size: 2rem;
    }
    
    .category-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .news-item {
        flex-direction: column;
        text-align: center;
    }
    
    .news-icon {
        font-size: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .hot-news-sidebar {
        order: -1;
    }
}

@media (max-width: 480px) {
    .news-main {
        padding: 10px;
    }
    
    .page-header {
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .modal-content {
        width: 98%;
        margin: 5% auto;
    }
}

/* 加载状态样式 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-spinner.small {
    width: 20px;
    height: 20px;
    border-width: 2px;
    margin-bottom: 10px;
}

.loading-text {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.error-text {
    color: #e74c3c;
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

.retry-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.retry-btn:hover {
    background: #5a6fd8;
}

/* 空状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    color: #666;
    font-size: 1.2rem;
    margin: 0;
}

/* 加载更多按钮优化 */
.load-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 新闻项动画 */
.news-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}