
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #e6f7ff;
    color: #0055aa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* 花瓣容器 */
.petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.petal {
    position: absolute;
    top: -20px;
    width: 12px;
    height: 12px;
    background: #ffccdd;
    border-radius: 50% 50% 50% 0;
    transform-origin: bottom right;
    opacity: 0.8;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

header {
    text-align: center;
    padding: 4rem 1rem 2rem;
    z-index: 1;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #003366;
}

.carousel-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 600px;
    margin: 100px auto 0 auto;
    perspective: 1500px;
    z-index: 2;
}

.carousel {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotate 20s infinite linear;
}

.carousel img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9) contrast(1.1);
    /* 移除 z-index，由 JS 控制 */
}

/* 扇面布局：6张图 */
.carousel img:nth-child(1) {
    transform: rotateY(0deg) translateZ(300px);
}

.carousel img:nth-child(2) {
    transform: rotateY(60deg) translateZ(300px);
}

.carousel img:nth-child(3) {
    transform: rotateY(120deg) translateZ(300px);
}

.carousel img:nth-child(4) {
    transform: rotateY(180deg) translateZ(300px);
}

.carousel img:nth-child(5) {
    transform: rotateY(240deg) translateZ(300px);
}

.carousel img:nth-child(6) {
    transform: rotateY(300deg) translateZ(300px);
}

@keyframes rotate {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
    /* 改为正向旋转 */
}

footer {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    font-size: 1rem;
    color: #666;
    z-index: 1;
}

.beian-link {
    color: #003366;
    text-decoration: none;
}

.beian-link:hover {
    text-decoration: underline;
}

/* 正面图片高亮 */
.carousel img.front {
    z-index: 10;
    filter: brightness(1) contrast(1.2) saturate(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
