/* 电影榜单样式 */

/* 榜单标签页 */
.fed-ranking-tabs {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.fed-tabs-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.fed-tabs-link {
    padding: 12px 20px;
    color: #6c757d;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.fed-tabs-link:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.fed-tabs-link.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: white;
}

/* 榜单内容 */
.fed-ranking-content {
    position: relative;
}

.ranking-panel {
    display: none;
    animation: fadeInUp 0.3s ease;
}

.ranking-panel.active {
    display: block;
}

/* 榜单项目 */
.ranking-item {
    position: relative;
    margin-bottom: 15px;
}

.ranking-movie {
    position: relative;
    height: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ranking-movie:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* 排名数字 */
.ranking-number {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* 电影信息 */
.ranking-info {
    padding: 12px;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
}

.ranking-title {
    color: white !important;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ranking-meta span {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

/* 票房榜特殊样式 */
.ranking-panel[data-type="box_office"] .fed-text-red {
    color: #dc3545 !important;
    font-weight: bold;
}

/* 北美票房榜特殊样式 */
.ranking-panel[data-type="north_america_box_office"] .ranking-number {
    background: linear-gradient(135deg, #6f42c1, #e83e8c);
}

/* TOP榜特殊样式 */
.ranking-panel[data-type="top"] .ranking-number {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* 热映榜特殊样式 */
.ranking-panel[data-type="hot"] .ranking-number {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

/* 最受期待榜特殊样式 */
.ranking-panel[data-type="wished"] .ranking-number {
    background: linear-gradient(135deg, #fd7e14, #e83e8c);
}

/* 无图片时的占位符 */
.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 12px;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fed-tabs-nav {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .fed-tabs-link {
        padding: 10px 15px;
        white-space: nowrap;
    }

    .ranking-movie {
        margin: 0 5px;
    }

    .ranking-info {
        padding: 8px;
    }

    .ranking-title {
        font-size: 13px;
    }

    .ranking-meta {
        gap: 4px;
    }

    .ranking-meta span {
        font-size: 11px;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .fed-tabs-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .ranking-item {
        padding: 5px !important;
    }

    .ranking-number {
        width: 20px;
        height: 20px;
        font-size: 10px;
        top: 5px;
        left: 5px;
    }
}

/* 加载状态 */
.ranking-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.ranking-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* 错误状态 */
.ranking-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px;
}

.ranking-error::before {
    content: '⚠️ ';
    font-size: 18px;
}
