/* 场景构造页面样式 */

/* 场景容器布局 */
.scene-workspace {
    display: flex;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 120px);
    min-height: 600px;
}

/* 3D画布容器 */
.scene-canvas-container {
    flex: 1;
    position: relative;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    min-height: 500px;
}

#sceneCanvas {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 右侧控制面板 */
.scene-control-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 面板通用样式 */
.control-panel {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 人偶控制面板 */
.figure-control-group {
    margin-bottom: 16px;
}

.control-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.color-input-wrapper {
    display: flex;
    gap: 8px;
}

#figureColor {
    width: 60px;
    height: 36px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
}

.text-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scene-btn-primary {
    background: var(--accent-primary);
    color: white;
}

.scene-btn-primary:hover {
    background: #00b8d9;
    transform: translateY(-1px);
}

.scene-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.scene-btn-secondary:hover {
    border-color: var(--accent-primary);
}

.scene-btn-danger {
    background: #ef4444;
    color: white;
}

.scene-btn-danger:hover {
    background: #dc2626;
}

.btn-full {
    width: 100%;
}

.btn-row {
    display: flex;
    gap: 8px;
}

.btn-row .btn {
    flex: 1;
}

/* 姿势按钮组 */
.pose-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pose-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pose-btn:hover {
    border-color: var(--accent-primary);
}

.pose-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* 人偶列表 */
.figure-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.figure-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.figure-item:hover {
    border-color: var(--border-light);
}

.figure-item.active {
    border-color: var(--accent-primary);
    background: rgba(0, 217, 255, 0.1);
}

.figure-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.figure-info {
    flex: 1;
    min-width: 0;
}

.figure-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.figure-pose {
    font-size: 12px;
    color: var(--text-muted);
}

/* 模式切换 */
.mode-switch {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mode-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    border-color: var(--accent-primary);
}

.mode-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* 背景设置 */
.bg-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bg-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bg-option:hover {
    background: var(--bg-primary);
}

.bg-icon {
    font-size: 20px;
}

.bg-option-text {
    font-size: 13px;
    color: var(--text-primary);
}

.hidden {
    display: none;
}

/* 操作按钮区 */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .scene-workspace {
        flex-direction: column;
        height: auto;
    }

    .scene-canvas-container {
        min-height: 400px;
    }

    .scene-control-panel {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .scene-workspace {
        padding: 12px;
    }

    .control-panel {
        padding: 16px;
    }
}

/* 变换按钮组 */
.transform-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.transform-btn {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transform-btn:hover {
    border-color: var(--accent-primary);
}

.transform-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}
