body {
    background-color: #eee7e7;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(12.jpg);
    background-size: cover;
    background-position: center;
    filter: blur(4px);
    z-index: -1;
}

.layout {
    grid-template-areas:
        "main"
        "footer"
    ;
}

.grid {
    align-content: center;
    justify-items: center;
}

.slide-container {
    grid-area: main;
    /*     position: relative; */
    margin: 0 auto;
    width: 1500px;
    height: 750px;
    border-radius: 70px;
    overflow: hidden;
    margin: 0 auto;
}

/* 设置slide为flex布局，保持图片容器的可见性 */
#slide {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    width: 100%;
    /* 宽度调整为100% */
    height: auto;
    /* 保证高度自适应 */
}

/* 设置item的竖向比例，并确保其自适应 */
.item {
    width: 20vw;
    /* 相对宽度，保持响应性 */
    height: 60vh;
    /* 使用视窗高度的60% */
    background-position: 50% 50%;
    display: inline-block;
    transition: 0.5s;
    background-size: cover;
    position: relative;
    z-index: 1;
    border-radius: 20px;
    box-shadow: 0 30px 50px #faf1f1;
    margin: 0 20px;
    /* 图片之间保持适当间隔 */
}

/* 调整nth-child来确保多张图片的显示 */
.item:nth-child(1),
.item:nth-child(2) {
    width: 100%;
    height: 100%;
    box-shadow: 0 30px 50px #cfcfce;
}

.item:nth-child(3) {
    transform: translateX(-20vw);
}

.item:nth-child(4) {
    transform: translateX(0);
}

.item:nth-child(5) {
    transform: translateX(20vw);
}

.item:nth-child(n+6) {
    opacity: 1;
}

/* 保留动画和过渡效果 */
.item .content {
    position: absolute;
    top: 50%;
    left: 50px;
    width: 80%;
    text-align: left;
    color: #f7f7f7;
    transform: translateY(-50%);
    display: none;
    font-family: system-ui;
}

.item:nth-child(2) .content {
    display: block;
    z-index: 11111;
}

.item .name {
    font-size: 50px;
    font-weight: bold;
    opacity: 0;
    animation: showcontent 1s ease-in-out 1 forwards;
}

.item .des {
    margin: 30px 0;
    opacity: 0;
    animation: showcontent 1s ease-in-out 0.3s 1 forwards;
}

.item button {
    padding: 10px 20px;
    border: none;
    opacity: 0;
    animation: showcontent 1s ease-in-out 0.6s 1 forwards;
}

@keyframes showcontent {
    from {
        opacity: 0;
        transform: translate(0, 100px);
        filter: blur(33px);
    }

    to {
        opacity: 1;
        transform: translate(0, 0);
        filter: blur(0);
    }
}

/* 按钮样式 */
.buttons {
    position: absolute;
    bottom: 30px;
    z-index: 222222;
    text-align: center;
    width: 100%;
}

.buttons button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid #555;
    transition: 0.5s;
}

.buttons button:hover {
    background-color: #bac383;
}









/* 留言板部分 */
.messages {
    position: relative;
    margin: 0 auto;
    width: 100%;
    /* 使宽度为100% */
    max-width: 1400px;
    /* 设置最大宽度 */
    height: 1000px;
    /* 可以根据需要调整 */
    padding: 50px;
    display: flex;
    align-items: center;
    flex-direction: column;
    background: linear-gradient(to right bottom,
            rgba(255, 255, 255, .6),
            rgba(255, 255, 255, .3),
            rgba(255, 255, 255, .2));
    background-color: hsla(40, 30%, 70%, 0.5);
    border-radius: 40px;
    box-shadow: 0 10px 50px #00000019;
}

/* 媒体查询 */
@media (max-width: 768px) {
    .messages {
        height: auto;
        /* 调整高度为自动以适应内容 */
        padding: 20px;
        /* 减少内边距 */
    }
}