.pinyun-360-view-container {
    position: relative;
    margin: 20px 0;
}

.pinyun-360-view {
    position: relative;
    display: block;
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
    box-sizing: border-box;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.pinyun-360-box {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0 auto;
    box-sizing: border-box;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.pinyun-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    z-index: 1;
}

.pinyun-image-container:active {
    cursor: grabbing;
}

.pinyun-image-container img {
    user-select: none;
    -webkit-user-drag: none;
    max-width: 100%;
    max-height: 100%;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pinyun-controls-position {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    text-align: center;
}
/* 修复小屏幕按钮无效问题 */
.pinyun-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000; /* 确保按钮在最上层 */
    pointer-events: auto; /* 确保按钮可以接收事件 */
}

.pinyun-controls button {
    background: rgba(221, 221, 221, 0.5);
    border: none;
    border-radius: 50%;
    width: 44px; /* 增大按钮尺寸 */
    height: 44px; /* 增大按钮尺寸 */
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto; /* 确保按钮可以接收事件 */
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .pinyun-controls button {
        width: 50px; /* 在移动设备上更大 */
        height: 50px;
    }
    
    .pinyun-controls .dashicons {
        font-size: 24px; /* 在移动设备上图标更大 */
    }
}

.pinyun-controls button:hover {
    color: #fff;
    background: rgba(62, 62, 62, 0.8);
    transform: scale(1.1);
}

.pinyun-controls .dashicons {
    font-size: 22px;
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* 防止图标拦截点击事件 */
}


/* 添加全屏模式下的按钮样式 */
.pinyun-360-view:-webkit-full-screen .pinyun-controls {
    bottom: 20px;
}

.pinyun-360-view:-moz-full-screen .pinyun-controls {
    bottom: 20px;
}

.pinyun-360-view:-ms-fullscreen .pinyun-controls {
    bottom: 20px;
}

.pinyun-360-view:fullscreen .pinyun-controls {
    bottom: 20px;
}

/* 确保加载提示居中 */
.pinyun-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 5;
}

/* 修复触摸事件问题 */
.pinyun-360-view {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* 修复全屏按钮在小屏设备上的问题 */
.pinyun-360-view:fullscreen .pinyun-controls {
    bottom: 30px;
}

.pinyun-360-view:fullscreen .pinyun-controls button {
    width: 50px;
    height: 50px;
}

/* 确保加载提示不会拦截事件 */
.pinyun-loading {
    pointer-events: none;
}