﻿
/* ========== 新闻列表页面专用样式 ========== */
.news-list-page {
    min-height: calc(100vh - var(--header-height) - var(--safe-top) - var(--footer-total-height));
    background: var(--bg-secondary);
}

/* ========== 搜索栏 ========== */
.news-search-section {
    background: var(--bg-primary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}

.news-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border-radius: 24px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

    .news-search-box:focus-within {
        border-color: var(--tech-blue);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

    .news-search-box i {
        color: var(--text-muted);
        font-size: 16px;
    }

.news-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

    .news-search-input::placeholder {
        color: var(--text-muted);
    }

.news-search-btn {
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--tech-blue) 0%, var(--discovery-blue) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .news-search-btn:active {
        transform: scale(0.95);
    }

/* ========== 分类筛选标签 ========== */
.category-filter-section {
    background: var(--bg-primary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .category-filter-section::-webkit-scrollbar {
        display: none;
    }

.category-filter-list {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.category-filter-item {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .category-filter-item:active {
        transform: scale(0.95);
    }

    .category-filter-item.active {
        background: linear-gradient(135deg, var(--tech-blue) 0%, var(--discovery-blue) 100%);
        color: white;
        border-color: var(--tech-blue);
    }

/* ========== 新闻列表 ========== */
.news-list-section {
    padding: 12px 16px;
}

.news-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 新闻卡片 */
.news-card {
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

    .news-card:active {
        transform: scale(0.98);
    }

.news-card-image-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.news-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:active .news-card-image {
    transform: scale(1.05);
}

.news-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--lighter-blue) 100%);
    color: var(--tech-blue);
    gap: 8px;
}

    .news-card-image-placeholder i {
        font-size: 40px;
        opacity: 0.5;
    }

.news-card-category-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.news-card-picked-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    border-radius: 50%;
    color: white;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

.news-card-content {
    padding: 14px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-card-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-card-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.news-card-time {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.news-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

    .news-card-stat i {
        font-size: 12px;
    }

/* 纯文字新闻卡片（无图片） */
.news-card-text-only {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

    .news-card-text-only:active {
        transform: scale(0.98);
    }

    .news-card-text-only .news-card-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
    }

    .news-card-text-only .news-card-category {
        padding: 3px 10px;
        background: var(--lighter-blue);
        color: var(--tech-blue);
        font-size: 11px;
        font-weight: 600;
        border-radius: 10px;
    }

    .news-card-text-only .news-card-picked-icon {
        color: #ff6b6b;
        font-size: 12px;
    }

/* ========== 加载状态 ========== */
.loading-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 10px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--tech-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========== 无更多数据提示 ========== */
.no-more-data {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-size: 13px;
    color: var(--text-muted);
    gap: 8px;
}

    .no-more-data::before,
    .no-more-data::after {
        content: '';
        flex: 1;
        height: 1px;
        background: var(--border-color);
        max-width: 60px;
    }

/* ========== 空状态 ========== */
.news-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.news-empty-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--lighter-blue) 100%);
    border-radius: 50%;
    margin-bottom: 20px;
}

    .news-empty-icon i {
        font-size: 48px;
        color: var(--tech-blue);
        opacity: 0.6;
    }

.news-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.news-empty-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========== 底部占位 ========== */
.bottom-placeholder {
    height: 20px;
}
