html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.panorama-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: #000;
}

/* 隐藏陀螺仪方向按钮 */
.pnlm-orientation-button {
    display: none !important;
}

.panorama-fullscreen:fullscreen,
.panorama-fullscreen:-webkit-full-screen,
.panorama-fullscreen:-moz-full-screen,
.panorama-fullscreen:-ms-fullscreen {
    background: #000;
}

/* 确保全景图容器和 UI 元素在全屏时也能正确显示 */
.panorama-fullscreen > #panorama {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

/* 确保所有控制 UI 有足够高的 z-index 来在全屏时显示 */
.panorama-info,
.panorama-actions,
.scene-switch-btn,
.scene-bar,
.share-bottom-btn {
    position: absolute;
    z-index: 1003;
}

.panorama-logo {
    max-height: 32px;
    max-width: 120px;
    object-fit: contain;
    opacity: 0.85;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.panorama-logo:hover {
    opacity: 1;
    transform: scale(1.02);
}

/* 项目信息栏 */
.panorama-info {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1002;
    border-radius: 4px;
    padding: 8px 12px;
    color: #fff;
    font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.panorama-info-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.panorama-separator {
    font-size: 14px;
    opacity: 0.7;
}

.panorama-author {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.panorama-views {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.panorama-views i,
.pano-eye-icon {
    font-size: 11px;
    display: inline-block;
    vertical-align: middle;
}

/* 顶部右侧操作按钮组 - 页面上下居中，与 Pannellum 控件同一列 */
.panorama-actions {
    top: 50%;
    right: 35px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    align-items: center;
    transform: translateY(-50%);
}

.pano-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 26px;
    height: 28px;
    padding: 18px 0;
    margin: 0;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.pano-action-btn .action-icon {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pano-action-btn .action-icon-img {
    width: 25px;
    height: 25px;
    display: block;
    transition: all 0.3s ease;
}

.pano-action-btn .action-count {
    font-size: 12px;
    color: #fff;
    font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
}

/* 点赞按钮 - 已赞状态 */
.pano-action-btn.liked .action-icon-img {
    filter: drop-shadow(0 0 4px rgba(255, 71, 87, 0.5));
    transform: scale(1.1);
}

.pano-action-btn.liked:hover .action-icon-img {
    filter: drop-shadow(0 0 8px rgba(255, 71, 87, 0.7));
    transform: scale(1.15);
}

/* 收藏按钮 - 已收藏状态 */
.pano-action-btn.favorited .action-icon-img {
    filter: drop-shadow(0 0 4px rgba(255, 195, 18, 0.5));
    transform: scale(1.1);
}

.pano-action-btn.favorited:hover .action-icon-img {
    filter: drop-shadow(0 0 8px rgba(255, 195, 18, 0.7));
    transform: scale(1.15);
}

/* 点赞动画 */
.pano-action-btn.liked .action-icon-img {
    animation: likeAnim 0.4s ease;
}

@keyframes likeAnim {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* 背景音乐按钮 - 播放中状态 */
.pano-action-btn.playing .action-icon-img {
    animation: bgmPulse 1.5s ease infinite;
}

@keyframes bgmPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* 分享按钮 - 右下角 */
.share-bottom-btn {
    position: absolute;
    bottom: 26px;
    right: 32px;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}
.share-bottom-icon {
    width: 36px;
    height: 36px;
    display: block;
    opacity: 0.9;
}
.qr-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1003;
    pointer-events: none;
}
.share-bottom-btn.active .qr-popup,
.share-bottom-btn:hover .qr-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.qr-popup-inner {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
}
.qr-popup-img {
    width: 160px;
    height: 160px;
    display: block;
    border-radius: 4px;
    background: #fff;
    padding: 8px;
}
.qr-popup-text {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
    white-space: nowrap;
}

/* ===== BGM 底部播放器 ===== */
.bgm-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.bgm-player.visible {
    transform: translateY(0);
}
.bgm-player-inner {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    max-width: 1000px;
    margin: 0 auto;
    gap: 20px;
}
.bgm-player-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.bgm-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.bgm-btn:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.bgm-btn-play {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
}
.bgm-btn-play:hover {
    background: rgba(255,255,255,0.25);
}
.bgm-player-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bgm-track-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bgm-track-name {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bgm-track-artist {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bgm-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bgm-time {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    font-family: monospace;
    min-width: 36px;
    text-align: center;
    flex-shrink: 0;
}
.bgm-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    transition: height 0.15s;
}
.bgm-progress-bar:hover {
    height: 6px;
}
.bgm-progress-current {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 0;
    position: relative;
    transition: width 0.1s linear;
}
.bgm-progress-thumb {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.bgm-progress-bar:hover .bgm-progress-thumb {
    opacity: 1;
}
.bgm-player-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.bgm-volume-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.bgm-volume-slider {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    border-radius: 6px;
    padding: 12px 8px;
    display: none;
    margin-bottom: 8px;
}
.bgm-volume-slider.visible {
    display: block;
}
.bgm-volume-bar {
    width: 80px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.bgm-volume-current {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 50%;
}
.bgm-volume-thumb {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* BGM 播放列表 */
.bgm-playlist {
    position: absolute;
    bottom: 100%;
    right: 20px;
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    display: none;
}
.bgm-playlist.visible {
    display: block;
}
.bgm-playlist-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bgm-playlist-item:hover {
    background: rgba(255,255,255,0.08);
}
.bgm-playlist-item.active {
    background: rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
}
.bgm-playlist-item-info {
    flex: 1;
    min-width: 0;
}
.bgm-playlist-item-name {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bgm-playlist-item-artist {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}
.bgm-playlist-item-play {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.bgm-playlist-item-play:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}
.bgm-playlist-empty {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}
.bgm-playlist::-webkit-scrollbar {
    width: 4px;
}
.bgm-playlist::-webkit-scrollbar-track {
    background: transparent;
}
.bgm-playlist::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .bgm-player-inner {
        padding: 8px 12px;
        gap: 10px;
    }
    .bgm-track-name {
        max-width: 120px;
        font-size: 12px;
    }
    .bgm-track-artist {
        display: none;
    }
    .bgm-playlist {
        width: 280px;
        right: 10px;
    }
    .bgm-player-right .bgm-btn-list {
        display: none;
    }
}

/* ===== 全景热点标签 — 始终显示 ===== */
.hotspot-sprite .hs-label {
    position: absolute;
    bottom: calc(80% + 2px) !important;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.65) !important;
    color: #fff !important;
    padding: 4px 12px !important;
    border-radius: 4px !important;
    font-size: 12px;
    font-family: '微软雅黑', Arial, sans-serif;
    white-space: nowrap;
    pointer-events: none;
    text-shadow: none;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 热点标签下方小三角指示箭头 */
.hotspot-sprite .hs-label::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.65);
}

/* 移动端热点标签稍小 */
@media (max-width: 768px) {
    .hotspot-sprite .hs-label {
        font-size: 11px;
        padding: 3px 8px !important;
        bottom: calc(100% + 2px);
    }
}

/* ===== 场景切换按钮 ===== */
.scene-switch-btn {
    position: absolute;
    bottom: 26px;
    left: 32px;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.scene-switch-icon {
    width: 36px;
    height: 36px;
    display: block;
    opacity: 0.9;
}

/* ===== 场景切换底部栏 ===== */
.scene-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 80px;
    z-index: 1001;
    background: rgba(29, 33, 41, 0.5);
    padding-block: 8px;
    text-align: center;
    pointer-events: auto;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.scene-bar.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.scene-bar-scroll {
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: auto;
    max-width: 988px;
    padding: 0 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.scene-bar-scroll::-webkit-scrollbar {
    display: none;
}

.scene-thumb {
    display: inline-flex;
    flex-direction: column;
    border-radius: 4px;
    width: 88px;
    height: 88px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid rgb(66 66 66 / 66%);
    transition: border-color 0.25s ease, transform 0.2s ease;
}

.scene-thumb:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.scene-thumb-img,
.scene-thumb-placeholder {
    border-radius: 3px;
    overflow: hidden;
}

.scene-thumb-active {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.scene-thumb-sweep {
    position: absolute;
    inset: -1px;
    border-radius: 5px;
    z-index: 5;
    pointer-events: none;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff, #fff) content-box, linear-gradient(#fff, #fff);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.scene-thumb-sweep-spot {
    position: absolute;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.4) 30%, transparent 70%);
    animation: sceneSweep 2.5s ease-in-out infinite;
}

@keyframes sceneSweep {
    0% { top: 0%; left: 0%; transform: translate(-50%, -50%); }
    25% { top: 0%; left: 100%; transform: translate(-50%, -50%); }
    50% { top: 100%; left: 100%; transform: translate(-50%, -50%); }
    75% { top: 100%; left: 0%; transform: translate(-50%, -50%); }
    100% { top: 0%; left: 0%; transform: translate(-50%, -50%); }
}

.scene-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #1a1a2e;
}

.scene-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    font-weight: 600;
    font-family: Helvetica, Arial, sans-serif;
}

.scene-thumb-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2px 4px;
    background: rgba(29, 33, 41, 0.8);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    height: 22px;
    font-family: Helvetica, "Nimbus Sans L", "Liberation Sans", Arial, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
}

.scene-thumb-active .scene-thumb-label {
    text-indent: 0;
}

.scene-thumb-label-marquee .scene-thumb-label-text {
    display: inline-block;
    white-space: nowrap;
}

.scene-thumb-active .scene-thumb-label-marquee .scene-thumb-label-text {
    padding-left: 100%;
    animation: marqueeText 5s linear infinite;
}

@keyframes marqueeText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 选中图标 - 右上角 */
.scene-thumb-check {
    position: absolute;
    top: -2px;
    right: -2px;
    z-index: 10;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scene-thumb-check-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* 移动端适配 */
@media (max-width: 768px) {
    .panorama-info {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        gap: 2px;
    }
    .panorama-info-row {
        gap: 4px;
    }
    .panorama-author {
        font-size: 12px;
        max-width: 140px;
    }
    .panorama-views {
        font-size: 11px;
    }
    .panorama-separator {
        font-size: 12px;
    }
    .panorama-logo {
        max-height: 24px;
        max-width: 90px;
    }

    .panorama-actions {
        right: 8px;
        gap: 18px;
    }
    .pano-action-btn {
        width: 22px;
        height: 24px;
        padding: 12px 0;
    }
    .pano-action-btn .action-icon {
        width: 20px;
        height: 20px;
    }
    .pano-action-btn .action-icon-img {
        width: 20px;
        height: 20px;
    }
    .pano-action-btn .action-count {
        font-size: 10px;
    }

    .scene-switch-btn {
        bottom: 16px;
        left: 12px;
        width: 30px;
        height: 30px;
    }
    .scene-switch-icon {
        width: 30px;
        height: 30px;
    }

    .share-bottom-btn {
        bottom: 16px;
        right: 12px;
        width: 30px;
        height: 30px;
    }
    .share-bottom-icon {
        width: 30px;
        height: 30px;
    }
    .qr-popup-img {
        width: 120px;
        height: 120px;
        padding: 6px;
    }
    .qr-popup-text {
        font-size: 10px;
    }

    .scene-bar {
        padding-block: 6px;
        bottom: 60px;
    }
    .scene-bar-scroll {
        gap: 6px;
        padding: 0 8px;
        max-width: none;
        justify-content: center;
    }
    .scene-thumb {
        width: 64px;
        height: 64px;
    }
    .scene-thumb-label {
        font-size: 9px;
        line-height: 14px;
        height: 16px;
        padding: 1px 2px;
    }
    .scene-thumb-sweep-spot {
        width: 72px;
        height: 72px;
    }
    .scene-thumb-check {
        width: 16px;
        height: 16px;
    }
    .scene-thumb-check-icon {
        width: 16px;
        height: 16px;
    }

    .bgm-player-inner {
        padding: 8px 12px;
        gap: 10px;
    }
    .bgm-track-name {
        max-width: 120px;
        font-size: 12px;
    }
    .bgm-track-artist {
        display: none;
    }
    .bgm-playlist {
        width: 280px;
        right: 10px;
    }
    .bgm-player-right .bgm-btn-list {
        display: none;
    }
}