SANTA CLARA, Calif. (AP) — The San Francisco 49ers took a long-term approach when they overhauled their entire football operation last winter by hiring a new coach and general manager. Amid their 0-3 start under Kyle Shanahan and John Lynch, the team isn't sounding the alarm.

"I think I'm more realistic in terms of how we play," Shanahan said Friday after his team came up short of a two-touchdown fourth-quarter comeback against the Los Angeles Rams in a 41-39 defeat the previous night.

"I was very proud of our guys last night. But by no means did we play perfect and I don't think we played as good as we can. But I thought the guys gave it everything they could. I thought they competed hard and I was proud of that."

The 49ers' offense got on track against their upstart division rivals after sputtering in the first two games against the Panthers and Seahawks. Shanahan's team had totaled just 465 yards of offense through the first two weeks, before logging 421 against the Rams and getting into the end zone for the first time all year on quarterback Brian Hoyer's 9-yard scramble in the first quarter. San Francisco wound up with five touchdowns and its highest-scoring game since Oct. 2013.

San Francisco's problems came trying to stop second-year quarterback Jared Goff, who looks vastly improved after struggling as a rookie. The 2016 first-overall pick had his best game as a pro completing 22 of 28 passes for 292 yards and three touchdowns. Receivers Sammy Watkins and Robert Woods both eclipsed 100 yards. Watkins, acquired Aug. 11 in a trade with Buffalo, scored his first two touchdowns with his new team.

The defensive struggles came on the heels of a strong outing four days earlier in Seattle. The 49ers limited the Seahawks to 312 yards on 79 snaps in the 12-9 defeat. They harassed Russell Wilson throughout the game and recorded three sacks. Goff on Thursday had plenty of time to read the defense while San Francisco's only sack was negated due to a holding penalty in the secondary.

"(The pass rush) wasn't good enough," Shanahan said. "I can't tell you exactly why, but our guys didn't win. They blocked us pretty well. We didn't affect the quarterback enough. I thought we did a very good job at that versus Seattle. And I thought we took a step back on that last night."

The 49ers have three straight road games upcoming and may be without a number of key players. Shanahan said he would be "shocked" if standout rookie linebacker Reuben Foster returned Sunday against the Cardinals after suffering a high ankle sprain in the opener. Safety Eric Reid is also unlikely to play with a left knee injury against the Seahawks.

Reid's replacement, Jaquiski Tartt, left Thursday's game with a concussion, as did reserve linebacker Brock Coyle and fullback Kyle Juszczyk. Defensive lineman Tank Carradine has a high ankle sprain and is a candidate to go on injured reserve, Shanahan said, while the team awaits results on an MRI.