/* DShare 自定义样式 */

/* 基础样式 */
body {
    padding-top: 76px; /* 为固定导航栏留空间 */
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* Loading 动画 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Toast 通知样式 */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 导航栏样式 - 纯黑底白字 */
.navbar {
    background: #000000 !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-brand {
    color: white !important;
    font-weight: 700;
    text-shadow: none;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    padding: 0.5rem 0.3rem !important;
    font-size: 0.95rem;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

.navbar-nav .nav-link.active {
    color: white !important;
}

/* 导航栏搜索框样式 */
.navbar .form-control {
    width: 160px; /* 减小搜索框宽度，避免在某些屏幕上溢出 */
    font-size: 0.9rem;
}

.navbar .btn {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
}

/* 导航栏在小屏幕上的优化 */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        margin-top: 0.5rem;
        padding: 1rem;
        border-radius: 0.375rem;
    }
    
    .navbar-nav .dropdown-menu {
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.5rem 1rem;
    }
    
    .navbar-nav .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.1);
        color: white;
    }
    
    .navbar .form-control {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* 中等屏幕优化 */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.3rem !important;
        font-size: 0.9rem;
    }
    
    .navbar .form-control {
        width: 130px; /* 在中等屏幕上进一步减小宽度 */
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 0.5rem !important; /* 减少菜单项之间的间距 */
    }
    
    .navbar .form-control {
        width: 180px; /* 即使在大屏幕上也不要太宽 */
    }
}

/* 导航栏额外优化 */
.navbar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    flex-shrink: 0;
}

/* 确保搜索框不会被挤压 */
.navbar .d-flex {
    flex-shrink: 0;
    min-width: fit-content;
}

/* 防止导航栏内容溢出 */
.navbar-collapse {
    flex-grow: 1;
    align-items: center;
}

/* 超小屏幕的导航栏优化 */
@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-brand .me-2 {
        display: none;
    }
}

/* 针对特定断点的菜单优化 */
@media (min-width: 992px) and (max-width: 1140px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.5rem 0.5rem !important;
    }
}

/* 导航栏搜索表单优化 */
.navbar-search-form {
    max-width: 220px;
}

.navbar-search-form .form-control {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
}

.navbar-search-form .btn-sm {
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 确保导航栏中的布局更加紧凑 */
.navbar .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
}

/* 英雄区域 - 全屏背景图样式 */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    margin-top: 0; /* 恢复正常的顶部间距，不再使用负边距 */
    padding-top: 70px;
    min-height: 80vh; /* 减小高度，确保在大多数屏幕上有更好的体验 */
    position: relative;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 英雄区域内容样式优化 */
.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.hero-section p.lead {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
    font-size: 1.4rem;
    opacity: 0.95;
    color: #ffffff;
}

/* 英雄区域搜索框样式 */
.search-box-large {
    margin: 2rem 0;
}

.search-box-large .input-group {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    overflow: hidden;
}

.search-box-large .form-control {
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.search-box-large .form-control:focus {
    box-shadow: none;
    background: rgba(255, 255, 255, 1);
}

.search-box-large .btn {
    padding: 1.2rem 2.5rem;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    transition: all 0.3s ease;
}

.search-box-large .btn:hover {
    background: linear-gradient(45deg, #f7931e, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
        padding-top: 100px;
        min-height: 80vh;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p.lead {
        font-size: 1.2rem;
    }
    
    .search-box-large .input-group {
        max-width: 90%;
    }
}

/* 搜索结果页面背景 */
.search-results-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/><circle cx="900" cy="800" r="80" fill="url(%23a)"/></svg>');
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
}

.search-results-page .container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 分类卡片 */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-icon {
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* 资源卡片样式 */
.resource-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.resource-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-card:hover .card-img-top {
    transform: scale(1.05);
}

.resource-card .card-body {
    display: flex;
    flex-direction: column;
}

.resource-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-card .card-text {
    flex-grow: 1;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.resource-stats {
    display: flex;
    gap: 1rem;
}

.resource-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 广告样式 */
.ad-banner-top {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: block; /* 确保显示 */
    position: relative;
    z-index: 10; /* 确保在其他元素之上 */
    margin-top: 0;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 公告文本样式 */
.announcement-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* 喇叭图标脉冲效果 */
.pulse-icon {
    color: #1da1f2;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.sidebar-ad .ad-placeholder {
    padding: 2rem 1rem;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
}

/* 标签云 */
.tags-cloud .badge {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.tags-cloud .badge:hover {
    transform: scale(1.1);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 0;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* 跟随滚动的侧边栏广告 */
.sticky-sidebar-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 160px;
    height: 600px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    z-index: 999;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sticky-sidebar-ad.left {
    left: 20px;
}

.sticky-sidebar-ad.right {
    right: 20px;
}

.sticky-sidebar-ad .ad-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #000000;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-sidebar-ad .ad-content {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
}

/* 页面加载广告弹窗 */
.page-load-ad-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-load-ad-overlay.show {
    opacity: 1;
    visibility: visible;
}

.page-load-ad-modal {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.page-load-ad-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-load-ad-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.page-load-ad-close:hover {
    background-color: #f8f9fa;
}

.page-load-ad-body {
    padding: 2rem;
    text-align: center;
}

.page-load-ad-content {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 3rem 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.page-load-ad-timer {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.page-load-ad-skip {
    background: #000000;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.page-load-ad-skip:enabled {
    opacity: 1;
}

.page-load-ad-skip:enabled:hover {
    background: #5a6268;
}

/* 资源详情页面样式 */
.resource-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.resource-detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.resource-stats-detail {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.stat-item i {
    color: rgba(255,255,255,0.8);
}

/* 详情页图片样式 - 强制限制尺寸 */
.description img,
.content-image,
.description-img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
    border-radius: 12px;
    margin: 15px auto;
    display: block !important; /* 居中显示 */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain !important; /* 保持图片比例 */
}

.description img:hover,
.content-image:hover,
.description-img:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

/* 强制图片响应式布局 - 覆盖所有可能的样式 */
.description img[style],
.content-image[style],
.description-img[style] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
}

/* 处理具有内联样式的图片 */
.description img[width="1920"],
.description img[width="1080"],
.description img[style*="width:1920"],
.description img[style*="width:1080"] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
}

/* 小屏幕上的图片优化 */
@media (max-width: 768px) {
    .description img,
    .content-image,
    .description-img {
        max-height: 250px !important;
        margin: 10px auto !important;
    }
}

/* 强制图片响应式布局 - 覆盖所有可能的样式 */
.description img[style],
.content-image[style],
.description-img[style] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
}

/* 处理具有内联样式的图片 */
.description img[width="1920"],
.description img[width="1080"],
.description img[style*="width:1920"],
.description img[style*="width:1080"] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .description img,
    .content-image,
    .description-img {
        max-height: 200px !important;
        margin: 8px auto !important;
    }
}

/* 内容图片的通用样式 */
.content-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    margin: 15px auto;
    display: block;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    object-fit: contain;
}

.content-image:hover {
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.description video {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 10px 0;
}

.resource-detail-img {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.screenshots img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.screenshots img:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* 移动设备样式调整 */
@media (max-width: 480px) {
    .search-box-large .btn {
        width: 100%;
    }
    
    .page-load-ad-modal {
        width: 95%;
        margin: 0 10px;
    }
    
    .page-load-ad-body {
        padding: 1.5rem;
    }
    
    .page-load-ad-content {
        padding: 2rem 1rem;
    }
}

/* 详情页特殊样式 */
.resource-detail-img {
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.unlock-section {
    background: #212529 !important;
    border-radius: 0.5rem !important;
    padding: 2rem !important;
    text-align: center !important;
    margin: 2rem 0 !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* 确保在按钮上没有其他样式覆盖 */
.unlock-btn, 
button.unlock-btn, 
.unlock-section .btn.unlock-btn {
    background: #000000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-radius: 0.375rem !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    color: white !important;
}

.unlock-btn:hover, 
button.unlock-btn:hover, 
.unlock-section .btn.unlock-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    background: #333333 !important;
    color: white !important;
}

.resource-links {
    background: #212529;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    padding: 1.5rem;
    color: white;
    margin: 1rem 0;
}

.resource-links.hidden {
    display: none;
}

/* 搜索页样式 */
.search-filters {
    background: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 自定义分页样式 - 黑色风格 */
.resources-section .pagination .page-item .page-link,
.search-results .pagination .page-item .page-link,
.category-section .pagination .page-item .page-link {
    color: #212529 !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
}

.resources-section .pagination .page-item.active .page-link,
.search-results .pagination .page-item.active .page-link,
.category-section .pagination .page-item.active .page-link {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

.resources-section .pagination .page-item.disabled .page-link,
.search-results .pagination .page-item.disabled .page-link,
.category-section .pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #fff !important;
    border-color: #dee2e6 !important;
}

.resources-section .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.search-results .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.category-section .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    color: #000 !important;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
}

/* 分页容器和跳转样式 */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pagination-jump label {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 0.9rem;
    color: #6c757d;
}

.pagination-jump .form-control {
    width: 60px;
    height: 38px;
    padding: 0.25rem 0.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.pagination-jump .btn {
    height: 38px;
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

/* 确保分页和跳转在小屏幕上也有良好的显示 */
@media (max-width: 576px) {
    .pagination-container {
        flex-direction: column;
    }
    
    .pagination-jump {
        margin-top: 15px;
        justify-content: center;
    }
}

/* 全局分页样式覆盖 - 强制黑色风格 */
body .pagination .page-item .page-link {
    color: #212529 !important;
    background-color: #fff !important;
    border: 1px solid #dee2e6 !important;
    text-decoration: none !important;
}

body .pagination .page-item.active .page-link {
    color: #fff !important;
    background-color: #212529 !important;
    border-color: #212529 !important;
}

body .pagination .page-item.disabled .page-link {
    color: #6c757d !important;
    background-color: #fff !important;
    border-color: #dee2e6 !important;
    pointer-events: none !important;
    cursor: default !important;
}

body .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    color: #000 !important;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    z-index: 2 !important;
}

/* 修复分页链接上的focus状态 */
body .pagination .page-link:focus {
    z-index: 3 !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.25) !important;
}

/* 覆盖分页容器在JS中添加的样式，优先使用我们的CSS样式 */
nav.pagination-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 确保分页间距正确 */
.resources-section .pagination,
.search-results .pagination,
.category-section .pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.resources-section .pagination .page-item:first-child .page-link,
.search-results .pagination .page-item:first-child .page-link,
.category-section .pagination .page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.resources-section .pagination .page-item:last-child .page-link,
.search-results .pagination .page-item:last-child .page-link,
.category-section .pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

/* 图片画廊模态框样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-modal.show {
    opacity: 1;
    visibility: visible;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-modal-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 10001;
}

.modal-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close-btn {
    background: rgba(255, 0, 0, 0.7);
}

.close-btn:hover {
    background: rgba(255, 0, 0, 0.9);
}

#modalImage {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.image-modal-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.nav-btn {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
}

.image-counter {
    color: white;
    font-size: 14px;
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

.image-modal-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .image-modal-controls {
        top: 5px;
        right: 5px;
        gap: 5px;
    }
    
    .modal-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .image-modal-nav {
        bottom: 10px;
        gap: 15px;
        padding: 8px 15px;
    }
    
    .nav-btn {
        width: 30px;
        height: 30px;
    }
}

/* 全屏模式 */
.image-modal.fullscreen .image-modal-content {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

.image-modal.fullscreen #modalImage {
    max-height: 100vh;
}