/* 图片容器 */
.image-container {
    position: relative;
    z-index: 1; /* 确保图片在云彩的前面 */
}

/* 云彩样式 */
.clouds {
    position: absolute;
    top: 15%; /* 可以根据需要调整云彩的位置 */
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* 使云彩不干扰页面交互 */
    z-index: 0;
    overflow: hidden; /* 确保不出现横向滚动条 */
}

.cloud {
    position: absolute;
    top: 0;
    animation-timing-function: linear;
}

/* 云彩横向滚动动画 */
@keyframes moveCloud1 {
    0% {
        left: -20%; /* 从屏幕左侧外面开始 */
    }
    100% {
        left: 120%; /* 向右滚动到屏幕外 */
    }
}

@keyframes moveCloud2 {
    0% {
        right: -20%; /* 从屏幕右侧外面开始 */
    }
    100% {
        right: 120%; /* 向左滚动到屏幕外 */
    }
}

@keyframes moveCloud3 {
    0% {
        left: -20%;
        transform: translateX(-50%);
    }
    100% {
        left: 120%;
    }
}

.cloud1 {
    animation: moveCloud1 35s infinite;
}

.cloud2 {
    animation: moveCloud2 40s infinite;
}

.cloud3 {
    animation: moveCloud3 30s infinite;
}

/* 花瓣容器 */
.petals {
    position: absolute;
    top: 0;
    right: 10%; /* 右侧树的位置，根据需要调整 */
    width: 100px; /* 容器宽度，根据花瓣大小调整 */
    height: 100vh; /* 花瓣飘落高度，等于视口高度 */
    pointer-events: none; /* 不影响交互 */
    z-index: 0; /* 在云彩下层，1.png 上层 */
}

/* 花瓣基础样式 */
.petal {
    position: absolute;
    width: 50px; /* 花瓣大小 */
    opacity: 0.8;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: forwards;
}

/* 飘落动画 + 轻微左右摆动 */
@keyframes fallPetal1 {
    0% {
        top: -30px;
        left: 20px;
        opacity: 1;
        transform: rotate(0deg);
    }
    100% {
        top: 100vh;
        left: 5px;
        opacity: 0;
        transform: rotate(360deg);
    }
}

@keyframes fallPetal2 {
    0% {
        top: -50px;
        left: 40px;
        opacity: 1;
        transform: rotate(15deg);
    }
    100% {
        top: 100vh;
        left: 60px;
        opacity: 0;
        transform: rotate(-360deg);
    }
}

@keyframes fallPetal3 {
    0% {
        top: -40px;
        left: 10px;
        opacity: 1;
        transform: rotate(-10deg);
    }
    100% {
        top: 100vh;
        left: 30px;
        opacity: 0;
        transform: rotate(360deg);
    }
}

@keyframes fallPetal4 {
    0% {
        top: -60px;
        left: 50px;
        opacity: 1;
        transform: rotate(5deg);
    }
    100% {
        top: 100vh;
        left: 20px;
        opacity: 0;
        transform: rotate(-360deg);
    }
}

/* 赋予每朵花瓣不同动画时长和延迟 */
.petal1 {
    animation-name: fallPetal1;
    animation-duration: 12s;
    animation-delay: 0s;
}

.petal2 {
    animation-name: fallPetal2;
    animation-duration: 15s;
    animation-delay: 3s;
}

.petal3 {
    animation-name: fallPetal3;
    animation-duration: 10s;
    animation-delay: 6s;
}

.petal4 {
    animation-name: fallPetal4;
    animation-duration: 14s;
    animation-delay: 9s;
}

/* 添加背景图片 */
body {
    background-image: url('/static/png/2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* 容器位置和覆盖层样式 */
.image-container {
    position: relative;
}

.overlay-images {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* 四个图片的定位 */
.overlay-image {
    position: absolute;
    display: block;
    margin: 0;
}

/* 第一个图标 - 居中正上方 */
.top-center {
    top: 100px; /* 调整上方位置 */
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px; /* 设置图片的最大宽度为500px */
    height: auto; /* 保持图片比例 */
}

/* 第二个图标 - 居中在下 */
.bottom-center {
    top: 450px; /* 使它位于图片的下方 */
    left: 50%;
    transform: translateX(-50%);
    max-width: 1000px; /* 设置图片的最大宽度为500px */
    height: auto; /* 保持图片比例 */
}

/* 第三和第四个图标 - 居中在下方第二张图片下 */
.bottom-row {
    position: relative; /* 容器为相对定位 */
    top: 580px; /* 调整位置，使它们在第二个图标下方 */
    width: 100%; /* 容器宽度占满父容器 */
    height: 60px; /* 设置容器高度，确保图片能够放得下 */
}

.overlay-image.left {
    position: absolute;
    left: 80px; /* 将左图放在容器的左侧 */
    width: 200px; /* 设置图片宽度 */
    height: 60px; /* 设置图片高度 */
}

.overlay-image.right {
    position: absolute;
    right: 80px; /* 将右图放在容器的右侧 */
    width: 200px; /* 设置图片宽度 */
    height: 60px; /* 设置图片高度 */
}

/* 视频容器和样式 */
.video-container {
    position: absolute;
    left: 620px;
    top: 700px; /* 调整位置 */
    width: 35%; /* 宽度为容器的40% */
    height: 350px; /* 设置高度 */
    border-radius: 15px; /* 给视频容器添加圆角 */
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保视频填充容器 */
    border-radius: 15px; /* 给视频也加上圆角 */
}

/* 轮播图容器 */
.carousel-container {
    position: absolute;
    right: 500px;
    top: 700px; /* 调整位置 */
    width: 20%; /* 宽度为容器的40% */
    height: 400px; /* 设置高度 */
    overflow: hidden;
    border-radius: 15px; /* 添加圆角效果 */
}

/* 轮播图样式 */
.carousel-inner {
    display: flex;
    transition: transform 0.5s ease;
    width: 100%;
}

.carousel-item {
    width: 100%;
    height: 100%;
}

.carousel-item img {
    width: 100%; /* 让图片宽度适应容器 */
    height: 100%; /* 让图片高度适应容器 */
    object-fit: cover; /* 图片填充方式 */
    border-radius: 15px; /* 给图片也加上圆角 */
}

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 25%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}
