Main Axis vs. Cross Axis
Every Flexbox layout has two axes. The main axis follows the flex-direction (row = horizontal, column = vertical). The cross axis is perpendicular. This distinction is fundamental: justify-content distributes space along the main axis, while align-itemsaligns along the cross axis. The most common beginner mistake is trying to vertically center with justify-content in a row layout — that property only works horizontally in row mode. Switch to align-items: center for vertical centering in a row container.