/*
 * Bootstrap 5 兼容性样式文件
 * 为mblog-master项目提供Bootstrap 3.x到5.x的平滑过渡
 * 作者: Qoder AI Assistant
 * 版本: 1.0.0
 * 日期: 2025-09-18
 */

/* ==================================================
   响应式显示隐藏类 (Bootstrap 3.x -> 5.x 兼容)
   ================================================== */

/* Bootstrap 3.x hidden-* 类的Bootstrap 5.x等价映射 */
.hidden-xs {
    display: none !important;
}

@media (min-width: 576px) {
    .hidden-xs {
        display: block !important;
    }
}

.hidden-sm {
    display: block !important;
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .hidden-sm {
        display: none !important;
    }
}

.hidden-md {
    display: block !important;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-md {
        display: none !important;
    }
}

.hidden-lg {
    display: block !important;
}

@media (min-width: 992px) {
    .hidden-lg {
        display: none !important;
    }
}

/* 移动端搜索框显示修复 */
@media (max-width: 767px) {
    .hidden-md.hidden-lg {
        display: block !important;
    }
}

/* 轮播图互斥显示规则 */
@media (max-width: 767.98px) {
    /* 移动端：显示移动版轮播图，隐藏桌面版 */
    .banner.d-none.d-md-flex {
        display: none !important;
    }
    
    .banner.bg-animation.d-md-none {
        display: block !important;
    }
}

@media (min-width: 768px) {
    /* 桌面端：显示桌面版轮播图，隐藏移动版 */
    .banner.d-none.d-md-flex {
        display: flex !important;
    }
    
    .banner.bg-animation.d-md-none {
        display: none !important;
    }
}

/* 现代化响应式显示类 */
.d-xs-none { display: none !important; }
.d-sm-none { display: none !important; }
.d-md-none { display: none !important; }
.d-lg-none { display: none !important; }
.d-xl-none { display: none !important; }

@media (min-width: 576px) {
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-inline { display: inline !important; }
    .d-sm-inline-block { display: inline-block !important; }
}

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-inline { display: inline !important; }
    .d-md-inline-block { display: inline-block !important; }
}

@media (min-width: 992px) {
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-inline { display: inline !important; }
    .d-lg-inline-block { display: inline-block !important; }
}

/* ==================================================
   现代化卡片样式增强
   ================================================== */

/* ==================================================
   移动端图片加载优化（保持原样式）
   ================================================== */

/* 移动端图片显示优化 */
@media (max-width: 767px) {
    /* 强制显示所有图片 */
    img[data-src] {
        display: block !important;
        visibility: visible !important;
    }
}

/* ==================================================
   移动端导航功能修复（保持原样式）
   ================================================== */

/* 移动端导航修复 - 保持原有样式，只修复功能 */
@media (max-width: 767px) {
    /* 导航头部布局 */
    .navbar-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative;
    }
    
    /* 导航按钮样式 */
    .navbar-toggle {
        position: relative;
        padding: 6px 12px;
        margin: 0;
        background-color: #ffea77;
        border: 2px solid #ffd700;
        border-radius: 6px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        font-weight: bold;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        order: 3;
    }
    
    .navbar-toggle:focus,
    .navbar-toggle:hover {
        background-color: #ffd700;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    }
    
    .navbar-toggle span {
        font-size: 12px;
        color: #333 !important;
        font-weight: bold;
    }
    
    /* Logo样式 */
    .navbar-brand {
        order: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* 移动端搜索框容器 */
    .mobile-search-container {
        order: 2 !important;
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
        margin: 0 15px !important;
    }
    
    /* 折叠菜单状态控制 */
    .navbar-collapse {
        padding-right: 15px;
        padding-left: 15px;
        overflow-x: visible;
        border-top: 1px solid transparent;
        -webkit-overflow-scrolling: touch;
    }
    
    .navbar-collapse.collapse {
        display: none !important;
        max-height: none;
        padding-bottom: 0;
        overflow: visible;
    }
    
    .navbar-collapse.collapse.in {
        display: block !important;
        overflow-y: auto;
    }
    
    .navbar-collapse.in {
        overflow-y: auto;
    }
    
    /* 导航菜单项样式 */
    .navbar-nav {
        float: none !important;
        margin: 7.5px -15px;
    }
    
    .navbar-nav > li {
        float: none;
    }
    
    .navbar-nav > li > a {
        padding-top: 10px;
        padding-bottom: 10px;
        line-height: 20px;
    }
    
    .navbar-nav .open .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: transparent;
        border: 0;
        -webkit-box-shadow: none;
        box-shadow: none;
    }
}

/* ==================================================
   重新设计的响应式布局系统
   ================================================== */

.main-content-wrapper {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 20px 0;
}

/* 主内容区域 */
.main-content-area {
    padding: 0 15px;
}

.main-posts-widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 30px;
}

/* 桌面端侧边栏 */
.desktop-sidebar {
    padding: 0 15px;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 5px;
}

.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 移动端侧边栏优化 */
.mobile-sidebar {
    margin-bottom: 20px;
}

.compact-widget {
    margin-bottom: 15px;
}

.compact-widget .panel-heading {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.compact-widget .panel-title {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

.compact-widget .panel-body {
    padding: 15px;
}

.mobile-hot-posts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mobile-hot-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 8px 12px;
    flex: 1;
    min-width: 120px;
    transition: all 0.3s ease;
}

.mobile-hot-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hot-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.hot-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.hot-link:hover {
    color: #3498db;
    text-decoration: none;
}

/* 分页区域 */
.pagination-wrapper {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.posts.widget {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.posts.widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 文章列表优化 */
.posts-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.posts-list .content {
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.posts-list .content:last-child {
    border-bottom: none;
}

.posts-list .content:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(5px);
}

.content-box {
    padding: 20px;
}

.posts-item h2 {
    font-size: 1.4rem;
    line-height: 1.3;
    margin-bottom: 15px;
    font-weight: 600;
}

.posts-item h2 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.posts-item h2 a:hover {
    color: #3498db;
}

.posts-item .item-text {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.posts-item .item-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.posts-item .item-info li {
    color: #888;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.posts-item .item-info li i {
    color: #6366f1;
}

/* 标题区域优化 */
.panel-heading.d-md-none {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    margin: -1px -1px 0 -1px;
    border-radius: 12px 12px 0 0;
}

.panel-heading.d-md-none .panel-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
}

/* 轮播图现代化样式 */
.banner .banner-item {
    margin-bottom: 20px;
}

.index-banner-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    background-size: cover;
    background-position: center;
    height: 280px;
}

.index-banner-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
}

.index-banner-box .overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    transition: all 0.3s ease;
}

.index-banner-box:hover .overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
}

.index-banner-box .title h3 {
    color: #fff;
    font-weight: 600;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    font-size: 1.25rem;
    line-height: 1.4;
}

/* ==================================================
   移动端优化
   ================================================== */

@media (max-width: 767.98px) {
    .index-banner-box {
        height: 220px;
        margin-bottom: 15px;
    }
    
    .index-banner-box .title h3 {
        font-size: 1.1rem;
        padding: 0 15px;
    }
    
    .posts.widget {
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    /* 移动端侧边栏优化 */
    .panel-body .list li a {
        font-size: 1.2rem;
        line-height: 1.5;
        padding: 10px 0;
    }
    
    .item-link {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
    }
    
    .comment-link {
        font-size: 1.2rem !important;
        line-height: 1.5 !important;
    }
    
    .panel-title {
        font-size: 1.1rem;
    }
    
    /* 移动端轮播图显示修复 */
    .banner.bg-animation.d-md-none {
        display: block !important;
        margin-bottom: 1px;
    }
    
    /* 确保桌面端轮播图在移动端隐藏 */
    .banner.d-none.d-md-flex {
        display: none !important;
    }
    
    /* 移动端轮播图组件样式 */
    .swipers-slider {
        display: block !important;
        width: 100%;
        margin: 0 auto;
        position: relative;
    }
    
    .swiper-container {
        width: 100% !important;
        height: 220px !important;
        overflow: hidden;
    }
    
    .swiper-slide {
        width: 100% !important;
        height: 220px !important;
    }
    
    .swiper-wrapper {
        height: 220px !important;
    }
    
    .swiper-pagination {
        display: block !important;
        bottom: 15px !important;
        position: absolute;
        width: 100%;
        text-align: center;
    }
    
    /* 移动端文章列表互斥显示修复 */
    .desktop-post-item {
        display: none !important;
    }
    
    .mobile-post-item {
        display: block !important;
        margin-bottom: 15px;
    }
    
    .mobile-post-item .content-box {
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
        background: #fff;
        overflow: hidden;
        padding: 18px !important;
    }
    
    .mobile-post-item .posts-item h2 {
        font-size: 1.2rem;
        line-height: 1.3;
    }
    
    .mobile-post-item .posts-item .item-text {
        font-size: 1.05rem;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* 移动端桌面版文章列表优化 */
    .posts.widget {
        margin-bottom: 25px;
    }
    
    .posts-item h2 {
        font-size: 1.3rem !important;
        margin-bottom: 12px !important;
    }
    
    .posts-item .item-text {
        font-size: 1.05rem !important;
        color: #444 !important;
    }
    
    .posts-item .item-info li {
        font-size: 0.95rem !important;
    }
    
    .content-box {
        padding: 18px !important;
    }
}

/* ==================================================
   Swiper轮播图优化
   ================================================== */

.swipers-slider {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.swiper-container {
    border-radius: 12px;
    width: 100%;
    height: 280px;
}

@media (max-width: 767.98px) {
    .swiper-container {
        height: 220px;
    }
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
    width: 12px;
    height: 12px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #007bff;
}

/* ==================================================
   现代化侧边栏样式
   ================================================== */

.modern-sidebar-widget {
    margin-bottom: 24px;
}

.modern-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 热门文章样式 */
.popular-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding-left: 10px;
    border-radius: 8px;
}

.item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.item-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 500;
    transition: color 0.3s ease;
    flex: 1;
}

.item-link:hover {
    color: #3498db;
    text-decoration: none;
}

/* 精彩推荐样式 */
.featured-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.featured-item:last-child {
    border-bottom: none;
}

.featured-item:hover {
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 20%);
    padding-left: 10px;
    border-radius: 8px;
}

.featured-item .item-number {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
}

/* 评论区样式 */
.comment-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding-left: 10px;
    border-radius: 8px;
}

.comment-icon {
    color: #9c27b0;
    font-size: 0.7rem;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.comment-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.comment-link:hover {
    color: #9c27b0;
    text-decoration: none;
}

.panel.panel-default.widget {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel.panel-default.widget:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.panel-heading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    padding: 16px 20px;
}

.panel-title {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.panel-title i {
    margin-right: 8px;
    opacity: 0.9;
}

.panel-body {
    padding: 20px;
}

.panel-body .list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.panel-body .list li {
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
}

.panel-body .list li:last-child {
    border-bottom: none;
}

.panel-body .list li:hover {
    background: #f8f9fa;
    padding-left: 10px;
}

.panel-body .list li a {
    color: #495057;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.6;
    transition: color 0.2s ease;
    display: block;
    padding: 8px 0;
}

.panel-body .list li a:hover {
    color: #007bff;
}

/* ==================================================
   通用工具类
   ================================================== */

.card-modern {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.btn-modern {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 24px;
    transition: all 0.3s ease;
    border: none;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* ==================================================
   深色模式支持 (预留)
   ================================================== */

@media (prefers-color-scheme: dark) {
    .posts.widget,
    .panel.panel-default.widget {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .panel-body .list li a {
        color: #e2e8f0;
    }
    
    .panel-body .list li a:hover {
        color: #63b3ed;
    }
}

/* ==================================================
   桌面端与移动端互斥显示规则
   ================================================== */

@media (min-width: 768px) {
    /* 桌面端：显示桌面版文章，隐藏移动版 */
    .desktop-post-item {
        display: block !important;
    }
    
    .mobile-post-item {
        display: none !important;
    }
}

/* ==================================================
   新布局系统CSS
   ================================================== */

/* 主布局容器 */
.main-content-wrapper {
    padding: 10px 0; /* 从20px减少到10px */
    position: relative;
}

.main-layout-row {
    margin: 0 -15px;
    gap: 0;
}

/* 主内容列 - 占据全宽 */
.main-content-column {
    padding: 0 15px;
    width: 100%;
}

/* 侧边栏列 - 不再需要 */
.sidebar-column {
    display: none;
}

/* ==================================================
   文章列表区域
   ================================================== */

.posts-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    margin-bottom: 0;
    margin-top: 4px; /* 添加顶部间距 */
}

.posts-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px; /* 从20px 25px减少到12px 20px */
    margin: 0;
}

.posts-title {
    color: #fff;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.posts-title i {
    font-size: 1.2rem;
}

.posts-list-wrapper {
    padding: 15px; /* 从30px减少到15px */
}

/* ==================================================
   文章网格布局 - 紧凑型优化
   ================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 8px; /* 从15px减少到8px */
    align-items: start;
}

@media (max-width: 991.98px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 6px; /* 从12px减少到6px */
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 7px; /* 从14px减少到7px */
    }
}

@media (min-width: 1400px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px; /* 从18px减少到10px */
    }
}

.no-content-message {
    padding: 60px 20px;
    text-align: center;
}

.empty-state {
    color: #95a5a6;
}

.empty-state i {
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* ==================================================
   分页区域
   ================================================== */

.pagination-section {
    margin-top: 8px; /* 从20px减少到8px */
    padding: 12px; /* 从20px减少到12px */
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #e9ecef;
}

/* ==================================================
   响应式断点优化 - 紧凑化
   ================================================== */

@media (max-width: 991.98px) {
    .main-content-wrapper {
        padding: 8px 0; /* 从15px减少到8px */
    }
    
    .posts-container {
        border-radius: 12px;
    }
    
    .posts-list-wrapper {
        padding: 10px; /* 从15px减少到10px */
    }
    
    .pagination-section {
        border-radius: 12px;
        padding: 8px; /* 从12px减少到8px */
        margin-top: 6px; /* 从10px减少到6px */
    }
}

@media (max-width: 767.98px) {
    .main-content-wrapper {
        padding: 6px 0; /* 从10px减少到6px */
    }
    
    .posts-container {
        border-radius: 10px;
    }
    
    .posts-header {
        padding: 8px 12px; /* 从12px 16px减少到8px 12px */
    }
    
    .posts-title {
        font-size: 1.2rem;
    }
    
    .posts-list-wrapper {
        padding: 8px; /* 从12px减少到8px */
    }
    
    .pagination-section {
        border-radius: 10px;
        padding: 6px; /* 从10px减少到6px */
        margin-top: 4px; /* 从10px减少到4px */
    }
}

/* ==================================================
   文章卡片样式
   ================================================== */

.post-card {
    background: #fff;
    border-radius: 16px;
    margin-bottom: 8px; /* 从15px减少到8px */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

/* 带图片的文章卡片 */
.post-card-with-image {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .post-card-with-image {
        flex-direction: row;
        align-items: stretch;
    }
}

.post-image {
    position: relative;
    overflow: hidden;
    height: 240px; /* 从220px增加到240px */
    flex-shrink: 0;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .post-image {
        width: 360px; /* 从320px增加到360px */
        height: 240px; /* 从220px增加到240px */
        border-radius: 12px 0 0 12px;
    }
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-image:hover .image-overlay {
    opacity: 1;
}

/* 文章内容区域 - 紧凑优化 */
.post-content {
    padding: 12px; /* 从20px减少到12px */
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-header {
    margin-bottom: 8px; /* 从12px减少到8px */
}

.post-title {
    margin: 0;
    font-size: 1.5rem; /* 从1.4rem增加到1.5rem */
    font-weight: 700;
    line-height: 1.3; /* 从1.4减少到1.3 */
    color: #2c3e50;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #3498db;
    text-decoration: none;
}

.post-summary {
    color: #555;
    font-size: 1.1rem; /* 保持1.1rem */
    line-height: 1.6;
    margin-bottom: 8px; /* 从12px减少到8px */
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em; /* 保证最小高度 */
}

/* 当没有摘要时，显示占位文本 */
.post-summary:empty::before {
    content: "点击阅读全文...";
    color: #999;
    font-style: italic;
    opacity: 0.7;
}

/* 没有摘要的文章卡片特殊处理 - 紧凑优化 */
.post-card-no-summary .post-content {
    padding: 20px; /* 从25px减少到20px */
}

.post-card-no-summary .post-title {
    font-size: 1.7rem; /* 从1.6rem增加到1.7rem */
    margin-bottom: 8px; /* 从10px减少到8px */
}

.post-card-no-summary .post-meta {
    margin-top: 12px; /* 从15px减少到12px */
    padding-top: 10px; /* 从12px减少到10px */
}

/* 空摘要占位符 */
.post-summary-empty {
    min-height: auto !important;
    margin-bottom: 10px;
}

.summary-placeholder {
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
    opacity: 0.8;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* 从12px减少到8px */
    padding-top: 6px; /* 从8px减少到6px */
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #888;
    font-size: 0.9rem; /* 从0.85rem增加到0.9rem */
    font-weight: 500;
}

.meta-item i {
    color: #6366f1;
    font-size: 0.85rem; /* 从0.8rem增加到0.85rem */
}

/* 仅文字的文章卡片 - 紧凑优化 */
.post-card-text-only .post-content {
    padding: 24px; /* 从30px减少到24px */
}

.post-card-text-only .post-title {
    font-size: 1.6rem; /* 从1.5rem增加到1.6rem */
    margin-bottom: 12px; /* 从15px减少到12px */
}

.post-card-text-only .post-summary {
    font-size: 1.15rem; /* 从1.1rem增加到1.15rem */
    -webkit-line-clamp: 4;
}

/* ==================================================
   移动端文章卡片优化 - 紧凑化
   ================================================== */

@media (max-width: 767.98px) {
    .post-card {
        border-radius: 12px;
        margin-bottom: 6px; /* 从12px减少到6px */
    }
    
    .post-content {
        padding: 10px; /* 从16px减少到10px */
    }
    
    .post-card-text-only .post-content {
        padding: 12px; /* 从20px减少到12px */
    }
    
    .post-title {
        font-size: 1.3rem; /* 从1.25rem增加到1.3rem */
    }
    
    .post-card-text-only .post-title {
        font-size: 1.4rem; /* 从1.35rem增加到1.4rem */
    }
    
    .post-summary {
        font-size: 1.05rem; /* 从1rem增加到1.05rem */
        -webkit-line-clamp: 2;
    }
    
    .post-card-text-only .post-summary {
        font-size: 1.1rem; /* 从1.05rem增加到1.1rem */
        -webkit-line-clamp: 3;
    }
    
    .post-meta {
        gap: 6px; /* 从10px减少到6px */
    }
    
    .meta-item {
        font-size: 0.9rem;
    }
    
    .post-image {
        height: 200px; /* 从180px增加到200px */
    }
}

/* ==================================================
   公告栏样式 - 紧凑型优化
   ================================================== */

.announcement-section {
    padding: 4px 0; /* 从8px减少到4px */
    margin-bottom: 4px; /* 从8px减少到4px */
    position: relative;
}

.announcement-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px; /* 从16px减少到12px */
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06), /* 减少阴影强度 */
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    overflow: hidden;
}

.announcement-card.compact {
    border-radius: 10px; /* 从12px减少到10px */
}

.announcement-header {
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.9) 0%, 
        rgba(139, 69, 19, 0.85) 50%, 
        rgba(16, 185, 129, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 6px 12px; /* 从8px 16px减少到6px 12px */
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.announcement-title {
    color: #fff;
    margin: 0;
    font-size: 1rem; /* 从1.1rem减少到1rem */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* 从8px减少到6px */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.announcement-title i {
    font-size: 0.9rem; /* 从1rem减少到0.9rem */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.announcement-content {
    padding: 8px 12px; /* 从10px 16px减少到8px 12px */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
}

.announcement-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px; /* 从6px减少到4px */
}

.announcement-list.compact {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px; /* 从10px减少到8px */
}

.announcement-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px; /* 从6px 10px减少到4px 8px */
    border-radius: 4px; /* 从6px减少到4px */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-size: 1rem; /* 保持1rem */
    line-height: 1.2; /* 从1.3减少到1.2 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); /* 进一步减少阴影 */
}

.announcement-item:hover {
    transform: translateY(-1px); /* 从-2px减少到-1px */
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* 减少阴影强度 */
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.announcement-item.important {
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.2) 0%, 
        rgba(255, 223, 0, 0.15) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.announcement-item.important i {
    color: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.3));
}

.announcement-item.warning {
    background: linear-gradient(135deg, 
        rgba(239, 68, 68, 0.15) 0%, 
        rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.announcement-item.warning i {
    color: #dc2626;
    filter: drop-shadow(0 1px 2px rgba(220, 38, 38, 0.3));
}

.announcement-item.info {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.15) 0%, 
        rgba(37, 99, 235, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.announcement-item.info i {
    color: #2563eb;
    filter: drop-shadow(0 1px 2px rgba(37, 99, 235, 0.3));
}

.announcement-item.contact {
    background: linear-gradient(135deg, 
        rgba(16, 185, 129, 0.15) 0%, 
        rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.announcement-item.contact i {
    color: #059669;
    filter: drop-shadow(0 1px 2px rgba(5, 150, 105, 0.3));
}

.announcement-item i {
    font-size: 1rem; /* 从1.1rem减少到1rem */
    flex-shrink: 0;
}

.announcement-item span {
    flex: 1;
    color: #2c3e50;
    font-weight: 500; /* 增加字体重量 */
}

.announcement-item a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.announcement-item a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.announcement-item strong {
    color: #e74c3c;
    font-weight: 700;
}

/* 公告栏移动端优化 */
@media (max-width: 767.98px) {
    .announcement-section {
        padding: 3px 0; /* 从6px减少到3px */
        margin-bottom: 3px; /* 从6px减少到3px */
    }
    
    .announcement-header {
        padding: 4px 8px; /* 从6px 12px减少到4px 8px */
    }
    
    .announcement-title {
        font-size: 0.9rem; /* 从1rem减少到0.9rem */
        gap: 3px; /* 从4px减少到3px */
    }
    
    .announcement-content {
        padding: 6px 8px; /* 从8px 12px减少到6px 8px */
    }
    
    .announcement-list {
        gap: 3px; /* 从4px减少到3px */
    }
    
    .announcement-list.compact {
        grid-template-columns: 1fr; /* 移动端改为单列 */
        gap: 3px;
    }
    
    .announcement-item {
        padding: 3px 6px; /* 从5px 8px减少到3px 6px */
        font-size: 0.95rem; /* 保持0.95rem */
        border-radius: 3px; /* 从5px减少到3px */
    }
    
    .announcement-item i {
        font-size: 0.85rem; /* 从0.9rem减少到0.85rem */
    }
}

/* ==================================================
   侧边栏信息区域
   ================================================== */

.sidebar-info-section {
    padding: 8px 0; /* 从25px大幅减少到8px */
    margin-top: 4px; /* 从15px减少到4px */
}

.sidebar-grid {
    gap: 8px; /* 从20px减少到8px */
    align-items: stretch;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}

.sidebar-widget:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.widget-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 18px 20px;
    text-align: center;
}

.widget-title {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.widget-title i {
    font-size: 1rem;
}

.widget-content {
    padding: 20px;
}

/* 最受欢迎列表 */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #fff3e0 0%, #ffebee 100%);
    padding-left: 8px;
    border-radius: 8px;
}

.popular-item .item-number {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.popular-item .item-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.6;
    flex: 1;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-item .item-link:hover {
    color: #ff6b6b;
    text-decoration: none;
}

/* 精彩推荐列表 */
.featured-posts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.featured-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.featured-item:last-child {
    border-bottom: none;
}

.featured-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #fff3e0 0%, #ffcc02 20%);
    padding-left: 8px;
    border-radius: 8px;
}

.featured-item .item-number {
    background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.featured-item .item-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.15rem;
    line-height: 1.6;
    flex: 1;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-item .item-link:hover {
    color: #ff8c00;
    text-decoration: none;
}

/* 最新评论列表 */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding-left: 8px;
    border-radius: 8px;
}

.comment-icon {
    color: #9c27b0;
    font-size: 0.8rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.comment-link {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.15rem;
    line-height: 1.6;
    flex: 1;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.comment-link:hover {
    color: #9c27b0;
    text-decoration: none;
}

/* ==================================================
   移动端优化
   ================================================== */

@media (max-width: 767.98px) {
    .announcement-section {
        padding: 12px 0;
        margin-bottom: 1px;
    }
    
    .announcement-card {
        border-radius: 10px;
        margin: 0 10px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
    }
    
    .announcement-header {
        padding: 10px 15px;
    }
    
    .announcement-title {
        font-size: 1rem;
    }
    
    .announcement-content {
        padding: 12px 15px;
        background: rgba(255, 255, 255, 0.8);
    }
    
    .announcement-list.compact {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .announcement-item {
        padding: 6px 10px;
        font-size: 0.85rem;
        gap: 6px;
        border-radius: 6px;
    }
    
    .sidebar-info-section {
        padding: 6px 0; /* 从20px大幅减少到6px */
        margin-top: 4px; /* 从15px减少到4px */
    }
    
    .sidebar-grid {
        gap: 6px; /* 从15px减少到6px */
    }
    
    .sidebar-widget {
        border-radius: 12px;
    }
    
    .widget-header {
        padding: 10px; /* 从15px减少到10px */
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    .widget-content {
        padding: 10px; /* 从15px减少到10px */
    }
    
    .popular-item,
    .featured-item,
    .comment-item {
        padding: 8px 0; /* 从10px减少到8px */
    }
    
    .popular-item .item-number,
    .featured-item .item-number {
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
    }
    
    .popular-item .item-link,
    .featured-item .item-link,
    .comment-link {
        font-size: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .announcement-list {
        gap: 10px;
    }
    
    .announcement-item {
        padding: 10px;
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .announcement-item i {
        font-size: 1rem;
    }
}

/* ===== AJAX 分页样式 ===== */
.pagination-section {
    margin-top: 15px; /* 从25px减少到15px */
    margin-bottom: 15px; /* 从30px减少到15px */
}

.pagination .page-link {
    color: #6c757d;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 2px;
    padding: 8px 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.2);
}

.pagination .page-item.active .page-link {
    color: white;
    background-color: #007bff;
    border-color: #007bff;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: rgba(248, 249, 250, 0.7);
    border-color: #dee2e6;
    cursor: not-allowed;
}

.loading-indicator {
    text-align: center;
    padding: 30px 20px;
    margin: 20px 0;
}

.loading-spinner {
    display: inline-block;
}

.loading-spinner i {
    color: #007bff;
    margin-bottom: 10px;
}

.loading-spinner p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.pagination-info {
    margin-top: 15px;
}

/* 紧凑型页面跳转样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-jump {
    display: flex;
    align-items: center;
    margin-left: 12px;
    gap: 4px;
}

.pagination-jump .jump-input {
    width: 45px;
    height: 28px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-align: center;
    font-size: 0.8rem;
    padding: 0;
    transition: all 0.2s ease;
    background: white;
    outline: none;
}

.pagination-jump .jump-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
}

.pagination-jump .jump-input:hover {
    border-color: #007bff;
}

.pagination-jump .jump-input::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.pagination-jump .jump-btn {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pagination-jump .jump-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}

.pagination-jump .jump-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 123, 255, 0.3);
}

.pagination-jump .jump-btn i {
    font-size: 0.7rem;
}

/* 错误提示优化 */
.jump-error-message {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.jump-error-message::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #dc3545;
}

/* 移动端优化 */
@media (max-width: 575.98px) {
    .pagination {
        gap: 4px;
    }
    
    .pagination-jump {
        margin-left: 8px;
        gap: 3px;
    }
    
    .pagination-jump .jump-input {
        width: 40px;
        height: 24px;
        font-size: 0.75rem;
    }
    
    .pagination-jump .jump-btn {
        width: 24px;
        height: 24px;
    }
    
    .pagination-jump .jump-btn i {
        font-size: 0.6rem;
    }
}

/* 分页响应式优化 */
@media (max-width: 575.98px) {
    .pagination .page-link {
        padding: 6px 8px;
        font-size: 0.8rem;
        margin: 0 1px;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
    
    .loading-indicator {
        padding: 20px 15px;
    }
    
    /* 页面跳转移动端优化 */
    .page-jump-wrapper {
        padding: 8px 12px;
        gap: 6px;
        border-radius: 20px;
    }
    
    .jump-label {
        font-size: 0.8rem;
    }
    
    .jump-input {
        width: 60px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .jump-btn {
        height: 28px;
        padding: 0 10px;
        font-size: 0.8rem;
    }
}

/* ==================================================
   详情页面样式优化
   ================================================== */

/* 详情页标题样式修复 */
.topic-title {
    background: #fff !important;
    color: #2c3e50 !important;
    padding: 20px 25px;
    margin: 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
}

/* 详情页面板标题区域 */
.topic .panel-heading {
    background: #fff !important;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

/* 详情页元信息样式 */
.topic .meta {
    padding: 15px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
}

/* 作者信息卡片样式 */
.author-info-card {
    background: #fff;
    border-radius: 8px; /* 从12px减少到8px */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); /* 减少阴影 */
    border: 1px solid #e9ecef;
    margin-top: 15px; /* 从20px减少到15px */
    margin-bottom: 15px; /* 从20px减少到15px */
    overflow: hidden;
}

.author-info-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 15px; /* 从15px 20px减少到8px 15px */
    text-align: center;
}

.author-info-title {
    color: #fff;
    margin: 0;
    font-size: 0.9rem; /* 从1.1rem减少到0.9rem */
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* 从8px减少到6px */
}

.author-info-content {
    padding: 12px; /* 从20px减少到12px */
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar-large {
    width: 50px; /* 从80px减少到50px */
    height: 50px; /* 从80px减少到50px */
    border-radius: 50%;
    border: 3px solid #fff; /* 从4px减少到3px */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 减少阴影 */
    flex-shrink: 0;
}

.author-name-large {
    flex: 1;
    font-size: 1.1rem; /* 从1.3rem减少到1.1rem */
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.author-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.author-actions .btn {
    font-size: 0.8rem; /* 减小按钮字体 */
    padding: 4px 8px; /* 减小按钮内边距 */
}

/* 推荐视频区域样式 */
.recommendations-section {
    margin-top: 30px;
}

.recommendations-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    text-align: center;
    border-radius: 12px 12px 0 0;
}

.recommendations-title {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.recommendations-content {
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    border-top: none;
    padding: 20px;
}

/* 推荐视频网格布局 */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.recommendation-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.recommendation-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.recommendation-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.recommendation-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendation-item:hover .recommendation-thumbnail img {
    transform: scale(1.05);
}

.recommendation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recommendation-item:hover .recommendation-overlay {
    opacity: 1;
}

.recommendation-info {
    padding: 15px;
}

.recommendation-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommendation-meta {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==================================================
   YouTube风格侧边栏推荐列表
   ================================================== */

/* 右侧推荐侧边栏 */
.recommendations-sidebar {
    padding-left: 20px;
}

.recommendations-sidebar .recommendations-section {
    margin-top: 0; /* 与左侧内容顶部对齊 */
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow: hidden; /* 防止整体容器溢出 */
}

.recommendations-sidebar .recommendations-content {
    padding: 10px; /* 从15px减少到10px */
    max-height: calc(100vh - 140px); /* 调整最大高度 */
    overflow-y: auto;
}

.recommendations-sidebar .recommendations-content::-webkit-scrollbar {
    width: 4px; /* 从6px减少到4px */
}

.recommendations-sidebar .recommendations-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.recommendations-sidebar .recommendations-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.recommendations-sidebar .recommendations-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* YouTube风格侧边栏推荐列表 */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 从12px减少到8px */
}

.recommendation-item-sidebar {
    display: flex;
    gap: 8px; /* 从12px减少到8px */
    padding: 6px; /* 从8px减少到6px */
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recommendation-item-sidebar:hover {
    background: #f8f9fa;
    transform: translateX(2px); /* 从4px减少到2px */
}

.recommendation-item-sidebar a {
    display: flex;
    gap: 8px; /* 从12px减少到8px */
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.recommendation-thumbnail-sidebar {
    width: 100px; /* 从120px减少到100px */
    height: 75px; /* 从90px减少到75px */
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.recommendation-thumbnail-sidebar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommendation-item-sidebar:hover .recommendation-thumbnail-sidebar img {
    transform: scale(1.03); /* 从1.05减少到1.03 */
}

.recommendation-info-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
    padding: 2px 0; /* 添加轻微内边距 */
}

.recommendation-title-sidebar {
    font-size: 0.85rem; /* 从0.95rem减少到0.85rem */
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.2; /* 从1.3减少到1.2 */
    margin: 0 0 6px 0; /* 从8px减少到6px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.recommendation-item-sidebar:hover .recommendation-title-sidebar {
    color: #3498db;
}

.recommendation-meta-sidebar {
    color: #6c757d;
    font-size: 0.75rem; /* 从0.8rem减少到0.75rem */
    display: flex;
    flex-direction: column;
    gap: 2px; /* 从4px减少到2px */
}

.recommendation-meta-sidebar span {
    display: flex;
    align-items: center;
    gap: 3px; /* 从4px减少到3px */
}

.recommendation-meta-sidebar i {
    font-size: 0.7rem; /* 从0.75rem减少到0.7rem */
    opacity: 0.8;
}

/* 移动端优化 */
@media (max-width: 767.98px) {
    .topic-title {
        font-size: 1.5rem;
        padding: 15px 20px;
    }
    
    .topic .meta {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .author-info-content {
        padding: 15px;
    }
    
    .author-avatar-large {
        width: 60px;
        height: 60px;
    }
    
    .author-name-large {
        font-size: 1.1rem;
    }
    
    .recommendations-content {
        padding: 15px;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recommendation-thumbnail {
        height: 160px;
    }
    
    .recommendation-info {
        padding: 12px;
    }
    
    .recommendation-title {
        font-size: 1rem;
    }
    
    /* YouTube风格侧边栏在移动端的优化 */
    .recommendations-sidebar {
        padding-left: 15px;
        margin-top: 15px; /* 从20px减少到15px */
    }
    
    .recommendations-sidebar .recommendations-section {
        position: static;
        max-height: none;
    }
    
    .recommendations-sidebar .recommendations-content {
        max-height: none;
        overflow-y: visible;
        padding: 8px; /* 从15px减少到8px */
    }
    
    .recommendation-thumbnail-sidebar {
        width: 90px; /* 从100px减少到90px */
        height: 68px; /* 从75px减少到68px */
    }
    
    .recommendation-title-sidebar {
        font-size: 0.8rem; /* 从0.9rem减少到0.8rem */
    }
    
    .recommendation-meta-sidebar {
        font-size: 0.7rem; /* 从0.75rem减少到0.7rem */
    }
    
    /* 作者信息在移动端的优化 */
    .author-info-content {
        padding: 10px; /* 从15px减少到10px */
        gap: 10px;
    }
    
    .author-avatar-large {
        width: 40px; /* 从60px减少到40px */
        height: 40px; /* 从60px减少到40px */
    }
    
    .author-name-large {
        font-size: 1rem; /* 从1.1rem减少到1rem */
    }
}

/* 懒加载图片基本样式 */
img.lazy {
    transition: opacity 0.3s ease-in-out, filter 0.3s ease-in-out;
    opacity: 1;
}

/* 加载中状态 */
img.lazy.loading {
    opacity: 0.7;
    filter: blur(2px);
}

/* 加载完成状态 */
img.lazy.loaded {
    opacity: 1;
    filter: none;
}

/* 渐显动画 */
img.lazy.fade-in {
    opacity: 1;
    filter: none;
}

/* 加载错误状态 */
img.lazy.error {
    opacity: 0.5;
    filter: grayscale(100%);
    background: #f5f5f5;
    position: relative;
}

img.lazy.error::after {
    content: '图片加载失败';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #999;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* 缩略图特殊样式 - 增强显示 */
.thumbnail.lazy {
    background: #f8f9fa;
    border-radius: 8px;
    display: block;
    width: 100%;
    height: 240px; /* 从200px增加到240px */
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .thumbnail.lazy {
        height: 200px; /* 从160px增加到200px */
    }
}

/* 加载动画优化 */
.post-image {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.post-image .lazy {
    transform-origin: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.post-image:hover .lazy.loaded {
    transform: scale(1.05);
}

/* 低网速优化 */
@media (prefers-reduced-motion: reduce) {
    img.lazy {
        transition: none;
    }
    
    .post-image .lazy {
        transition: none;
    }
    
    .post-image:hover .lazy.loaded {
        transform: none;
    }
}

/* ==================================================
   内联页面跳转功能样式
   ================================================== */

/* 跳转功能容器 */
.page-jump-item {
    margin-left: 8px;
}

/* 跳转组件包装器 */
.page-jump-wrapper {
    display: flex !important;
    align-items: center;
    padding: 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    min-width: 80px;
    height: 38px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-jump-wrapper:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.2);
    transform: translateY(-1px);
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

/* 输入框样式 */
.page-jump-input {
    width: 45px;
    height: 36px;
    border: none;
    outline: none;
    text-align: center;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    padding: 0;
    margin: 0;
    transition: all 0.2s ease;
}

.page-jump-input::-webkit-outer-spin-button,
.page-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.page-jump-input[type=number] {
    -moz-appearance: textfield;
}

.page-jump-input:focus {
    background: rgba(0,123,255,0.08);
    color: #007bff;
}

/* 跳转按钮样式 */
.page-jump-btn {
    width: 32px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.page-jump-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: scale(1.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.page-jump-btn:active {
    transform: scale(0.95);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

/* 响应式优化 */
@media (max-width: 576px) {
    .page-jump-item {
        margin-left: 4px;
    }
    
    .page-jump-wrapper {
        min-width: 70px;
        height: 36px;
    }
    
    .page-jump-input {
        width: 38px;
        height: 34px;
        font-size: 12px;
    }
    
    .page-jump-btn {
        width: 28px;
        height: 34px;
        font-size: 10px;
    }
}

/* 分页导航整体优化 */
.pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    font-weight: 500;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.pagination .page-item:not(.page-jump-item) .page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* 跳转功能动画效果 */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.page-jump-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.page-jump-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.page-jump-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    color: #6c757d;
}

/* ==================================================
   详情页全局布局优化
   ================================================== */
   
/* 详情页全局布局优化 */
.topics-show {
    padding: 0 15px;
}

/* YouTube风格布局优化 */
@media (min-width: 992px) {
    .topics-show {
        padding-right: 0;
    }
    
    .recommendations-sidebar {
        padding-left: 0;
        margin-left: 20px;
    }
}

/* 详情页主内容区域 */
.topic.panel.panel-default.fulltext {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
    overflow: hidden;
}

/* 评论区域样式 */
.chats.shadow-box {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-top: 25px;
    overflow: hidden;
}

.chat_header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 15px 20px;
    border-bottom: none;
}

.chat_header h4 {
    color: #fff;
    margin: 0;
    font-weight: 600;
}

/* 详情页文字内容优化 */
.content-body.entry-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #2c3e50;
}

.content-body.entry-content h1,
.content-body.entry-content h2,
.content-body.entry-content h3,
.content-body.entry-content h4,
.content-body.entry-content h5,
.content-body.entry-content h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.8em;
}