/* 新闻列表页面专用样式 */

/* 页面标题区域 */
.newsbanner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.newsbanner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.n_banner {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.n_banner h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.n_banner h4 {
    font-size: 1.2em;
    opacity: 0.9;
    font-weight: 300;
}

/* 分类导航优化 - 全新设计 */
.news-feed-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px auto;
    padding: 0;
    max-width: 800px;
    background: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.news-feed-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    z-index: 1;
}

.news-feed-header li {
    position: relative;
    z-index: 2;
    margin: 0;
    flex: 1;
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-feed-header li a {
    display: block;
    padding: 20px 30px;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 0;
    letter-spacing: 0.5px;
}

.news-feed-header li a p {
    margin: 0;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
}

/* 悬停效果 */
.news-feed-header li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.news-feed-header li a:hover::before {
    left: 100%;
}

.news-feed-header li a:hover {
    color: #667eea;
    transform: translateY(-2px);
}

.news-feed-header li a:hover p {
    transform: scale(1.05);
}

/* 激活状态样式 */
.news-feed-header li.on {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    margin: 5px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

.news-feed-header li.on a {
    color: #ffffff;
    padding: 20px 30px;
}

.news-feed-header li.on a::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.news-feed-header li.on a:hover {
    color: #ffffff;
}

/* 分类导航的装饰元素 */
.news-feed-header::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
    border-radius: 50px;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-feed-header:hover::after {
    opacity: 1;
}

/* 新闻卡片增强 */
.news-feed-card {
    position: relative;
    border: 1px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-feed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.news-feed-card:hover {
    border-color: #667eea;
    transform: translateY(-8px) scale(1.02);
}

/* 文章标题样式增强 */
.news-feed-content-title {
    background: linear-gradient(135deg, #333 0%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.news-feed-card:hover .news-feed-content-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 摘要文本优化 */
.news-feed-content-abstract {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    text-align: justify;
}

/* 日期标签美化 */
.news-feed-content-date {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    color: #495057;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.news-feed-content-date::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.news-feed-card:hover .news-feed-content-date::before {
    left: 100%;
}

/* 图片悬停效果 */
.news-feed-content-img {
    position: relative;
    overflow: hidden;
    border: 3px solid #f8f9fa;
    transition: all 0.4s ease;
}

.news-feed-content-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-feed-card:hover .news-feed-content-img::after {
    opacity: 1;
}

.news-feed-card:hover .news-feed-content-img {
    border-color: #667eea;
    transform: scale(1.08) rotate(1deg);
}

/* 分页组件美化 - 通用样式设计 */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 60px auto;
    padding: 0;
    max-width: 1200px;
    position: relative;
}

/* 通用分页样式 - 覆盖所有可能的分页结构 */
.pagination-container * {
    box-sizing: border-box;
}

.pagination-container ul,
.pagination-container div,
.pagination-container .pagination {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e9ecef;
    min-width: 60px;
}

.pagination-container li,
.pagination-container a,
.pagination-container span {
    margin: 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    list-style: none;
}

.pagination-container li:last-child,
.pagination-container a:last-child,
.pagination-container span:last-child {
    border-bottom: none;
}

.pagination-container a,
.pagination-container span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #495057;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    min-height: 50px;
    position: relative;
    overflow: hidden;
}

.pagination-container a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pagination-container a:hover::before {
    opacity: 1;
}

.pagination-container a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* 当前页面样式 */
.pagination-container .current,
.pagination-container .active,
.pagination-container span[class*="current"],
.pagination-container span[class*="active"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.pagination-container .current::before,
.pagination-container .active::before,
.pagination-container span[class*="current"]::before,
.pagination-container span[class*="active"]::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2));
    opacity: 1;
}

/* 上一页下一页样式 */
.pagination-container .prev,
.pagination-container .next,
.pagination-container a[class*="prev"],
.pagination-container a[class*="next"] {
    font-weight: 700;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.pagination-container .prev:hover,
.pagination-container .next:hover,
.pagination-container a[class*="prev"]:hover,
.pagination-container a[class*="next"]:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 分页组件的装饰元素 */
.pagination-container ul::before,
.pagination-container div::before,
.pagination-container .pagination::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #667eea);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pagination-container ul:hover::before,
.pagination-container div:hover::before,
.pagination-container .pagination:hover::before {
    opacity: 1;
}

/* 空状态美化 */
.empty-state {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    margin: 40px 20px;
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.empty-state i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 2;
}

.empty-state p {
    color: #495057;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* 加载动画 */
.news-feed-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式优化 */
@media (max-width: 768px) {
    .news-feed-header {
        flex-direction: column;
        margin: 20px 10px;
        padding: 15px;
    }
    
    .news-feed-header li {
        margin: 5px 0;
    }
    
    .news-feed-header li a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .news-feed-card {
        margin: 20px 10px;
    }
    
    .news-feed-card a {
        padding: 20px;
    }
    
    .news-feed-content-title {
        font-size: 18px;
    }
    
    /* 移动端分页样式调整 */
    .pagination-container {
        margin: 30px 20px;
    }
    
    .pagination-container ul,
    .pagination-container div,
    .pagination-container .pagination {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        min-width: auto;
        max-width: 100%;
    }
    
    .pagination-container li,
    .pagination-container a,
    .pagination-container span {
        border-bottom: none;
        border-right: 1px solid #e9ecef;
        margin: 0;
    }
    
    .pagination-container li:last-child,
    .pagination-container a:last-child,
    .pagination-container span:last-child {
        border-right: none;
    }
    
    .pagination-container a,
    .pagination-container span {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .pagination-container a:hover,
    .pagination-container .current,
    .pagination-container .active,
    .pagination-container span[class*="current"],
    .pagination-container span[class*="active"] {
        transform: translateY(-2px);
    }
}

/* 热门标签样式 */
.sidebar-section {
    background: #ffffff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sidebar-section:hover::before {
    transform: scaleX(1);
}

.sidebar-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.sidebar-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
    background: linear-gradient(135deg, #333 0%, #666 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-section h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 1px;
}

/* 标签云容器 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
    overflow: hidden;
}

/* 单个标签样式 */
.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 200px;
    min-width: 60px;
}

/* 标签名称样式 - 可以省略 */
.tag-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
    display: inline-block;
    flex-shrink: 1;
}

/* 标签计数样式 - 完整显示 */
.tag-count {
    flex-shrink: 0;
    margin-left: 6px;
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    white-space: nowrap;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.6s ease;
}

.tag-item:hover::before {
    left: 100%;
}

.tag-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}


.tag-item:hover .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 标签大小变化效果 - 根据文章数量 */
.tag-item:nth-child(1) { font-size: 15px; }
.tag-item:nth-child(2) { font-size: 15px; }
.tag-item:nth-child(3) { font-size: 15px; }
.tag-item:nth-child(4) { font-size: 14px; }
.tag-item:nth-child(5) { font-size: 14px; }
.tag-item:nth-child(6) { font-size: 13px; }
.tag-item:nth-child(7) { font-size: 13px; }
.tag-item:nth-child(8) { font-size: 12px; }

/* 标签颜色变化 */
.tag-item:nth-child(odd) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.tag-item:nth-child(even) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.tag-item:nth-child(3n) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

/* 特殊标签样式 */
.tag-item:first-child {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: #ffffff;
    border-color: #ff6b6b;
}

.tag-item:first-child .tag-count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}



/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-section {
        padding: 20px;
        margin: 15px 10px;
    }
    
    .sidebar-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .tag-cloud {
        gap: 8px;
    }
    
    .tag-item {
        padding: 6px 12px;
        font-size: 13px;
        max-width: 150px;
        min-width: 50px;
    }
    
    .tag-name {
        max-width: 80px;
    }
    
    .tag-count {
        font-size: 11px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .tag-cloud {
        justify-content: center;
    }
    
    .tag-item {
        padding: 5px 10px;
        font-size: 12px;
        max-width: 120px;
        min-width: 40px;
    }
    
    .tag-name {
        max-width: 60px;
    }
}

/* 打印样式 */
@media print {
    .news-feed-header,
    .pagination-container,
    .c_nav {
        display: none;
    }
    
    .news-feed-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .sidebar-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tag-item {
        background: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ccc !important;
    }
}
