/* 确保父容器不限制宽度 */
.homeBox.searchBox {
    max-width: none !important;
    width: 100% !important;
}

.homeBox {
    max-width: none !important;
}

/* 豆瓣高分排行榜样式 - SEO友好版本 */
.douban-ranking-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 20px;
    margin: 40px 0;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1820px !important;
    width: 95% !important;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.douban-title {
    text-align: center;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    position: relative;
}

.douban-title::before {
    content: '🏆';
    margin-right: 10px;
}

/* 标签和筛选头部 */
.ranking-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

/* 标签切换区域 */
.ranking-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ranking-tab {
    background: rgba(233, 236, 239, 0.8);
    color: #666;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.ranking-tab:hover {
    background: rgba(214, 217, 220, 0.9);
    color: #333;
    transform: translateY(-2px);
}

.ranking-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.tab-icon {
    font-size: 18px;
}

.tab-text {
    font-weight: 600;
}

/* 筛选切换按钮 */
.filter-toggle-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-left: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.filter-toggle-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 筛选面板 */
.filter-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.filter-panel.hidden {
    display: none;
}

.filter-panel.visible {
    display: block;
}

.filter-section {
    margin-bottom: 15px;
}

.filter-section:last-of-type {
    margin-bottom: 0;
}

.filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: left;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.filter-option {
    background: rgba(241, 243, 244, 0.8);
    color: #666;
    border: 1px solid rgba(200, 200, 200, 0.5);
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(214, 217, 220, 0.9);
    border-color: rgba(150, 150, 150, 0.7);
}

.filter-option.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.filter-actions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.filter-reset-btn {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    padding: 8px 20px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.filter-reset-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* 内容显示区域 */
.ranking-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    min-height: 600px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 网格布局 - 桌面端 */
.ranking-grid.desktop-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 26px;
    margin-bottom: 30px;
}

/* 网格布局 - 移动端 */
.ranking-grid.mobile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.ranking-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(240, 240, 240, 0.6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(5px);
}

.ranking-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.95);
}

.ranking-item-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
    background: #f8f9fa;
}

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

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

.score-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffd700;
    padding: 2px 5px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    z-index: 3;
}

.hot-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.25);
    color: white;
    padding: 1px 4px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 1px;
}

.hot-badge::before {
    content: '🔥';
    font-size: 7px;
    opacity: 0.8;
}

.ranking-item-info {
    padding: 10px;
}

.ranking-item-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 3px;
    line-height: 1.3;
    height: auto;
    min-height: 30px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
}

.ranking-item-meta {
    font-size: 11px;
    color: #999;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: normal;
}

/* 默认显示桌面端版本，隐藏移动端版本 */
.ranking-item-meta-mobile {
    display: none;
}

/* 分页控件 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid rgba(240, 240, 240, 0.5);
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
    min-width: 80px;
}

.pagination-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.pagination-btn:disabled {
    background: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-info {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    padding: 0 10px;
    white-space: nowrap;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.page-jump-input {
    width: 40px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.page-jump-input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.page-jump-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.page-jump-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-1px);
}

/* 加载状态 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
    color: #999;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
    .douban-ranking-container {
        padding: 15px 10px;
        margin: 0;
        border-radius: 0;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .douban-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .ranking-tabs {
        background: rgba(255, 255, 255, 0.8);
        padding: 8px;
        border-radius: 20px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        margin-bottom: 20px;
        gap: 6px;
        backdrop-filter: blur(10px);
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .ranking-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .ranking-tab {
        padding: 10px 18px;
        font-size: 14px;
        min-width: auto;
        flex: 1;
        border-radius: 16px;
        background: transparent;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* 移动端筛选切换按钮 */
    .filter-toggle-btn {
        padding: 8px 16px;
        font-size: 13px;
        margin-left: 8px;
    }
    
    /* 移动端筛选面板样式 */
    .filter-panel {
        padding: 15px 10px;
    }
    
    .filter-label {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .filter-option {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .filter-reset-btn {
        padding: 7px 16px;
        font-size: 12px;
    }
    
    .ranking-content {
        padding: 15px 8px;
        min-height: 500px;
        border-radius: 0;
    }
    
    .ranking-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .score-badge {
        top: 3px;
        right: 3px;
        padding: 1px 3px;
        font-size: 7px;
        border-radius: 4px;
    }
    
    .hot-badge {
        bottom: 3px;
        left: 3px;
        padding: 0px 2px;
        font-size: 6px;
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.2);
    }
    
    .ranking-item-info {
        padding: 6px;
    }
    
    .ranking-item-title {
        font-size: 11px;
        min-height: 24px;
        margin-bottom: 2px;
    }
    
    .ranking-item-meta {
        font-size: 8px;
    }
    
    /* 移动端：隐藏桌面版本，显示移动版本 */
    .ranking-item-meta-desktop {
        display: none !important;
    }
    
    .ranking-item-meta-mobile {
        display: block !important;
        font-size: 8px;
    }
    
    .pagination-controls {
        gap: 8px;
        padding: 15px 0;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 60px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
    
    .page-jump-input {
        width: 35px;
        height: 22px;
        font-size: 11px;
    }
}

/* 平板响应式 */
@media (max-width: 1024px) and (min-width: 769px) {
    .ranking-grid.desktop-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 18px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .ranking-grid.desktop-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 24px;
    }
}

