.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px; /* 容器最大宽度 */
    height: 300px; /* 容器初始高度，可根据需求调整 */
    margin: auto;
    overflow: hidden;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    background-color: #000; /* 容器背景色 */
    border-radius: 20px; /* 设置圆角 */
}

.carousel-slide {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%; /* 保证图片宽度始终为容器宽度 */
    height: 100%; /* 保证图片高度始终为容器高度 */
    object-fit: cover; /* 使用 cover 保证图片始终填充容器 */
    object-position: center; /* 保证图片在容器中垂直和水平居中 */
}

/* 按钮默认状态隐藏在容器的左右两侧 */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* 使按钮垂直居中 */
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.3s ease; /* 添加丝滑过渡效果 */
    z-index: 10;
}

.prev {
    left: 10px; /* 按钮初始位置固定在容器左侧 */
    transform: translateY(-50%) translateX(-100px); /* 初始时隐藏在左侧外部 */
}

.next {
    right: 10px; /* 按钮初始位置固定在容器右侧 */
    transform: translateY(-50%) translateX(100px); /* 初始时隐藏在右侧外部 */
}

/* 鼠标悬停时按钮滑入 */
.carousel-container:hover .prev {
    transform: translateY(-50%) translateX(0); /* 左侧按钮滑入 */
}

.carousel-container:hover .next {
    transform: translateY(-50%) translateX(0); /* 右侧按钮滑入 */
}

/* 圆点导航 */
.dots {
    text-align: center;
    padding: 10px;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
}

.dot {
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: #fff; /* 圆点默认颜色为白色 */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.5s ease;
}

.dot.active {
    background-color: rgb(33, 117, 243); /* 选中后的颜色为亮蓝色 */
}