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
e8b2ac4
 
1b86f72
 
e8b2ac4
 
 
 
 
 
 
 
 
3ba96fb
 
 
e8b2ac4
 
1b86f72
 
 
 
e8b2ac4
 
3ba96fb
 
e8b2ac4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
aa68823
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
:root {
    --primary-color: #6A5ACD;
    --secondary-color: #20B2AA;
    --sidebar-bg: #2c3e50;
    --text-color-dark: #34495e;
    --text-color-light: #ecf0f1;
    --hover-color: #7B68EE;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    padding: 1.5rem;
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 10;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sidebar-header h2 {
    margin: 0;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-color-light);
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .sidebar-header h2 {
    opacity: 0;
}

/* Unified sidebar toggle button */
#sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-color-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: fixed; /* Fixed position for both desktop and mobile */
    top: 1rem;
    left: 1rem;
    z-index: 1001; /* Ensure it's above other content */
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#sidebar-toggle:hover {
    color: var(--hover-color);
}

/* Desktop specific toggle behavior */
@media (min-width: 769px) {
    #sidebar-toggle {
        position: absolute; /* Position relative to sidebar on desktop */
        top: 1.5rem;
        right: 1.5rem;
        left: auto; /* Reset left position */
        background: transparent; /* Reset background */
        box-shadow: none; /* Reset shadow */
    }

    .sidebar.collapsed #sidebar-toggle {
        transform: rotate(180deg);
    }
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-color-light);
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.2s;
}

.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(106, 90, 205, 0.3);
}

.sidebar-nav .nav-link .nav-text {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .nav-link .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    height: 100%;
    transition: margin-left 0.3s ease, width 0.3s ease;
    background-image: url('BGround.png');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow-y: auto;
}

.main-content.collapsed {
    margin-left: 80px;
    width: calc(100% - 80px);
}

.container {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    box-sizing: border-box;
}

.page {
    display: none;
    width: 100%;
    max-width: 900px;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    color: var(--text-color-light);
    margin-bottom: 2rem;
}

.card h2 {
    color: var(--text-color-light);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.card p, .card label {
    color: var(--text-color-light);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 1rem;
}

#csv-upload {
    display: none;
}

.file-upload-wrapper label {
    display: block;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.file-upload-wrapper label:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--primary-color);
}

select, input[type="text"], button {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color-light);
    font-size: 1rem;
    box-sizing: border-box;
}

select option {
    background: #fff;
    color: var(--text-color-dark);
}

select:focus, input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.3);
    outline: none;
}

button {
    background-color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}

button:hover {
    background-color: var(--hover-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(106, 90, 205, 0.4);
}

#plot-output {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#plot-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

#train-output, #ai-answer, #upload-status, #plot-error {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color-light);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    min-height: 50px;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: pointer;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nav-text {
    animation: fadeInText 0.5s forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.sidebar.collapsed .nav-text {
    animation: none;
}

/* Overlay for when sidebar is active */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999; /* Below sidebar, above content */
}

.overlay.active {
    display: block;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    /* Hide desktop toggle on mobile */
    #desktop-sidebar-toggle {
        display: none;
    }

    /* Show mobile toggle */
    #sidebar-toggle {
        display: flex; 
    }

    .app-layout {
        flex-direction: column;
        height: auto; /* Allow content to dictate height */
        min-height: 100vh; /* Ensure it takes at least full viewport height */
    }

    .sidebar {
        width: 250px; /* Slightly narrower sidebar for mobile */
        height: 100vh; /* Full viewport height */
        position: fixed; /* Keep it fixed for overlay effect */
        top: 0;
        left: 0;
        padding: 1.5rem;
        transform: translateX(-100%); /* Hide sidebar by default */
        transition: transform 0.3s ease;
        z-index: 1000; /* Ensure it's on top of everything */
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto; /* Allow sidebar content to scroll if needed */
    }

    .sidebar.active {
        transform: translateX(0); /* Slide in when active */
    }

    .sidebar.collapsed {
        /* On mobile, 'collapsed' means hidden, so it's the same as default hidden state */
        width: 250px;
        transform: translateX(-100%);
    }

    .sidebar-header {
        margin-bottom: 2rem;
    }

    .sidebar-header h2 {
        opacity: 1; /* Always show title on mobile */
    }

    .sidebar-nav .nav-link .nav-text {
        opacity: 1; /* Always show text on mobile */
        width: auto;
        overflow: visible;
    }

    .sidebar-nav .nav-link {
        justify-content: flex-start;
    }

    .main-content {
        margin-left: 0; /* Remove left margin */
        width: 100%; /* Take full width */
        min-height: 100vh; /* Ensure main content takes at least full viewport height */
        padding: 1rem; /* Adjust padding */
        overflow-y: auto; /* Ensure scrolling */
        background-size: cover; /* Ensure background covers well */
        background-position: center;
    }

    .main-content.collapsed {
        margin-left: 0;
        width: 100%;
    }

    .container {
        padding: 1rem; /* Adjust container padding */
        /* Center the card horizontally */
        justify-content: center;
        align-items: flex-start; /* Align items to start to prevent vertical centering issues */
    }

    .page {
        max-width: 100%; /* Allow pages to take full width */
    }

    .card {
        padding: 1.5rem; /* Adjust card padding */
        width: 95%; /* Give it a max width to prevent stretching */
        box-sizing: border-box; /* Include padding in width */
    }

    /* Adjust font sizes for better mobile readability */
    body {
        font-size: 0.9rem;
    }

    .card h2 {
        font-size: 1.5rem;
    }

    select, input[type="text"], button {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}