Consider a cube with side length 10. Inside the cube, an ellipse is inscribed such that its foci are at the midpoints of two opposite edges of the cube. The major axis of the ellipse is parallel to one of the cube’s edges. If the distance between the foci is 6 units, find the length of the major axis of the ellipse. Let's think step by step and output the final answer within \boxed{}.
user