.right-side-movies-horizontal {}

.movies-carousel-container {
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    /* 平滑滚动 */
    padding: 0.5rem 0 1rem 0;
    gap: 0.75rem;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    /* iOS平滑滚动 */
    -webkit-overflow-scrolling: touch;
    /* 防止垂直滚动 */
    overflow-y: hidden;
    /* 默认移动端：允许滚动 */
    overflow-x: auto;
}

/* 隐藏 WebKit 滚动条 */
.movies-carousel-container::-webkit-scrollbar {
    display: none;
}

/* 保持原有的卡片设计，但调整为横向滑动 */
.movie-carousel-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    width: 160px;
    /* 固定宽度适合滑动 */
    min-width: 160px;
    /* 防止压缩 */
    aspect-ratio: 9/15;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    text-align: left;
    background: var(--bg-minor);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    scroll-snap-align: start;
    flex-shrink: 0;
    /* 防止卡片被压缩 */
}

/* 保持原有的背景图片效果 */
.movie-carousel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    opacity: 1;
    transition: all 0.5s ease;
    z-index: 1;
    filter: brightness(1) contrast(1.2) saturate(1.2);
}

.movie-carousel-card:hover::before {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(1.1) contrast(1.2) saturate(1.2);
}

/* 保持原有的渐变效果 */
.movie-carousel-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.3) 30%,
            rgba(0, 0, 0, 0.7) 70%,
            rgba(0, 0, 0, 0.95) 100%);
    z-index: 1;
}

/* 保持原有的标题样式 */
.movie-carousel-card h5 {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 1.0rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    width: 100%;
    color: var(--fg-light1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s, transform 0.3s;
    letter-spacing: 0.5px;
    /* 改为和VerticalListHalfPicture一样的2行显示 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-height: 3rem;
    /* 约2.5行的高度，和VerticalListHalfPicture一致 */
    white-space: normal;
}

.movie-carousel-card:hover h5 {
    color: var(--fg-primary);
    transform: translateY(-2px);
    /* hover时显示完整文本，和VerticalListHalfPicture一致 */
    max-height: 100vh;
    overflow: visible;
}

/* 保持原有的详情样式 */
.movie-carousel-card p {
    position: relative;
    z-index: 2;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    text-align: left;
    width: 100%;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 0;
}

.movie-carousel-card:hover p {
    color: var(--fg-light3);
    transform: translateY(-2px);
}

.movie-carousel-card .movie-title {
    font-size: 0.8rem;
}

.movie-code {
    color: #ffcc00;
    font-weight: 600;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .movies-carousel-container {
        gap: 0.5rem;
        padding: 0.5rem 0.5rem 1rem 0.5rem;
    }

    .movie-carousel-card {
        width: 140px;
        min-width: 140px;
        padding: 0.8rem;
    }

    .movie-carousel-card h5 {
        font-size: 0.9rem;
    }

    .movie-carousel-card p {
        font-size: 0.7rem;
    }
}

/* PC端优化 */
@media (min-width: 769px) {
    .movies-carousel-container {
        gap: 0.75rem;
        padding: 0.5rem 0 1rem 0;
        /* PC端禁用滚动，隐藏超出内容 */
        overflow-x: hidden;
        /* 确保只显示完整卡片 */
        justify-content: flex-start;
    }

    .movie-carousel-card {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        /* 防止拉伸 */
        padding: 1rem;
        flex-shrink: 0;
        /* 防止压缩 */
    }

    .movie-carousel-card h5 {
        font-size: 1.0rem;
    }

    .movie-carousel-card p {
        font-size: 0.8rem;
    }

    /* 根据不同屏幕宽度调整卡片数量 */
    @supports (container-type: inline-size) {
        .right-side-movies-horizontal {
            container-type: inline-size;
        }

        @container (max-width: 400px) {
            .movie-carousel-card:nth-child(n+3) {
                display: none;
            }
        }

        @container (max-width: 580px) {
            .movie-carousel-card:nth-child(n+4) {
                display: none;
            }
        }

        @container (max-width: 760px) {
            .movie-carousel-card:nth-child(n+5) {
                display: none;
            }
        }
    }

    /* 备用方案：基于视口宽度 */
    @media (max-width: 1200px) {
        .movie-carousel-card:nth-child(n+3) {
            display: none;
        }
    }

    @media (min-width: 1201px) and (max-width: 1400px) {
        .movie-carousel-card:nth-child(n+4) {
            display: none;
        }
    }

    @media (min-width: 1401px) and (max-width: 1600px) {
        .movie-carousel-card:nth-child(n+5) {
            display: none;
        }
    }

    @media (min-width: 1601px) {
        .movie-carousel-card:nth-child(n+6) {
            display: none;
        }
    }
}