/* 首页海报轮播：使用三张图轮换（调整路径到实际文件名） */
.poster-carousel {
    position: relative;           /* 改为相对定位，不脱离文档流 */
    width: min(48vw, 100%);
    aspect-ratio: 3 / 1;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
    margin: 0 auto;               /* 水平居中（对块级元素有效） */
}

/* 图片变为填充容器（绝对定位），容器高度由 aspect-ratio 决定 */
.poster-carousel img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 700ms ease, transform 700ms ease;
    pointer-events: none;
    user-select: none;
}

.poster-carousel img.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.poster-carousel:hover img {
    transition-duration: 300ms;
}

@media (max-width: 600px) {
    .poster-carousel {
        width: 80vw;
    }
}