
/* 第五幕：延展图文介绍样式 */

/* 结束场景背景 */
.ending-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F29950DT20251204103200.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    transition: opacity 0.5s ease;
}

/* 四季轮播容器 */
.seasons-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    overflow: hidden;
}

/* 四季图片 */
.season-image {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
}

.season-image.active {
    opacity: 1;
    z-index: 2;
}
.seasons-container #winter{
    background: url(https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F24533DT20251209165409.jpg) no-repeat center center;
    background-size: 100% 100%;
    opacity: 1;
}
.seasons-container #autumn{
    background: url(https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F24534DT20251209165409.jpg) no-repeat center center;
    background-size: 100% 100%;
}
.seasons-container #summer{
    background: url(https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F29947DT20251209165409.jpg) no-repeat center center;
    background-size: 100% 100%;
}
.seasons-container #spring{
    background: url(https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F29948DT20251209165409.jpg) no-repeat center center;
    background-size: 100% 100%;
}
.seasons-container #all-seasons{
    background: url(https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F981DT20251209145122.jpg) no-repeat center center;
    background-size: 100% 100%;
}
/* 暗色遮罩 */
.dark-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: black;
    opacity: 0;
    z-index: 3;
    transition: opacity 1s ease;
}

.dark-overlay.show {
    opacity: 0.7;
}

/* 文字图片 */
.ending-text {
    position: absolute;
    width: 100%;
    max-width: 600px;
    height: 393px;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F29953DT20251204103200.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 4;
    opacity: 0;
    transition: opacity 1s ease;
}

.ending-text.show {
    opacity: 1;
}

/* 下拉图标 */
.ending-arrow {
    position: absolute;
    width: 100%;
    height: 86px;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F29952DT20251204103200.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 5;
    opacity: 0;
    transition: opacity 1s ease;
    cursor: pointer;
    animation: arrowBounce 2s infinite ease-in-out;
}

.ending-arrow.show {
    opacity: 1;
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* 扩展内容 */
.expanded-content {
    position: relative;
    width: 100%;
    height: 100%; /* 使用视口高度 */
    top: 0;
    left: 0;
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-09/U947P4T47D55856F24530DT20251209145122.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 6;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.expanded-content.show {
    display: block;
    opacity: 1;
}

/* 结束场景容器 */
#ending {
    /* height: auto; */
    overflow: visible;
    display: block;
}

/* 固定背景部分 */
.ending-container {
    position: relative;
    width: 100%;
    height: 100%; /* 视口高度 */
    overflow: hidden;
}

/* 修改body，允许滚动 */
/* body {
    overflow: auto;
    height: auto;
} */

/* 扩展图片 */
.expanded-image {
    position: absolute;
    width: 100%;
    height: auto;
    top: 0;
    left: 0;
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-12/U808P4T47D55867F29953DT20251216145048.png');
    background-size: contain;
    background-position: center top;
    background-repeat: no-repeat;
    padding-top: 100%;
    z-index: 7;
    margin-top: 90px;
}

/* 按钮容器 */
.buttons-container {
    position: absolute;
    width: 90%;
    max-width: 600px;
    height: auto;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 8;
}

/* 按钮样式 */
.action-button {
    width: 47%;
    height: auto;
    padding-top: 25%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.action-button:hover {
    transform: scale(1.05);
}

.action-button:active {
    transform: scale(0.95);
}

/* 查找最近港湾按钮 */
.find-harbor {
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F24532DT20251204103200.png');
}

/* 港湾服务大全按钮 */
.services {
    display: none;
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F24533DT20251204103200.png');
}

/* 分享温暖发现按钮 */
.share {
    background-image: url('https://www.chinanews.com.cn/fileftp/2025/12/2025-12-04/U808P4T47D55844F24534DT20251204103200.png');
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow: auto;
    z-index: 101;
    -webkit-overflow-scrolling: touch;
}

.modal-image {
    width: 100%;
    height: auto;
    display: block;
}

.modal-close {
    position: fixed;
    top: 42px;
    left: 20px;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    color: #333;
    z-index: 102;
}

.modal-close::before,
.modal-close::after {
    content: '';
    position: fixed;
    width: 20px;
    height: 2px;
    background-color: #333;
}

.modal-close::before {
    transform: rotate(45deg);
}

.modal-close::after {
    transform: rotate(-45deg);
}

/* 港湾服务大全弹窗样式 */
.services-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.services-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.services-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    height: 80%;
    max-height: 600px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    z-index: 101;
    display: flex;
    flex-direction: column;
}

.services-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: #f0f0f0;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 102;
}

.services-modal-close::before,
.services-modal-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background-color: #333;
}

.services-modal-close::before {
    transform: rotate(45deg);
}

.services-modal-close::after {
    transform: rotate(-45deg);
}

.services-modal-header {
    padding: 15px 20px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.services-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.services-modal-body {
    flex: 1;
    padding: 0;
    overflow: hidden;
}

.services-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}
