/* QC编辑器样式 */
.qc-editor-container {
    height: calc(100vh - 120px);
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

.qc-editor {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    text-align: center;
}

.editor-placeholder i {
    color: #dee2e6;
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qcCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    cursor: move;
    border: 1px solid #ddd;
}

.image-container:active {
    cursor: grabbing;
}

#qcCanvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: move;
}

/* 编辑器工具栏 */
.editor-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.editor-toolbar .btn {
    margin: 0;
    min-width: 36px;
}

/* 旋转滑块样式 */
.rotation-slider {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.rotation-slider .form-range {
    width: 100px;
    margin: 4px 0;
}

.rotation-slider .form-label {
    margin-bottom: 2px;
    font-size: 0.75rem;
    color: #6c757d;
}

.rotation-slider small {
    font-size: 0.7rem;
    margin-top: 2px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .editor-toolbar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: 20px;
        top: auto;
        justify-content: center;
    }
    
    .rotation-slider {
        min-width: 100px;
    }
    
    .rotation-slider .form-range {
        width: 80px;
    }
}

/* 叠加层样式 */
.overlay-line {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.overlay-line.vertical {
    width: 2px;
    background-color: #ff0000;
    cursor: ew-resize;
}

.overlay-line.horizontal {
    height: 2px;
    background-color: #ff0000;
    cursor: ns-resize;
}

.overlay-line.clock {
    width: 2px;
    background-color: #00ff00;
    transform-origin: bottom center;
}

.overlay-line.draggable {
    pointer-events: auto;
    opacity: 0.8;
}

.overlay-line.draggable:hover {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(0,0,0,0.5));
}

/* 叠加图片样式 */
.overlay-image {
    position: absolute;
    pointer-events: auto;
    cursor: move;
    border: 2px dashed transparent;
    transition: border-color 0.2s ease;
}

.overlay-image:hover {
    border-color: var(--primary-color);
}

.overlay-image.selected {
    border-color: var(--warning-color);
}

/* 控制点样式 */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border: 1px solid #fff;
    border-radius: 50%;
    cursor: nw-resize;
}

.resize-handle.nw { top: -4px; left: -4px; cursor: nw-resize; }
.resize-handle.ne { top: -4px; right: -4px; cursor: ne-resize; }
.resize-handle.sw { bottom: -4px; left: -4px; cursor: sw-resize; }
.resize-handle.se { bottom: -4px; right: -4px; cursor: se-resize; }

/* 响应式设计 */
@media (max-width: 768px) {
    .qc-editor-container {
        height: calc(100vh - 200px);
    }
    
    .editor-toolbar {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: 20px;
        top: auto;
        text-align: center;
    }
    
    .editor-toolbar .btn-group {
        width: 100%;
        justify-content: center;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .overlay-line {
        min-width: 20px;
        min-height: 20px;
    }
    
    .resize-handle {
        width: 20px;
        height: 20px;
    }
    
    .resize-handle.nw { top: -10px; left: -10px; }
    .resize-handle.ne { top: -10px; right: -10px; }
    .resize-handle.sw { bottom: -10px; left: -10px; }
    .resize-handle.se { bottom: -10px; right: -10px; }
}