/* ===================================
   资讯页面样式
   =================================== */

/* 首页资讯列表样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.news-item-tag {
    flex-shrink: 0;
    padding: 4px 12px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
}

.news-item-tag.hot {
    background: var(--primary-color);
    color: white;
}

.news-item-content {
    flex: 1;
    min-width: 0;
}

.news-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: var(--transition);
}

.news-item:hover .news-item-title {
    color: var(--primary-color);
}

.news-item-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 13px;
    color: var(--text-light);
}

/* ===================================
   页面Banner
   =================================== */
.page-banner {
    background: var(--bg-gradient);
    padding: 120px 0 60px;
    text-align: center;
    color: white;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-desc {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.breadcrumb {
    font-size: 14px;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
}

.breadcrumb span {
    margin: 0 8px;
}

/* ===================================
   资讯列表页面
   =================================== */
.news-page {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.news-page-content {
    max-width: 900px;
    margin: 0 auto;
}

/* 筛选标签 */
.news-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 资讯列表 */
.news-list-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.news-item-page {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.news-item-page:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.news-item-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    background: var(--bg-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-icon {
    font-size: 40px;
}

.news-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item-header {
    margin-bottom: 8px;
}

.news-item-page .news-item-tag {
    display: inline-block;
    margin-bottom: 8px;
}

.news-item-page .news-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

.news-item-page:hover .news-item-title {
    color: var(--primary-color);
}

.news-item-page .news-item-excerpt {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.news-item-footer {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.page-btn,
.page-num {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover,
.page-num:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-num.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: var(--text-light);
}

/* ===================================
   侧边栏
   =================================== */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-btn {
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

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

/* 热门列表 */
.hot-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: var(--transition);
}

.hot-item:last-child {
    border-bottom: none;
}

.hot-item:hover .hot-title {
    color: var(--primary-color);
}

.hot-rank {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hot-item:nth-child(1) .hot-rank {
    background: #5B77F2;
    color: white;
}

.hot-item:nth-child(2) .hot-rank {
    background: #7B93F5;
    color: white;
}

.hot-item:nth-child(3) .hot-rank {
    background: #FFB088;
    color: white;
}

.hot-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag-item:hover {
    background: var(--primary-color);
    color: white;
}

/* 下载组件 */
.download-widget {
    background: var(--bg-gradient);
    color: white;
    text-align: center;
}

.download-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.download-text {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.download-widget .download-qr {
    margin-top: 16px;
}

.download-widget .qr-placeholder {
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 8px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.download-widget p {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 12px;
}

/* ===================================
   文章详情页
   =================================== */
.article-page {
    padding: 60px 0;
    background: var(--bg-secondary);
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
}

.article-main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 文章头部 */
.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.article-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 16px;
}

.article-tag.hot {
    background: var(--primary-color);
    color: white;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-light);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-author .author-avatar {
    font-size: 20px;
}

/* 文章正文 */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body .article-lead {
    font-size: 18px;
    color: var(--text-secondary);
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    margin-bottom: 32px;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 40px 0 20px;
    padding-left: 16px;
    border-left: 4px solid var(--primary-color);
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
}

.article-body ul,
.article-body ol {
    margin: 16px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
}

/* 提示框 */
.article-notice {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #FFF7ED;
    border-radius: 8px;
    margin: 24px 0;
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notice-content strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.notice-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 引用 */
.article-quote {
    padding: 24px 32px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 24px 0;
    text-align: center;
}

.article-quote p {
    font-size: 18px;
    font-style: italic;
    color: var(--text-secondary);
    margin: 0 0 12px;
}

.article-quote cite {
    font-size: 14px;
    color: var(--text-light);
}

/* FAQ */
.article-faq {
    margin: 24px 0;
}

.faq-item {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 文章标签 */
.article-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 分享 */
.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.share-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.share-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn.wechat {
    background: #07C160;
    color: white;
}

.share-btn.weibo {
    background: #E6162D;
    color: white;
}

.share-btn.qq {
    background: #12B7F5;
    color: white;
}

.share-btn:hover {
    opacity: 0.8;
}

/* 上下篇导航 */
.article-nav {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
    text-align: center;
}

.back-to-list {
    display: inline-block;
    padding: 12px 32px;
    background: var(--bg-gradient);
    color: white;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
}

.back-to-list:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* 版权声明 */
.article-copyright {
    margin-top: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.article-copyright p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 相关推荐 */
.article-related {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: var(--transition);
}

.related-item:hover {
    background: #FFF7ED;
}

.related-tag {
    padding: 2px 8px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    font-size: 12px;
    border-radius: 4px;
}

.related-name {
    font-size: 14px;
    color: var(--text-primary);
}

/* 文章侧边栏 */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 作者组件 */
.author-widget {
    text-align: center;
}

.author-info {
    padding: 20px 0;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    background: var(--bg-gradient);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.author-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 目录 */
.toc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toc-item {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: var(--transition);
}

.toc-item:hover,
.toc-item.active {
    background: #FFF7ED;
    color: var(--primary-color);
}

/* ===================================
   响应式设计
   =================================== */
@media (max-width: 1024px) {
    .news-page-content,
    .article-content {
        grid-template-columns: 1fr;
    }

    .news-sidebar,
    .article-sidebar {
        display: none;
    }

    .news-item {
        flex-direction: column;
        gap: 12px;
    }

    .news-item-meta {
        flex-direction: row;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 28px;
    }

    .article-main {
        padding: 24px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        flex-wrap: wrap;
        gap: 12px;
    }

    .news-item-page {
        flex-direction: column;
    }

    .news-item-thumb {
        width: 100%;
        height: 80px;
    }
}

/* ===================================
   加载状态和空状态
   =================================== */
.loading-state,
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-state p,
.empty-state p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===================================
   分页样式优化
   =================================== */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-ellipsis {
    padding: 0 8px;
    color: var(--text-light);
}
