.scene-hierarchy { display: flex; flex-direction: column; width: 100%; height: 100%; background-color: #2a2a2a; color: #e0e0e0; } .scene-hierarchy.outliner { font-size: 12px; } /* ==================== Toolbar ==================== */ .outliner-toolbar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #333; border-bottom: 1px solid #1a1a1a; flex-shrink: 0; } .outliner-toolbar-left { display: flex; align-items: center; } .outliner-filter-btn { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: #3a3a3a; border: 1px solid #4a4a4a; border-radius: 3px; color: #ccc; cursor: pointer; transition: all 0.15s ease; } .outliner-filter-btn:hover { background: #444; border-color: #555; } .outliner-search { flex: 1; display: flex; align-items: center; gap: 6px; padding: 4px 10px; background: #3a3a3a; border: 1px solid #4a4a4a; border-radius: 3px; } .outliner-search svg { color: #888; flex-shrink: 0; } .outliner-search input { flex: 1; background: transparent; border: none; outline: none; color: #e0e0e0; font-size: 12px; } .outliner-search input::placeholder { color: #666; } .outliner-search .search-dropdown { color: #666; cursor: pointer; } .search-clear-btn { display: flex; align-items: center; justify-content: center; padding: 2px; background: transparent; border: none; color: #888; cursor: pointer; border-radius: 2px; transition: all 0.15s ease; } .search-clear-btn:hover { background: rgba(255, 255, 255, 0.1); color: #fff; } .outliner-toolbar-right { display: flex; align-items: center; gap: 4px; } .outliner-action-btn { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: #3a3a3a; border: 1px solid #4a4a4a; border-radius: 3px; color: #ccc; cursor: pointer; transition: all 0.15s ease; } .outliner-action-btn:hover { background: #444; border-color: #555; color: #fff; } /* ==================== Column Header ==================== */ .outliner-header { display: flex; align-items: center; height: 24px; padding: 0 8px; background: #333; border-bottom: 1px solid #1a1a1a; flex-shrink: 0; font-size: 11px; color: #999; } .outliner-header-icons { display: flex; align-items: center; gap: 6px; padding-right: 6px; border-right: 1px solid #444; margin-right: 6px; flex-shrink: 0; } .header-icon { color: #666; cursor: pointer; transition: color 0.15s ease; } .header-icon:hover { color: #999; } .outliner-header-label { flex: 1; display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; padding: 2px 4px; border-radius: 2px; transition: background 0.15s ease; } .outliner-header-label:hover { background: rgba(255, 255, 255, 0.05); } .outliner-header-label.sorted { color: #e0e0e0; } .outliner-header-type { width: 80px; min-width: 60px; flex-shrink: 0; display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; padding: 2px 4px; border-radius: 2px; transition: background 0.15s ease; } .outliner-header-type:hover { background: rgba(255, 255, 255, 0.05); } .outliner-header-type.sorted { color: #e0e0e0; } .sort-indicator { font-size: 8px; color: #888; } /* ==================== Content Area ==================== */ .outliner-content { flex: 1; overflow-y: auto; overflow-x: hidden; } /* 滚动条样式 | Scrollbar styling */ .outliner-content::-webkit-scrollbar { width: 8px; } .outliner-content::-webkit-scrollbar-track { background: transparent; } .outliner-content::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; } .outliner-content::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); } .outliner-list { padding: 0; margin: 0; } /* ==================== Item Styles ==================== */ .outliner-item { display: flex; align-items: center; height: 22px; padding: 0 8px; cursor: pointer; transition: background 0.1s ease; border-bottom: 1px solid transparent; } .outliner-item:hover { background: rgba(255, 255, 255, 0.05); } .outliner-item.selected { background: #3d5a80; } .outliner-item.selected:hover { background: #4a6a90; } .outliner-item.world-item { background: #333; border-bottom: 1px solid #1a1a1a; } .outliner-item.dragging { opacity: 0.5; background: rgba(74, 158, 255, 0.1); } /* Drop Indicators | 拖放指示器 */ .outliner-item.drop-before { position: relative; } .outliner-item.drop-before::before { content: ''; position: absolute; top: -1px; left: 8px; right: 8px; height: 2px; background: linear-gradient(90deg, #4a9eff 0%, #4a9eff 50%, transparent 50%); background-size: 8px 2px; border-radius: 1px; animation: dropIndicatorPulse 0.8s ease-in-out infinite; } .outliner-item.drop-after { position: relative; } .outliner-item.drop-after::after { content: ''; position: absolute; bottom: -1px; left: 8px; right: 8px; height: 2px; background: linear-gradient(90deg, #4a9eff 0%, #4a9eff 50%, transparent 50%); background-size: 8px 2px; border-radius: 1px; animation: dropIndicatorPulse 0.8s ease-in-out infinite; } .outliner-item.drop-inside { background: rgba(74, 158, 255, 0.15); box-shadow: inset 0 0 0 2px rgba(74, 158, 255, 0.5); border-radius: 4px; } @keyframes dropIndicatorPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .outliner-item.disabled { opacity: 0.5; } .outliner-item-icons { display: flex; align-items: center; gap: 6px; padding-right: 6px; margin-right: 4px; flex-shrink: 0; } .item-icon { color: #666; cursor: pointer; transition: color 0.15s ease; } .item-icon:hover { color: #999; } .item-icon.visibility { color: #888; } .item-icon.visibility:hover { color: #4a9eff; } .item-icon.visibility.hidden { color: #555; opacity: 0.6; } .item-icon.visibility.hidden:hover { color: #4a9eff; opacity: 1; } .outliner-item-content { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; } .outliner-item-expand { width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; color: #888; flex-shrink: 0; } .outliner-item-expand.clickable { cursor: pointer; border-radius: 3px; transition: background 0.15s ease, color 0.15s ease; } .outliner-item-expand.clickable:hover { color: #fff; background: rgba(255, 255, 255, 0.1); } .outliner-item-expand:hover { color: #ccc; } .outliner-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e0e0e0; } .outliner-item.selected .outliner-item-name { color: #fff; } /* 内联重命名输入框 | Inline rename input */ .outliner-item-name-input { flex: 1; min-width: 60px; padding: 1px 4px; margin: -2px 0; background: #1a1a1a; border: 1px solid #3b82f6; border-radius: 2px; color: #fff; font-size: inherit; font-family: inherit; outline: none; } .outliner-item-name-input:focus { box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3); } .outliner-item-type { width: 80px; min-width: 60px; flex-shrink: 0; color: #888; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* Entity Type Icons */ .entity-type-icon { flex-shrink: 0; margin-right: 4px; } .entity-type-icon.world { color: #4a9eff; } .entity-type-icon.folder { color: #dcb67a; } .entity-type-icon.light { color: #ffd700; } .entity-type-icon.atmosphere, .entity-type-icon.cloud, .entity-type-icon.fog { color: #87ceeb; } .entity-type-icon.mesh { color: #9966ff; } .entity-type-icon.player { color: #4ade80; } .entity-type-icon.default { color: #888; } /* ==================== Status Bar ==================== */ .outliner-status { display: flex; align-items: center; height: 22px; padding: 0 12px; background: #2d2d2d; border-top: 1px solid #1a1a1a; flex-shrink: 0; font-size: 11px; color: #888; } /* ==================== Empty State ==================== */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; color: #666; height: 100%; } .empty-icon { color: #444; margin-bottom: 12px; opacity: 0.5; } .empty-hint { font-size: 12px; color: #555; } /* ==================== View Mode Toggle ==================== */ .view-mode-toggle { display: flex; align-items: center; gap: 2px; padding: 2px; background: #3a3a3a; border: 1px solid #4a4a4a; border-radius: 3px; margin-left: 8px; } .mode-btn { display: flex; align-items: center; justify-content: center; width: 24px; height: 20px; padding: 0; background: transparent; border: none; border-radius: 2px; color: #888; cursor: pointer; transition: all 0.15s ease; } .mode-btn:hover { background: rgba(255, 255, 255, 0.1); color: #ccc; } .mode-btn.active { background: #4a9eff; color: #fff; } .remote-indicator { display: flex; align-items: center; padding: 2px 6px; background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.5); border-radius: 3px; color: rgb(16, 185, 129); animation: pulse-green 1.5s ease-in-out infinite; } @keyframes pulse-green { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } } /* ==================== Context Menu ==================== */ .context-menu { background: #2d2d2d; border: 1px solid #444; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); padding: 4px; min-width: 180px; } .context-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; background: transparent; border: none; border-radius: 3px; color: #e0e0e0; font-size: 12px; cursor: pointer; text-align: left; } .context-menu button:hover { background: rgba(255, 255, 255, 0.1); } .context-menu-divider { height: 1px; background: #444; margin: 4px 0; } .context-menu-item-with-submenu { position: relative; } .context-menu-item-with-submenu .submenu-arrow { margin-left: auto; color: #666; } .context-submenu { position: fixed; background: #2d2d2d; border: 1px solid #444; border-radius: 4px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); padding: 4px; min-width: 180px; z-index: 1001; } .context-submenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 10px; background: transparent; border: none; border-radius: 3px; color: #e0e0e0; font-size: 12px; cursor: pointer; text-align: left; } .context-submenu button:hover { background: rgba(255, 255, 255, 0.1); } .context-menu-danger { color: #f87171 !important; } .context-menu-danger:hover { background: rgba(248, 113, 113, 0.15) !important; } /* 快捷键提示 | Shortcut hints */ .context-menu-shortcut { margin-left: auto; font-size: 10px; color: #666; font-family: var(--font-family-mono, 'Consolas', monospace); } /* Prefab Instance Context Menu Styles | 预制体实例右键菜单样式 */ .context-menu-section-header { display: flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 10px; font-weight: 600; color: #60a5fa; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #3b82f6; margin-bottom: 4px; } .context-menu-section-header svg { opacity: 0.8; } .context-menu-highlight { color: #60a5fa !important; font-weight: 500; } .context-menu-highlight:hover { background: rgba(59, 130, 246, 0.2) !important; } .context-menu-warning { color: #fbbf24 !important; } .context-menu-warning:hover { background: rgba(251, 191, 36, 0.15) !important; } .context-menu button:disabled { opacity: 0.4; cursor: not-allowed; } .context-menu button:disabled:hover { background: transparent; } /* ==================== Prefab Edit Mode | 预制体编辑模式 ==================== */ .scene-hierarchy.prefab-edit-mode { border-left: 3px solid #3b82f6; } .prefab-edit-header { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 100%); border-bottom: 1px solid #3b82f6; color: #93c5fd; font-size: 12px; font-weight: 500; } .prefab-edit-header svg { color: #60a5fa; } .outliner-item.prefab-root { background: rgba(59, 130, 246, 0.1); } .outliner-item.prefab-root:hover { background: rgba(59, 130, 246, 0.15); } .entity-type-icon.prefab { color: #60a5fa; } /* ==================== Prefab Instance Indicator | 预制体实例指示器 ==================== */ .outliner-item.prefab-instance { background: rgba(59, 130, 246, 0.05); border-left: 2px solid #3b82f6; } .outliner-item.prefab-instance:hover { background: rgba(59, 130, 246, 0.1); } .outliner-item.prefab-instance.selected { background: rgba(59, 130, 246, 0.2); } .entity-type-icon.prefab-instance { color: #60a5fa; } .prefab-badge { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 6px; font-size: 9px; font-weight: 700; background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); color: white; border-radius: 3px; flex-shrink: 0; } .outliner-item.prefab-instance .outliner-item-name { color: #93c5fd; } .outliner-item.prefab-instance .outliner-item-type { color: #60a5fa; font-style: italic; } /* ==================== Responsive Layout | 响应式布局 ==================== */ /* 使用 container query 在窄面板时隐藏 Type 列 */ /* Use container query to hide Type column in narrow panels */ .scene-hierarchy { container-type: inline-size; container-name: scene-hierarchy; } /* 当面板宽度小于 200px 时隐藏 Type 列和图标列 */ /* Hide Type column and icons column when panel width < 200px */ @container scene-hierarchy (max-width: 200px) { .outliner-header-type, .outliner-item-type, .outliner-header-icons, .outliner-item-icons { display: none; } } /* 当面板宽度小于 280px 时只隐藏 Type 列 */ /* Hide only Type column when panel width < 280px */ @container scene-hierarchy (max-width: 280px) { .outliner-header-type, .outliner-item-type { display: none; } }