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

body {
    overflow: visible;
    /* overflow: hidden; */
    width: 100vw;
    height: 100vh;
}

/* 强制旋转容器 */
/* .rotate-container {
    width: 100vh;
    height: 100vw;
    top: 0;
    left: 0;
    transform: rotate(90deg) translate(0, -100%);
    transform-origin: top left;
    --container-width: 100vh;
    --container-height: 100vw;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    overflow-x: visible;
} */
:root {
    --rotate-width: 100vw;
    --rotate-height: 100vh;
}

.rotate-container {
    width: var(--rotate-width, 100vw);
    height: var(--rotate-height, 100vh);
    /* position: fixed; */
    top: 0;
    left: 0;
    --container-width: 100vh;
    --container-height: 100vw;
    --shift: calc(var(--container-width)- var(--container-height));
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    overflow-x: auto;
    overflow-y: hidden;
}

/* 移动端覆盖 */
@media (max-device-width: 768px) {
    :root {
        --rotate-width: 100vh;
        --rotate-height: 100vw;
    }

    .rotate-container {
        transform: rotate(90deg) translate(0, -100vw);
        transform-origin: top left;

    }

    body {
        background-color: lightgreen;
    }
}

.media{
    display: none;
}

.game-container {
    margin: 0 auto;
    /* width: 100vh;
    height: 100vw; */
    width: var(--rotate-width, 100vw);
    height: var(--rotate-height, 100vh);
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    top: 0;
}

/* 视频容器 */
.scene-video-container {
    scrollbar-width: none;
    overflow: hidden;
    position: absolute;
    left: 0;
    top: 0;
    /* width: 100vh;
    height: 100vw; */
    width: var(--rotate-width, 100vw);
    height: var(--rotate-height, 100vh);
    /* aspect-ratio: 16/9; */
    background: #000;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); */
    /* margin: auto; */
    display: flex;
    text-align: center;
}

.scene-video-container video {
    /* object-fit: cover; */
    cursor: pointer;
    width: 100%;
    /* height: 100%; */
    height: auto;
    background-size: cover;
    background-position: center;
}

/* 隐藏原生视频加载效果 */
video::-webkit-media-controls-loading-panel {
    display: none !important;
}

/* 隐藏视频全屏播放按钮 */
video::-webkit-media-controls-fullscreen-button {
    display: none;
}





.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.control-btn:hover {
    transform: scale(1.1);
    color: #ff4757;
}


/* 选择按钮 */
.choices-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    /* margin-top: 20px; */
    position: absolute;
    width: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* 将元素中心移动到父元素中心 */
    /* margin: auto; */
}

.choice-btn {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0), rgba(0, 0, 0, 0));
    border: 2px solid rgba(255, 71, 87, 0);
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.choice-btn:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0), rgba(0, 0, 0, 0));
    /* border-color: rgba(ff, 47, 57, 0); */
    transform: translateY(-3px) scale(1.02);
    /* box-shadow: 0 10px 20px rgba(255, 71, 87, 0.2); */
}

.choice-shortcut {
    background: rgba(255, 71, 87, 0.3);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.choice-btn.timer {
    border-color: #ffa502;
}

.choice-btn.timer .choice-shortcut {
    background: rgba(255, 165, 2, 0.3);
}


/* 过场动画 */
.scene-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.transition-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: white;
    text-align: center;
    opacity: 0;
}



.notification-text {
    font-size: 14px;
}

/* 播放/暂停叠加层 */
.play-pause-overlay {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.scene-video-container:hover .play-pause-overlay {
    opacity: 0.3;
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff4757;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



/* 添加额外css动画 */

@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter 2s steps(40) forwards;
}

/* ------------------------------------------------交互1----------------------------------------- */
.scroll_item {
    /* width: 100vh;
    height: 100vw; */
    width: var(--rotate-width, 100vw);
    height: var(--rotate-height, 100vh);
    position: absolute;
    top: 0;
    left: 0;
    --container-width: 100vh;
    --container-height: 100vw;
    -webkit-overflow-scrolling: touch;
    touch-action: auto;
    overflow-x: auto;
    overflow-y: hidden;
    /* overflow: auto; */
    /* overflow-x: auto;
    overflow-y: auto; */
    /* overflow-x: visible; */
    display: none;
    z-index: 1;

}
/* 背景 */
div.interaction1>img:nth-child(1) {
    z-index: 1;
    left: 0px;
    top: 0px;
    position: absolute;

}

/* 新通道 */
div.interaction1>img:nth-child(2) {
    z-index: 1;
    left: 2077px;
    top: 0px;
    position: absolute;

}

/* 开挖部分 */
div.interaction1>img:nth-child(15) {
    z-index: 1;
    left: 2264px;
    top: 230px;
    position: absolute;
    --progress: 8%;
    mask-size: 250% 100%;
    mask-image: linear-gradient(80deg, transparent 0%, transparent calc(var(--progress, 100%)), black calc(var(--progress, 100%) + 20%));
    /* -webkit-mask-image: linear-gradient(80deg, transparent 0%, transparent calc(var(--progress, 100%) ), black  calc(var(--progress, 100%) + 20% )); */
    -webkit-mask-image: linear-gradient(110deg, transparent 0%, transparent calc(60% - var(--progress, 100%)), black 60%, black 100%);
    mask-position: -3192px 0px;
    transition: mask-image 0.3s;
}

@keyframes clip {
    0% {
        mask-position: -3192px 0px;
    }

    100% {
        mask-position: -638px 0px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    div.interaction1>img:nth-child(15) {
        animation: clip linear forwards;
        animation-timeline: view(x);
        animation-range: entry 20% exit 60%;
        /* animation-play-state: paused; */
        /* animation-iteration-count: 1; */
    }
}

/* 船1 */
div.interaction1>img:nth-child(3) {
    z-index: 1;
    left: 887px;
    top: 485px;
    position: absolute;
    animation: boat1 linear 50s forwards;
    transition: opacity 2s;
    animation-iteration-count: infinite;
}

/* 船2 */
div.interaction1>img:nth-child(4) {
    z-index: 1;
    left: 1220px;
    top: 650px;
    position: absolute;
    animation: boat2 linear 30s forwards;
    animation-iteration-count: infinite;
}

/* 云 6朵*/
div.interaction1>img:nth-child(5) {
    z-index: 1;
    left: -275px;
    top: 492px;
    position: absolute;
    animation: motion2 linear 15s forwards;
    animation-play-state: paused;
    animation-iteration-count: 1;

}

div.interaction1>img:nth-child(6) {
    z-index: 1;
    left: 579px;
    top: -491px;
    position: absolute;
    animation: motion1 linear 15s forwards;
    animation-play-state: paused;
    animation-iteration-count: 1;

}

div.interaction1>img:nth-child(7) {
    z-index: 1;
    left: 1318px;
    top: 346px;
    position: absolute;
}

div.interaction1>img:nth-child(8) {
    z-index: 1;
    left: 2359px;
    top: -157px;
    position: absolute;
}

div.interaction1>img:nth-child(9) {
    z-index: 1;
    left: 3395px;
    top: 200px;
    position: absolute;
}

div.interaction1>img:nth-child(10) {
    z-index: 1;
    left: 3154px;
    top: -590px;
    position: absolute;
}

.interaction1 .continue_button {
    /* 继续探索按钮 */
    position: absolute;
    z-index: 1;
    left: 7667px;
    top: 674px;
    opacity: 1;
    transition: scale 0.5s ease;
}

.continue_button:hover {
    scale: 1.25;
}

.continue_button:active {
    transform: translateY(2px);
}

.observer-div_interaction1 {
    position: absolute;
    z-index: 1;
    background: #1fda10;
    opacity: 0;
    transition: opacity 2s ease;
}

.observer-div_interaction1:nth-of-type(1) {
    /* trigger1 */
    width: 120px;
    height: 100px;
    left: 1455px;
    top: 500px;
}

.observer-div_interaction1:nth-of-type(2) {
    /* trigger2 */
    width: 130px;
    height: 100px;
    left: 3240px;
    top: 460px;
}

.observer-div_interaction1:nth-of-type(3) {
    /* trigger3 */
    width: 105px;
    height: 95px;
    left: 5900px;
    top: 354px;
}

#xinhangdao-text {
    position: absolute;
    left: 5530px;
    top: 113px;
    z-index: 1;
    scale: 0.8;
    opacity: 0;
    transition: opacity 8s ease;
}

/* 动画 */
@keyframes boat1 {
    0% {
        left: 887px;
        top: 485px;
        opacity: 0;
    }

    5% {
        left: 887px;
        top: 485px;
        opacity: 1;
    }

    85% {
        left: -100px;
        opacity: 1;
    }

    100% {
        left: -100px;
        top: 485px;
        opacity: 0;
    }
}

@keyframes boat2 {
    0% {
        left: 1220px;
        top: 650px;
    }

    65% {
        left: 2120px;
        top: 650px;
        transform: rotate(0deg)
    }

    80% {
        left: 2317px;
        top: 694px;
        scale: 0.3;
        transform: rotate(22deg);
    }

    100% {
        left: 2317px;
        top: 694px;
        scale: 0.3;
        transform: rotate(22deg);
    }
}

/* 云向上散开 */
@keyframes fadeInOut {
    0% {
        opacity: 1;
        scale: 1;
        transform: translate(300px, 0%);
    }

    15% {
        opacity: 1;
        scale: 1;
        transform: translate(105px, -15%);
    }

    100% {
        opacity: 0;
        scale: 0.3;
        transform: translate(-1000px, -100%);
    }
}

/* 云向下散开 */
@keyframes fadeIn {
    0% {
        opacity: 1;
        scale: 1;
        transform: translate(0px, 0%);
    }

    10% {
        opacity: 1;
        scale: 1;
        transform: translate(150px, 10%);
    }

    100% {
        opacity: 0;
        scale: 0.5;
        transform: translate(1500px, 100%);
    }
}

/* 云层运动 */
/* 向上散开 */
@keyframes motion1 {
    0% {
        opacity: 1;
        scale: 1;
        transform: translate(300px, 0%);
    }

    100% {
        opacity: 0.8;
        scale: 1;
        transform: translate(-1000px, -200px);
    }
}

/* 向下散开 */
@keyframes motion2 {
    0% {
        opacity: 1;
        scale: 1;
        transform: translate(0px, 0%);
    }

    100% {
        opacity: 0.8;
        scale: 1;
        transform: translate(1000px, 100px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .flow_clouds:nth-child(odd) {
        animation: fadeIn linear 10s forwards;
        /* animation-timeline: view(x);
                animation-range: entry exit 60%; */
        animation-play-state: paused;
        animation-iteration-count: 1;
    }

    .flow_clouds:nth-child(even) {
        animation: fadeInOut linear 10s forwards;
        /* animation-timeline: view(x);
                animation-range: entry exit 60%; */
        animation-play-state: paused;
        animation-iteration-count: 1;
    }
}
/* ------------------------------------------------交互1----------------------------------------- */

/* ------------------------------------------------交互2----------------------------------------- */
/* Scroll_Item */
.scroll_item.interaction2 {
    display: none;
}
/* 背景 */
div.interaction2>img:nth-child(1) {
    z-index: 1;
    left: 0;
    top: 0;
    position: absolute;
    background: #288a99;
}

/* 字1 */
div.interaction2>img:nth-child(2) {
    z-index: 1;
    left: 8736px;
    top: 523px;
    position: absolute;

}

/* 箱子1 */
div.interaction2>img:nth-child(3) {
    z-index: 1;
    left: 7987px;
    top: 161px;
    position: absolute;
    display: none;
    transition: opacity 2s;

}

/* 箱子2 */
div.interaction2>img:nth-child(4) {
    z-index: 1;
    left: 8031px;
    top: 395px;
    position: absolute;

}

/* 老人和孙女 */
div.interaction2>img:nth-child(5) {
    z-index: 1;
    left: 5164px;
    top: 110px;
    scale: 0.9;
    position: absolute;
    opacity: 1;

}

/* 中年人 */
div.interaction2>img:nth-child(6) {
    z-index: 1;
    left: 13032px;
    top: 402px;
    position: absolute;
}

/* 奶奶 */
div.interaction2>img:nth-child(9) {
    z-index: 1;
    left: 10940px;
    top: 274px;
    position: absolute;
}

.scroll_text {
    z-index: 1;
    position: absolute;
    opacity: 0;
    transition: opacity 3s ease;
}

/* 夷陵区乐天溪 */
div.interaction2>img:nth-child(10) {
    left: 777px;
    top: 391px;
}

div.interaction2>img:nth-child(11) {
    left: 4469px;
    top: 242px;
}

div.interaction2>img:nth-child(12) {
    left: 5786px;
    top: 214px;
}

div.interaction2>img:nth-child(13) {
    left: 6156px;
    top: 729px;
}

div.interaction2>img:nth-child(14) {
    left: 10935px;
    top: 120px;
}

div.interaction2>img:nth-child(15) {
    left: 11317px;
    top: 243px;
}

div.interaction2>img:nth-child(16) {
    left: 13274px;
    top: 291px;
}

div.interaction2>img:nth-child(17) {
    left: 15828px;
    top: 463px;
}

div.interaction2>img:nth-child(18) {
    left: 16864px;
    top: 537px;
}

div.interaction2>img:nth-child(19) {
    left: 19204px;
    top: 672px;
}
div.interaction2>img:nth-child(20) {
    left: 12649px;
    top: 764px;
}
.interaction2 .continue_button {
    /* 继续探索按钮 */
    position: absolute;
    z-index: 1;
    left: 20614px;
    top: 474px;
    opacity: 1;
    transition: scale 0.5s ease;
}

.continue_button:hover {
    scale: 1.25;
}

.continue_button:active {
    transform: translateY(2px);
}

.observer-div_interaction2 {
    position: absolute;
    z-index: 1;
    background: #1fda10;
    opacity: 0;
    transition: opacity 2s ease;
}

.observer-div_interaction2:nth-of-type(1) {
    /* trigger1 */
    width: 120px;
    height: 100px;
    left: 1455px;
    top: 500px;
}

.observer-div_interaction2:nth-of-type(2) {
    /* trigger2 */
    width: 130px;
    height: 100px;
    left: 3240px;
    top: 460px;
}

.observer-div_interaction2:nth-of-type(3) {
    /* trigger3 */
    width: 105px;
    height: 95px;
    left: 5900px;
    top: 354px;
}
/* ------------------------------------------------交互2----------------------------------------- */

/* ------------------------------------------------交互3----------------------------------------- */
/* Scroll_Item */
.scroll_item.interaction3 {
    display: none;
}

.animation {
    position: absolute;
    width: 1986px;
    height: 1080px;
    background-repeat: no-repeat;
    background-image: url(../media/漂流瓶动画/sprite.png);
    animation: animation 3s steps(24) infinite;
}

@keyframes animation {
    0% {
        background-position: -0px -0px;
    }

    100% {
        background-position: -47856px -0px;
    }
}

/* 蓝底背景 */
div.interaction3>img:nth-child(1) {
    z-index: 0;
    left: 0;
    top: 0;
    position: absolute;
    opacity: 1;
}

/* 字1 点击听听他们的声音*/
div.interaction3>img:nth-child(3) {
    z-index: 1;
    left: 310px;
    top: 797px;
    position: absolute;
    opacity: 1;

}

div.interaction3>img {
    z-index: 1;
    position: absolute;
    opacity: 0;
    transition: opacity 2s ease;
}

/* 漂流瓶留声1 搬了新家，把乡亲们安顿好，我才放心*/
div.interaction3>img:nth-child(4) {
    left: 1207px;
    top: 286px;
}

/* 漂流瓶留声2 我在江上跑了四十年，江水的声音，我忘不掉*/
div.interaction3>img:nth-child(5) {
    left: 1432px;
    top: 423px;
}

/* 漂流瓶留声3 江水要去更远的地方，我也会更好*/
div.interaction3>img:nth-child(6) {
    left: 1160px;
    top: 634px;
}

/* 漂流瓶留声4 老师说，我们搬家是为了国家，我很期待新学校*/
div.interaction3>img:nth-child(7) {
    left: 37px;
    top: 272px;
}

/* 漂流瓶留声5 搬家是为了三峡，只要江水记得我，这辈子就值了*/
div.interaction3>img:nth-child(8) {
    left: 129px;
    top: 562px;
}

.interaction3 .continue_button {
    /* 继续探索按钮 */
    position: absolute;
    z-index: 1;
    left: 1333px;
    top: 797px;
    opacity: 0;
    transition: scale 0.5s ease;
    display: none;
}

.button-div_interaction3 {
    position: absolute;
    z-index: 1;
    background: #1fda10;
    opacity: 0;
    transition: opacity 2s ease;
}

.button-div_interaction3:nth-of-type(2) {
    /* 漂流瓶1 */
    width: 120px;
    height: 100px;
    left: 455px;
    top: 370px;
}

.button-div_interaction3:nth-of-type(3) {
    /* 漂流瓶2 */
    width: 130px;
    height: 100px;
    left: 640px;
    top: 540px;
}

.button-div_interaction3:nth-of-type(4) {
    /* 漂流瓶3 */
    width: 105px;
    height: 95px;
    left: 1170px;
    top: 354px;
}

.button-div_interaction3:nth-of-type(5) {
    /* 漂流瓶4 */
    width: 130px;
    height: 110px;
    left: 1150px;
    top: 553px;
}

.button-div_interaction3:nth-of-type(6) {
    /* 漂流瓶5 */
    width: 100px;
    height: 100px;
    left: 1440px;
    top: 526px;
    display: none;
}
/* ------------------------------------------------交互3----------------------------------------- */

/* ------------------------------------------------交互4----------------------------------------- */
/* Scroll_Item */
.scroll_item.interaction4 {
    display: none;
}
div.interaction4>img {
    position: absolute;
    z-index: 1;
    opacity: 1;
    transition: opacity 2s ease;
}

div.interaction4>img:nth-of-type(1) {
    /* 底图 */
    background: #288a99;
}

div.interaction4>img:nth-of-type(2) {
    /* 字1安置区 */
    left: 3735px;
    top: 225px;
    opacity: 0;
}

div.interaction4>img:nth-of-type(3) {
    /* 字2展览馆 */
    left: 6459px;
    top: 73px;
    opacity: 0;
}

div.interaction4>img:nth-of-type(5) {
    /* 望苇对话 */
    left: 13560px;
    top: 517px;
    opacity: 0;
}

div.interaction4>img:nth-of-type(6) {
    /* 望苇人物介绍 */
    left: 14936px;
    top: 73px;
    opacity: 0;
}
.interaction4 .continue_button {
    /* 继续探索按钮 */
    position: absolute;
    z-index: 1;
    left: 18064px;
    top: 580px;
    opacity: 1;
    transition: scale 0.5s ease;
}

.observer-div_interaction4 {
    position: absolute;
    z-index: 1;
    background: #b7cfb5;
    opacity: 0;
    /* transition: opacity 2s ease; */
}

.observer-div_interaction4:nth-of-type(1) {
    /* 安置区 */
    width: 396px;
    height: 64px;
    left: 3313px;
    top: 388px;
}

.observer-div_interaction4:nth-of-type(2) {
    /* 展览馆 */
    width: 605px;
    height: 64px;
    left: 5846px;
    top: 296px;
}

.observer-div_interaction4:nth-of-type(3) {
    /* 柑橘园 */
    width: 396px;
    height: 65px;
    left: 7840px;
    top: 263px;
}

.observer-div_interaction4:nth-of-type(4) {
    /* 民宿区 */
    width: 396px;
    height: 65px;
    left: 10610px;
    top: 263px;
}

/* 动画 继续探索按钮 */
/* @keyframes fadeIn2 {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    50% {
        opacity: 1;
        transform: translateY(0px);
    }

    100% {
        opacity: 0;
        transform: translateY(0px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .scroll_item .continue_button {
        animation: fadeIn2 ease;
        animation-timeline: view(x);
        animation-range: entry 0% entry 100% exit;
    }
} */
/* ------------------------------------------------交互4----------------------------------------- */