/* ===================== 新闻专区共享样式 ===================== */

/* 页面容器 */
.news-page-container {
    min-height: 100vh;
    background: var(--gradient-bg);
}

/* 顶部标题栏 */
.news-header {
    padding: 40px 20px;
    text-align: center;
}

.news-header h1 {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-color);
}

/* 卡片列表容器 */
.news-list {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* 单条新闻卡片 */
.news-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* 有图卡片 */
.news-card.has-image .card-image {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 右侧内容区 */
.card-content {
    flex: 1;
    min-width: 0;
}

/* 标题 */
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 来源+日期行 */
.card-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
}

.card-meta .source {
    /* source span */
}

.card-meta .date {
    margin-left: 12px;
}

/* 无图卡片 */
.news-card.no-image .card-image {
    display: none;
}

/* 加载状态 */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

.loading-text {
    color: var(--text-light);
    margin-top: 16px;
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-message {
    color: var(--text-light);
    font-size: 16px;
}

.retry-btn {
    margin-top: 16px;
    padding: 8px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.retry-btn:hover {
    background: var(--primary-dark);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* 旋转动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式 */
@media (max-width: 768px) {
    .news-list {
        padding: 0 12px 20px;
    }

    .news-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-card.has-image .card-image {
        width: 100%;
        height: 180px;
    }

    .news-header h1 {
        font-size: 24px;
    }
}
