With the continuous improvement of life quality, the demand for higher food quality has risen. Traditionally printed information on food packaging, such as production date and shelf life, falls short of assessing food quality and freshness adequately. Visual intelligent packaging can determine the freshness of food by changing colors, but the potential for food contamination due to pH indicator leakages with long response time poses a threat to food safety and quality. Therefore, polymer dyes that exhibit good biocompatibility, rapid pH response, and resistance to migration are increasingly essential in visually intelligent packaging applications. The phenothiazine cationic dye Azure B, which is sensitive to pH fluctuations, was incorporated into a poly(acrylamide-acrylic acid) hydrogel by electrostatic interactions. The research scrutinized the internal cross-linking of the synthesized hydrogel film (PAMA-Az) using Fourier transform infrared spectroscopy and evaluated the mobility of Azure B within the hydrogel through a UV spectrum. Furthermore, a comprehensive assessment of the physical and chemical properties of PAMA-Az, including discoloration response, mechanical strength, swelling behavior, ammonia gas sensitivity, and color reversibility, was conducted. Results indicated that the pH-responsive PAMA-Az formed by electrostatic interactions possessed a more compact structure, improved color-changing responsiveness, and lower Azure B mobility compared to the blending hydrogel. The color transition of PAMA-Az from blue to lavender and finally pink within the pH range of 7-12, coupled with its swift response to ammonia vapor and color reversibility, highlights its potential for visual food intelligent packaging. In a shrimp freshness monitoring experiment, the PAMA-Az hydrogel film, used as a contact substrate, successfully achieved the visual assessment of shrimp freshness, where a color change from blue to pink signaled rotting. Consequently, the fast-response and low- mobility pH-responsive hydrogel film demonstrates promising applications in visual food intelligent packaging and gas-sensitive labeling.