Alginate-based copolymers as the solid-state electrolyte for Mg battery