.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: auto;
  overflow-x: hidden;
  padding: var(--spacing-md);
  min-height: 0;
}

.inspector-content::-webkit-scrollbar {
  width: 14px;
}

.inspector-content::-webkit-scrollbar-track {
  background: transparent;
}

.inspector-content::-webkit-scrollbar-thumb {
  background: rgba(121, 121, 121, 0.4);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.inspector-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 100, 100, 0.7);
  background-clip: padding-box;
}

.inspector-section {
  margin-bottom: var(--spacing-lg);
}

.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 {
  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;
}
