/* 全局样式 */
body {
    background-color: #f8f9fa;
    padding-top: 56px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: all 0.3s ease;
}

.navbar.fixed-top {
    background-color: rgba(33, 37, 41, 0.98) !important;
    backdrop-filter: blur(10px);
}

/* 文章卡片样式 */
.article-card {
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
}

.article-card .card {
    border: none;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.article-card .card-body {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
}

.article-card .card-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .text-muted {
    font-size: 0.85rem;
}

.article-card .card-img {
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.article-card .card-img-wrapper {
    height: 100%;
    padding: 0.5rem;
}

.article-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-card .card-text {
    font-size: 0.875rem;
    color: #6c757d;
}

/* 头条文章样式 */
.featured-article .card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
}

.featured-article img {
    height: 300px;
    object-fit: cover;
}

/* 右侧推荐区样式 */
.sidebar {
   /* background-color: #fff;
     padding: 20px; */
    padding: 0;
    border-radius: 4px;
    /*box-shadow: 0 2px 4px rgba(0,0,0,.05);
    position: sticky;
    top: 20px;*/
}

.recommended-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

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

.recommended-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    
}

.recommended-card {
    transition: transform 0.2s ease;
}

.recommended-card:hover {
    transform: translateY(-3px);
}

.recommended-card img {
    aspect-ratio: 16/9;
    object-fit: cover;
    width: 100%;
    min-height: 120px
}

.recommended-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .featured-article img {
        height: 200px;
    }
    
    .article-card .card-img-wrapper {
        height: 80px;
        padding: 0.25rem;
    }
    
    .article-card .card-body {
        padding: 0.25rem 0.5rem;
    }
    
    .recommended-item img {
        height: 120px;
    }
}

/* 排行榜样式 */
.ranking-item {
    transition: all 0.2s ease;
}

.ranking-item:hover {
    background-color: #f8f9fa;
}

.ranking-item a {
    color: #333;
}

.rank-number {
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rank-1 {
    background-color: #ff4d4f;
    color: white;
}

.rank-2 {
    background-color: #ff7a45;
    color: white;
}

.rank-3 {
    background-color: #ffa940;
    color: white;
}

.rank-other {
    background-color: #f0f0f0;
    color: #999;
}

.rank-title {
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: normal;
    font-weight: 500;
}

.ranking-item:hover .rank-title {
    color: #1a73e8 !important;
}

#loadMoreBtn {
    min-width: 120px;
    transition: all 0.3s ease;
}

#loadMoreBtn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#loadMoreBtn .spinner-border {
    margin-left: 8px;
    vertical-align: middle;
}

.sidebar-container1 {
    position: sticky;
    top: 76px; /* 导航栏高度 + 一些间距 */
    max-height: calc(100vh - 86px); /* 减少一点高度，防止出现滚动条 */
    overflow: hidden; /* 改为hidden，防止出现滚动条 */
    padding-right: 10px; /* 添加右侧内边距 */
}

/* 自定义滚动条样式 */
.sidebar-container::-webkit-scrollbar {
    width: 4px;
}

.sidebar-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.sidebar-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.recommended-list .row {
    margin-right: -10px; /* 修正row的右边距 */
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .sidebar-container {
        position: static;
        max-height: none;
        padding-right: 20px;
        padding-left: 10px;
    }
} 
.text-center{
    display: none;
}
img[src=""] {
    display: none;
}