{'fraction_non_alphanumeric': 0.04195264241592313, 'fraction_numerical': 0.021555422100205904, 'mean_word_length': 4.94327597195666, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 2, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The impact of screen time and green time on mental health in children and adolescents during the COVID-19 pandemic

The COVID-19 pandemic has affected the life of children and adolescents in an unprecedented way. In the present study, we focused on two activities that have been likely affected by mitigation measures: screen time and green time. We investigated how both influenced each other during the pandemic, how they affected children’s and adolescents' mental health, and which role socio-demographic characteristics have in predicting screen time, green time, and mental health. We used data collected between autumn 2020 and spring 2021 from 844 participants aged 5 to 19 of a population-based, prospective cohort study in Canton Ticino, Italian-speaking Switzerland. We analyzed the data using an extended version of the Random Intercept Cross-Lagged Panel Model with time-invariant socio-demographic covariates and mental health as outcome. Results showed that, at the between-person level, screen time was a risk factor and green time a protective factor of mental health. However, within-person deviations of screen time and green time during the pandemic did not consistently predict mental health. Furthermore, they did not influence each other over time. Gender, age, perceived economic situation of the family, Body Mass Index and the availability of green space nearby all influenced stable measures of green time and screen time (i.e., random intercepts). Our results highlight the need for targeted actions to promote green time and raise awareness about the detrimental effect of screen time on children’s and adolescents’ mental health.


Introduction
Declared a worldwide pandemic on January 30, 2020 (WHO, 2020a), the COVID-19 crisis has changed the lives of individuals of all age groups in an unprecedented way. To protect vulnerable populations, Switzerlandwhere the present study was conductedfaced a complete lockdown during the first wave in spring 2020, followed by a partial lockdown and strict prevention and mitigation measures, which have been in place over the winter months through spring 2021.
The resulting interruption of leisure activities, social distancing, and isolation can have negative consequences on mental health (Hossain et al., 2020;Vindegaard & Benros, 2020;Xiong et al., 2020). Children and adolescents have been particularly affected by the abrupt decrease in and disruption of social activities and interactions, which can impact mental health and result in both immediate and long-term affective and behavioral problems (Mohler-Kuo, Dzemaili, Foster, Werlen, & Walitza, 2021;Orben, Tomova, & Blakemore, 2020;UNESCO, 2020). There is a growing consensus that the mental health consequences of the COVID-19 pandemic in underage populations are a major public health priority and that good quality studies are imperative to expand and improve the evidence on the effects of the pandemic on mental health (Campion, Javed, Sartorius, & Marmot, 2020;WHO, 2020b).
Mental health can be defined as "a state of well-being in which an individual realizes his or her own abilities, can cope with the normal stresses of life, can work productively and is able to make a contribution to his or her community" (WHO, 2018). Mental health is crucial in childhood and adolescence since many mental disorders that start early in life are likely to persist through adulthood (Johnson, Dupuis, Piche, Clayborne, & Colman, 2018;Otto et al., 2020). At the same time, adolescence is a development stage during which biological (e.g., hormones) and social-environmental changes happen together with the maturation of cognitive capacities. These changes represent a moment of greater vulnerability to the onset and progress of mental illness (Blakemore, 2019).
The majority of evidence to date stems from cross-sectional studies, where issues of directionality may limit causal inference. In the present study, we focus on two behavioral factors potentially associated with children's and adolescents' mental health during the COVID-19 pandemic: screen time (ST) and green time (GT). After presenting an up-to-date summary of existing evidence and relevant theoretical frameworks on the link between ST, GT, and mental health in childhood and adolescence, we state our hypotheses on the reciprocal effects of ST and GT and their impact on children's and adolescents' mental health. Acknowledging the role of individual and contextual factors, we considered gender, age, perceived economic situation of the family, neighborhood characteristics, and Body Mass Index (BMI) as predictors of both ST and GT. Using data from Corona Immunitas Ticino, a longitudinal, population-based cohort study based in Canton Ticino, Italianspeaking Switzerland, we modelled within-and between-person effects over time applying an extended version of the Random Intercept Cross-Lagged Panel Model (RI-CLPM) (Mulder & Hamaker, 2020).

Screen time and mental health
ST encompasses very different activities such as consuming news or entertainment programs, online gaming, social media use, instant communication with peers and family members, online search for information, and many more. Given the variety of online activities, one can draw on different theories to derive possible positive or negative effects of screen time on mental health. We focus on four of them, as explicated below.
During the pandemic, news about COVID-19 have been primarily negative in tone (Ogbodo et al., 2020;Robertson, Lagus, & Kajava, 2021, pp. 110-115;Sacerdote, Sehgal, & Cook, 2020). According to the Framing Theory (Scheufele, 1999), exposure to negatively framed news, which highlight increasing infection rates, death, or the economic crisis resulting from the pandemic, leads to fear and even panic attack, especially among vulnerable populations. In fact, a cross-sectional and cross-cultural study focusing on the lockdown period showed that nearly half of the children worldwide were scared by the news about COVID-19 (Götz et al., 2020). On social media platforms, pandemic related news was often exaggerated and misleading. Platforms such as Facebook, Instagram, or Twitter were used to share fake news on COVID-19 and to express attitudes and emotions towards the pandemic, oftentimes complaining about further restriction measures (Tsao et al., 2021), and evidence suggested that the exposure to such negatively valenced content can have negative emotional repercussions (Gabarron, Oyeyemi, & Wynn, 2021).
Another mechanism through which especially social media may impact mental health is the social comparison with peers and influencers. The Social Comparison Theory states that people tend to evaluate themselves by comparison with others when objective measures for self-evaluation are lacking (Festinger, 1954). Popular social media platforms among younger generations, such as Instagram and TikTok, primarily present positive images ("positivity bias"), where users tend to disclose self-enhancing information about their looks, life, and achievements (Waterloo, Baumgartner, Peter, & Valkenburg, 2018). At the time of strict containment measures, adolescents were likely to see images of others who may seemingly be less impacted by social isolation, which has been shown to be related to higher depression levels among young social media consumers (Ellis et al., 2020). One reason for the negative association is the feeling of envy caused by upward social comparison (Verduyn, Gugushvili, Massar, Täht, & Kross, 2020). In addition, social comparison is closely linked to fear of missing out (FoMO), which is "a pervasive apprehension that others might be having rewarding experiences from which one is absent" (Przybylski, Murayama, DeHaan, & Gladwell, 2013, p. 1841. Social media use has been identified as a risk factor of FoMO. In a comprehensive meta-analysis of 70 studies, Yali, Sen, and Guoliang (2021) obtained a pooled effect size of r = 0.38. People with higher FoMO also pose greater attention to positive internal states of others and are more likely to experience social pain due to perceived exclusion (Lai, Altavilla, Ronconi, & Aceto, 2016).
On the other hand, social media, and the Internet in general, have provided a gateway for children and adolescents to stay in contact with peers and family members to cope with negative feelings and the absence of direct contacts during the pandemic (Cauberghe, Van Wesenbeeck, De Jans, Hudders, & Ponnet, 2021;Götz et al., 2020;. According to the Compensatory Internet Use Theory (Kardefelt-Winther, 2014), negative life events and stressors may motivate people to use the Internet to alleviate negative emotions about such stressors. In this regard, the study by Cauberghe et al. (2021) has shown that, during the pandemic, adolescents with higher levels of anxiety used social media as a coping tool, which, in turn, was related to higher happiness levels.
One way to cope with loneliness, and negative feelings in general, is through Internet-enhanced self-disclosure, as described in the equally named theory developed by Valkenburg and Peter (2009). Online communication stimulates adolescents' self-disclosure because the Internet provides a less face-threatening and more controllable space where users feel less inhibited in disclosing confidential information. This, in turn, leads to better relationship quality with already existing friends and new friends online and, ultimately, to higher levels of mental health. In fact, Zhen, Nan, and Pham (2021) found that self-disclosure on social media during COVID-19 helped students diminish their stress levels.
We accounted for the two former and the two latter theories to hypothesize that ST can exert either negative or positive impacts on mental health during the pandemic.

Green time and mental health
GT comprises time spent in nature, such as parks, woods, gardens, and playgrounds, which also entails and facilitates outdoor physical activity. Living in greener areas augment the likelihood of engaging in physical activity (Markevych et al., 2017), and sufficient physical activity improves cognitive development and reduces psychopathological symptoms. Recent cross-sectional studies in China and the United Kingdom showed that physical activity was associated with better mental health among children and adolescents during the COVID-19 pandemic (Kang et al., 2021;Wright et al., 2021), echoing pre-pandemic findings on the positive effects of physical activity on mental health. These positive effects are particularly evident in children and adolescents (Rodriguez-Ayllon et al., 2019), especially for their cognitive performance (Biddle, Ciaccioni, Thomas, & Vergeer, 2019). Acknowledging the beneficial role of physical activity, the WHO recommends 60 min of moderate-to-vigorous physical activity for children and adolescents per day (Bull et al., 2020).
Moreover, the benefits of GT include exposure to natural sunlight and social interaction in shared outdoor spaces, which proved to be beneficial for both physical and mental health (Oswald, Rumbold, Kedzior, & Moore, 2020). Two theories explain the underlying mechanisms: According to the Attention Restoration Theory (Kaplan, 1995), nature has restorative effects on cognitive functioning, while the Stress Reduction Theory (Ulrich et al., 1991) postulates that natural spaces and environment can contribute to reduced stress. Furthermore, the Biophilia Hypothesis states that humans have an innate affinity for nature and need nature for their well-being and development (Gullone, 2000). Large green spaces and playgrounds provide opportunities to socialize, let off steam, and enjoy shared play for younger children. Because physical activity declines from childhood through early adolescence (Corder et al., 2016) and GT modalities change with age, both 'getting away' and opportunities for mind-wandering in outdoor spaces become progressively more prominent than physical activity (Kaplan, 1995).
GT was largely limited in Switzerland during the first wave of the pandemic when the lockdown comprised strict home confinement and closures of parks, playgrounds, and picnic areas, and bans on gatherings, including in outdoor spaces. Some of these restrictive measures have been progressively relapsed starting in summer 2020, but large gatherings (i.e. more than 50 people) remained prohibited over the following autumn and winter months, and fear of contagion in public spaces have limited GT.
Our second study hypothesis is that GT during the COVID-19 pandemic positively impacts mental health over time.

Screen time and green time
Although ST and GT (including physical activity) have been previously studied together to predict mental health, very few studies applied longitudinal designs and explored the concomitant effects of ST and GT on mental health (Oswald et al., 2020). Pre-pandemic cross-sectional studies found that less ST and more frequent physical activity were associated with fewer symptoms of depression, anxiety, and hopelessness (e.g., Hrafnkelsdottir et al., 2018;Michael et al., 2020). Likewise, a longitudinal study revealed that children who progressively increased physical activity while maintaining low levels of ST experienced the highest levels of mental health four years later (del Pozo-Cruz et al., 2019). A pre-post experimental study found that participation in an outdoor adventure program increased mental health, especially for adolescents with high levels of ST (i.e., >3 h/day) (Mutz, Müller, & Göring, 2019).
We can draw on the Displacement Hypothesis to delineate the relationship between ST and GT. It assumes that, since each day has a finite amount of time, ST displaces valuable time for other daily healthenhancing activities such as GT, physical activity, reading time, time for (offline) socialization, time for homework, or sleep (Camerini, Gerosa, & Marciano, 2020). Thus, it is reasonable to assume that ST that involves television viewing, video gaming, or surfing on the Internet on stationary devices goes to the detriment of GT. Further evidence for this assumption comes from an observational study conducted in China between the pre-and lockdown periods, which found that ST increased while overall physical activity decreased after the onset of the pandemic (Xiang, Zhang, & Kuwahara, 2020).
Nevertheless, a major criticism of the Displacement Hypothesis is that, considering the vast diffusion of hand-held mobile devices, screen media can nowadays be used while engaging in other activities such as a stroll in the park. Previous studies found that youth spend 76% of their ST alongside other activities such as travelling, homework, eating, or social interactions (Jeong et al., 2005). It is, thus, likely that ST and GT go hand in hand and not to the detriment of the other activity.
Taking into account both scenarios, we hypothesize that ST and GT either negatively or positively influence each other over time.

Covariates
Different socio-demographic characteristics potentially affect both ST and GT.
According to two comprehensive reviews of studies on correlates of GT (Lee et al., 2021;Sallis, Prochaska, & Taylor, 2000), boys engage more in outdoor play than girls, and outdoor time decreases in adolescence. Furthermore, being overweight or obese is related to less outdoor time, and living in a building with outdoor space is positively associated with GT.
ST is also affected by socio-demographic characteristics. For example, ST tends to increase as children get older and are less supervised by their parents or other caregivers (Bucksch et al., 2016;Fakhouri, Hughes, Brody, Kit, & Ogden, 2013). ST has also been shown to be higher in families of a lower socio-economic background who seem to have neither the means nor the awareness needed to offer their children alternative leisure time activities (Camerini, Schulz, & Jeannet, 2018;Tandon et al., 2012). Furthermore, green space in the neighborhood is associated with less ST (Dadvand et al., 2014;Sanders, Feng, Fahey, Lonsdale, & Astell-Burt, 2015), and a meta-analysis revealed that ST is positively associated with childhood overweight and obesity, where those who spent 2 h or more on screens per day were 1.67 more likely to be overweight or obese (Fang, Mu, Liu, & He, 2019). However, evidence on gender differences in overall ST is mixed. For example, while one study based on data from the Health Behavior in School-aged Children found that boys reported more ST (Bucksch et al., 2016), another found no significant gender differences (Simon, Solana, González, Catalán, & Serrano, 2019).
Based on the aforementioned evidence, we considered gender, age, perceived economic situation of the family, green space in the neighborhood, and BMI as covariates associated with GT and ST.

Study aims
The aims of the present study are three-fold: (1) to investigate whether between-and within-person levels of GT and ST impact mental health in children and adolescents during the COVID-19 pandemic, (2) to explore how GT and ST are related to each other over time during the pandemic, and (3) to investigate the role of covariates in the abovementioned associations, including gender, age, perceived economic situation of the family, presence of green space in the neighborhood, and BMI.
To address the three study aims, we applied an extended version of the RI-CLPM (Mulder & Hamaker, 2020), which allows disentangling between-and within-person effects of GT and ST, and to model time-invariant covariates and outcomes (Fig. 1). To the best of our knowledge, this is the first study investigating ST, GT, and covariates in relation to mental health in children and adolescents, while making use of longitudinal data to disentangle trait-like between-person associations from state-like within-person effects.

Study design
Corona Immunitas Ticino (CIT) is a population-based, prospective cohort study investigating the seroprevalence of the SARS-CoV-2 virus and the impact of the COVID-19 pandemic on mental health in the general population in Canton Ticino, Italian-speaking Switzerland. CIT is part of a larger network of seroprevalence studies conducted across Switzerland, which have been previously described (West et al., 2020). CIT combines repeated survey and serology measures and assessments collected in a representative sample of the general population, including children and adolescents between 5 and 19 years of age, during the COVID-19 pandemic. In August 2020, we invited a representative sample of 4264 children and adolescents drawn from the Swiss Federal. In addition, participants were allowed to nominate up to five household members, which led to the inclusion of 188 additional subjects up to 19 years of age. For ethical, legal, and practical reasons, people not fluent in Italian, under guardianship, in an asylum procedure, or with a short-term residency permit (i.e., <1 year) were excluded from the study. Of all 4452 invited, 1024 (23%) provided informed consent to participate in the study and filled out the baseline (BL) questionnaire between September and November 2020. For children (N = 619), parents provided answers regarding the invited child. For adolescents (N = 405), survey responses were based on self-report. After completing the baseline questionnaire, participants entered a digital cohort with weekly (W) and monthly (M) follow-up questionnaires.
The study received approval from the Cantonal ethics committee (number 2020-01514).

Measures
Screen time (ST) was assessed on M1, M3, and M5 with four openended questions: "How many hours did you (your child) spend on electronic devices (e.g., smartphone, computer, PlayStation, Xbox, Nintendo, TV) on a typical weekday?", "How many of these hours did you (your child) spend for school-related activities?", "How many hours did you (your child) spend on electronic devices (e.g., smartphone, computer, PlayStation, Xbox, Nintendo, TV) on a typical weekend day?", "How many of these hours did you (your child) spend for schoolrelated activities?". To avoid spurios relationships between age and ST due to distance learning, which was still in place for post-obligatory schools during the second wave covered in this study, we decided to focus on leisure ST. A weighted average score was calculated by subtracting ST for school-related activities from total ST and by using the formula for the newly created ST measures (leisure ST weekday*5+leisure ST weekend day*2)/7.
Green time (GT) was assessed on M1, M3, and M5 with two openended questions: "How many hours did you (your child) spend outdoors in nature (e.g., garden, park, playground, woods) on a typical weekday, excluding school-related activities?", "How many hours did you (your child) spend outdoors in nature (e.g., garden, park, playground, woods) on a typical weekend day?". We computed a weighted average score using the formula (GT weekday*5 + GT weekend day*2)/ 7.
Mental health during the last two weeks was assessed on M6 across a set of seven subdomains taken from the DSM-5 cross-cutting symptoms measure for 6-17 years old individuals (DSM-5; see Clarke & Kuhl, 2014): somatic symptoms ("Been bothered by stomach aches, headaches, or other aches and pains"), sleep problems ("Been bothered by not being able to fall asleep or stay asleep, or by waking up too early"), inattention ("Been bothered by not being able to pay attention when in class or doing homework or reading a book or playing a game"), depression ("Had less fun doing things than used to"; "Felt sad or depressed for several hours"), anger ("Felt angry or lost your temper"), irritability ("Felt more irritated or easily annoyed than usual"), and anxiety ("Felt nervous, anxious, or scared"; "Not been able to stop worrying"). Respondents aged 14 to 19 self-reported their symptoms, parents of children up to 9 years of age either responded on behalf and for their child, while parents of children aged 10 to 13 were asked to fill out the questionnaire with input from their participating child. All items were rated on a Likert scale ranging from 1 "not at all" to 5 "nearly every day", and we computed an overall score averaging responses across the seven domains, with higher values indicating lower levels of mental health (Cronbach's α = 0.913).
Socio-demographic covariates included gender measured as 1 "female" and 0 "male", age (at the date of the baseline questionnaire), perceived economic situation of the family measured as 0 "not enough or just enough to live" and 1 "more than enough to live", and availability of green space in the neighborhood measured as 0 "no access" and 1 "access to private or communal garden". Moreover, we calculated Body Mass Index (BMI) by dividing self-reported body weight in kilograms by self-reported height in meters squared. We calculated the BMI using the WHO macro that generates age-specific z-scores (BMIz; de Onis et al., 2007). For descriptive purposes, we classified participants as underweight (SD < − 2.0), normal weight (− 2.0 ≤ SD ≤ 1.0), overweight (1.0

Statistical analysis
To identify potential systematic bias in participants included in the analytical sample, we conducted independent samples t-tests and χ 2tests to check whether the analytical sample differed significantly from participants who were excluded because they had missing values on the exogenous socio-demographic variables, or with z-scores > |3.5| on the continuous variables (Iglewicz & Hoaglin, 1993). We ran Little's MCAR test to determine whether data were missing completely at random (MCAR) (χ2 = 149.40, p = .499). We used the maximum likelihood method integrated into the "lavaan" package (Rosseel, 2012) in R statistical software (R Core Team, 2013) to impute missing values for GT, ST, and mental health while fitting the RI-CLPM.
Prior to the main analyses, we ran repeated measures Analysis of Variance (ANOVA) to explore how ST and GT evolved from M1 to M5. Next, we calculated bivariate correlations among all continuous and dummy variables. To estimate the within-and between-person source of variance of ST and GT across M1, M3, and M5, we calculated intra-class correlation coefficients (ICCs), which estimate the portion of variance related to individual, trait-like differences among participants over time, i.e. between-person variance, while the residual portion of variance is explained by within-person fluctuations.
For the main analyses, we estimated an extended version of the RI-CLPM (Mulder & Hamaker, 2020), including covariates as time-invariant predictors and mental health as a time-invariant outcome (see Fig. 1). We used a maximum likelihood estimation with robust (Huber-White) standard errors (MLR) and a scaled test statistic to estimate the model. To separate the total predictive value of ST and GT into stable, between-person components and time-variant, within-person components, we added a direct path from the intercepts (between-person level), as well as from each latent concept of GT and ST measured at M1, M3, and M5 (within-person level), to mental health (Mulder & Hamaker, 2020). First, we ran a fully unconstrained model, then autoregressive effects, cross-lagged effects, and covariances were constrained to be equal across all waves. Eventually, we added the within-person deviations as predictors of the outcome in addition to the between-person components. We tested the nested model with more constraints against the less constrained model and determined the most parsimonious model by evaluating the decrease in AIC and BIC and the change in model fit indices, including the Comparative Fit Index (CFI), the Root Mean Square Error of Approximation (RMSEA), and the Standardized Root Mean Square Residual (SRMR). Given the large sample size, the χ2 value was not considered to be a good indicator of model (Hooper, Coughlan, & Mullen, 2008). At the between-person level, we interpreted correlations as relatively small (r = 0.10), medium (r = 0.20), and relatively large (r = 0.30), following the recommendations by Gignac and Szodorai (2016). At the within-person level, we considered an effect size of β < 0.10 as meaningful, as suggested by Adachi and Willoughby (Adachi & Willoughby, 2015). The R code and dataset used for the analyses are available at https://osf.io/vzm7b.

Results
The analytical sample (N = 844) consisted of 442 (52%) females, mean age was 12.8 years (SD = 4 years). The majority (n = 666; 79%) was normal weight, while 132 participants (16%) were either overweight or obese and 46 (5%) underweight. Approximately half of participants (n = 467; 55%) reported that their family had just the necessary or not enough to live. The majority (n = 688; 82%) reported the availability of green spaces, such as a private or public garden, near their home. The analytical sample and excluded participants (n = 180) did not differ across their socio-demographic characteristics (see also Table 1).
We conducted a one-way repeated measures ANOVA without imputed data for GT and ST separately to test if there was a significant change in these behaviors over five months between autumn 2020 and spring 2021. On average, participants spent 2 h outside in M1, and 1 h and 45 min in M2 and M3. We found a significant time effect for GT (Wilks' Lambda = 0.95, F(2,500) = 12.26, p < .001). Follow up comparisons indicated a downward trend between M1 and M3, but stable values between M3 and M5 (Table 2 here and Fig. 1 in the Appendix). This was trend was evident for all age groups, though GT levels remained consistently higher among the youngest participants aged 5-9 across all three time points. ST was stable between M1 and M5. We found no significant time effect (Wilks' Lambda = 0.996, F(2,499) = 0.907, p = .404). Participants spent, on average, 2 h and 40 min in front of screens for leisure activities at each time point, though age differences could be observed at each time point. More precisely, leisure ST ranged from approximately 1 h and 20 min among 5 to 9 year-olds, through 2 h among 10 to 14 year-olds, to 4 h and 20 min among adolescents aged 15 or older.
On average, participants reported suffering from mental health problems "rarely" during the past two weeks. Using the cut-offs suggested by the American Psychological Association (i.e., "rarely" for inattention and "several days" for the remaining subdomains), we could observe that approximately 63% reported problems of inattention, 31% suffered from sleep problems, depressive symptoms, or anxiety, 20% reported somatic symptoms such as stomach ache, and 16% states of anger. The prevalence of mental health problems was higher in females and in older participants, except for the anger subdomain, where prevalence rates were roughly the same ( Table 1 in the Appendix).
(r = − 0.098, p < .05). Concerning the covariates, being older was significantly and positively related to ST (r = 0.630 to 0.659, p < .01) at all time points, while the relationship was negative for GT at M1 (r = − 0.122, p < .01) and M5 (r = − 0.090, p < .05). Furthermore, being female (r = 0.181, p < .01) and being older (r = 0.444, p < .01) were significantly and positively associated with mental health problems at M6. Next, the perception that one's family has more than enough to live was significantly associated with lower levels of GT at all measurement points (r = − 0.135 to − 0.100, p < .01), and the availability of green space with lower levels of ST (r = − 0.121 to − 0.075, p < .05). BMIz was significantly positively associated with GT at all measurement points (r = 0.093 to 0.121, p < .05). The ICC for GT was 0.384 and the ICC for ST was 0.803. The large ICC for ST indicates low variability of ST within study participants over the observed period and high variability between them. Next, we ran an extended version of the RI-CLPM by adding time-invariant socio-demographic covariates and mental health as the outcome. The comparison of goodness-of-fit indices pointed towards a fully constrained model, i.e., a model with constrained auto-regressive effects, cross-lagged effects, and covariances, including also within-person level deviations as predictors, as the one that fitted best the data (see Table 1 Table 3. We observed a negative association of mental health problems at M6 with the intercept of GT (B = − 0.416, p = .033) and a positive association with the intercept of ST (B = 0.249, p < .001), where the intercepts provide stable between-person information. Thus, higher levels of GT were related to lower levels of mental health problems across the study participants, whereas higher levels of ST were related to higher levels of mental health problems. Additionally, we observed that only the latent variable of GT at M1 predicted mental health problems at M6 (B = 0.122, p = .024). We did not find any other significant effects of timevariant GT and ST levels, measured at M1, M3, and M5, on mental health. At the within-person level, we observed significant positive autoregressive effects for GT (B = 0.133, p = .023), but not for ST (B = 0.081, p = .523). In other words, GT above the participants' mean at M1 and M3 was associated with higher levels of GT two months later, at M3 and M5, respectively. We found no cross-lagged within-person effects in either direction, hence GT and ST did not predict each other over time. Likewise, residual correlations at the within-person level were not significant at any time point. This suggests that the remaining variances in GT and ST at each time point were independent of each other. Furthermore, at the between-person level, GT and ST were not significantly associated with each other either. In other words, participants who reported higher levels of GT did not report significantly higher or lower levels of ST.
Looking at the associations of time-invariant covariates and the random intercepts of ST and GT, we found that, compared to males, females reported significantly lower levels of GT (B = − 0.177, p = .007), but similar levels of ST (B = 0.057, p = .581). Only ST levels significantly increased with age (B = 0.329, p < .001). Furthermore, children's and adolescents' BMIz was positively associated with both GT (B = 0.101, p < .001) and ST (B = 0.093, p = .014). A good perceived economic situation of the family, i.e. having "more than enough to live", was significantly and negatively associated with GT (B = − 0.246, p = .001) and ST (B = − 0.317, p = .001). Additionally, the availability of green space nearby was related to more GT (B = 0.206, p = .034) and less ST (B = − 0.321, p = .039).

Discussion
The aim of the present study was to investigate whether ST and GT during the COVID-19 pandemic influenced mental health among children and adolescents over time. We used monthly repeated measures, and applied an extended version of the RI-CLPM to separate betweenand within-person effects over time. We found that, first, GT and ST were significantly associated with worse and better mental health, respectively, second, that GT had a positive and significant autoregressive effect over time (making up for a "virtuous cycle"), and, third, that both individual and contextual factors contributed to the associations of ST and GT with mental health.
The associations of GT and ST with mental health symptomatology can be intepreted using existing theoretical frameworks. Drawing on Table 2 Descriptive statistics and zero-order correlations among all included manifest variables (N = 844).  Framing Theory, it seems that higher levels ST led to anxiety and psychosomatic symptoms due to the exposure to negatively framed news and information on the COVID-19 pandemic (Gabarron et al., 2021;Götz et al., 2020). Next, in line with Social Comparison Theory, upward comparison with friends and peers on social media, who seem to be less affected by the pandemic ("positivity bias"), may have fostered envy (Verduyn et al., 2020), and depressive symptoms (Ellis et al., 2020). In addition, FoMO, caused by greater exposure to online, mainly social media contents (Yali et al., 2021), might have contributed to worsen mental health. On the other hand, at the between-person level, GT had a positive effect on mental health. This is in line with the Attention Restoration Theory and Stress Reduction Theory, where the first postulates that green spaces have restorative effects on cognitive functioning and the second that they contribute to reduce stress levels.
Moreover, for children, GT is likely filled with playtime and physical activity, which are beneficial their mental health. For adolescents, GT may be associated with relaxed time, socialization with peers and friends, and getting away from stressful situations at school and at home, thus contributing to better mental health. We observed a significant, positive and prospective association of GT measured at the first monthly follow-up with mental health problems measured at the sixth monthly follow-up. It may be that outdoor time shortly after the first peak of the pandemic in spring 2020 was potentially detrimental for future mental health because of the associated worries of a COVID-19 infection due to contacts with other people in public places, which in turn plausibly caused anxiety, depression, and psychosomatic problems. These worries seemed to have vanished as the pandemic evolved and people got used to social distancing in public, and younger populations experienced no or only mild symptoms in case of infection (Castagnoli et al., 2020). The second main finding of the study was that only within-person deviations of GT predicted higher levels in the same variable over time. GT seems to have been positively experienced, i.e. lived as a high quality time that contributed to reduced stress levels, and to provide opportunities for socializing and for mind wander, which in turn initiated a virtous circle of more time spent outdoors. We did not find a significant autoregressive effect of ST at the within-person level. The average leisure time spent in front of screens, which was approximately 2 h and 40 min, was fairly stable through the pandemic months. It should be recalled that the repeated assessments of ST cover the second pandemic wave in Switzerland between autumn 2020 and spring 2021, when strict lockdown measures were loosened again and schools reopened, though extracurricular activities were still limited and distance learning for older adolescents in place. This context likely explains why ST did not increase, i.e., there was no major disruption in children's and adolescents' life during the observed period as in case of other studies that compared ST levels of the pre-pandemic and lockdown period (e.g., Schmidt, Anedda, Burchartz, Eichsteller, et al., 2020;Xiang et al., 2020). Given the lack of reciprocial relationships, both at the between-and within-person level, our results do not support the Time Displacement Hypothesis, since ST did not come to the detriment of GT, including physical activity. Similar findings have been observed at the between-person level in an observational study in Germany, which showed that containment measures during the lockdown led to an increase in both ST and habitual levels of physical activity (Schmidt, Anedda, Burchartz, Eichsteller, et al., 2020). Conversely, less ST was not invariably related to more GT.
Compared to children and adolescent males, females reported significantly lower levels of GT but similar ST levels. These findings are in line with a known gender effect on GT, and with pre-pandemic and pandemic evidence (Lee et al., 2021;Sallis et al., 2000). Moreover, only ST but not GT levels increased with age in our study sample, with intra-class correlation coefficients indicating high variability in ST across participants (ranging from 5 to 19 years), and low variability within participants observed over a relatively short period of time (five months for ST). Leisure ST was rather stable over time, and increased with age from approximately 1 h and 20 min among 5 to 9 year-olds, to 2 h among 10 to 14 year-olds, and 4 h and 20 min among adolescents aged 15 or older, at each time point. ST typically increases from childhood to adolescence (Bucksch et al., 2016;Fakhouri et al., 2013). The increase in ST may be boosted by the ownership of digital devices, and the progressive reduction in parental supervision. In 2020, 96% of 12-13 year-olds in Switzerland owned a smartphone, 100% of 18-19 year-olds (Süss et al., 2020, p. 76). GT was not related to an older age, neither was it heavily affected by stay-at-home recommendations and limited extracurricular (sports) activities for adolescents of 16 years or older, which were surpressed for several months even after the first lockdown and independently of indoor or outdoor settings.
A good perceived economic situation of the family, i.e. having "more than enough to live", was significantly and inversely associated with both GT and ST. The inverse association with GT could be explained by the fact that children from families of a higher socio-economic status, partly captured by our perceived economic situation measure, could not engage in extracurricular or organized sports club activities that wereas just explainedlimited even after strict lockdown measures were loosened after the first pandemic wave. Pre-pandemic research has shown that children from high socio-economic status families generally engage more in organized sports, while those from families of a lower  socio-economic status tend to spend more time in unorganized, habitual physical activity (Schmidt, Anedda, Burchartz, Oriwol, et al., 2020). Furthermore, parents with a higher socio-economic status tend to be more attentive to quality leisure time of their children and may actively decide not to provide them with personal electronic devices as a means to control ST and stimulate offline activities. This may explain the inverse association between perceived economic situation of the family and ST in our study and it is consistent with previous findings of less ST in children from families with a higher socio-economic status (Camerini et al., 2018;Minges et al., 2015;Tandon et al., 2012). Next, we found that the availability of and easy access to green spaces were positively related to GT and negatively to ST. These findings suggest that the availability of green space in the neighborhood was a key facilitator of more GT also during pandemic-related restrictions. Providing children and adolescents with a convenient and safe opportunity to spend outdoor time is an effective means to incrase GT (Markevych et al., 2017), and it can contribute to better cognitive development and reduced psychopathological symptoms. For exammple, in a large cross-sectional study of nearly 60 thousand Chinese children, attending schools or kindergartens next to greener areas was related to a lower probability to report attention-deficit/hyperactivity disorder (ADHD) symptoms (Yang et al., 2019). Finally, children's and adolescents' BMI was positively associated with both GT and ST. Considering ST as a sedentary behavior, the link between BMI and ST is not surprising. Though it is less clear why higher BMI is associated also with more GT, it should be noted that GT is an umbrella term that encompasses both physical activity and relaxing time outdoors. The latter is often sedentary. Future research should apply a more nuanced measure of GT, and integrate physical health and fit measures, to disentangle the relationship with global body mass.

Implications
The present study has several implications. First, our findings highlight that GT should have been promoted during the pandemic, especially among girls, to preserve and promote better mental health. Prevalence rates for mental health problems were consistently higher among females compared to male counterparts. The provision of safe green space in the neighborhood and organized outdoor activities, maintaining the necessary protection measures, e.g., limitation of participants or larger distances between participants and mask wearing when this is compatible with the performed activities. Second, efforts should be made to raise awareness of the potential detrimental impact of ST on mental health. Nevertheless, interventions that aim to reduce ST are too simplistic, and may not be possible. ST was indispensable for remote learning, and ST may as well have provided opportunities to manage negative feelings or social deficits in specific vulnerable child and adolescent populations. Third, and closely linked to this point, promotional activities should be targeted to specific sub-populations based on their socio-demographic and socio-economic background, considering neighborhood characteristics and the evolvement of the pandemic.

Limitations and future directions
Some limitations should be acknowledged. We used a rigorous probabilistic sampling method to be able to generalize the findings to the underlying population, but our results should be applied cautiously and mainly to similar populations since only 23% of all invited agreed to participate in the study. Among those who entered the study, a selection bias seems unlikely because the salient characteristics of participants in the analytical sample (82%) did not significantly differ from those of excluded participants (18%). Concerning sample characteristics, we acknowledge that the perceived economic situation of the family is only one aspect of the broader concept of socio-economic background, which includes also parents' educational attainment and occupation. Yet, the latter two indicators are generally difficult to report by children and adolescents (Hauser, 1994). Another potential limitation is the use of parent reports for children aged 5 to 13. The burden of participating in a longitudinal study with weekly and monthly questionnaires during the pandemic was deemed high. We expected that parents of younger children were adequately aware of the whereabouts and feelings of their offspring, but this may be less the case as children grow older and enter puberty. We explicitly asked parents of children aged 10 to 13 to fill out the questionnaires together with their participating child, but we have no information on how often this has been done and to what extent parents' observations mirror the actual behaviors and mental state of their children. Moreover, we acknowledge that the measures of GT and ST each encompasses different activities, which may vary not only between but also within individuals. When asking participants to report on the hours they (their child) spent in nature or with screens, we cannot exclude a potential recall bias, especially considering that adolescents seem to rely more on the frequency of device use rather than the duration when reporting on ST . The integration of digital trace data may overcome this problem, but there are still numerous key issues to be solved, including ethical, methodological, and conceptual issues (Stier, Breuer, Siegers, & Thorson, 2020). The reliance on an overall measure of ST and GT is also problematic for another reason: GT encompasses physical activity, outdoor play, but also relaxing walks, or simply a picnic in the park, and each of these may or not entail various degrees of positive social interactions. A better understanding of the type of activity and the context, e.g., with family members or friends, can contribute to unravel which aspects of GT have a beneficial role on mental health. Similarly, ST encompasses a variety of social and non-social activities. Disentangling these activities, especially social media use, is important to understand why and how ST had a distinct effect on mental health in children compared to adolescents during the pandemic. Our findings suggest that the pandemic did not modify, alter, or change the nature of the association of GT and ST with mental health in children and adolescents, but confirmed that this association is complex and warrants further investigations to inform and tailor interventions that account for the varying needs and characteristics of the population's subgroups.

Declarations of interest
None.

Funding
The study was funded by Corona Immunitas, a public-private partnership supported by the Federal Office of Public Health, various cantons, companies, and private individuals in Switzerland. The funders were not involved in the study design, collection, analysis, interpretation of data, the writing of this article or the decision to submit it for publication.