/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 主容器布局 */
.main-container {
    display: flex;
    min-height: calc(100vh - 20px);
    position: relative;
    margin-top: 20px;
}

/* 左侧菜单栏样式 */
.left-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #fdfefe 0%, #f8fafc 100%);
    border-right: 1px solid #e8edf3;
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 900;
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: #d7dde5 transparent;
}

/* 侧栏细滚动条（webkit 内核） */
.left-sidebar::-webkit-scrollbar {
    width: 6px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: #d7dde5;
    border-radius: 3px;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: #c2cbd6;
}

/* 侧边栏展开/收起按钮：圆形雪佛龙，钉在侧栏右缘垂直居中
   （DOM 置于 aside 外，避免被侧栏 overflow 裁剪；用毗邻选择器联动收起态） */
.sidebar-toggle {
    position: fixed;
    left: 260px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
    z-index: 950;
    pointer-events: auto;
    transition: left 0.3s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 左向雪佛龙（展开态：点击收起） */
.sidebar-toggle::before {
    content: '';
    width: 9px;
    height: 9px;
    border-top: 2px solid #94a3b8;
    border-right: 2px solid #94a3b8;
    transform: rotate(225deg);
    transition: transform 0.3s ease, border-color 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #f0fdf4;
    border-color: #4CAF50;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.28);
}

.sidebar-toggle:hover::before {
    border-color: #4CAF50;
}

/* 收起态：按钮跟随侧栏贴到 50px 边缘，雪佛龙翻转向右（点击展开） */
.left-sidebar.collapsed + .sidebar-toggle {
    left: 50px;
}

.left-sidebar.collapsed + .sidebar-toggle::before {
    transform: rotate(45deg);
}

.left-sidebar.collapsed + .sidebar-toggle:hover::before {
    border-color: #4CAF50;
}

/* 侧边栏收缩状态下的ICP备案信息隐藏 */
.left-sidebar.collapsed .icp-section {
    display: none; /* 隐藏ICP备案信息 */
}

/* 侧边栏折叠状态 - 只显示图标 */
.left-sidebar.collapsed {
    width: 50px; /* 收缩后保持一定宽度，只显示图标 */
    overflow: hidden;
}

/* 侧边栏收缩状态下的元素样式 */
.left-sidebar.collapsed .sidebar-section-title {
    display: none; /* 隐藏章节标题 */
}

/* 侧边栏收缩状态下的链接样式 - 只显示图标 */
.left-sidebar.collapsed .sidebar-link {
    margin: 0;
    padding: 10px 0;
    justify-content: center;
    font-size: 0; /* 隐藏所有文字 */
}

/* 侧边栏收缩状态下的图标样式 */
.left-sidebar.collapsed .sidebar-icon {
    font-size: 16px;
    margin-right: 0;
    display: inline-block;
}

/* 隐藏收缩状态下的术语标签 */
.left-sidebar.collapsed .terms-tags-container {
    display: none; /* 隐藏术语标签 */
}

/* 侧边栏折叠时的主内容区（按钮 div 现位于 aside 与 main 之间，需用一般兄弟选择器） */
.left-sidebar.collapsed ~ .content-area {
    margin-left: 50px; /* 主内容区左侧间距调整为收缩后的侧边栏宽度 */
}

/* 侧边栏内容区域 */
.sidebar-section {
    padding: 16px 0;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-section:last-child {
    border-bottom: none;
}

/* 侧边栏分区标题：前置绿色小竖条点缀 */
.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 20px 12px 20px;
    padding: 0;
}

.sidebar-section-title::before {
    content: '';
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background-color: #4CAF50;
    flex-shrink: 0;
}

/* 侧边栏菜单 */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

/* 侧边栏链接样式：圆角胶囊，hover 更柔和 */
.sidebar-link {
    display: flex;
    align-items: center;
    margin: 0 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
}

.sidebar-link:hover {
    background-color: #eef2f7;
    color: #3d8b40;
}

/* 侧边栏激活状态 */
.sidebar-link.active {
    background-color: #eaf6ea;
    color: #3d8b40;
    font-weight: 500;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #4CAF50;
}

/* 侧边栏图标 */
.sidebar-icon {
    width: 20px;
    margin-right: 10px;
    text-align: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* ICP备案部分样式 */
.icp-section {
    padding: 20px;
    font-size: 12px;
    color: #94a3b8;
    text-align: left;
}

.icp-info p {
    margin-bottom: 8px;
    line-height: 1.4;
}

.copyright {
    margin-top: 12px;
    font-size: 11px;
}

/* 主内容区域样式 */
.content-area {
    flex: 1;
    margin-left: 260px;
    transition: all 0.3s ease;
}



/* 移动端侧边栏遮罩 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 899;
    transition: opacity 0.3s ease;
}

/* 移动端侧边栏按钮 */
.mobile-sidebar-btn {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 24px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.mobile-sidebar-btn .menu-icon {
    background-color: white;
}

/* 移动端侧边栏按钮激活状态 */
.mobile-sidebar-btn.active .menu-icon:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 5px);
}

.mobile-sidebar-btn.active .menu-icon:nth-child(2) {
    opacity: 0;
}

.mobile-sidebar-btn.active .menu-icon:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -5px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 网站头部样式 */
.site-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 56px;
    display: flex;
    align-items: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* 确保logo左侧对齐 */
.site-header .logo {
    margin-right: auto;
}

/* 确保中间导航居中 */
.site-nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 确保右侧导航右侧对齐 */
.site-nav-right {
    margin-left: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.site-logo {
    width: auto;
    height: 32px;
    max-width: 80px;
    object-fit: contain;
    opacity: 0.95;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.site-logo:hover {
    opacity: 1;
}

/* 确保logo在头部区域内正确显示 */
.site-header .logo {
    height: 100%;
    align-items: center;
    display: flex;
    padding: 2px 0;
}

.logo h1 {
    font-size: 24px;
    color: white;
    margin: 0;
}

/* logo 整体作为首页入口链接：去掉下划线/浏览器默认链接色 */
a.logo {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.menu-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* 桌面端导航样式 */
.site-nav-center,
.site-nav-right {
    display: flex;
    align-items: center;
}

.site-nav-center ul,
.site-nav-right ul {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.site-nav-center a,
.site-nav-right a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.site-nav-center a:hover,
.site-nav-right a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* 移动端导航样式 */
.site-nav {
    display: none;
}

.site-nav ul {
    display: flex;
    list-style: none;
    gap: 24px;
    margin-left: auto;
}

.site-nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.site-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* 新闻模块样式 - 直接修改默认样式，移除顶部内边距 */
.news-container {
    max-width: 1040px; /* 1440 视口下内容区约 1180 宽，原 800 上限右侧浪费近 400px，且热门条被压窄 */
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 900; /* 确保内容区域在侧边栏之下 */
}

/* 确保主内容区域没有padding */
.content-area {
    padding: 0;
}

/* 确保分类区域没有额外的顶部间距 */
.category-section {
    margin: 0;
    padding: 0;
}

/* 确保分类区域内部没有额外间距 */
/* 确保分类标题没有额外的顶部间距 */
.section-title {
    margin: 0;
    padding: 0;
}

/* 移动端保持原有样式 */
@media (max-width: 768px) {
    .news-container {
        padding: 4px;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
}

/* 页面标题样式 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h2 {
    font-size: 32px;
    color: #1e3c72;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
}

/* 新闻分类标题样式 */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e3c72;
    margin: 0;
    padding: 0 0 0 8px;
    border-left: 3px solid #4CAF50;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 32px;
}

/* 分类按钮容器样式 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 0;
    padding: 0;
}

/* 热门新闻区域样式 - 彻底重构，确保从容器左侧开始滚动 */

/* 热门新闻容器 - 主容器 */
.hot-news-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #f8f9fa;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid #e9ecef;
  flex: 1 1 320px;
  min-height: 32px;
  min-width: 0;
  margin: 0 !important;
  overflow: hidden;
  box-sizing: border-box;
}

/* 热门标签样式 */
.hot-news-label {
  font-size: 14px;
  color: #ff6b35;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0; /* 不允许收缩 */
  min-width: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hot-news-label::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 14px;
  background-color: #ddd;
  margin-left: 4px;
  vertical-align: middle;
}

/* 滚动容器 - 核心组件 */
.hot-news-scroll {
  flex: 1;
  overflow: hidden !important;
  position: relative;
  height: 28px;
  min-width: 0;
  box-sizing: border-box;
  background-color: transparent;
}

/* 简化的滚动实现 - 确保滚动效果正常工作 */

/* 滚动容器样式 */
.hot-news-scroll {
  position: relative !important;
  overflow: hidden !important;
  flex: 1 !important;
  height: 28px !important;
  min-width: 100px !important;
  background-color: transparent !important;
}

/* 滚动内容容器 */
.hot-news-list {
  display: inline-block !important;
  white-space: nowrap !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 28px !important;
  line-height: 28px !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
}

/* 移除CSS动画定义，由JavaScript控制滚动 */

/* 新闻链接样式 */
.hot-news-list a {
  display: inline-block;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  padding: 0 12px;
  margin: 0;
  line-height: 28px;
  transition: color 0.3s ease;
  position: relative;
}

.hot-news-list a:hover {
  color: #4CAF50;
}

.hot-news-list a::before {
  content: '🔥';
  font-size: 12px;
  margin-right: 6px;
  opacity: 0.8;
}

/* 移除重复的CSS动画代码，由JavaScript控制滚动 */

/* 移除冲突的样式定义 */

.category-filter::-webkit-scrollbar {
    display: none;
}

.category-filter button {
    flex: 0 0 auto;
    padding: 6px 14px;
    border: 1px solid #ddd;
    background-color: white;
    color: #666;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin: 0;
    line-height: 1.4;
}

.category-filter button:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.15);
}

.category-filter button.active {
    background-color: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.25);
}

/* 新闻列表样式 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 24px;
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

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

.news-thumbnail {
    width: 120px;
    margin-right: 16px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    /* 与右侧正文等高：占位块和封面图都随内容高度拉伸，消除左矮右高的错位感 */
    align-self: stretch;
    height: auto;
    min-height: 80px;
    /* 竖长封面防撑爆：img 改绝对定位填充，高度永远由文字内容决定，
       不会因图片原始比例把整条卡片撑到数百 px（2026-10-03 用户反馈） */
    position: relative;
}

.news-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background-color: #f5f7fa;
    color: #9aa5b4;
}

/* 无封面占位：轻量图标+小字，替代原来满块蓝底大字（44% 条目无封面，视觉要克制） */
.tag-placeholder .ph-icon {
    font-size: 22px;
    line-height: 1;
}

.tag-placeholder .ph-text {
    font-size: 12px;
    font-weight: 600;
    /* 分类名最长可达 6-8 字：收紧字距并允许换行，避免溢出 120px 缩略框 */
    letter-spacing: 1px;
    padding: 0 6px;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
}

/* 封面破图兜底：onerror 移除 img 后露出占位底色 */
.news-thumbnail.cover-broken {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    color: #9aa5b4;
}

.news-thumbnail.cover-broken::after {
    content: '📰';
    font-size: 22px;
    line-height: 1;
}

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

.news-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 标题链接化：继承标题样式，hover 才提示可点（支持中键/Ctrl+点击新标签打开） */
.news-title a {
    color: inherit;
    text-decoration: none;
}

.news-title a:hover {
    color: #1890ff;
    text-decoration: underline;
}

/* 列表摘要：两行截断，提升列表信息密度（summary 后端本来就有值） */
.news-summary {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.55;
    color: #666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    word-break: break-word;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

/* 标签胶囊组：并入 meta 行（时间之前），不再独立占行 */
.news-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.news-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 11px;
    border-radius: 12px;
    white-space: nowrap;
}

/* ---------- 骨架屏（列表加载占位） ---------- */
.news-skeleton {
    pointer-events: none;
}

.sk-thumb,
.sk-line {
    background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 37%, #eef1f5 63%);
    background-size: 400% 100%;
    animation: sk-shimmer 1.3s ease infinite;
}

.sk-thumb {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 4px;
    margin-right: 16px;
}

.sk-line {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.sk-title { width: 70%; height: 18px; }
.sk-summary { width: 95%; }
.sk-meta { width: 40%; }

@keyframes sk-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* ---------- 加载失败态（与「暂无数据」空态区分，给重试入口） ---------- */
.error-state {
    padding: 48px 16px;
    text-align: center;
    color: #8c8c8c;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.error-state .retry-btn {
    margin-top: 14px;
    padding: 6px 22px;
    border: 1px solid #1890ff;
    color: #1890ff;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.error-state .retry-btn:hover {
    background: #1890ff;
    color: #fff;
}

/* ---------- 列表搜索框 ---------- */
/* 标题独立一行，热门条+搜索框同行 */
.category-head-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hot-search-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.news-search-box {
    display: flex;
    align-items: center;
    flex: 0 0 280px;
    min-width: 200px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.2s;
}

.news-search-box:focus-within {
    border-color: #1890ff;
}

.news-search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 7px 10px;
    font-size: 13px;
    background: transparent;
}

.news-search-box button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 14px;
    line-height: 1;
}

/* 新闻详情样式 */
.news-detail {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-detail-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.news-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 12px;
}

.news-detail-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

/* 摘要导语：meta description 的页面呈现，也是正文前的导读 */
.news-detail-summary {
    margin: 0 0 20px 0;
    padding: 14px 16px;
    background-color: #f7f9f7;
    border-left: 3px solid #4CAF50;
    border-radius: 4px;
}

.news-detail-summary p {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: #555;
    text-indent: 0;
}

/* 面包屑导航 */
.news-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #888;
}

.news-breadcrumb a {
    color: #666;
    text-decoration: none;
}

.news-breadcrumb a:hover {
    color: #4CAF50;
}

.news-breadcrumb-sep {
    color: #c0c0c0;
}

.news-breadcrumb-current {
    max-width: 320px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 下一篇条目右对齐，与上一篇形成左右分布 */
.news-nav-item.next-news {
    align-items: flex-end;
    text-align: right;
}

.news-detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 24px;
}

.news-detail-content p {
    margin-bottom: 16px;
    text-indent: 2em;
}

.news-detail-actions {
    display: flex;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    position: relative;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-button:hover {
    background-color: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 点赞按钮动画效果 */
.action-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-button.liked {
    color: #ff4d4f;
    animation: like-pulse 0.6s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 77, 79, 0.5);
    background-color: rgba(255, 77, 79, 0.1);
}

.action-button.liked svg {
    fill: #ff4d4f;
    stroke: #ff4d4f;
    animation: like-scale 0.6s ease-in-out;
    transform-origin: center;
    filter: drop-shadow(0 0 4px rgba(255, 77, 79, 0.8));
}

/* 点赞动画 - 脉冲效果 */
@keyframes like-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.4);
        background-color: transparent;
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 20px rgba(255, 77, 79, 0);
        background-color: rgba(255, 77, 79, 0.15);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 77, 79, 0);
        background-color: rgba(255, 77, 79, 0.1);
    }
}

/* 点赞动画 - 缩放效果 */
@keyframes like-scale {
    0% {
        transform: scale(1);
        fill: transparent;
        stroke: currentColor;
    }
    30% {
        transform: scale(0.7);
        fill: transparent;
        stroke: currentColor;
    }
    60% {
        transform: scale(1.6);
        fill: rgba(255, 77, 79, 0.8);
        stroke: #ff4d4f;
    }
    100% {
        transform: scale(1);
        fill: #ff4d4f;
        stroke: #ff4d4f;
    }
}

/* 点赞动画 - 心形爆炸效果 */
@keyframes like-heart-burst {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 点赞按钮点击效果 */
.action-button:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

/* 分享面板样式 - 优化版 */
.share-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 10000px rgba(0, 0, 0, 0.5);
    width: 360px;
    max-width: 90vw;
    height: auto;
    max-height: 90vh;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s ease;
    overflow: hidden;
    border: none;
}

.share-panel.show {
    opacity: 1;
    visibility: visible;
    display: block;
    transform: translate(-50%, -50%) scale(1);
}

.share-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.share-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 20px;
    color: white;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.share-panel-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.share-panel-content {
    padding: 24px;
    max-height: calc(90vh - 80px); /* 调整最大高度，确保在移动端有足够的滚动空间 */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.5) rgba(0, 0, 0, 0.05);
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    overscroll-behavior-y: contain;
}

.share-panel-content::-webkit-scrollbar {
    width: 4px;
}

.share-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
}

.share-panel-content::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 2px;
}

.share-panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.7);
}

.share-section {
    margin-bottom: 28px;
}

.share-section:last-child {
    margin-bottom: 0;
}

.share-section h4 {
    margin: 0 0 20px 0;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.share-channels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.share-channel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.share-channel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.share-channel:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    color: white;
    border-color: #667eea;
}

.share-channel:hover::before {
    opacity: 1;
}

.share-channel:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.share-channel svg {
    width: 36px;
    height: 36px;
    stroke: #4b5563;
    fill: none;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
}

.share-channel:hover svg {
    stroke: white;
    fill: rgba(255, 255, 255, 0.2);
    transform: scale(1.2) rotate(5deg);
}

/* 各分享渠道特定样式 */
.share-channel[data-channel="wechat"]:hover::before {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
}

.share-channel[data-channel="wechat"]:hover {
    border-color: #07c160;
}

.share-channel[data-channel="weibo"]:hover::before {
    background: linear-gradient(135deg, #e6162d 0%, #c81623 100%);
}

.share-channel[data-channel="weibo"]:hover {
    border-color: #e6162d;
}

.share-channel[data-channel="qq"]:hover::before {
    background: linear-gradient(135deg, #12b7f5 0%, #0aa1d6 100%);
}

.share-channel[data-channel="qq"]:hover {
    border-color: #12b7f5;
}

.share-channel[data-channel="copy"]:hover::before {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.share-channel[data-channel="copy"]:hover {
    border-color: #6b7280;
}

/* 分享按钮定位 */
.news-detail-actions {
    position: relative;
}

/* 微信分享样式 */
.wechat-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}

.wechat-qr-code {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    background: white;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#wechat-qrcode {
    width: 140px;
    height: 140px;
    background-color: #fff;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wechat-tip {
    font-size: 15px;
    color: #666;
    text-align: center;
    margin: 0;
    padding: 0 24px;
    line-height: 1.5;
}





/* 分类按钮样式 */
.category-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}

.category-button:hover {
    border-color: #1976d2;
    color: #1976d2;
}

.category-button.active {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

/* 热门新闻滚动容器 */
.hot-news-scroll {
    overflow: hidden !important;
    position: relative;
    height: 28px;
    flex: 1;
}

/* 加载状态默认隐藏 */
.loading {
    display: none;
}

/* Markdown 样式 */
.news-detail-content h1 {
    font-size: 2rem;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.news-detail-content h2 {
    font-size: 1.75rem;
    margin: 1.25rem 0 0.75rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}
.news-detail-content h3 {
    font-size: 1.5rem;
    margin: 1rem 0 0.5rem 0;
}
.news-detail-content h4 {
    font-size: 1.25rem;
    margin: 0.75rem 0 0.5rem 0;
}
.news-detail-content h5 {
    font-size: 1.1rem;
    margin: 0.75rem 0 0.5rem 0;
}
.news-detail-content h6 {
    font-size: 1rem;
    margin: 0.75rem 0 0.5rem 0;
    color: #666;
}

.news-detail-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    text-indent: 2em;
}

.news-detail-content a {
    color: #2196F3;
    text-decoration: none;
}
.news-detail-content a:hover {
    text-decoration: underline;
}

.news-detail-content strong {
    font-weight: bold;
    color: #333;
}

.news-detail-content em {
    font-style: italic;
}

.news-detail-content hr {
    border: none;
    height: 1px;
    background-color: #eee;
    margin: 2rem 0;
}

.news-detail-content blockquote {
    border-left: 4px solid #2196F3;
    margin: 1rem 0;
    padding: 0.5rem 0 0.5rem 1rem;
    background-color: #f9f9f9;
    color: #666;
}

.news-detail-content ul, .news-detail-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.news-detail-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.news-detail-content pre {
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
}

.news-detail-content code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.news-detail-content pre code {
    background-color: transparent;
    padding: 0;
}

.news-detail-content img.markdown-image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
}

.news-detail-content table.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.news-detail-content table.markdown-table th,
.news-detail-content table.markdown-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
}

.news-detail-content table.markdown-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.news-detail-content table.markdown-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 响应式设计 */
@media (max-width: 480px) {
    /* 分享面板适配移动端 */
    .share-panel {
        width: 90%;
        max-width: 320px;
        /* 移除bottom设置，避免内容被截断 */
    }
    
    /* 分享渠道调整为2列布局 */
    .share-channels {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* 调整分享渠道样式 */
    .share-channel {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    /* 调整分享渠道图标大小 */
    .share-channel svg {
        width: 22px;
        height: 22px;
    }
    
    /* 调整分享面板内容内边距 */
    .share-panel-content {
        padding: 14px 16px;
    }
    
    /* 调整分享面板头部内边距 */
    .share-panel-header {
        padding: 14px 16px;
    }
    
    /* 调整分享面板标题大小 */
    .share-panel-header h3 {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    /* 更小屏幕的适配 */
    .share-channels {
        grid-template-columns: 1fr;
    }
    
    /* 调整分享渠道样式 */
    .share-channel {
        flex-direction: row;
        gap: 8px;
        justify-content: center;
        padding: 12px 8px;
    }
    
    /* 调整分享渠道图标大小 */
    .share-channel svg {
        width: 20px;
        height: 20px;
    }
}

/* 点赞数量样式 */
.like-count {
    margin-left: 8px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    font-size: 14px;
    position: relative;
}

.action-button.liked .like-count {
    color: #ff4d4f;
    animation: like-count-pulse 0.6s ease-in-out;
    text-shadow: 0 0 4px rgba(255, 77, 79, 0.5);
}

/* 点赞数量变化动画 */
@keyframes like-count-pulse {
    0% {
        transform: scale(1);
        color: #666;
    }
    50% {
        transform: scale(1.5);
        color: #ff4d4f;
        text-shadow: 0 0 8px rgba(255, 77, 79, 0.8);
    }
    100% {
        transform: scale(1);
        color: #ff4d4f;
    }
}

/* 点赞按钮悬停效果 */
.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* 点赞按钮过渡效果 */
.action-button svg {
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 点赞按钮文字过渡效果 */
.action-button span {
    transition: all 0.3s ease;
}

/* 热门推荐样式 - 全面优化 */
.hot-news {
    margin-top: 32px;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.hot-news-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-news-title::before {
    content: '🔥';
    font-size: 16px;
}

.hot-news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hot-news-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.hot-news-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f0f9ff;
}

.hot-news-rank {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* 排名样式 */
.hot-news-item:nth-child(1) .hot-news-rank {
    background: #ff4d4f;
}

.hot-news-item:nth-child(2) .hot-news-rank {
    background: #fa8c16;
}

.hot-news-item:nth-child(3) .hot-news-rank {
    background: #1890ff;
}

.hot-news-item:nth-child(n+4) .hot-news-rank {
    background: #52c41a;
}

.hot-news-item-title {
    font-size: 14px;
    color: #333333;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.hot-news-item:hover .hot-news-item-title {
    color: #1890ff;
}

/* 加载状态 */
.hot-news-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.hot-news-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hot-news {
        margin-top: 24px;
        padding: 16px;
        border-radius: 8px;
    }
    
    .hot-news-title {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .hot-news-item {
        padding: 12px 14px;
        gap: 12px;
    }
    
    .hot-news-rank {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .hot-news-item-title {
        font-size: 13px;
    }
}

/* 分页样式 - 优化版 */
#pagination, .pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding: 12px 0 !important;
    flex-wrap: wrap !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e5e7eb !important;
    max-width: 800px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.pagination-info {
    font-size: 13px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 6px 12px !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
}

.pagination-container {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.pagination-btn, .prev-btn, .next-btn {
    padding: 6px 12px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #374151 !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 60px !important;
    text-align: center !important;
    line-height: 1.4 !important;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    overflow: hidden !important;
    margin: 0 !important;
}

.pagination-btn:hover:not(:disabled), .prev-btn:hover:not(:disabled), .next-btn:hover:not(:disabled) {
    border-color: #4CAF50 !important;
    color: #4CAF50 !important;
    background: #f0fdf4 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.2) !important;
    z-index: 10 !important;
}

.pagination-btn:disabled, .prev-btn:disabled, .next-btn:disabled {
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed !important;
    background: #f9fafb !important;
    transform: none !important;
    box-shadow: none !important;
}

.page-numbers {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border-radius: 12px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
}

.page-btn {
    padding: 6px 10px !important;
    border: 1px solid #e5e7eb !important;
    background: #ffffff !important;
    color: #4b5563 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 36px !important;
    text-align: center !important;
    line-height: 1.4 !important;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    margin: 0 2px !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
}

.page-btn:hover:not(:disabled) {
    border-color: #4CAF50 !important;
    color: #4CAF50 !important;
    background: #f0fdf4 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25) !important;
    z-index: 10 !important;
}

.page-btn.active {
    background: linear-gradient(135deg, #4CAF50 0%, #3d8b40 100%) !important;
    color: #ffffff !important;
    border-color: #4CAF50 !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3) !important;
    font-weight: 600 !important;
    transform: translateY(-1px) !important;
    z-index: 20 !important;
}

.page-btn:disabled {
    color: #9ca3af !important;
    border-color: #e5e7eb !important;
    cursor: not-allowed !important;
    background: #f9fafb !important;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-ellipsis {
    padding: 0 4px !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 0 2px !important;
}

/* 分页样式适配移动端 */
@media (max-width: 768px) {
    #pagination, .pagination {
        gap: 6px !important;
        margin-top: 12px !important;
        padding: 8px !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
    }
    
    .pagination-container {
        gap: 6px !important;
    }
    
    .pagination-btn, .prev-btn, .next-btn {
        padding: 4px 8px !important;
        font-size: 12px !important;
        min-width: 50px !important;
        border-radius: 6px !important;
    }
    
    .page-numbers {
        gap: 4px !important;
        padding: 6px 8px !important;
        border-radius: 8px !important;
    }
    
    .page-btn {
        padding: 4px 8px !important;
        font-size: 12px !important;
        min-width: 32px !important;
        border-radius: 4px !important;
        margin: 0 1px !important;
    }
    
    .pagination-info {
        font-size: 12px !important;
        padding: 4px 8px !important;
        margin-top: 4px !important;
    }
}



/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示 */
.error-message {
    padding: 16px;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 16px;
}

/* 术语标签容器样式 */
.terms-tags-container {
    margin-top: 8px;
    padding: 0 16px;
}

.terms-section-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 6px 0;
    padding: 0;
}

.terms-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px 0;
}

/* 术语标签样式 - 紧凑型设计 */
.term-tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #f0f9ff;
    color: #0369a1;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #bae6fd;
    line-height: 1.4;
    text-decoration: none;
}

.term-tag:hover {
    background-color: #e0f2fe;
    color: #0284c7;
    border-color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.15);
}

/* 术语标签激活状态 */
.term-tag.active {
    background-color: #0369a1;
    color: white;
    border-color: #0369a1;
    box-shadow: 0 1px 3px rgba(3, 105, 161, 0.25);
}

/* 返回按钮 */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.back-button:hover {
    background: #e0e0e0;
}

/* 统一的移动端响应式样式 */
@media (max-width: 768px) {
    /* 网站头部样式 */
    .site-header {
        height: 56px;
        display: flex;
        align-items: center;
        padding: 0;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .header-content {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 0 4px;
        height: 56px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .logo {
        gap: 6px;
        padding: 2px 0;
        display: flex;
        align-items: center;
    }
    
    .logo h1 {
        font-size: 18px;
        color: white;
        margin: 0;
    }
    
    .site-logo {
        width: auto;
        height: 28px;
        max-width: 70px;
        object-fit: contain;
        opacity: 0.95;
        border-radius: 6px;
    }
    
    /* 主容器布局 */
    .main-container {
        display: block;
        min-height: calc(100vh - 56px);
        margin-top: 56px;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    /* 详情页让位：窄屏下 .site-header 转成 position:fixed（见文件上方断点），
       脱离文档流、不再占位。列表页由上面 .main-container 的 margin-top:56px 补偿，
       而详情页没有 .main-container 包裹（body 直接进 .news-container），
       不补这一下正文顶部（面包屑）就会被压在蓝色导航条下面。
       注意：只作用于详情页专属的 .news-detail-page，不要写成 .news-container——
       那个类是列表页与详情页共用的，会给列表页叠成 112px 双重让位。 */
    .news-detail-page {
        margin-top: 56px;
    }
    
    /* 左侧菜单栏样式 */
    .left-sidebar {
        position: fixed;
        width: 280px;
        left: -280px;
        top: 56px;
        height: calc(100vh - 56px);
        z-index: 990;
        background: white;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    /* 侧边栏打开状态 */
    .left-sidebar.mobile-open {
        left: 0;
    }
    
    /* 隐藏桌面端切换按钮 */
    .sidebar-toggle {
        display: none;
    }
    
    /* 主内容区域样式 */
    .content-area {
        margin-left: 0 !important;
        padding: 0 4px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 新闻容器样式 */
    .news-container {
        padding: 4px;
        max-width: 100%;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* 确保category-section本身没有限制宽度 */
    .category-section {
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    /* 分类标题样式 - 进一步优化宽度，为热门滚动区域腾出更多空间 */
    .section-title {
        font-size: 15px;
        font-weight: 700;
        margin: 0;
        padding: 4px 8px;
        background-color: #f8f9fa;
        border-left: 3px solid #4CAF50;
        border-radius: 4px;
        white-space: nowrap;
        width: auto;
        box-sizing: border-box;
        flex-shrink: 0;
        line-height: 1.6;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 热门新闻容器样式 - 最大化利用剩余空间 */
    .hot-news-container {
        display: flex;
        align-items: center;
        flex: 1;
        margin-top: 0;
        padding: 6px 8px;
        border-radius: 16px;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        box-sizing: border-box;
        min-width: 0;
        overflow: hidden;
        max-width: none;
        flex-grow: 1;
    }
    
    .hot-news-label {
        font-size: 12px;
        color: #ff6b35;
        font-weight: 700;
        white-space: nowrap;
        margin-right: 4px;
        flex-shrink: 0;
        padding: 0;
        line-height: 1.6;
    }
    
    .hot-news-scroll {
        height: 24px;
        flex: 1;
        overflow: hidden;
        position: relative;
        min-width: 0;
    }
    
    .hot-news-list a {
        font-size: 13px;
        padding: 0;
        color: #333;
        text-decoration: none;
        white-space: nowrap;
    }
    
    /* 新闻列表样式 */
    .news-list {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 8px;
        padding: 0;
    }
    
    /* 新闻项样式 */
    .news-item {
        flex-direction: column;
        padding: 2px 0 0 0;
        box-sizing: border-box;
        width: 100%;
        display: flex;
        gap: 10px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: transform 0.2s, box-shadow 0.2s;
        cursor: pointer;
        margin: 0;
    }
    
    .news-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 6px rgba(0,0,0,0.12);
    }
    
    /* 新闻缩略图样式 */
    .news-thumbnail {
        width: 100%;
        height: 160px;
        min-height: 0; /* 覆盖桌面端 stretch 规则的 min-height:80 */
        margin-right: 0;
        box-sizing: border-box;
        background-color: #f0f0f0;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .news-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* 新闻内容样式 */
    .news-content {
        width: 100%;
        box-sizing: border-box;
        flex: 1;
        min-width: 0;
        background-color: #f8f9fa;
        padding: 12px;
        border-radius: 6px;
        margin-top: -8px;
    }
    
    /* 新闻标题样式 */
    .news-title {
        font-size: 16px;
        line-height: 1.5;
        font-weight: 600;
        margin-bottom: 6px;
        color: #333;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 新闻元信息样式 */
    .news-meta {
        font-size: 12px;
        line-height: 1.4;
        color: #999;
        margin-bottom: 6px;
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    /* 新闻标签样式 */
    .news-tags {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .news-tag {
        display: inline-block;
        padding: 2px 8px;
        background-color: #f0f0f0;
        color: #666;
        font-size: 11px;
        border-radius: 12px;
        white-space: nowrap;
        border: 1px solid #e0e0e0;
    }
    
    /* 移动端侧边栏遮罩 */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 980;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }
    
    /* 移动端侧边栏按钮 */
    .mobile-sidebar-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        background: #1e3c72;
        color: white;
        font-size: 20px;
        cursor: pointer;
        border-radius: 50%;
        position: fixed;
        left: 16px;
        bottom: 24px;
        z-index: 999;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease;
    }
    
    .mobile-sidebar-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: block;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 1100;
        position: relative;
    }
    
    .menu-icon {
        display: block;
        width: 24px;
        height: 2px;
        background-color: white;
        margin: 5px 0;
        transition: all 0.3s ease;
    }
    
    /* 移动端隐藏桌面端导航 */
    .site-nav-center,
    .site-nav-right {
        display: none;
    }
    
    /* 显示移动端专用导航 */
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e3c72;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 900;
        display: block;
    }
    
    /* 导航展开样式 */
    .site-nav.active {
        max-height: 500px;
        padding: 8px 0;
    }
    
    /* 下拉菜单样式 */
    .site-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
        width: 100%;
    }
    
    .site-nav li {
        width: 100%;
        margin: 0;
    }
    
    .site-nav li:last-child {
        border-bottom: none;
    }
    
    .site-nav a {
        font-size: 15px;
        padding: 12px 16px;
        white-space: nowrap;
        display: block;
        width: 100%;
        text-align: left;
        color: white;
        text-decoration: none;
        transition: background-color 0.2s ease;
    }
    
    .site-nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        font-weight: 500;
    }
    
    .site-nav .active a {
        background-color: rgba(76, 175, 80, 0.3);
    }
    
    /* 汉堡菜单激活状态 */
    .mobile-menu-btn.active .menu-icon:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 5px);
    }
    
    .mobile-menu-btn.active .menu-icon:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active .menu-icon:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -5px);
    }
    
    /* 优化页面标题 */
    .page-header h2 {
        font-size: 24px;
    }
    
    /* 分页样式优化 */
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 6px;
        margin-top: 20px;
        padding: 12px 0;
        flex-wrap: wrap;
    }
    
    .page-button {
        padding: 6px 12px;
        border: 1px solid #ddd;
        background: #fff;
        border-radius: 4px;
        cursor: pointer;
        font-size: 13px;
        transition: all 0.2s;
        min-width: 36px;
        text-align: center;
    }
    
    /* 新闻详情样式 */
    .news-detail {
        background: #fff;
        padding: 16px;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .news-detail-title {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .news-detail-meta {
        display: flex;
        gap: 12px;
        font-size: 13px;
        color: #666;
        flex-wrap: wrap;
        margin-bottom: 16px;
    }
    
    .news-detail-content {
        font-size: 15px;
        line-height: 1.8;
    }
    
    .news-detail-content img {
        max-width: 100%;
        height: auto;
        margin: 12px 0;
        border-radius: 4px;
    }
    
    /* Markdown图片样式优化 */
    .markdown-image {
        max-width: 100%;
        height: auto;
        margin: 12px 0;
        border-radius: 4px;
        display: block;
    }
    
    /* Markdown表格样式优化 */
    .markdown-table {
        width: 100%;
        border-collapse: collapse;
        margin: 12px 0;
        overflow-x: auto;
        display: block;
    }
    
    .markdown-table th,
    .markdown-table td {
        padding: 8px;
        border: 1px solid #e0e0e0;
        text-align: left;
        font-size: 13px;
    }
    
    .markdown-table th {
        background-color: #f8f9fa;
        font-weight: 600;
    }
    
    /* 加载状态优化 */
    .loading {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 30px;
    }
    
    .spinner {
        width: 28px;
        height: 28px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #1976d2;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    /* 错误提示优化 */
    .error-message {
        padding: 12px;
        background: #ffebee;
        color: #d32f2f;
        border-radius: 4px;
        text-align: center;
        margin: 12px 0;
        font-size: 14px;
    }
    
    /* 空状态样式 */
    .empty-state {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 40px 0;
        color: #999;
        font-size: 14px;
    }
    
    /* 确保内容区域在移动端正确滚动 */
    .content-area {
        overflow-x: hidden;
    }
    
    /* 确保整个页面在移动端充分利用宽度 */
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* 优化术语标签在移动端的显示 */
    .terms-tags-list {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 4px 0;
    }
    
    .term-tag {
        display: inline-block;
        padding: 3px 8px;
        background-color: #f0f9ff;
        color: #0369a1;
        font-size: 11px;
        font-weight: 500;
        border-radius: 12px;
        white-space: nowrap;
        cursor: pointer;
        transition: all 0.2s ease;
        border: 1px solid #bae6fd;
        line-height: 1.4;
    }
}

/* 上一篇/下一篇导航样式 */
.news-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
    margin-top: 16px;
    border-top: 1px solid #eee;
}

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

.news-nav-link {
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.news-nav-link:hover {
    color: #4CAF50;
}

.news-nav-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.news-nav-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 没有相邻资讯的一侧（如"已是最后一篇"）：弱化成灰色提示，
   避免它看起来像一条可以点的标题 */
.news-nav-item.is-empty .news-nav-label,
.news-nav-item.is-empty .news-nav-title {
    color: #b9b9b9;
    font-weight: 400;
}

/* 相关推荐样式 */
.related-news {
    margin-top: 32px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-news-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.related-news-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.related-news-item {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.related-news-item a {
    text-decoration: none;
}

.related-news-item:hover a {
    text-decoration: none;
}

.related-news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.related-news-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.related-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-news-item:hover .related-news-image img {
    transform: scale(1.05);
}

.related-news-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-news-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    border-bottom: none;
    padding-bottom: 0;
}

.related-news-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #666;
    margin-top: auto;
}

/* 相关讨论样式（A2）：与资讯共享话题的广场帖，文字卡片纵向列表 */
.related-posts {
    margin-top: 32px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-posts-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.related-posts-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.related-posts-item {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-posts-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.related-posts-item a {
    text-decoration: none;
    display: block;
}

.related-posts-item .related-posts-title {
    font-size: 14px;
    font-weight: 600;
    color: #1976d2;
    line-height: 1.4;
    margin: 0 0 6px;
    padding: 0;
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.related-posts-item:hover .related-posts-title {
    color: #1565c0;
    text-decoration: underline;
}

.related-posts-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-posts-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    /* 上一篇/下一篇导航移动端样式 */
    .news-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 12px 0;
    }
    
    .news-nav-item {
        width: 100%;
        padding: 12px;
        background: #f9f9f9;
        border-radius: 6px;
    }
    
    .news-nav-title {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    /* 相关推荐移动端样式 */
    .related-news {
        margin-top: 24px;
        padding: 16px;
    }
    
    .related-news-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .related-news-item {
        flex-direction: row;
        background: #fff;
        border: 1px solid #eee;
    }
    
    .related-news-image {
        width: 100px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .related-news-content {
        padding: 10px;
    }
    
    .related-news-title {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .related-news-meta {
        gap: 8px;
        font-size: 11px;
    }

    /* 相关讨论移动端样式 */
    .related-posts {
        margin-top: 24px;
        padding: 16px;
    }

    .related-posts-list {
        gap: 10px;
    }

    .related-posts-item {
        padding: 10px 12px;
    }

    .related-posts-meta {
        gap: 8px;
        font-size: 11px;
    }
}

/* ============================================================
   手机端新闻列表排版（刻意放在文件末尾，覆盖前面几个 @media 块）
   问题：窄屏下 .news-item 变成"整块大图 + 内嵌灰底卡片"，缩略图被撑到
   整行宽度、160px 高；没有封面图的资讯还会显示 28px 的"环保资讯"占位大字，
   单条卡片近 290px，一屏看不到两条，视觉上很喧宾夺主。
   方案：改成"左侧小图 + 右侧文字"的紧凑横向布局；没有封面图时不渲染占位块，
   直接成为干净的纯文字行；去掉文字区的第二层灰底，整条资讯就是一张卡片。
   ============================================================ */
@media (max-width: 768px) {
    .news-list {
        gap: 10px;
        margin-top: 12px;
    }

    .news-item {
        flex-direction: row;
        align-items: flex-start;
        padding: 12px;
        gap: 12px;
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    }

    /* 触摸反馈：移动端没有 hover，用 :active 给一点点击反馈 */
    .news-item:active {
        background-color: #f7f8fa;
    }

    /* 缩略图：由 374x160 的整块大图收成左侧小图，与文字并排 */
    .news-thumbnail {
        width: 108px;
        height: 78px;
        min-height: 0; /* 覆盖桌面端 stretch 规则的 min-height:80 */
        flex: 0 0 108px;
        margin: 0;
        border-radius: 6px;
        background-color: #f0f0f0;
    }

    /* 没有封面图时隐藏占位块，避免"环保资讯"四个大字占掉大半个屏幕 */
    .news-thumbnail.tag-placeholder {
        display: none;
    }

    /* 破图占位同步隐藏，保持与无封面一致 */
    .news-thumbnail.cover-broken {
        display: none;
    }

    /* 搜索框独占一行（标题/热门行下面） */
    .news-search-box {
        flex: 1 1 100%;
        order: 1;
    }

    /* 骨架屏缩略图与真实缩略图（108x78）对齐 */
    .sk-thumb {
        width: 108px;
        height: 78px;
        margin-right: 0;
    }

    /* 文字区不再套第二层灰底卡片，整条资讯只保留一张卡 */
    .news-content {
        flex: 1;
        min-width: 0;
        background: transparent;
        padding: 0;
        margin-top: 0;
        border-radius: 0;
    }

    .news-title {
        font-size: 15px;
        line-height: 1.45;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .news-meta {
        gap: 10px;
        font-size: 12px;
        color: #8c8c8c;
        margin-bottom: 8px;
    }

    .news-tags .news-tag {
        font-size: 11px;
        padding: 2px 8px;
    }

    /* 末尾元素不再留多余下间距（标签行常为空） */
    .news-content > *:last-child {
        margin-bottom: 0;
    }
}

/* 超窄屏（iPhone SE 等 375/360 宽）再收紧一档，保证标题一行仍有 12+ 字 */
@media (max-width: 380px) {
    .news-item {
        padding: 10px;
        gap: 10px;
    }

    .news-thumbnail {
        width: 92px;
        height: 68px;
        flex: 0 0 92px;
    }

    .news-title {
        font-size: 14px;
    }
}

/* ============================================================
   手机端详情页「上一篇/下一篇」排版（同样刻意放文件末尾，覆盖 2760 行的 @media）
   问题：窄屏下被改成上下两行通栏灰卡，两块叠起来 172px 高，大量留白；
   相邻资讯缺失的一侧还会用一整张灰卡显示"下一篇 / 无"，纯粹占地方；
   标题两行截断又把卡片撑得更高。
   方案：改回左右两列紧凑卡片，标题单行省略；缺失的一侧退成一行灰色提示；
   两侧各加 ← / → 方向箭头，前后关系一眼可见。
   ============================================================ */
@media (max-width: 768px) {
    .news-navigation {
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        padding: 12px 0 0;
        margin-top: 12px;
    }

    /* 两列等宽，min-width:0 是标题单行省略能生效的前提 */
    .news-nav-item {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        padding: 9px 10px;
        background: #f7f8fa;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
    }

    .news-nav-link,
    .news-nav-title {
        min-width: 0;
        max-width: 100%;
    }

    .news-nav-link:active {
        opacity: 0.65;
    }

    .news-nav-label {
        font-size: 11px;
        margin-bottom: 3px;
        color: #8c8c8c;
    }

    /* 标题由两行截断收成单行，卡片高度随之减半 */
    .news-nav-title {
        font-size: 13px;
        line-height: 1.35;
        -webkit-line-clamp: 1;
    }

    /* 方向箭头：上一篇指向左、下一篇指向右 */
    .news-nav-item.prev-news .news-nav-label::before {
        content: "← ";
    }

    .news-nav-item.next-news .news-nav-label::after {
        content: " →";
    }

    /* 没有相邻资讯的一侧：去掉卡片底纹，退成一行灰色提示（配色见文件前部的 is-empty 规则） */
    .news-nav-item.is-empty {
        background: transparent;
        border-color: transparent;
    }
}

/* 超窄屏再收一档，保证两侧标题都还有可读宽度 */
@media (max-width: 380px) {
    .news-nav-item {
        padding: 8px 9px;
    }

    .news-nav-title {
        font-size: 12px;
    }
}

/* ============ 评论区样式 ============ */

/* 评论区整体容器：与正文/相关推荐同宽的白卡片 */
.comments-section {
    margin-top: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    padding: 24px;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.comments-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 11px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 13px;
    font-weight: 500;
}

/* ---- 发表区 ---- */
.comment-composer {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}

.comment-composer-avatar,
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f5f5f5;
}

.comment-composer-main {
    flex: 1;
    min-width: 0;
}

.comment-input {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
    resize: vertical;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.comment-input:focus {
    outline: none;
    border-color: #1976d2;
    background: #fff;
}

.comment-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.comment-char-count {
    font-size: 12px;
    color: #999;
}

.comment-submit-btn {
    padding: 8px 24px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.comment-submit-btn:hover {
    background: #1565c0;
}

.comment-submit-btn:disabled {
    background: #90caf9;
    cursor: not-allowed;
}

/* 未登录引导 */
.comment-login-tip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.comment-login-link {
    color: #1976d2;
    font-weight: 500;
    text-decoration: none;
}

.comment-login-link:hover {
    text-decoration: underline;
}

/* ---- 评论列表 ---- */
.comment-list {
    display: flex;
    flex-direction: column;
}

.comment-loading,
.comment-empty {
    padding: 40px 0;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}

.comment-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 2px 0;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.comment-action-btn:hover {
    color: #1976d2;
}

.comment-action-btn.liked {
    color: #ff4d4f;
}

/* 楼中楼 */
.comment-children {
    margin-top: 12px;
    padding-left: 12px;
    border-left: 2px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-children .comment-item {
    padding: 10px 0;
}

.comment-children .comment-avatar {
    width: 28px;
    height: 28px;
}

/* 回复框 */
.comment-reply-box {
    margin-top: 10px;
}

.comment-reply-input {
    min-height: 60px;
}

.comment-reply-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.comment-reply-cancel {
    padding: 6px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: border-color 0.2s;
}

.comment-reply-cancel:hover {
    border-color: #999;
}

.comment-reply-submit {
    padding: 6px 20px;
}

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

.comment-page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.comment-page-btn:hover:not(:disabled):not(.active) {
    border-color: #1976d2;
    color: #1976d2;
}

.comment-page-btn.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
    cursor: default;
}

.comment-page-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ============================================
   首页（index.html）样式 + 通用页脚
   ============================================ */
.site-footer {
    text-align: center;
    padding: 24px 0;
    color: #bbb;
    font-size: 12px;
}

.home-main {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 16px 80px;
    min-height: calc(100vh - 56px);
}

.home-hero {
    background: #fff;
    border-radius: 12px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.home-hero h2 {
    font-size: 26px;
    color: #1e3c72;
    margin-bottom: 10px;
}

.home-sub {
    font-size: 15px;
    color: #888;
    margin-bottom: 32px;
}

.home-entries {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.home-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 160px;
    padding: 20px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(30, 60, 114, 0.25);
}

.home-entry-title {
    font-size: 18px;
    font-weight: 700;
}

.home-entry-desc {
    font-size: 12px;
    opacity: 0.85;
}

/* 移动端：header 转 fixed（56px），给首页主体让位 */
@media (max-width: 768px) {
    .home-main {
        padding-top: 80px;
    }
}
