77
88body {
99 display : flex;
10- justify-content : center;
11- align-items : center;
1210 flex-direction : column;
13- background-color : # fff ;
11+ align-items : center;
12+ background : linear-gradient (to bottom, # d1eef8, # e5f3f7 );
1413 padding : 20px ;
15- height : 100vh ;
14+ min- height: 100vh ;
1615}
1716
17+ /* Main weather widget */
1818.weather-widget {
19- background-color : # 007BFF ;
20- border-radius : 10 px ;
21- box-shadow : 0 0 20px rgba (0 , 0 , 0 , 0.1 );
22- padding : 20 px ;
19+ background : linear-gradient (to bottom , # 007BFF, # 72cee7 ) ;
20+ border-radius : 15 px ;
21+ box-shadow : 0 8 px 20px rgba (0 , 0 , 0 , 0.15 );
22+ padding : 25 px ;
2323 text-align : center;
24- max-width : 300 px ;
24+ max-width : 320 px ;
2525 width : 100% ;
26+ color : white;
2627 margin-bottom : 40px ;
2728}
2829
29- h1 {
30- font-size : 24 px ;
31- color : # 333 ;
30+ . weather-widget h1 {
31+ font-size : 28 px ;
32+ margin-bottom : 15 px ;
3233}
3334
34- .weather-location {
35- margin-bottom : 20 px ;
35+ .weather-location h2 {
36+ font-size : 22 px ;
3637}
3738
38- h2 {
39- font-size : 20px ;
40- color : black;
39+ .weather-location p {
40+ font-size : 16px ;
41+ opacity : 0.9 ;
42+ margin-bottom : 15px ;
4143}
4244
4345.weather-details h3 {
44- font-size : 48 px ;
45- color : white ;
46+ font-size : 50 px ;
47+ margin : 10 px 0 ;
4648}
4749
4850.weather-details p {
4951 font-size : 16px ;
50- color : white;
51- margin-top : 10px ;
52+ margin : 5px 0 ;
5253}
5354
55+ /* Weekly forecast */
5456.weekly-forecast {
55- background-color : # fff ;
56- border-radius : 10 px ;
57- box-shadow : 0 0 20px rgba (0 , 0 , 0 , 0.1 );
57+ background-color : # ffffff ;
58+ border-radius : 15 px ;
59+ box-shadow : 0 8 px 20px rgba (0 , 0 , 0 , 0.1 );
5860 padding : 20px ;
5961 text-align : center;
60- max-width : 600 px ;
62+ max-width : 700 px ;
6163 width : 100% ;
6264}
6365
66+ .weekly-forecast h2 {
67+ font-size : 24px ;
68+ margin-bottom : 15px ;
69+ }
70+
71+ /* Forecast row */
6472.forecast-row {
6573 display : flex;
74+ flex-wrap : wrap;
6675 justify-content : space-between;
76+ gap : 15px ;
6777}
6878
6979.day-forecast {
70- background-color : # 007BFF ;
80+ flex : 1 1 100 px ;
7181 padding : 15px ;
72- border-radius : 5 px ;
82+ border-radius : 10 px ;
7383 text-align : center;
74- width : 100px ;
84+ color : rgb (255 , 255 , 255 );
85+ transition : transform 0.3s ease, box-shadow 0.3s ease;
86+ }
87+
88+ /* Weather type colors */
89+ .day-forecast .sunny {
90+ background : linear-gradient (135deg , # f6d365, # fda085 );
91+ }
92+
93+ .day-forecast .cloudy {
94+ background : linear-gradient (135deg , # bdc3c7, # 2c3e50 );
95+ }
96+
97+ .day-forecast .rainy {
98+ background : linear-gradient (135deg , # 74ebd5, # ACB6E5 );
99+ }
100+
101+ .day-forecast .partly {
102+ background : linear-gradient (135deg , # ff7d13, # f7c4be );
103+ }
104+
105+ /* Hover effect */
106+ .day-forecast : hover {
107+ transform : translateY (-5px ) scale (1.05 );
108+ box-shadow : 0 10px 20px rgba (0 , 0 , 0 , 0.2 );
75109}
76110
77111.day-forecast h3 {
78- font-size : 24 px ;
112+ font-size : 22 px ;
79113 margin-bottom : 5px ;
80114}
81115
82116.day-forecast p {
83117 font-size : 14px ;
84- color : whitesmoke;
85- }
118+ }
119+
120+ /* Responsive */
121+ @media (max-width : 500px ) {
122+ .forecast-row {
123+ flex-direction : column;
124+ align-items : center;
125+ }
126+ .day-forecast {
127+ width : 80% ;
128+ }
129+ }
0 commit comments