.carousel-container {
    position: relative;
    width: 100%;
    height: 540px;
    overflow: hidden;
    margin: 20px;
}

/* 针对手机等小屏设备的媒体查询 */
@media screen and (max-width: 768px) {
    .carousel-container {
        height: 250px;
        margin: 10px 0px;
    }
}

.carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 16px;
    margin: 0;
}

/* 针对手机等小屏设备的媒体查询 */
@media screen and (max-width: 768px) {
    .carousel-title {
        padding: 10px;
        font-size: 16px;
    }
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.carousel-container:hover .carousel-button {
    opacity: 1;
}

.carousel-button.prev {
    left: 16px;
}

.carousel-button.next {
    right: 16px;
}

.carousel-indicators {
    position: absolute;
    bottom: 64px;
    left: 0;
    right: 0;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    z-index: 10;
    justify-content: center;
    width: fit-content;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.3s;
}

.indicator.active {
    background: rgba(255, 255, 255, 1);
}

/* 添加悬停暂停效果 */
.carousel-slide:hover {
    cursor: pointer;
}