/* 新闻采集群站系统 - 默认模板样式 */
/* 重置样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6; color: #333; background: #f5f6f7;
}
a { text-decoration: none; color: #1a73e8; transition: color 0.2s; }
a:hover { color: #1557b0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* 头部 */
.header {
    background: #fff; border-bottom: 1px solid #e8e8e8;
    position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.header-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #f0f0f0;
}
.logo a { display: flex; align-items: baseline; gap: 10px; color: #1a1a1a; }
.logo h1 { font-size: 1.6rem; font-weight: 700; color: #c41e24; }
.logo .subtitle { font-size: 0.85rem; color: #888; }
.search-box { display: flex; }
.search-box input {
    width: 260px; padding: 8px 14px; border: 1px solid #ddd;
    border-radius: 4px 0 0 4px; font-size: 0.9rem; outline: none;
}
.search-box input:focus { border-color: #c41e24; }
.search-box button {
    padding: 8px 18px; background: #c41e24; color: #fff;
    border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 0.9rem;
}
.search-box button:hover { background: #a3181d; }

/* 导航 */
.main-nav { padding: 0; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav li a {
    display: block; padding: 10px 16px; color: #444;
    font-size: 0.95rem; font-weight: 500; border-bottom: 2px solid transparent;
}
.main-nav li a:hover, .main-nav li a.active {
    color: #c41e24; border-bottom-color: #c41e24;
}

/* 面包屑 */
.breadcrumb { padding: 12px 0; font-size: 0.85rem; }
.breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:last-child)::after {
    content: ">"; margin: 0 8px; color: #bbb;
}
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #c41e24; }
.breadcrumb li:last-child { color: #999; }

/* 主内容区 */
.main { padding: 20px 0; min-height: 500px; }
.main-inner { display: flex; gap: 20px; }
.main-content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; position: sticky; top: 70px; align-self: flex-start; max-height: calc(100vh - 90px); overflow-y: auto; }

/* 区块标题 */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: #fff; border-left: 4px solid #c41e24;
    margin-bottom: 1px; font-size: 1.05rem; font-weight: 600;
}
.section-title a { font-size: 0.85rem; color: #888; font-weight: 400; }
.section-title a:hover { color: #c41e24; }

/* 新闻列表 */
.news-list { background: #fff; }
.news-item {
    display: flex; gap: 16px; padding: 16px; border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}
.news-item:hover { background: #fafafa; }
.news-item:last-child { border-bottom: none; }
.news-thumb {
    width: 180px; height: 120px; flex-shrink: 0; border-radius: 4px;
    overflow: hidden; background: #f0f0f0;
}
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.news-title {
    font-size: 1.1rem; font-weight: 600; line-height: 1.4;
    margin-bottom: 8px; color: #1a1a1a; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-title a { color: inherit; }
.news-title a:hover { color: #c41e24; }
.news-summary {
    font-size: 0.9rem; color: #666; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px;
}
.news-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.8rem; color: #999; margin-top: auto;
}
.news-meta .category {
    background: #f0f0f0; color: #666; padding: 2px 8px;
    border-radius: 3px; font-size: 0.75rem;
}
.news-meta .category:hover { background: #c41e24; color: #fff; }

/* 热门新闻侧边栏 */
.hot-news, .latest-news { background: #fff; margin-bottom: 16px; }
.hot-news .news-item, .latest-news .news-item {
    display: block; padding: 10px 16px; border-bottom: 1px solid #f5f5f5;
}
.hot-news .news-title, .latest-news .news-title {
    font-size: 0.9rem; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    display: block; line-height: 1.5;
}
.hot-news .news-title a, .latest-news .news-title a {
    display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.hot-news .news-meta, .latest-news .news-meta { font-size: 0.75rem; }
.hot-rank {
    display: inline-block; width: 20px; height: 20px; line-height: 20px;
    text-align: center; background: #f0f0f0; color: #999;
    font-size: 0.75rem; border-radius: 3px; margin-right: 8px; flex-shrink: 0;
}
.hot-rank.top { background: #c41e24; color: #fff; }

/* 侧边栏分类导航 */
.sidebar-categories { background: #fff; margin-bottom: 16px; }
.cat-links { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; }
.cat-link {
    display: inline-block; padding: 6px 16px; background: #f5f5f5;
    color: #555; border-radius: 4px; font-size: 0.85rem; transition: all 0.2s;
}
.cat-link:hover { background: #c41e24; color: #fff; }

/* 侧边栏关于 */
.sidebar-about { background: #fff; margin-bottom: 16px; }
.about-text { padding: 16px; font-size: 0.85rem; color: #666; line-height: 1.7; }

/* 首页特色布局 */
.hero-section { display: flex; gap: 16px; margin-bottom: 20px; min-height: 420px; }
.hero-main { flex: 1; min-width: 0; }
.hero-side { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 0; background: #fff; border-radius: 4px; overflow: hidden; }

/* 左侧头条大图 */
.hero-main .featured-news {
    background: #fff; border-radius: 4px; overflow: hidden; height: 100%;
    display: flex; flex-direction: column;
}
.hero-main .featured-news .news-item { padding: 0; border: none; display: flex; flex-direction: column; flex: 1; }
.hero-main .featured-news .news-thumb { width: 100%; height: 300px; flex-shrink: 0; }
.hero-main .featured-news .news-info { padding: 16px; flex: 1; }
.hero-main .featured-news .news-title { font-size: 1.25rem; -webkit-line-clamp: 2; }

/* 右侧推荐列表 */
.hero-side .side-item {
    display: flex; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0; transition: background 0.2s;
}
.hero-side .side-item:last-child { border-bottom: none; }
.hero-side .side-item:hover { background: #fafafa; }
.hero-side .side-thumb {
    width: 100px; height: 70px; flex-shrink: 0;
    border-radius: 4px; overflow: hidden; background: #f0f0f0;
}
.hero-side .side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side .side-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.hero-side .side-title {
    font-size: 0.95rem; font-weight: 600; line-height: 1.4; color: #1a1a1a;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 4px;
}
.hero-side .side-title a { color: inherit; }
.hero-side .side-title a:hover { color: #c41e24; }
.hero-side .side-meta { font-size: 0.75rem; color: #999; }
.hero-side .section-title { margin-bottom: 0; border-radius: 4px 4px 0 0; }

/* 分页 */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; padding: 20px; background: #fff; margin-top: 1px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid #e0e0e0; border-radius: 4px;
    font-size: 0.9rem; color: #555; background: #fff;
}
.pagination a:hover { border-color: #c41e24; color: #c41e24; }
.pagination .current {
    background: #c41e24; color: #fff; border-color: #c41e24;
}
.pagination .disabled { color: #ccc; cursor: not-allowed; }

/* 详情页 */
.article-header { background: #fff; padding: 24px; margin-bottom: 1px; }
.article-title { font-size: 1.6rem; font-weight: 700; line-height: 1.4; margin-bottom: 16px; color: #1a1a1a; }
.article-meta {
    display: flex; align-items: center; gap: 16px;
    font-size: 0.85rem; color: #888; flex-wrap: wrap;
}
.article-meta .source { color: #c41e24; font-weight: 500; }
.article-content {
    background: #fff; padding: 24px; font-size: 1.05rem;
    line-height: 1.8; color: #333;
}
.article-content p { margin-bottom: 16px; }
.article-content h2, .article-content h3 { margin: 24px 0 12px; color: #1a1a1a; }
.article-content img { margin: 16px auto; border-radius: 4px; }
.article-content a.internal-link { color: #c41e24; border-bottom: 1px dotted #c41e24; }
.article-content blockquote {
    border-left: 4px solid #c41e24; padding: 12px 20px;
    background: #fafafa; margin: 16px 0; color: #555;
}
.article-content ul, .article-content ol { margin: 16px 0 16px 24px; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td { border: 1px solid #e0e0e0; padding: 10px; }
.article-content th { background: #f5f5f5; font-weight: 600; }

/* 标签 */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag-item {
    display: inline-block; padding: 4px 12px; background: #f0f0f0;
    color: #666; border-radius: 20px; font-size: 0.85rem;
}
.tag-item:hover { background: #c41e24; color: #fff; }

/* 相关新闻 */
.related-section { background: #fff; padding: 20px; margin-top: 16px; }
.related-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.related-item { display: flex; gap: 10px; }
.related-item .thumb { width: 80px; height: 60px; border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.related-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item .title { font-size: 0.9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 上下篇导航 */
.article-nav {
    display: flex; justify-content: space-between; gap: 16px;
    background: #fff; padding: 16px 24px; margin-top: 1px;
}
.article-nav a { display: block; max-width: 45%; }
.article-nav .label { font-size: 0.8rem; color: #999; margin-bottom: 4px; }
.article-nav .title { font-size: 0.9rem; color: #1a73e8; line-height: 1.4; }
.article-nav a:hover .title { color: #c41e24; }

/* 搜索结果 */
.search-header { background: #fff; padding: 20px; margin-bottom: 1px; }
.search-header h2 { font-size: 1.1rem; color: #333; }
.search-header .keyword { color: #c41e24; font-weight: 600; }
.no-result { text-align: center; padding: 60px 20px; background: #fff; }
.no-result p { color: #999; font-size: 1rem; }

/* 页脚 */
.footer {
    background: #2a2a2a; color: #aaa; padding: 30px 0; margin-top: 30px;
}
.footer-links { display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
.footer-links a { color: #ccc; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-info { font-size: 0.8rem; color: #777; }
.footer-info a { color: #777; }
.footer-info p { margin-bottom: 4px; }

/* 响应式 */
@media (max-width: 768px) {
    .header-top { flex-direction: column; gap: 12px; }
    .search-box input { width: 200px; }
    .main-nav ul { gap: 0; }
    .main-nav li a { padding: 8px 10px; font-size: 0.85rem; }
    .main-inner { flex-direction: column; }
    .sidebar { width: 100%; }
    .hero-section { flex-direction: column; }
    .hero-side { width: 100%; }
    .hero-main .featured-news .news-thumb { height: 200px; }
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; height: 180px; }
    .article-title { font-size: 1.3rem; }
    .related-list { grid-template-columns: 1fr; }
    .article-nav { flex-direction: column; }
    .article-nav a { max-width: 100%; }
}

/* 返回顶部 */
.back-to-top {
    position: fixed; right: 20px; bottom: 20px;
    width: 44px; height: 44px; background: #c41e24;
    color: #fff; border: none; border-radius: 50%;
    cursor: pointer; font-size: 1.2rem; opacity: 0;
    transition: opacity 0.3s, transform 0.3s; transform: translateY(20px);
    z-index: 99; display: flex; align-items: center; justify-content: center;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: #a3181d; }
