.spaceEdit-container {
    display: flex;
    height: 100%;
    width: 100%;
}

.spaceEdit-canvas-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}

.spaceEdit-canvas-container canvas {
    border: 2px solid #333;
    border-radius: 8px;
    background: #000;
    cursor: crosshair;
}

.spaceEdit-control-panel {
    width: 350px;
    background: rgba(15, 15, 15, 0.95);
    border-left: 2px solid #333;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.spaceEdit-control-panel.collapsed {
    width: 0px;
}

.spaceEdit-control-panel .panel-header {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-bottom: 2px solid #333;
    padding: 15px 20px;
    position: relative;
    z-index: 10;
}

.spaceEdit-control-panel .panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.spaceEdit-control-panel.collapsed .panel-content {
    opacity: 0;
    overflow: hidden;
}

.spaceEdit-control-panel .control-group {
    margin-bottom: 20px;
}

.spaceEdit-control-panel .control-group h6 {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.spaceEdit-control-panel .card {
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
}

.spaceEdit-control-panel .card-body {
    padding: 12px;
}

/* 元素列表項目 */
.element-item {
    background: rgba(40, 40, 40, 0.6);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.element-item:hover {
    background: rgba(50, 50, 50, 0.8);
    border-color: #0d6efd;
}

.element-item.selected {
    background: rgba(13, 110, 253, 0.2);
    border-color: #0d6efd;
}

.element-item-label {
    flex: 1;
    color: #fff;
    font-size: 0.875rem;
}

.element-item-actions {
    display: flex;
    gap: 4px;
}

.element-item-actions .btn {
    padding: 2px 8px;
    font-size: 0.75rem;
}

/* 底圖預覽 */
#backgroundImagePreview {
    margin-top: 10px;
}

#backgroundImagePreviewImg {
    max-width: 100%;
    border: 2px solid #333;
    margin-bottom: 8px;
}

/* 畫布上的元素樣式 */
.canvas-element {
    cursor: pointer;
}

.canvas-element.selected {
    filter: brightness(1.5);
}

.canvas-element-label {
    font-size: 12px;
    fill: #fff;
    pointer-events: none;
}

/* 障礙物頂點摺疊樣式 */
.obstacle-points-collapse {
    transition: all 0.3s ease;
    max-height: 0;
}

.obstacle-points-collapse[style*="display: block"] {
    max-height: 1000px;
}

/* 障礙物頂點項目樣式 */
.obstacle-point-item {
    transition: all 0.2s ease;
    background: rgba(50, 50, 50, 0.3);
}

.obstacle-point-item:hover {
    background: rgba(13, 110, 253, 0.2);
    border: 1px solid #0d6efd;
}

/* Canvas overlay controls - 畫布右上角控制面板 */
.canvas-overlay-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.canvas-overlay-controls:hover {
    opacity: 1;
}

.canvas-overlay-controls > * {
    pointer-events: auto;
}

/* Display controls - 顯示選項控制區域 */
.display-controls {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    padding: 10px 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.display-controls .form-label {
    font-size: 0.625rem;
    color: white;
}

.display-controls .form-range {
    height: 4px;
}

.display-controls .form-control-sm {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.display-controls .form-control-sm:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: none;
}