RushiMane2003 commited on
Commit
4f9e18b
·
verified ·
1 Parent(s): 756eb35

Update templates/main.html

Browse files
Files changed (1) hide show
  1. templates/main.html +332 -3
templates/main.html CHANGED
@@ -4,7 +4,336 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>🌧️ Rainwater Quest Adventure</title>
7
- <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  </head>
9
 
10
  <body style="margin:0; padding:0; height:100vh; overflow:hidden; background:linear-gradient(135deg,#f8fafc 0%,#e0f7fa 100%);">
@@ -39,14 +368,14 @@
39
  <div style="flex:1 1 auto; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:auto;">
40
  {% if not video_watched %}
41
  <div style="width:100%; max-width:500px; margin:0 auto;">
42
- {% if not local_file_exists %}
43
  <div class="feedback error">⚠️ Video file not found: {{ video_src }}. Please check the path or use an online URL.</div>
44
  <form action="{{ url_for('main_app') }}" method="post">
45
  <button type="submit" name="mark_watched" class="button-full-width">Skip missing video</button>
46
  </form>
47
  {% else %}
48
  <form id="autoMarkWatchedForm" action="{{ url_for('main_app') }}" method="post" style="margin:0;">
49
- <video id="gameVideo" controls src="{{ video_src }}" type="video/mp4" style="width:100%; max-height:180px; border-radius:12px; background:#e0f7fa;"></video>
50
  <input type="hidden" name="mark_watched" value="1">
51
  </form>
52
  <script>
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>🌧️ Rainwater Quest Adventure</title>
7
+ <style>
8
+ /* Import Google Fonts */
9
+ @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Roboto:wght@300;400;500;700&display=swap');
10
+ @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');
11
+
12
+
13
+ /* Main styling */
14
+ body {
15
+ background: linear-gradient(135deg, #e0f2f7 0%, #b3e0f2 100%); /* Light blue gradient */
16
+ font-family: 'Roboto', sans-serif;
17
+ margin: 0;
18
+ padding: 0;
19
+ color: #333; /* Default text color */
20
+ }
21
+
22
+ .container {
23
+ max-width: 1200px;
24
+ margin: 20px auto;
25
+ padding: 20px;
26
+ }
27
+
28
+ /* Header styling */
29
+ .game-header {
30
+ background: linear-gradient(90deg, #FF6B6B, #4ECDC4, #45B7D1);
31
+ background-size: 300% 300%;
32
+ animation: gradientShift 3s ease infinite;
33
+ color: white;
34
+ text-align: center;
35
+ padding: 20px;
36
+ border-radius: 15px;
37
+ margin-bottom: 20px;
38
+ box-shadow: 0 8px 32px rgba(0,0,0,0.3);
39
+ font-family: 'Orbitron', monospace;
40
+ font-weight: 900;
41
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
42
+ }
43
+
44
+ @keyframes gradientShift {
45
+ 0% { background-position: 0% 50%; }
46
+ 50% { background-position: 100% 50%; }
47
+ 100% { background-position: 0% 50%; }
48
+ }
49
+
50
+ /* Game card styling */
51
+ .game-card {
52
+ background: rgba(255, 255, 255, 0.95);
53
+ border-radius: 20px;
54
+ padding: 25px;
55
+ margin: 15px 0;
56
+ box-shadow: 0 15px 35px rgba(0,0,0,0.1);
57
+ backdrop-filter: blur(10px);
58
+ border: 2px solid rgba(255,255,255,0.18);
59
+ transition: all 0.3s ease;
60
+ }
61
+
62
+ .game-card:hover {
63
+ transform: translateY(-5px);
64
+ box-shadow: 0 20px 40px rgba(0,0,0,0.15);
65
+ }
66
+
67
+ /* Progress bar styling */
68
+ .progress-container {
69
+ background: rgba(255,255,255,0.2);
70
+ border-radius: 25px;
71
+ padding: 5px;
72
+ margin: 20px 0;
73
+ }
74
+
75
+ .progress-bar {
76
+ background: linear-gradient(90deg, #00C9FF, #92FE9D);
77
+ height: 30px;
78
+ border-radius: 20px;
79
+ transition: width 0.5s ease;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ color: white;
84
+ font-weight: bold;
85
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
86
+ min-width: 0; /* Allow it to be 0% width */
87
+ }
88
+
89
+ /* XP and Level styling */
90
+ .stats-container {
91
+ display: flex;
92
+ justify-content: space-around;
93
+ margin: 20px 0;
94
+ flex-wrap: wrap; /* Allow wrapping on smaller screens */
95
+ gap: 10px; /* Space between items */
96
+ }
97
+
98
+ .stat-item {
99
+ background: linear-gradient(135deg, #667eea, #764ba2);
100
+ color: white;
101
+ padding: 15px 20px;
102
+ border-radius: 15px;
103
+ text-align: center;
104
+ min-width: 120px;
105
+ box-shadow: 0 5px 15px rgba(0,0,0,0.2);
106
+ font-family: 'Orbitron', monospace;
107
+ flex-grow: 1; /* Allow items to grow */
108
+ }
109
+
110
+ .stat-value {
111
+ font-size: 24px;
112
+ font-weight: 900;
113
+ margin-bottom: 5px;
114
+ }
115
+
116
+ .stat-label {
117
+ font-size: 12px;
118
+ opacity: 0.8;
119
+ }
120
+
121
+ /* General button styling */
122
+ .button-group {
123
+ display: flex;
124
+ gap: 10px; /* Space between buttons */
125
+ flex-wrap: wrap;
126
+ justify-content: center;
127
+ margin-top: 20px;
128
+ }
129
+
130
+ .button-group button, .button-full-width {
131
+ background: linear-gradient(135deg, #667eea, #764ba2);
132
+ color: white;
133
+ border: none;
134
+ border-radius: 15px;
135
+ padding: 15px 25px;
136
+ cursor: pointer;
137
+ transition: all 0.3s ease;
138
+ font-size: 16px;
139
+ font-weight: 500;
140
+ text-align: center;
141
+ box-shadow: 0 5px 15px rgba(0,0,0,0.2);
142
+ flex: 1; /* Make buttons grow to fill space */
143
+ min-width: 150px; /* Minimum width for buttons */
144
+ text-decoration: none; /* For anchor tags acting as buttons */
145
+ display: inline-block;
146
+ }
147
+
148
+ .button-full-width {
149
+ width: 100%;
150
+ }
151
+
152
+ .button-group button:hover, .button-full-width:hover {
153
+ transform: translateY(-3px);
154
+ box-shadow: 0 8px 25px rgba(0,0,0,0.3);
155
+ background: linear-gradient(135deg, #7b8cec, #8a5bb8);
156
+ }
157
+
158
+
159
+ /* Achievement badge */
160
+ .achievement {
161
+ background: linear-gradient(45deg, #FFD700, #FFA500);
162
+ color: #333;
163
+ padding: 10px 20px;
164
+ border-radius: 25px;
165
+ display: inline-block;
166
+ margin: 10px 5px;
167
+ font-weight: bold;
168
+ box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
169
+ animation: pulse 2s infinite;
170
+ }
171
+
172
+ @keyframes pulse {
173
+ 0% { transform: scale(1); }
174
+ 50% { transform: scale(1.05); }
175
+ 100% { transform: scale(1); }
176
+ }
177
+
178
+ /* Welcome screen styling */
179
+ .welcome-container {
180
+ text-align: center;
181
+ padding: 50px;
182
+ background: rgba(255,255,255,0.1);
183
+ border-radius: 30px;
184
+ backdrop-filter: blur(10px);
185
+ margin: 20px auto; /* Centered */
186
+ max-width: 900px;
187
+ box-shadow: 0 20px 40px rgba(0,0,0,0.1);
188
+ }
189
+
190
+ .welcome-title {
191
+ font-size: 3.5em;
192
+ font-family: 'Orbitron', monospace;
193
+ font-weight: 900;
194
+ background: linear-gradient(45deg, #FF6B6B, #4ECDC4, #45B7D1);
195
+ -webkit-background-clip: text;
196
+ -webkit-text-fill-color: transparent;
197
+ margin-bottom: 20px;
198
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
199
+ }
200
+
201
+ .welcome-text {
202
+ font-size: 1.3em;
203
+ color: #34495e; /* Darker text for readability */
204
+ margin: 30px 0;
205
+ line-height: 1.6;
206
+ }
207
+
208
+ .welcome-text strong {
209
+ color: #2c3e50;
210
+ }
211
+
212
+ .welcome-image {
213
+ max-width: 100%;
214
+ border-radius: 15px;
215
+ margin-top: 30px;
216
+ box-shadow: 0 10px 20px rgba(0,0,0,0.2);
217
+ }
218
+
219
+ /* Certificate styling */
220
+ .certificate {
221
+ background: linear-gradient(135deg, #667eea, #764ba2);
222
+ color: white;
223
+ padding: 40px;
224
+ border-radius: 20px;
225
+ text-align: center;
226
+ margin: 20px auto;
227
+ max-width: 600px;
228
+ box-shadow: 0 20px 40px rgba(0,0,0,0.3);
229
+ border: 3px solid #FFD700;
230
+ }
231
+
232
+ /* Video container styling */
233
+ .video-container {
234
+ border-radius: 20px;
235
+ overflow: hidden;
236
+ box-shadow: 0 15px 35px rgba(0,0,0,0.2);
237
+ margin: 20px 0;
238
+ width: 100%; /* Ensure video container takes full width */
239
+ }
240
+
241
+ .video-container video {
242
+ width: 100%;
243
+ height: auto;
244
+ display: block;
245
+ }
246
+
247
+ /* Question container styling */
248
+ .question-container {
249
+ background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
250
+ color: white;
251
+ padding: 25px;
252
+ border-radius: 20px;
253
+ margin: 20px 0;
254
+ box-shadow: 0 10px 30px rgba(0,0,0,0.2);
255
+ text-align: center;
256
+ }
257
+
258
+ /* Video watched indicator */
259
+ .video-watched {
260
+ background: rgba(76, 175, 80, 0.1);
261
+ border: 2px solid #4CAF50;
262
+ border-radius: 10px;
263
+ padding: 15px;
264
+ margin: 10px 0;
265
+ color: #2E7D32;
266
+ font-weight: bold;
267
+ text-align: center;
268
+ }
269
+
270
+ /* Feedback messages */
271
+ .feedback.success {
272
+ background-color: #d4edda;
273
+ color: #155724;
274
+ border: 1px solid #badbcc;
275
+ padding: 15px;
276
+ margin: 15px 0;
277
+ border-radius: 8px;
278
+ text-align: center;
279
+ }
280
+
281
+ .feedback.error {
282
+ background-color: #f8d7da;
283
+ color: #721c24;
284
+ border: 1px solid #f5c6cb;
285
+ padding: 15px;
286
+ margin: 15px 0;
287
+ border-radius: 8px;
288
+ text-align: center;
289
+ }
290
+
291
+ .feedback.info {
292
+ background-color: #d1ecf1;
293
+ color: #0c5460;
294
+ border: 1px solid #bee5eb;
295
+ padding: 15px;
296
+ margin: 15px 0;
297
+ border-radius: 8px;
298
+ text-align: center;
299
+ }
300
+
301
+ /* Utility classes for layout */
302
+ .columns-3 {
303
+ display: flex;
304
+ justify-content: center;
305
+ gap: 20px;
306
+ margin-top: 20px;
307
+ flex-wrap: wrap; /* Allow wrapping */
308
+ }
309
+
310
+ .columns-3 > div {
311
+ flex: 1;
312
+ min-width: 250px; /* Ensure columns don't get too small */
313
+ }
314
+
315
+ .columns-5 {
316
+ display: flex;
317
+ justify-content: space-around;
318
+ gap: 10px;
319
+ margin-top: 20px;
320
+ flex-wrap: wrap;
321
+ }
322
+
323
+ .columns-5 > div {
324
+ flex: 1;
325
+ min-width: 150px;
326
+ }
327
+
328
+ h1, h2, h3, h4, h5, h6 {
329
+ font-family: 'Orbitron', monospace;
330
+ color: #34495e;
331
+ }
332
+
333
+ p {
334
+ line-height: 1.6;
335
+ }
336
+ </style>
337
  </head>
338
 
339
  <body style="margin:0; padding:0; height:100vh; overflow:hidden; background:linear-gradient(135deg,#f8fafc 0%,#e0f7fa 100%);">
 
368
  <div style="flex:1 1 auto; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; overflow:auto;">
369
  {% if not video_watched %}
370
  <div style="width:100%; max-width:500px; margin:0 auto;">
371
+ {% if is_local_video and not local_file_exists %}
372
  <div class="feedback error">⚠️ Video file not found: {{ video_src }}. Please check the path or use an online URL.</div>
373
  <form action="{{ url_for('main_app') }}" method="post">
374
  <button type="submit" name="mark_watched" class="button-full-width">Skip missing video</button>
375
  </form>
376
  {% else %}
377
  <form id="autoMarkWatchedForm" action="{{ url_for('main_app') }}" method="post" style="margin:0;">
378
+ <video id="gameVideo" controls src="{{ video_src }}" {% if is_local_video %} type="video/mp4" {% endif %} style="width:100%; max-height:180px; border-radius:12px; background:#e0f7fa;"></video>
379
  <input type="hidden" name="mark_watched" value="1">
380
  </form>
381
  <script>