* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    overflow: hidden;
    /* 修复：确保body背景透明，避免遮挡Three.js渲染 */
    background: transparent;
}

#container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 修复：确保容器在最底层 */
    z-index: 1;
}

/* 场景导航 */
#scene-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-arrow {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 24px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin: 0 5px;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-arrow:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow.hidden {
    display: none;
}

.scene-thumbnails {
    display: flex;
    gap: 10px;
}

.scene-thumbnail {
    width: 100px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.scene-thumbnail:hover {
    border-color: #3498db;
}

.scene-thumbnail.active {
    border-color: #2ecc71;
}

.scene-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 热点信息 */
#hotspot-info {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    z-index: 200;
}

#hotspot-info.hidden {
    display: none;
}

.info-content {
    position: relative;
}

.info-title {
    margin-bottom: 10px;
    color: #2c3e50;
}

.info-description {
    color: #34495e;
    margin-bottom: 15px;
    line-height: 1.5;
}

.info-media {
    margin-bottom: 15px;
}

.info-media img {
    max-width: 100%;
    border-radius: 5px;
}

.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* 控制按钮 */
#controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

#controls button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

#controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 热点标记 */
.hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.hotspot:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(-50%, -50%) scale(1.2);
}

.hotspot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #3498db;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* 加载指示器 */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 修改加载指示器背景为半透明，避免全黑 */
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    font-size: 18px;
}

#loading.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .scene-thumbnail {
        width: 80px;
        height: 48px;
    }

    #hotspot-info {
        width: 90%;
        max-width: none;
    }

    #controls button {
        width: 36px;
        height: 36px;
    }

    /* 移动端缩略图导航滑动支持 */
    #scene-nav {
        overflow-x: hidden;
        overflow-y: hidden;
        max-width: 100%;
        white-space: nowrap;
        padding: 10px 5px;
        bottom: 10px;
        display: flex;
        align-items: center;
    }

    .nav-arrow {
        width: 25px;
        height: 25px;
        font-size: 20px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    .nav-arrow:hover {
        transform: scale(1.05);
    }
    
    .nav-arrow:active {
        transform: scale(0.98);
    }

    .scene-thumbnails {
        display: inline-flex;
        flex-wrap: nowrap;
        gap: 8px;
        padding: 5px;
        overflow-x: auto;
        overflow-y: hidden;
        /* 隐藏滚动条但保持功能 */
        -ms-overflow-style: none;
        scrollbar-width: none;
        flex: 1;
    }
    
    .scene-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .scene-thumbnail {
        flex-shrink: 0;
        width: 70px;
        height: 42px;
    }
}