/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#canvas-container {
    width: 100vw;
    height: 100vh;
    cursor: grab;
    position: relative;
}

#canvas-container.dragging {
    cursor: grabbing;
}

/* 信息提示 */
#info {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    z-index: 100;
    pointer-events: none;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    font-size: 14px;
    padding: 0 20px;
}

/* 加载界面 */
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 进度条 */
#progress-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    display: none;
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

#progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 10px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

#progress-text {
    position: absolute;
    top: 30px;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 公司信息 */
#company-info {
    position: fixed;
    left: 20px;
    bottom: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    font-size: 14px;
    font-weight: normal;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    backdrop-filter: blur(5px);
    z-index: 10000;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 音乐控制 */
#music-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 100;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#music-control:hover {
    background-color: rgba(50, 50, 50, 0.8);
    transform: scale(1.1);
}

/* 缩放控制 */
#zoom-controls {
    position: absolute;
    bottom: 80px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    overflow: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.zoom-btn {
    width: 48px;
    height: 48px;
    background-color: rgba(50, 50, 50, 0.8);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background-color: rgba(70, 70, 70, 0.8);
}

.zoom-btn:active {
    background-color: rgba(90, 90, 90, 0.8);
}

/* 展品控制 */
#exhibit-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 12px;
    z-index: 100;
    display: flex;
    gap: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.exhibit-btn {
    padding: 12px 24px;
    background-color: rgba(50, 50, 50, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    transition: all 0.3s ease;
    min-width: 140px;
    font-weight: 500;
}

.exhibit-btn:hover {
    background-color: rgba(70, 70, 70, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.exhibit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.exhibit-btn:active {
    transform: translateY(0);
}

/* 展品信息 */
#exhibit-info {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 100;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    min-width: 200px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 返回按钮 */
#back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 12px 20px;
    background-color: rgba(30, 30, 30, 0.85);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    font-size: 16px;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: none;
}

#back-button:hover {
    background-color: rgba(50, 50, 50, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 隐藏的Canvas */
#text-canvas {
    display: none;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    z-index: 10000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease;
}

.message-error {
    background: #f44336;
    color: white;
}

.message-success {
    background: #4CAF50;
    color: white;
}

.message-info {
    background: #2196F3;
    color: white;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* 移动端优化 */
@media (max-width: 768px) {
    #exhibit-controls {
        top: 10px;
        padding: 8px;
        flex-direction: column;
        gap: 6px;
    }
    
    .exhibit-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 120px;
    }
    
    #exhibit-info {
        bottom: 60px;
        font-size: 12px;
        padding: 8px 16px;
        min-width: 160px;
    }
    
    #company-info {
        font-size: 12px;
        padding: 6px 12px;
        left: 10px;
        bottom: 10px;
    }
    
    #info {
        display: none;
    }

    #loading {
        font-size: 16px;
        padding: 15px 20px;
        width: 80%;
        max-width: 300px;
    }
    
    #music-control {
        width: 44px;
        height: 44px;
        bottom: 15px;
        right: 15px;
    }
    
    #zoom-controls {
        bottom: 70px;
        right: 15px;
    }
    
    .zoom-btn {
        width: 44px;
        height: 44px;
    }
    
    #back-button {
        top: 10px;
        left: 10px;
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #exhibit-info {
        bottom: 50px;
        font-size: 11px;
        min-width: 140px;
        padding: 6px 12px;
    }
    
    #exhibit-controls {
        gap: 4px;
    }
    
    .exhibit-btn {
        min-width: 110px;
        padding: 8px 12px;
        font-size: 11px;
    }

    #company-info {
        font-size: 11px;
        padding: 5px 10px;
        left: 8px;
        bottom: 8px;
        max-width: 200px;
    }
    
    #loading {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    #music-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    #company-info {
        font-size: 11px;
        padding: 4px 8px;
        left: 5px;
        bottom: 5px;
    }
    
    #exhibit-controls {
        top: 5px;
        padding: 6px;
    }
    
    .exhibit-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 100px;
    }
    
    #exhibit-info {
        bottom: 40px;
        font-size: 11px;
        padding: 6px 10px;
    }
    
    #music-control {
        bottom: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    #zoom-controls {
        bottom: 50px;
        right: 10px;
    }
    
    .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* 加载完成后的隐藏 */
.loading-complete #loading,
.loading-complete #progress-container {
    display: none !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 性能优化类 */
.performance-optimized {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .exhibit-btn {
        border-width: 3px;
    }
    
    #exhibit-info {
        border-width: 2px;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .exhibit-btn:hover {
        transform: none;
        background-color: rgba(50, 50, 50, 0.9);
    }
    
    #music-control:hover {
        transform: none;
        background-color: rgba(0, 0, 0, 0.7);
    }
    
    .zoom-btn:hover {
        background-color: rgba(50, 50, 50, 0.8);
    }
}

/* 打印样式 */
@media print {
    #canvas-container,
    #exhibit-controls,
    #music-control,
    #zoom-controls,
    #company-info {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
        overflow: auto;
    }
}
