-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
203 lines (175 loc) · 3.48 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/* Base Styles and Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: #ffffff;
min-height: 100vh;
line-height: 1.6;
}
/* Container for Layout */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
/* Header Section */
header {
text-align: center;
margin-bottom: 2rem;
}
header h1 {
font-size: 2.5rem;
margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.location-controls {
display: flex;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
}
/* Button Styles */
.btn {
padding: 0.8rem 1.5rem;
border: none;
border-radius: 25px;
background-color: #4caf50;
color: #fff;
cursor: pointer;
font-size: 1rem;
transition: transform 0.3s ease, background-color 0.3s ease;
}
.btn:hover {
background-color: #45a049;
transform: translateY(-2px);
}
/* Input Field Styles */
#locationInput {
padding: 0.8rem 1.5rem;
border: none;
border-radius: 25px;
width: 250px;
font-size: 1rem;
}
/* Weather Card Section */
.weather-card {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 2rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
margin-bottom: 2rem;
}
.weather-info {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1.5rem;
}
.temperature {
font-size: 4rem;
font-weight: bold;
}
.weather-details p {
font-size: 1.2rem;
margin: 0.5rem 0;
}
/* Forecast Section */
.forecast {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 2rem;
margin-top: 2rem;
}
.forecast h2 {
text-align: center;
margin-bottom: 1.5rem;
}
#forecastChart {
width: 100%;
max-height: 400px;
margin-bottom: 2rem;
}
.forecast-card {
text-align: center;
padding: 10px;
background-color: #2a5298;
margin: 5px;
border-radius: 8px;
}
/* For centering and sizing weather icons */
.weather-icon {
display: flex;
justify-content: center;
align-items: center;
width: 48px;
height: 48px;
margin: 0 auto;
}
/* Loading Spinner */
.loading-spinner {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.spinner {
width: 50px;
height: 50px;
border: 5px solid #f3f3f3;
border-top: 5px solid #3498db;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Error Message */
.error-message {
background-color: #ff4444;
color: #fff;
padding: 1rem;
border-radius: 10px;
text-align: center;
margin: 1rem 0;
}
/* Utility Classes */
.hidden {
display: none;
}
/* Responsive Design */
@media (max-width: 768px) {
.container {
padding: 1rem;
}
.weather-info {
flex-direction: column;
align-items: center;
text-align: center;
}
.location-controls {
flex-direction: column;
align-items: center;
}
.search-box {
width: 100%;
}
#locationInput {
width: 100%;
max-width: 300px;
}
}