/* ===== 频道页专属样式 ===== */

/* 标题+分类 同一行 */
.section-header-row {
    display: flex;
    align-items: center;
    margin: 30px 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.category-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    flex: 1;
    scrollbar-width: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 18px;
    border-radius: 30px;
    white-space: nowrap;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
    text-decoration: none;
    display: inline-block;
}

.category-btn.active,
.category-btn:hover {
    background: linear-gradient(45deg, var(--secondary), var(--primary));
    color: white;
    border: 1px solid #333;
}

/* 移动端：只显示更多按钮，其他隐藏 */
@media (max-width: 768px) {
    .category-scroll .category-btn:not(:last-child) {
        display: none;
    }

    .category-scroll {
        justify-content: flex-end;
    }

    .category-btn:last-child {
        background: linear-gradient(45deg, var(--secondary), var(--primary));
        color: white;
        border-color: transparent;
        border: 1px solid #333;
    }
}

/* 左侧影片网格 + 右侧热播榜 */
.content-row {
    display: flex;
    gap: 25px;
    margin-bottom: 40px;
}

.left-grid {
    flex: 4;
    min-width: 0;
}

.right-ranking {
    flex: 1;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 0 14px 18px;
    border: 1px solid var(--border);
    height: fit-content;
    max-height: 492px;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.right-ranking::-webkit-scrollbar {
    display: none;
}

/* 移动端隐藏热播榜 */
@media (max-width: 768px) {
    .right-ranking {
        display: none;
    }

    .content-row {
        display: block;
    }
}

.ranking-title {
    padding-top: 18px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-left: 12px;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 2;
}

.ranking-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 0;
    width: 4px;
    background-color: var(--primary);
}

.ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    height: 70px;
    box-sizing: content-box;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-num {
    width: 24px;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}

.ranking-num.top1 {
    color: #ffcc00;
}

.ranking-num.top2 {
    color: #c0c0c0;
}

.ranking-num.top3 {
    color: #cd7f32;
}

.ranking-poster {
    width: 45px;
    height: 63px;
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    background-color: #2a2a3a;
}

.ranking-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.ranking-meta span:first-child {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 20px;
}

.ranking-hits i {
    margin-right: 3px;
    color: var(--primary);
    font-size: 11px;
}

/* 左侧影片网格调整 */
.grid-double-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 15px;
}

.movie-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s;
    border: none;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    flex-shrink: 0;
    height: auto;
    max-height: 180px;
    position: relative;
    background: #2a2a3a;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.movie-info {
    padding: 8px 6px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.grid-double-row .movie-card:first-child,
.grid-double-row .movie-card:nth-child(6) {
    background: linear-gradient(145deg, #1d2a38, #16202c);
}

/* 加载动画 */
.loading-placeholder {
    grid-column: span 5;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-placeholder i {
    font-size: 30px;
    margin-bottom: 10px;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* 移动端网格调整为3列，只显示前6个（2排） */
@media (max-width: 768px) {
    .grid-double-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .grid-double-row .movie-card:nth-child(n+7) {
        display: none;
    }

    .grid-double-row .movie-card:first-child,
    .grid-double-row .movie-card:nth-child(4) {
        background: linear-gradient(145deg, #1d2a38, #16202c);
    }

    .grid-double-row .movie-card:nth-child(6) {
        background: var(--bg-card);
    }

    .loading-placeholder {
        grid-column: span 3;
    }
}

@media (max-width: 480px) {
    .grid-double-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .grid-double-row .movie-card:nth-child(n+7) {
        display: none;
    }

    .movie-title {
        font-size: 12px;
    }

    .movie-meta {
        font-size: 10px;
    }

    .loading-placeholder {
        grid-column: span 3;
    }
}

/* 片库筛选栏 */
.filter-bar {
    display: flex;
    gap: 25px;
    margin: 30px 0;
    padding: 20px 0;
    background-color: var(--bg-dark);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.filter-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.filter-more {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
}

.filter-more:hover {
    color: var(--primary);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    text-decoration: none;
}

.filter-btn.active,
.filter-btn:hover {
    color: var(--primary);
}

/* 移动端隐藏片库筛选栏 */
@media (max-width: 768px) {
    .filter-bar {
        display: none;
    }
}