.entity-inspector { display: flex; flex-direction: column; height: 100%; background-color: var(--color-bg-base); color: var(--color-text-primary); position: relative; } .inspector-header { display: flex; align-items: center; gap: var(--spacing-sm); height: var(--layout-panel-header); padding: 0 var(--spacing-md); border-bottom: 1px solid var(--color-border-default); background-color: var(--color-bg-elevated); flex-shrink: 0; } .inspector-header-icon { color: var(--color-text-secondary); flex-shrink: 0; } .inspector-header h3 { margin: 0; font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); color: var(--color-text-primary); text-transform: uppercase; letter-spacing: 0.05em; } .inspector-content { flex: 1; overflow-y: scroll; overflow-x: hidden; padding: var(--spacing-md); min-height: 0; } .inspector-content::-webkit-scrollbar { width: 8px; height: 8px; } .inspector-content::-webkit-scrollbar-track { background: var(--color-bg-base); } .inspector-content::-webkit-scrollbar-thumb { background: rgba(121, 121, 121, 0.4); border-radius: 4px; } .inspector-content::-webkit-scrollbar-thumb:hover { background: rgba(100, 100, 100, 0.7); } .inspector-content::-webkit-scrollbar-corner { background: transparent; } .inspector-section { margin-bottom: 20px; padding: 12px; background-color: rgba(255, 255, 255, 0.02); border-radius: 6px; } .inspector-section:last-child { margin-bottom: 0; } .section-header { display: flex; align-items: center; gap: var(--spacing-sm); font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--spacing-sm); padding-bottom: var(--spacing-xs); border-bottom: 1px solid var(--color-border-subtle); } .section-icon { color: var(--color-text-tertiary); flex-shrink: 0; } .section-header span { flex: 1; } .add-component-btn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background-color: var(--color-primary); color: var(--color-text-inverse); border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); } .add-component-btn:hover { background-color: var(--color-primary-hover); transform: scale(1.1); } .add-component-btn:active { transform: scale(0.95); } .section-content { padding: var(--spacing-sm) 0; } .info-row { display: flex; justify-content: space-between; align-items: center; padding: var(--spacing-xs) var(--spacing-sm); font-size: var(--font-size-base); border-radius: var(--radius-sm); transition: background-color var(--transition-fast); } .info-row:hover { background-color: var(--color-bg-hover); } .info-label { color: var(--color-text-secondary); font-weight: var(--font-weight-medium); font-size: var(--font-size-sm); } .info-value { color: var(--color-text-primary); font-size: var(--font-size-sm); font-family: var(--font-family-mono); } .component-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--spacing-sm); min-height: min-content; } .component-item { background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-base) 100%); border: 1px solid var(--color-border-default); border-radius: var(--radius-md); overflow: visible; transition: all var(--transition-base); display: flex; flex-direction: column; min-height: min-content; } .component-item:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); } .component-item.expanded { background: var(--color-bg-overlay); box-shadow: var(--shadow-md); overflow: visible; } .component-header { display: flex; align-items: center; gap: var(--spacing-sm); padding: var(--spacing-sm) var(--spacing-md); cursor: pointer; transition: background-color var(--transition-fast); user-select: none; } .component-header:hover { background-color: var(--color-bg-hover); } .component-expand-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--color-text-secondary); padding: 0; cursor: pointer; transition: all var(--transition-fast); flex-shrink: 0; } .component-expand-btn:hover { color: var(--color-primary); transform: scale(1.1); } .component-icon { display: flex; align-items: center; color: var(--color-text-secondary); flex-shrink: 0; transition: color var(--transition-fast); } .component-item:hover .component-icon, .component-item.expanded .component-icon { color: var(--color-primary); } .component-name { flex: 1; color: var(--color-text-primary); font-size: var(--font-size-base); font-weight: var(--font-weight-medium); } .remove-component-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--color-text-tertiary); padding: var(--spacing-xs); cursor: pointer; border-radius: var(--radius-sm); transition: all var(--transition-fast); flex-shrink: 0; opacity: 0; } .component-header:hover .remove-component-btn { opacity: 1; } .remove-component-btn:hover { background-color: var(--color-error); color: var(--color-text-inverse); transform: scale(1.1); } .remove-component-btn:active { transform: scale(0.95); } .component-properties { border-top: 1px solid var(--color-border-default); background-color: var(--color-bg-base); overflow: visible; } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--spacing-4xl) var(--spacing-lg); text-align: center; color: var(--color-text-secondary); height: 100%; } .empty-icon { color: var(--color-text-tertiary); margin-bottom: var(--spacing-md); opacity: 0.5; } .empty-title { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); color: var(--color-text-secondary); margin-bottom: var(--spacing-xs); } .empty-hint { font-size: var(--font-size-sm); color: var(--color-text-tertiary); } .empty-state-small { padding: var(--spacing-lg); text-align: center; color: var(--color-text-tertiary); font-size: var(--font-size-sm); font-style: italic; } .entity-name { font-size: 14px; font-weight: 600; color: var(--color-text-primary); } .section-title { font-size: 11px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin: -4px -4px 12px -4px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border-subtle); } .property-field { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 6px; font-size: 12px; gap: 16px; background-color: rgba(255, 255, 255, 0.01); border-radius: 4px; margin-bottom: 4px; } .property-field:last-child { margin-bottom: 0; } .property-field:hover { background-color: rgba(255, 255, 255, 0.03); } .property-label { color: var(--color-text-secondary); font-weight: 500; flex-shrink: 0; min-width: 80px; font-size: 12px; } .property-value-text { color: var(--color-text-primary); text-align: right; word-break: break-word; font-size: 12px; flex: 1; } .component-remove-btn { display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--color-text-tertiary); padding: 4px; cursor: pointer; border-radius: 3px; transition: all 0.15s; flex-shrink: 0; opacity: 0; margin-left: auto; } .component-header:hover .component-remove-btn { opacity: 1; } .component-remove-btn:hover { background-color: var(--color-error); color: white; } .empty-inspector { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; height: 100%; } .child-node-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background-color: rgba(255, 255, 255, 0.03); border-radius: 4px; font-size: 12px; transition: background-color 0.15s; cursor: default; } .child-node-item:hover { background-color: rgba(255, 255, 255, 0.05); } .child-node-index { color: #666; min-width: 20px; font-size: 12px; } .child-node-name { color: #ccc; flex: 1; font-size: 12px; } .file-preview-content { background: #1e1e1e; border: 1px solid #3e3e3e; border-radius: 4px; padding: 12px; max-height: 400px; overflow-y: auto; font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 1.6; color: #d4d4d4; white-space: pre-wrap; word-break: break-word; } .file-preview-content::-webkit-scrollbar { width: 10px; } .file-preview-content::-webkit-scrollbar-track { background: #1e1e1e; } .file-preview-content::-webkit-scrollbar-thumb { background: #424242; border-radius: 5px; } .file-preview-content::-webkit-scrollbar-thumb:hover { background: #4e4e4e; } .spin-slow { animation: spin 2s linear infinite; } @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } /* 添加组件菜单样式 */ .section-title-with-action { display: flex; justify-content: space-between; align-items: center; } .component-menu-container { position: relative; } .add-component-trigger { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--color-primary); border: none; border-radius: 4px; color: var(--color-text-inverse); cursor: pointer; font-size: 11px; font-weight: 500; transition: all 0.15s ease; } .add-component-trigger:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3); } .add-component-trigger:active { transform: translateY(0); } .component-dropdown-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999; } .component-dropdown { position: absolute; top: calc(100% + 4px); right: 0; min-width: 220px; max-height: 320px; background: var(--color-bg-elevated); border: 1px solid var(--color-border-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); z-index: 1000; overflow: hidden; animation: dropdownSlide 0.15s ease; } @keyframes dropdownSlide { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } } .component-dropdown-header { padding: 10px 12px; font-size: 11px; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--color-border-default); background: var(--color-bg-base); } .component-dropdown-empty { padding: 16px 12px; text-align: center; color: var(--color-text-tertiary); font-size: 12px; } .component-dropdown-list { max-height: 260px; overflow-y: auto; padding: 4px 0; } .component-dropdown-list::-webkit-scrollbar { width: 6px; } .component-dropdown-list::-webkit-scrollbar-track { background: transparent; } .component-dropdown-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; } .component-dropdown-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); } .component-category-group { margin-bottom: 4px; } .component-category-group:last-child { margin-bottom: 0; } .component-category-label { padding: 6px 12px 4px; font-size: 10px; font-weight: 600; color: var(--color-text-tertiary); text-transform: uppercase; letter-spacing: 0.05em; } .component-dropdown-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 8px 12px; background: transparent; border: none; color: var(--color-text-primary); cursor: pointer; text-align: left; transition: all 0.1s ease; } .component-dropdown-item:hover { background: var(--color-bg-hover); } .component-dropdown-item:active { background: var(--color-primary); } .component-dropdown-item-name { font-size: 12px; font-weight: 500; } .component-dropdown-item-desc { font-size: 10px; color: var(--color-text-tertiary); margin-top: 2px; } /* 组件列表项样式 */ .component-item-card { margin-bottom: 4px; background: var(--color-bg-elevated); border: 1px solid var(--color-border-default); border-radius: 6px; overflow: hidden; transition: all 0.15s ease; } .component-item-card:hover { border-color: var(--color-border-strong); } .component-item-card.expanded { border-color: var(--color-primary); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15); } .component-item-header { display: flex; align-items: center; padding: 8px 10px; background: var(--color-bg-base); cursor: pointer; user-select: none; transition: background 0.1s ease; } .component-item-header:hover { background: var(--color-bg-hover); } .component-expand-icon { display: flex; align-items: center; color: var(--color-text-tertiary); transition: color 0.1s ease; } .component-item-card:hover .component-expand-icon, .component-item-card.expanded .component-expand-icon { color: var(--color-primary); } .component-item-name { flex: 1; margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--color-text-primary); } .component-item-card .component-remove-btn { display: flex; align-items: center; justify-content: center; background: transparent; border: none; color: var(--color-text-tertiary); cursor: pointer; padding: 4px; border-radius: 4px; opacity: 0; transition: all 0.1s ease; } .component-item-header:hover .component-remove-btn { opacity: 1; } .component-item-card .component-remove-btn:hover { background: var(--color-error); color: var(--color-text-inverse); } .component-item-content { padding: 8px 10px; border-top: 1px solid var(--color-border-default); background: var(--color-bg-base); overflow: hidden; min-width: 0; }