The goal of this research has been to generalize Density Functional Theory (DFT) for complex molecules, i.e. molecules whose size, shape, and interaction energies cause them to show significant deviations from mean-field behavior. We considered free energy functionals and minimized them for systems with different geometries and dimensionalities including confined fluids (such as molecular layers on surfaces and molecules in nano-scale pores), systems with directional interactions and order-disorder transitions, amphiphilic dimers, block copolymers, and self-assembled nano-structures. The results of this procedure include equations of equilibrium for these systems and the development of computational tools for predicting phase transitions and self-assembly in complex fluids. DFT was developed for confined fluids. A new phenomenon, surface compression of confined fluids, was predicted theoretically and confirmed by existing experimental data and by simulations. The strong attraction to a surface causes adsorbate molecules to attain much higher densities than that of a normal liquid. Under these conditions, adsorbate molecules are so compressed that they repel each other. This phenomenon is discussed in terms of experimental data, results of Monte Carlo simulations, and theoretical models. Lattice version of DFT was developed for modeling phase transitions in adsorbed phase including wetting, capillary condensation, and ordering.