body {
    margin: 0;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #fff;
}

#scene {
    position: relative;
    width: 100%;
    height: 96%;
}

#scene img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
}
#bgD {
    display: none; /* 一開始隱藏 */
    opacity: 0; /* 確保動畫時不會突兀 */
}
.show {
    display: block !important;
    animation: fadeIn 1s forwards;
}

/* A 背景淡入 */
.fade-in {
    animation: fadeIn 1s forwards;
}

/* B 人物淡入 + 左側移動 */
.fade-in-left {
    animation: fadeInLeft 2.5s forwards;
}

/* C 人物淡入 + 右側移動 */
.fade-in-right {
    animation: fadeInRight 3s forwards;
}

/* A B C 淡出 */
.fade-out {
    animation: fadeOut 1s forwards;
}

/* D 淡入 */
.fade-in-fast {
    animation: fadeIn 1s forwards;
}

/* === 動畫關鍵影格 === */

/* 淡入 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 淡出 */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* B 人物從左進場 */
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* C 人物從右進場 */
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}