Habitat complexity plays a crucial role in shaping the diversity and structure of coral reef fish communities by offering a range of ecological niches for feeding, reproduction, and shelter. This study investigates how different levels of habitat complexity, particularly the presence of supporting habitats such as seagrass beds and mangroves, influence the richness and diversity of coral reef fish communities in Sekotong Bay, Lombok, Indonesia. Data were collected at four stations using the Underwater Visual Census (UVC) method, with observations focusing on habitat parameters, substrate complexity, and anthropogenic activity. Results showed that stations with buffer habitats —mangroves at Station III and seagrass beds at Station IV— exhibited significantly higher species richness and diversity indices compared to other stations. Seagrass beds, in particular, were associated with the highest diversity (H' = 2.95; 42 species), suggesting their key role in maintaining fish community structure. Although Station IV experienced human activity, it still supported a complete community structure, including target fish species, highlighting the ecological buffering capacity of adjacent seagrass habitats. These habitats not only function as nursery grounds and sediment filters but also sustain the ecological balance and resilience of coral reef ecosystems. The study also found that river mouths may negatively affect benthic substrate diversity due to sedimentation unless mitigated by buffer vegetation. Overall, findings underscore the importance of preserving habitat complexity and integrating seagrass and mangrove protection into coastal management strategies to enhance biodiversity, ecosystem stability, and local socio-economic resilience.