/* Assembly Scene Styles */

#assembly-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10;
    display: none;
}

#assembly-container.active {
    display: flex;
}

.assembly-layout {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    padding: 10px;
    gap: 10px;
    box-sizing: border-box;
}

/* 左侧：仓库面板 */
.warehouse-panel {
    flex: 0 0 30%;
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 8px;
    overflow-y: auto;
    box-sizing: border-box;
    min-width: 0;
}

.warehouse-panel h3 {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    margin: 0 0 8px 0;
    text-align: center;
    font-size: 16px;
    text-shadow: 0 0 8px #00ff00;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

/* 中间：机器人面板 */
.robot-panel {
    flex: 0 0 40%;
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
}

.robot-diagram {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #00aa00;
    background: rgba(0, 40, 0, 0.5);
}

#robot-canvas {
    display: block;
}

.robot-inventory-section {
    flex: 0 0 auto;
}

.robot-inventory-section h4 {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    margin: 0 0 6px 0;
    font-size: 14px;
    text-shadow: 0 0 8px #00ff00;
}

.robot-inv-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

/* 右侧：Instructions面板 */
.instructions-panel {
    flex: 0 0 30%;
    background: rgba(0, 20, 0, 0.9);
    border: 2px solid #00ff00;
    padding: 8px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-width: 0;
}

.instructions-panel h3 {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    margin: 0 0 8px 0;
    text-align: center;
    font-size: 16px;
    text-shadow: 0 0 8px #00ff00;
}

.instructions-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
    padding-right: 8px;
    word-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

.instruction-item {
    margin-bottom: 12px;
    padding: 6px;
    background: rgba(0, 80, 0, 0.2);
    border-left: 2px solid #00aa00;
}

.instruction-item .inst-title {
    font-weight: bold;
    color: #00ff00;
    margin-bottom: 5px;
}

.instruction-item .inst-text {
    color: #00dd00;
    white-space: pre-wrap;
}

/* Departure按钮 */
.departure-btn {
    margin-top: 8px;
    padding: 10px 20px;
    background: #00aa00;
    color: #000;
    border: 2px solid #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: none;
    box-shadow: 0 0 15px #00ff00;
    transition: all 0.2s;
}

.departure-btn:hover {
    background: #00ff00;
    box-shadow: 0 0 30px #00ff00;
    transform: scale(1.05);
}

.departure-btn:active {
    transform: scale(0.95);
}

/* 物品格子通用样式 */
.item-grid {
    width: 100%;
}

.item-slot {
    aspect-ratio: 1;
    background: rgba(0, 40, 0, 0.3);
    border: 1px solid #00aa00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.item-slot:hover {
    background: rgba(0, 80, 0, 0.5);
    border-color: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.item-slot.has-item {
    background: rgba(0, 100, 0, 0.4);
    border-color: #00ff00;
}

.item-slot.dragging {
    opacity: 0.5;
}

.item-slot .item-icon {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.item-slot .item-label {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 3px #000;
    background: rgba(0, 0, 0, 0.7);
    padding: 1px;
}

/* 拖拽状态 */
.drag-preview {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0.8;
    width: 50px;
    height: 50px;
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scrollbar样式 */
.instructions-scroll::-webkit-scrollbar,
.warehouse-panel::-webkit-scrollbar {
    width: 8px;
}

.instructions-scroll::-webkit-scrollbar-track,
.warehouse-panel::-webkit-scrollbar-track {
    background: rgba(0, 40, 0, 0.5);
}

.instructions-scroll::-webkit-scrollbar-thumb,
.warehouse-panel::-webkit-scrollbar-thumb {
    background: #00aa00;
    border-radius: 4px;
}

.instructions-scroll::-webkit-scrollbar-thumb:hover,
.warehouse-panel::-webkit-scrollbar-thumb:hover {
    background: #00ff00;
}

