/* 新闻列表页面样式 - 现代化信息流设计 */

/* CSS变量定义 - 与产品页面保持一致 */
:root {
    --primary-color: #050816;
    --accent-color: #4d9eff;
    --text-primary: #ffffff;
    --text-secondary: #c0c8e7;
    --text-muted: #8a94a6;
    --border-color: #1a2332;
    --card-bg: #0a0f1a;
    --card-hover-bg: #111827;
    --gradient-primary: linear-gradient(135deg, #4d9eff 0%, #6bb6ff 100%);
    --gradient-secondary: linear-gradient(135deg, #1a2332 0%, #2d3748 100%);
    --shadow-primary: 0 8px 32px rgba(77, 158, 255, 0.15);
    --shadow-secondary: 0 4px 20px rgba(0, 0, 0, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 页面整体布局 */
.news-section {
    background: var(--primary-color);
    min-height: 100vh;
    padding: 40px 0;
}

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

/* 页面标题区域 */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 50px 0;
    background: var(--gradient-secondary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-secondary);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    animation: shimmer 3s ease-in-out infinite;
}

.page-title {
    color: var(--text-primary);
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-shadow: 0 2px 10px rgba(77, 158, 255, 0.3);
}

.page-title i {
    color: var(--accent-color);
    font-size: 36px;
    animation: float 3s ease-in-out infinite;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin: 0;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* 分类侧边栏 */
.category-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-secondary);
    position: sticky;
    top: 20px;
    backdrop-filter: blur(10px);
}

.category-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.category-header h3 {
    color: var(--text-primary);
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-header h3 i {
    color: var(--accent-color);
    font-size: 20px;
}

.category-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-menu li {
    margin-bottom: 12px;
    position: relative;
}

.category-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    background: rgba(77, 158, 255, 0.05);
}

.category-menu li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: 1;
}

.category-menu li a:hover::before,
.category-menu li.active a::before {
    left: 0;
}

.category-menu .category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.category-menu .category-title i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.category-menu li a:hover,
.category-menu li.active a {
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-2px);
}

.category-menu li.active a {
    background: var(--gradient-primary);
    border-color: var(--accent-color);
}

.category-count {
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(77, 158, 255, 0.3);
}

/* 新闻列表区域 */
.news-main-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-secondary);
    backdrop-filter: blur(10px);
}

/* 新闻列表 - 现代化信息流布局 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.news-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-secondary);
    position: relative;
    backdrop-filter: blur(10px);
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.news-item:hover::before {
    transform: scaleX(1);
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-primary);
    border-color: var(--accent-color);
}

.news-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-content-inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    padding: 30px;
    min-height: 220px;
}

.news-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 220px;
    background: var(--card-bg);
    box-shadow: var(--shadow-secondary);
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-image img {
    transform: scale(1.08);
}

.news-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-primary);
    backdrop-filter: blur(10px);
}

.news-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 0;
}

.news-title {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.news-description {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 25px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    opacity: 0.9;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 14px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-meta-left {
    display: flex;
    align-items: center;
    gap: 25px;
}

.news-views,
.news-author {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(77, 158, 255, 0.1);
    border-radius: 20px;
    transition: var(--transition);
}

.news-views:hover,
.news-author:hover {
    background: rgba(77, 158, 255, 0.2);
    transform: translateY(-2px);
}

.news-views i,
.news-author i {
    color: var(--accent-color);
    font-size: 14px;
}

.news-category {
    background: var(--gradient-primary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(77, 158, 255, 0.3);
}

/* 分页容器 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

.pagination-container ul {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    color: var(--text-secondary);
    text-decoration: none;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pagination-container a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: 1;
}

.pagination-container a:hover::before,
.pagination-container a.hover::before {
    left: 0;
}

.pagination-container a:hover,
.pagination-container a.hover {
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-primary);
    transform: translateY(-3px);
}

.pagination-container a span {
    position: relative;
    z-index: 2;
}

.pagination-container .page-prev,
.pagination-container .page-next {
    width: 50px;
    height: 50px;
}

.pagination-container .page-prev i,
.pagination-container .page-next i {
    font-size: 16px;
    position: relative;
    z-index: 2;
}

/* 加载状态 */
.loading-container {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(77, 158, 255, 0.1);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

/* 错误状态 */
.error-container {
    text-align: center;
    padding: 80px 20px;
    color: #ef4444;
}

.error-icon {
    font-size: 60px;
    margin-bottom: 25px;
    color: #ef4444;
}

.error-container h3 {
    margin: 0 0 15px 0;
    color: #ef4444;
    font-size: 24px;
}

.error-container p {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
}

/* 空状态 - 美化版 */
.empty-container {
    text-align: center;
    padding: 100px 40px;
    color: var(--text-muted);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-secondary);
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    grid-column: 1 / -1;
}

.empty-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    animation: shimmer 3s ease-in-out infinite;
}

.empty-icon {
    font-size: 100px;
    margin-bottom: 40px;
    color: var(--accent-color);
    opacity: 0.7;
    animation: float 4s ease-in-out infinite;
}

.empty-container h3 {
    margin: 0 0 25px 0;
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-container p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
    max-width: 500px;
    opacity: 0.8;
}

/* 添加装饰元素 */
.empty-container::after {
    content: '';
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 动画效果 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

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

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

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 280px 1fr;
        gap: 30px;
    }
    
    .news-content-inner {
        grid-template-columns: 280px 1fr;
        gap: 25px;
    }
    
    .page-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .news-section {
        padding: 30px 0;
    }
    
    .page-header {
        padding: 40px 20px;
        margin-bottom: 30px;
    }
    
    .page-title {
        font-size: 28px;
        flex-direction: column;
        gap: 15px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .category-sidebar {
        position: static;
        order: 2;
    }
    
    .news-main-content {
        order: 1;
        padding: 25px;
    }
    
    .news-content-inner {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 25px;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-title {
        font-size: 20px;
    }
    
    .news-description {
        font-size: 15px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 30px 15px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .news-content-inner {
        padding: 20px;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-title {
        font-size: 18px;
    }
    
    .news-description {
        font-size: 14px;
    }
    
    .category-sidebar {
        padding: 20px;
    }
}

/* 单个新闻布局 - 修复居中问题 */
.news-list.single-news .news-item {
    max-width: none;
    margin: 0;
}

/* 添加一些微妙的装饰效果 */
.news-item::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.news-item:hover::after {
    opacity: 1;
    transform: scale(1.5);
}
