﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    overflow: hidden;
}

#panorama {
    width: 100vw;
    height: 100vh;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    color: white;
    padding: 15px 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 1.5rem;
    margin: 0;
    display: none; /* 隐藏标题数字 */
}

.top-bar .description {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 3px;
}

/* PhotoSwipe 图片保护样式 - 禁止右键保存和长按下载 */
.pswp__img {
    /* 禁止选择文本和图片 */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    /* 禁止拖拽 */
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    user-drag: none !important;
    /* 禁止长按弹出菜单（移动端） */
    -webkit-touch-callout: none !important;
    /* 禁止图片上下文菜单 */
    pointer-events: auto !important;
}

/* PhotoSwipe 容器也应用保护 */
.pswp__item {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* PhotoSwipe 自定义样式 - 确保计数器和关闭按钮正确显示 */
.pswp__counter {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    z-index: 2000 !important;
    text-align: center !important;
    min-width: 60px !important;
}

/* 确保关闭按钮在右上角显示 */
.pswp__button--close {
    position: fixed !important;
    top: 100px !important; /* 往下移动，避免与顶部栏重叠 */
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border-radius: 50% !important;
    z-index: 2000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
}

.pswp__button--close:hover {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(1.1) !important;
}

.pswp__button--close::before {
    content: '×' !important;
    color: white !important;
    font-size: 32px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .pswp__counter {
        bottom: 15px !important;
        font-size: 14px !important;
        padding: 6px 12px !important;
    }

    .pswp__button--close {
        top: 100px !important; /* 移动端也往下移动，避免与顶部栏重叠 */
        right: 15px !important;
        width: 40px !important;
        height: 40px !important;
    }

    .pswp__button--close::before {
        font-size: 28px !important;
    }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .top-bar {
        padding: 10px 15px;
    }

    .top-bar h1 {
        font-size: 1.2rem;
        display: none; /* 移动端也隐藏标题数字 */
    }

    .top-bar .description {
        display: none;
    }
    
    /* 移动端箭头更小 */
    .custom-hotspot {
        --arrow-size: 28px; /* 移动端默认图标更小 */
        min-width: 28px;
        min-height: 28px;
        max-width: 56px; /* 移动端限制容器最大宽度 */
        max-height: 56px; /* 移动端限制容器最大高度 */
    }
}

/* 热点容器（父级由 Pannellum 控制 transform，因此不要在此设置 transform） */
.custom-hotspot {
    width: auto;
    height: auto;
    min-width: 40px; /* 默认图标更小 */
    min-height: 40px; /* 默认图标更小 */
    max-width: 80px; /* 限制容器最大宽度，防止图标占满屏幕 */
    max-height: 80px; /* 限制容器最大高度，防止图标占满屏幕 */
    border: none;
    cursor: pointer;
    transition: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 让子元素拥有 3D 透视空间 */
    perspective: 800px;
    transform-style: preserve-3d;
    /* 使用CSS变量控制箭头大小，实现自适应 */
    --arrow-size: 40px; /* 默认图标更小 */
}

/* 贴地箭头（放在父级内部，所有透视与旋转都放在子元素，避免被父级 transform 覆盖） */
.custom-hotspot .hotspot-arrow {
    width: var(--arrow-size, 40px); /* 使用CSS变量，默认40px */
    height: var(--arrow-size, 40px); /* 使用CSS变量，默认40px */
    background-image: url('/images/icons/arrow.png'); /* 确保该图片存在 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    transform-origin: center center;
    /* 默认贴地，Z 轴朝向通过 CSS 变量或 JS 设置，箭头图片本身朝右，需要旋转-90度指向前方 */
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg));
}

.custom-hotspot:hover .hotspot-arrow {
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg)) scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 前进箭头图标样式 */
.custom-hotspot .hotspot-arrow-forward {
    width: var(--arrow-size, 40px); /* 默认40px，更小 */
    height: var(--arrow-size, 40px); /* 默认40px，更小 */
    background-image: url('/images/icons/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    transform-origin: center center;
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg));
}

/* PC端前进箭头更大 */
@media (min-width: 769px) {
    .custom-hotspot .hotspot-arrow-forward {
        width: 60px; /* PC端更大 */
        height: 60px; /* PC端更大 */
    }
}

.custom-hotspot:hover .hotspot-arrow-forward {
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg)) scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 左斜前箭头图标样式 */
.custom-hotspot .hotspot-arrow-left {
    width: var(--arrow-size, 40px); /* 默认40px，更小 */
    height: var(--arrow-size, 40px); /* 默认40px，更小 */
    background-image: url('/images/icons/左斜前.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    transform-origin: center center;
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg));
}

.custom-hotspot:hover .hotspot-arrow-left {
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg)) scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 右斜前箭头图标样式 */
.custom-hotspot .hotspot-arrow-right {
    width: var(--arrow-size, 40px); /* 默认40px，更小 */
    height: var(--arrow-size, 40px); /* 默认40px，更小 */
    background-image: url('/images/icons/右斜前.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    transform-origin: center center;
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg));
}

.custom-hotspot:hover .hotspot-arrow-right {
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg)) scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 返回箭头图标样式 - 完全复制前进箭头的样式，只改变图标 */
.custom-hotspot .hotspot-arrow-back {
    width: var(--arrow-size, 40px); /* 默认40px，更小 */
    height: var(--arrow-size, 40px); /* 默认40px，更小 */
    background-image: url('/images/icons/返回.png'); /* 使用返回图标 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    will-change: transform;
    transform-origin: center center;
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg));
}

/* PC端返回箭头更大 */
@media (min-width: 769px) {
    .custom-hotspot .hotspot-arrow-back {
        width: 60px; /* PC端更大 */
        height: 60px; /* PC端更大 */
    }
}

.custom-hotspot:hover .hotspot-arrow-back {
    transform: rotateX(70deg) rotateZ(calc(var(--yaw-rot, 0deg) - 90deg)) scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 点击图标样式 - 改为忽闪忽闪的小点 */
.custom-hotspot .hotspot-click {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffffff;
    display: block;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 16px rgba(255, 255, 255, 0.4);
    /* 闪烁动画 */
    animation: blink-dot 1.5s ease-in-out infinite;
    transform-origin: center center;
    /* 点击图标平面展示，不需要3D效果 */
    transform: none;
}

/* 闪烁动画定义 */
@keyframes blink-dot {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.custom-hotspot:hover .hotspot-click {
    animation: blink-dot 0.8s ease-in-out infinite;
    /* box-shadow 颜色通过内联样式控制，这里只设置默认值 */
    box-shadow: 0 0 12px rgba(255, 255, 255, 1), 0 0 24px rgba(255, 255, 255, 0.6);
}

/* 图片图标样式 */
.custom-hotspot .hotspot-gallery {
    width: var(--arrow-size, 40px); /* 使用CSS变量，随FOV缩放 */
    height: var(--arrow-size, 40px); /* 使用CSS变量，随FOV缩放 */
    background-color: #ffffff; /* 默认白色，可通过内联样式覆盖 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: calc(var(--arrow-size, 40px) * 0.3); /* 字体大小随图标大小缩放 */
    will-change: transform;
    transform-origin: center center;
    transform: none;
}

.custom-hotspot:hover .hotspot-gallery {
    transform: scale(1.12);
    filter: brightness(1.12);
    transition: transform 0.15s, filter 0.15s;
}

/* 隐藏 Pannellum 自带的加载界面 */
.pnlm-load-box,
.pnlm-lbox,
.pnlm-load-button,
#loading,
.loading {
    display: none !important;
}

/* 场景淡入淡出动画 */
#panorama {
    transition: opacity 0.9s ease-in-out;
}

#panorama.fade-out {
    opacity: 0;
}

#panorama.fade-in {
    opacity: 1;
}

/* 箭头图片样式 */
.circular-arrow-icon {
    width: 40px;
    height: 40px;
    background-image: url('/images/icons/arrow.png'); /* 请将您的箭头图片命名为arrow.png并放入此路径 */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.circular-arrow-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* 图片展示模态框样式 - 左右轮播 */
.image-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
}

.image-gallery-modal[style*="display: block"] {
    display: flex;
}

.image-gallery-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000;
    cursor: default;
}

.gallery-header {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

.gallery-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: opacity 0.3s;
}

.gallery-close:hover {
    opacity: 0.7;
}

.gallery-content {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Viewer.js 图片容器样式 */
.gallery-viewer-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-viewer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-viewer-list li {
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    box-sizing: border-box;
}

.gallery-viewer-list li img {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
    z-index: 100;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 40px;
}

.gallery-nav.next {
    right: 40px;
}

.gallery-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Viewer.js 自定义样式覆盖 */
.viewer-container {
    background: rgba(0, 0, 0, 0.95) !important;
}

.viewer-toolbar {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* 隐藏Viewer.js的工具栏，使用我们自己的导航 */
.viewer-toolbar {
    display: none !important;
}

.gallery-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.gallery-indicator.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .gallery-header {
        padding: 12px 20px;
    }

    .gallery-nav {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .gallery-nav.prev {
        left: 15px;
    }

    .gallery-nav.next {
        right: 15px;
    }

    .gallery-item {
        padding: 20px;
    }

    .gallery-item img {
        max-width: 95vw;
        max-height: 80vh;
    }

    .gallery-indicators {
        bottom: 60px;
    }
}

/* 视频播放模态框样式 */
.video-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-player-container {
    width: auto; /* 改为自动，根据内容计算 */
    height: auto; /* 改为自动，根据内容计算 */
    max-width: 90vw; /* 最大宽度不超过视口90% */
    max-height: 90vh; /* 最大高度不超过视口90% */
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.video-header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
    z-index: 10;
}

.video-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.video-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s;
}

.video-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-content-wrapper {
    width: 100%; /* 宽度跟随容器 */
    display: flex;
    align-items: flex-start; /* 改为顶部对齐，避免上下空白 */
    justify-content: center;
    position: relative;
    background: #000;
    overflow: visible; /* 改为visible，让视频控制栏可以显示 */
    border-radius: 0; /* 移除底部圆角，因为按钮区域会有圆角 */
}

.video-content {
    width: 100%;
    display: flex;
    align-items: flex-start; /* 改为顶部对齐 */
    justify-content: center;
    padding: 0 20px 70px 20px; /* 增加底部padding，为视频控制栏和按钮区域留出空间 */
    overflow: visible; /* 改为visible，让控制栏可以显示 */
    box-sizing: border-box;
}

.video-content video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* 保持宽高比，完整显示视频 */
}

/* Plyr播放器样式优化 - PC端和移动端统一 */
.video-content .plyr {
    width: 100%;
    height: auto; /* 改为auto，让高度自适应内容 */
    display: flex !important;
    flex-direction: column !important;
}

.video-content .plyr__video-wrapper {
    width: 100%;
    height: auto; /* 改为auto，让高度自适应视频 */
    position: relative;
    flex: 0 0 auto; /* 不拉伸，根据内容确定高度 */
    order: 1 !important; /* 视频在上 */
}

.video-content .plyr__video {
    width: 100%;
    height: auto; /* 改为auto，让高度自适应 */
    display: block;
}

/* 确保Plyr控制栏在视频下方，不遮挡视频 - PC端和移动端统一 */
.video-content .plyr__controls {
    position: relative !important; /* 改为相对定位，在正常流中 */
    background: rgba(0, 0, 0, 0.8) !important; /* 不透明背景，更清晰 */
    margin-top: 5px !important; /* 与视频保持一点间距 */
    flex: 0 0 auto !important; /* 不拉伸，固定高度 */
    order: 2 !important; /* 控制栏在下 */
    transform: none !important; /* 移除任何变换 */
    bottom: auto !important; /* 移除底部定位 */
    left: auto !important; /* 移除左侧定位 */
    right: auto !important; /* 移除右侧定位 */
}

.video-nav-buttons {
    position: relative; /* 改为相对定位，在正常流中 */
    display: flex;
    align-items: center;
    justify-content: space-between; /* 左右按钮分别靠两边 */
    padding: 15px 30px; /* 上下内边距，让按钮在视频窗口外面 */
    background: #000; /* 背景色与容器一致 */
    border-radius: 0 0 10px 10px; /* 底部圆角 */
    pointer-events: none;
    z-index: 100;
}

.video-nav {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s;
    z-index: 100;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.video-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-nav.prev,
.video-nav.next {
    /* 移除左右定位，使用flex布局居中 */
}

/* 移动端视频播放器优化（针对长条视频） */
@media (max-width: 768px) {
    .video-player-container {
        max-width: 100vw; /* 移动端使用全屏宽度 */
        max-height: 100vh; /* 移动端使用全屏高度 */
        border-radius: 0; /* 移动端去掉圆角，使用全屏 */
    }

    .video-header {
        padding: 8px 12px; /* 减小内边距 */
        border-radius: 0; /* 移动端去掉圆角 */
    }

    .video-title {
        font-size: 0.85rem; /* 移动端缩小标题字体 */
        font-weight: 500;
        overflow: hidden; /* 防止标题过长 */
        text-overflow: ellipsis; /* 超出部分显示省略号 */
        white-space: nowrap; /* 单行显示 */
        max-width: calc(100vw - 80px); /* 限制标题最大宽度，为关闭按钮留空间 */
    }

    .video-close {
        font-size: 1.2rem; /* 移动端缩小关闭按钮 */
        padding: 3px 8px; /* 减小内边距 */
        min-width: 32px; /* 设置最小宽度，确保点击区域 */
        min-height: 32px;
    }

    .video-content-wrapper {
        border-radius: 0; /* 移动端去掉圆角 */
    }

    .video-content {
        padding: 0 10px 10px 10px; /* 移动端减小底部内边距，控制栏会在视频下方 */
        display: flex;
        flex-direction: column;
    }

    .video-content video {
        max-width: 100%;
        max-height: calc(100vh - 200px); /* 减去标题栏、控制栏和按钮区域高度 */
        width: auto;
        height: auto;
    }

    /* 移动端Plyr控制栏优化 - 确保在视频下方，不遮挡 */
    .video-content .plyr {
        display: flex !important;
        flex-direction: column !important;
    }

    .video-content .plyr__video-wrapper {
        order: 1 !important; /* 视频在上 */
        flex: 0 0 auto !important;
        position: relative !important;
    }

    .video-content .plyr__controls {
        order: 2 !important; /* 控制栏在下 */
        position: relative !important; /* 强制相对定位，不覆盖视频 */
        margin-top: 5px !important; /* 与视频保持一点间距 */
        background: rgba(0, 0, 0, 0.9) !important; /* 不透明背景 */
        transform: none !important; /* 移除任何变换 */
        bottom: auto !important; /* 移除底部定位 */
        left: auto !important; /* 移除左侧定位 */
        right: auto !important; /* 移除右侧定位 */
    }

    /* 确保Plyr容器不覆盖视频 */
    .video-content .plyr__poster {
        position: absolute;
    }

    /* 移动端进度条优化 - 增大触摸区域 */
    .video-content .plyr__progress {
        height: 8px !important; /* 增加进度条高度 */
        margin: 12px 0 !important; /* 增加上下边距，扩大触摸区域 */
        min-height: 32px !important; /* 最小触摸区域高度（iOS推荐44px，这里32px） */
        padding: 12px 0 !important; /* 增加上下内边距，扩大触摸区域 */
    }

    .video-content .plyr__progress__container {
        height: 8px !important; /* 容器高度 */
        padding: 12px 0 !important; /* 增加上下内边距，扩大触摸区域 */
        margin: 0 !important;
        min-height: 32px !important; /* 最小触摸区域 */
        display: flex !important;
        align-items: center !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3) !important; /* 触摸反馈 */
    }

    .video-content .plyr__progress__buffer,
    .video-content .plyr__progress__played {
        height: 8px !important; /* 进度条高度 */
    }

    .video-content .plyr__progress__container::before {
        height: 8px !important; /* 背景高度 */
    }

    /* 进度条滑块（拖拽点）增大触摸区域 */
    .video-content .plyr__progress__container::after {
        width: 20px !important; /* 滑块宽度 */
        height: 20px !important; /* 滑块高度 */
        margin-top: -6px !important; /* 居中显示 */
        margin-left: -10px !important; /* 居中显示 */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important; /* 增加可见性 */
    }

    .video-content .plyr__progress__container:hover::after,
    .video-content .plyr__progress__container:active::after {
        width: 24px !important; /* 悬停/触摸时更大 */
        height: 24px !important;
        margin-top: -8px !important;
        margin-left: -12px !important;
    }

    /* 确保进度条整个区域都可以触摸 */
    .video-content .plyr__progress__container * {
        pointer-events: auto !important;
    }

    .video-nav-buttons {
        padding: 12px 20px; /* 移动端上下和左右内边距 */
        border-radius: 0; /* 移动端去掉圆角 */
    }

    .video-nav {
        width: 40px; /* 移动端缩小按钮尺寸 */
        height: 40px;
        font-size: 1.2rem; /* 移动端缩小按钮内文字 */
        background: rgba(255, 255, 255, 0.15); /* 稍微增加透明度，更明显 */
    }

    .video-nav:hover,
    .video-nav:active {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05); /* 移动端减小悬停放大效果 */
    }
}

/* 超小屏幕优化（针对竖屏长条视频） */
@media (max-width: 480px) {
    .video-header {
        padding: 6px 10px; /* 进一步减小内边距 */
    }

    .video-title {
        font-size: 0.75rem; /* 超小屏幕进一步缩小标题 */
        max-width: calc(100vw - 70px);
    }

    .video-close {
        font-size: 1rem;
        padding: 2px 6px;
        min-width: 28px;
        min-height: 28px;
    }

    .video-content {
        padding: 0 5px 5px 5px; /* 超小屏幕减小底部内边距 */
    }

    .video-content video {
        max-height: calc(100vh - 190px); /* 超小屏幕减去标题栏、控制栏和按钮区域高度 */
    }

    /* 超小屏幕Plyr控制栏优化 */
    .video-content .plyr__controls {
        margin-top: 3px; /* 减小间距 */
    }

    /* 超小屏幕进度条进一步优化 */
    .video-content .plyr__progress {
        height: 10px !important; /* 超小屏幕进一步增加高度 */
        margin: 14px 0 !important; /* 增加边距 */
        min-height: 40px !important; /* 超小屏幕更大的触摸区域 */
        padding: 15px 0 !important; /* 增加内边距 */
    }

    .video-content .plyr__progress__container {
        height: 10px !important;
        padding: 15px 0 !important; /* 增加内边距，扩大触摸区域 */
        min-height: 40px !important; /* 更大的触摸区域 */
    }

    .video-content .plyr__progress__buffer,
    .video-content .plyr__progress__played {
        height: 10px !important;
    }

    .video-content .plyr__progress__container::before {
        height: 10px !important;
    }

    .video-content .plyr__progress__container::after {
        width: 28px !important; /* 超小屏幕滑块更大 */
        height: 28px !important;
        margin-top: -9px !important;
        margin-left: -14px !important;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4) !important;
    }

    .video-content .plyr__progress__container:hover::after,
    .video-content .plyr__progress__container:active::after {
        width: 32px !important; /* 触摸时更大 */
        height: 32px !important;
        margin-top: -11px !important;
        margin-left: -16px !important;
    }

    .video-nav {
        width: 35px; /* 超小屏幕进一步缩小按钮 */
        height: 35px;
        font-size: 1rem;
    }

    .video-nav-buttons {
        padding: 10px 15px; /* 超小屏幕上下和左右内边距 */
    }
}

/* 底部导航栏样式 */
.panorama-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent; /* 去掉黑色背景 */
    backdrop-filter: none; /* 去掉背景模糊效果 */
    -webkit-backdrop-filter: none; /* iOS Safari支持 */
    padding: 15px 10px;
    z-index: 999;
    box-shadow: none; /* 去掉阴影 */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* PC端显示滚动条 */
@media (min-width: 769px) {
    .panorama-nav-bar {
        /* PC端显示滚动条 */
        scrollbar-width: thin; /* Firefox - 显示细滚动条 */
        scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1); /* Firefox - 滚动条颜色 */
        -ms-overflow-style: auto; /* IE/Edge - 显示滚动条 */
    }

    .panorama-nav-bar::-webkit-scrollbar {
        display: block;
        height: 6px; /* PC端滚动条高度 */
    }

    .panorama-nav-bar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 3px;
    }

    .panorama-nav-bar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4);
        border-radius: 3px;
    }

    .panorama-nav-bar::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.6);
    }
}

/* 移动端隐藏滚动条但保持滚动功能 */
@media (max-width: 768px) {
    .panorama-nav-bar {
        /* 移动端隐藏滚动条 */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }

    .panorama-nav-bar::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Opera - 移动端隐藏 */
    }
}

.panorama-nav-list {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0 10px;
    min-width: max-content;
    justify-content: center;
}

.panorama-nav-item {
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.panorama-nav-item:hover {
    transform: translateY(-3px);
}

.panorama-nav-item.active {
    position: relative;
}

.panorama-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: #4CAF50;
    border-radius: 2px;
}

.panorama-nav-thumbnail {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    display: none; /* 默认隐藏，加载成功后显示 */
    position: absolute;
    top: 0;
    left: 0;
}

.panorama-nav-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.7rem;
    border: 2px solid rgba(255,255,255,0.2);
    font-weight: 500;
}

.panorama-nav-item.active .panorama-nav-thumbnail {
    border-color: #4CAF50;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.panorama-nav-item:hover .panorama-nav-thumbnail {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

/* 编号标签样式（显示在图片底部） */
.panorama-nav-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7); /* 恢复透明黑色背景 */
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
    border-radius: 0 0 8px 8px;
    z-index: 10;
    line-height: 1.2;
}

.panorama-nav-item.active .panorama-nav-number {
    background: rgba(76, 175, 80, 0.8); /* 激活状态使用绿色背景 */
    color: white;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .panorama-nav-bar {
        padding: 10px 5px;
        /* 移动端增加底部安全区域适配（iPhone X等有底部横条） */
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        /* 移动端优化滚动性能 */
        -webkit-overflow-scrolling: touch;
        /* 移动端防止滚动时出现橡皮筋效果 */
        overscroll-behavior-x: contain;
    }

    .panorama-nav-list {
        gap: 8px;
        padding: 0 5px;
        /* 移动端优化滚动 */
        scroll-behavior: smooth;
    }

    .panorama-nav-item {
        /* 移动端增大触摸区域 */
        padding: 5px;
        min-width: 80px;
        /* 移动端优化触摸反馈 */
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
        tap-highlight-color: rgba(255, 255, 255, 0.1);
    }

    .panorama-nav-item:active {
        /* 移动端按下时的反馈效果 */
        transform: scale(0.95);
        opacity: 0.8;
    }

    /* 移动端缩略图容器 */
    .panorama-nav-item > div:first-child {
        width: 65px;
        height: 48px;
        margin: 0 auto;
    }
    
    .panorama-nav-thumbnail {
        border-radius: 6px;
    }
    
    .panorama-nav-placeholder {
        border-radius: 6px;
        font-size: 0.65rem;
    }

    .panorama-nav-number {
        font-size: 0.65rem;
        padding: 3px 0;
    }

    /* 移动端当前项指示器更明显 */
    .panorama-nav-item.active::after {
        height: 2px;
        width: 70%;
    }

    /* 移动端隐藏hover效果（移动端没有hover） */
    .panorama-nav-item:hover {
        transform: none;
    }

    .panorama-nav-item:hover .panorama-nav-thumbnail {
        transform: none;
        border-color: rgba(255, 255, 255, 0.3);
    }
}

/* 超小屏幕优化（iPhone SE等） */
@media (max-width: 375px) {
    .panorama-nav-bar {
        padding: 8px 3px;
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }

    .panorama-nav-list {
        gap: 6px;
        padding: 0 3px;
    }

    .panorama-nav-item {
        min-width: 70px;
        padding: 4px;
    }

    .panorama-nav-thumbnail {
        width: 60px;
        height: 45px;
    }

    .panorama-nav-number {
        font-size: 0.6rem;
        padding: 2px 0;
    }
}

/* 确保全景图容器不被底部导航栏遮挡 */
#panorama {
    padding-bottom: 100px;
}

@media (max-width: 768px) {
    #panorama {
        /* 移动端根据导航栏实际高度调整，确保不被遮挡 */
        padding-bottom: 85px;
        /* 移动端考虑安全区域 */
        padding-bottom: calc(85px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 375px) {
    #panorama {
        /* 超小屏幕进一步调整 */
        padding-bottom: 80px;
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}
    