pub fn format_duration(seconds: f64) -> String
Formats a duration in seconds to a human-readable string.