/* 页面居中 */
body, html {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    background-color: transparent;
}

/* 图集容器 */
.gallery {
    position: relative;
    width: 1000px;  /* 容器宽度 */
    height: 600px;  /* 容器高度 */
    perspective: 2000px;  /* 设置3D效果 */
    overflow: visible;
    margin-left: 270px; /* 向右移动整体容器 */
    margin-top: -50px;  /* 向上移动 50px */
}


/* 轮播容器 */
.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 1s ease;
    transform-style: preserve-3d;  /* 保持3D效果 */
    overflow: hidden;  /* 隐藏溢出的部分 */
}

/* 每张图片 */
.image {
    position: absolute;
    width: 339px;  /* 图片宽度 */
    height: 390px;  /* 图片高度 */
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease, transform 1s ease;
    opacity: 0.3;  /* 所有图片默认半透明 */
    transform: rotateY(90deg) translateZ(500px) scale(0.8);  /* 初始状态，图片稍微缩小并位于后方 */
    z-index: 1;  /* 所有图片起始层级相同 */
}

/* 当前显示的图片 */
.image.main {
    opacity: 1;  /* 当前图片完全不透明 */
    transform: rotateY(0deg) translateZ(400px) scale(1);  /* 当前图片正面显示 */
    z-index: 10;  /* 当前图片位于最前面 */
}

/* 按钮样式 */
button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;  /* 设置按钮背景为透明 */
    border: none;  /* 去掉默认的边框 */
    padding: 0;  /* 去掉默认的内边距 */
    cursor: pointer;  /* 鼠标悬停时显示手形光标 */
    z-index: 10;
}


/* 控制按钮的位置 */
.prev-btn {
    left: -80px;  /* 设置按钮距离容器左边的距离 */
    width: 50px;  /* 设置按钮宽度 */
    height: 80px;  /* 设置按钮高度 */
    background-image: url('../images/slide-left-jt.png');  /* 设置按钮的背景图片 */
    background-size: cover;  /* 确保图片按比例填充按钮 */
    background-position: center;  /* 使图片居中 */
}

.next-btn {
    right: -80px;  /* 设置按钮距离容器右边的距离 */
    width: 50px;  /* 设置按钮宽度 */
    height: 80px;  /* 设置按钮高度 */
    background-image: url('../images/slide-right-jt.png');  /* 设置按钮的背景图片 */
    background-size: cover;  /* 确保图片按比例填充按钮 */
    background-position: center;  /* 使图片居中 */
}