/* 场景面板 */
#sceneViewSL {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: 900px;
    color: #fff;
    padding: 25px 30px;
    border-radius: 16px;
    z-index: 100;
    box-sizing: border-box;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    /* 使用Flexbox实现垂直布局和居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

#sceneViewSL.hiddenSL {
    transform: translateX(-50%) translateY(calc(100vh + 100%));
}

/* 图标样式 */
.iconSL {
    font-size: 32px;
    margin-bottom: 12px;
    color: #fff;
}

/* 场景分类导航 */
.scene-type-containerSL {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
}

.scene-type-listSL {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 12px;
    flex: 1;
    /* 限制显示区域，确保只显示4个完整按钮 */
    width: calc(4 * 120px + 3 * 12px + 24px);
    max-width: calc(4 * 120px + 3 * 12px + 24px);
}

.scene-type-listSL::-webkit-scrollbar {
    display: none;
}

/* 场景类型选择按钮 */
.scene-typeSL {
    flex: 0 0 auto;
    background-color: #0000004D;
    border-radius: 30px;
    padding: 10px 0px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 固定宽度，确保4个按钮完整显示 */
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    position: relative;
    overflow: hidden;
}

/* 场景类型选择按钮激活状态 */
.scene-typeSL.activeSL {
    background: rgba(255, 255, 255, 1);
    color: #303133;
}

/* 分类标签文本容器 */
.type-text-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-nameSL {
    font-size: 1.1rem;
    position: absolute;
    left: 0;
    white-space: nowrap;
}

/* 滚动按钮 */
.scroll-btnSL {
    background-color: #0000004D;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10;
}

.scroll-btnSL.btnSL-L {
    margin-right: 10px;
}

.scroll-btnSL.btnSL-R {
    margin-left: 10px;
}

.scroll-btnSL:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 场景列表容器 */
.scene-list-containerSL {
    /* 容器宽度与父容器保持一致，通过内部元素控制显示数量 */
    width: 100%;
    max-width: 100%;
    position: relative;
    align-self: center;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 10px 0;
    border-radius: 12px;
    background-color: #0000004D;
    min-height: 100px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.scene-listSL {
    display: flex;
    gap: 10px;
    /* 使用margin代替padding，确保滚动时左右边距一致 */
    margin: 0 10px;
    /* PC/平板端：流式布局，宽度自适应容器 */
    width: max-content;
    cursor: grab;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scene-listSL::-webkit-scrollbar {
    display: none;
}

.scene-listSL.draggingSL {
    cursor: grabbing;
}

.scene-listSL:active {
    cursor: grabbing;
}

/* 场景列表内的场景容器样式 */
.scene-itemSL {
    flex: 0 0 auto;
    width: 80px;
    height: 100px;
    background-color: #0000004D;
    border: 1px solid #ffffff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-align: center;
    box-sizing: border-box;
    user-select: none;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSL 0.5s ease-out forwards;
}

.scene-itemSL .img-container {
    width: 100%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scene-itemSL .img-container img {
    border-radius: 12px 12px 0 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scene-itemSL .name-container {
    height: 20%;
    width: 100%;
    overflow: hidden;
    position: relative;
    height: 1.5em;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scene-itemSL .nameSL {
    font-size: 0.9rem;
    line-height: 1.3;
    white-space: nowrap;
    top: 0;
    left: 0;
    width: max-content;
    transition: all 0.3s ease;
}


/* 场景选项选中效果 */
.scene-itemSL.activeSL {
    background: rgba(255, 255, 255, 1);
    border: 1px solid #ffffff;
    color: #303133;
}

/* 滚动文本动画 */
@keyframes scrollText {
    0% {
        transform: translateX(35%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.scroll-text {
    display: inline-block;
    animation: scrollText 5s linear infinite;
    padding-left: 100%;
}

.center-text {
    width: 100%;
    left: 0;
    transform: none;
    padding-left: 0;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeInSL {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载指示器 */
.loading-indicatorSL {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
}

/* 控制按钮 */
.controlsSL {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    gap: 15px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #sceneViewSL {
        width: 380px;
        padding: 20px 0px;
    }

    .scene-type-listSL {
        width: calc(4 * 80px + 3 * 12px + 24px);
        max-width: calc(4 * 80px + 3 * 12px + 24px);
    }

    .scene-typeSL {
        padding: 8px 0px;
        font-size: 1rem;
        height: 40px;
        width: 80px;
        min-width: 80px;
        max-width: 80px;
    }

    .scene-list-containerSL {
        /* 平板端: 容器宽度与父容器保持一致 */
        width: 100%;
        max-width: 100%;
    }

    .scene-listSL {
        /* 移动端: 固定宽度显示4个完整按钮，使用margin确保边距一致 */
        margin: 0 10px;
        width: calc(4 * 75px + 3 * 15px);
        max-width: calc(4 * 75px + 3 * 15px);
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .scene-listSL::-webkit-scrollbar {
        display: none;
    }

    .type-nameSL {
        font-size: 0.7rem;
    }

    .scene-itemSL .nameSL {
        font-size: 0.8rem;
    }

    .scene-itemSL {
        width: 75px;
        height: 106px;
    }

    .iconSL {
        font-size: 28px;
    }

    .controlsSL {
        left: 15px;
        bottom: 15px;
    }
}

@media (max-width: 480px) {
    #sceneViewSL {
        padding: 15px 5px;
    }

    .scene-type-listSL {
        width: calc(4 * 70px + 3 * 12px + 24px);
        max-width: calc(4 * 70px + 3 * 12px + 24px);
    }

    .scene-typeSL {
        padding: 6px 0px;
        font-size: 0.9rem;
        height: 36px;
        width: 70px;
        min-width: 70px;
        max-width: 70px;
    }

    .scene-list-containerSL {
        /* 手机端: 容器宽度与父容器保持一致 */
        width: 100%;
        max-width: 100%;
    }

    .scene-listSL {
        /* 小屏手机端: 固定宽度显示4个完整按钮，使用margin确保边距一致 */
        margin: 0 10px;
        width: calc(4 * 80px + 3 * 15px);
        max-width: calc(4 * 80px + 3 * 15px);
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .scene-listSL::-webkit-scrollbar {
        display: none;
    }

    .type-nameSL {
        font-size: 0.7rem;
    }

    .scene-itemSL .nameSL {
        font-size: 0.8rem;
    }

    .scene-itemSL {
        width: 80px;
        height: 95px;
    }

    .iconSL {
        font-size: 24px;
    }

    .controlsSL {
        left: 10px;
        bottom: 10px;
    }
}

/* 针对超小屏幕的额外优化 */
@media (max-width: 375px) {
    .scene-type-listSL {
        gap: 8px;
        width: calc(4 * 60px + 3 * 8px + 24px);
        max-width: calc(4 * 60px + 3 * 8px + 24px);
    }

    .scene-typeSL {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        font-size: 0.8rem;
        height: 34px;
    }

    .scroll-btnSL {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .scroll-btnSL.btnSL-L {
        margin-right: 8px;
    }

    .scroll-btnSL.btnSL-R {
        margin-left: 8px;
    }
}