Elias207 commited on
Commit
277d046
·
verified ·
1 Parent(s): 6ba6b9a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +246 -851
index.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>CineAI Studio - استودیو هوش مصنوعی سینمایی</title>
7
 
8
  <!-- بارگذاری فونت‌ها -->
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
@@ -11,34 +11,36 @@
11
  <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
12
 
13
  <style>
14
- /* Professional Video Studio Theme */
 
 
15
  #imageToVideoApp {
16
- --studio-primary: #5A67D8;
17
- --studio-primary-dark: #4C51BF;
18
- --studio-secondary: #805AD5;
19
- --studio-secondary-dark: #6B46C1;
20
- --studio-accent: #DD6B20;
21
- --studio-success: #48BB78;
22
- --studio-error: #F56565;
23
-
24
- /* Dark theme colors */
25
- --studio-bg-dark: #0F0F0F;
26
- --studio-bg-darker: #000000;
27
- --studio-surface: #1A1A1A;
28
- --studio-surface-light: #252525;
29
- --studio-surface-lighter: #2D2D2D;
30
- --studio-border: rgba(255, 255, 255, 0.08);
31
- --studio-border-light: rgba(255, 255, 255, 0.12);
32
-
33
- --studio-text: #FFFFFF;
34
- --studio-text-secondary: #B8B8B8;
35
- --studio-text-muted: #808080;
36
-
37
- --studio-glow-primary: 0 0 40px rgba(90, 103, 216, 0.5);
38
- --studio-glow-secondary: 0 0 40px rgba(128, 90, 213, 0.5);
39
-
40
- font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
41
- color: var(--studio-text);
42
  line-height: 1.6;
43
  direction: rtl;
44
  min-height: 100vh;
@@ -54,907 +56,361 @@
54
 
55
  body {
56
  margin: 0;
57
- background: var(--studio-bg-darker);
58
- position: relative;
59
  }
60
 
61
- /* Cinematic Background */
62
- body::before {
63
- content: '';
64
- position: fixed;
65
- top: 0;
66
- left: 0;
67
- right: 0;
68
- bottom: 0;
69
- background:
70
- radial-gradient(circle at 20% 50%, rgba(90, 103, 216, 0.1) 0%, transparent 50%),
71
- radial-gradient(circle at 80% 80%, rgba(128, 90, 213, 0.1) 0%, transparent 50%),
72
- radial-gradient(circle at 50% 20%, rgba(221, 107, 32, 0.05) 0%, transparent 50%);
73
- pointer-events: none;
74
- z-index: 1;
75
- }
76
-
77
- /* Film grain effect */
78
- body::after {
79
- content: '';
80
- position: fixed;
81
- top: 0;
82
- left: 0;
83
- right: 0;
84
- bottom: 0;
85
- background-image:
86
- repeating-linear-gradient(
87
- 0deg,
88
- transparent,
89
- transparent 2px,
90
- rgba(255, 255, 255, 0.01) 2px,
91
- rgba(255, 255, 255, 0.01) 4px
92
- );
93
- pointer-events: none;
94
- z-index: 2;
95
- opacity: 0.5;
96
- animation: filmGrain 8s steps(10) infinite;
97
- }
98
 
99
- @keyframes filmGrain {
100
- 0%, 100% { transform: translate(0, 0); }
101
- 10% { transform: translate(-1%, -1%); }
102
- 20% { transform: translate(1%, 1%); }
103
- 30% { transform: translate(-1%, 1%); }
104
- 40% { transform: translate(1%, -1%); }
105
- 50% { transform: translate(-1%, 0); }
106
- 60% { transform: translate(1%, 0); }
107
- 70% { transform: translate(0, 1%); }
108
- 80% { transform: translate(0, -1%); }
109
- 90% { transform: translate(1%, 1%); }
110
- }
111
 
112
  /* Main Container */
113
  #imageToVideoApp .studio-container {
114
  width: 100%;
115
  max-width: 1200px;
116
  margin: 0 auto;
117
- padding: 0 20px;
118
- position: relative;
119
- z-index: 10;
120
  }
121
 
122
- /* Professional Header */
123
  #imageToVideoApp .studio-header {
124
- padding: 40px 0 60px;
125
  text-align: center;
126
- position: relative;
127
- background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
128
- }
129
-
130
- /* Film strip decoration */
131
- #imageToVideoApp .film-strip {
132
- position: absolute;
133
- top: 20px;
134
- left: 50%;
135
- transform: translateX(-50%);
136
- width: 300px;
137
- height: 40px;
138
- background: linear-gradient(90deg,
139
- transparent 0%,
140
- var(--studio-surface) 10%,
141
- var(--studio-surface) 90%,
142
- transparent 100%);
143
- display: flex;
144
- align-items: center;
145
- justify-content: space-evenly;
146
- padding: 0 30px;
147
- opacity: 0.3;
148
- }
149
-
150
- #imageToVideoApp .film-strip::before,
151
- #imageToVideoApp .film-strip::after {
152
- content: '';
153
- position: absolute;
154
- top: 5px;
155
- bottom: 5px;
156
- width: 100%;
157
- background: repeating-linear-gradient(
158
- 90deg,
159
- transparent,
160
- transparent 10px,
161
- var(--studio-surface-light) 10px,
162
- var(--studio-surface-light) 20px
163
- );
164
  }
165
 
166
- #imageToVideoApp .film-strip .hole {
167
- width: 15px;
168
- height: 20px;
169
- background: var(--studio-bg-darker);
170
- border-radius: 2px;
171
- position: relative;
172
- z-index: 2;
173
- }
174
-
175
- /* Logo and Title */
176
  #imageToVideoApp .studio-logo {
177
  display: inline-flex;
178
  align-items: center;
179
- gap: 20px;
180
- margin-bottom: 20px;
181
- animation: fadeInScale 1s ease-out;
182
- }
183
-
184
- @keyframes fadeInScale {
185
- from {
186
- opacity: 0;
187
- transform: scale(0.8);
188
- }
189
- to {
190
- opacity: 1;
191
- transform: scale(1);
192
- }
193
- }
194
-
195
- #imageToVideoApp .logo-icon {
196
- width: 80px;
197
- height: 80px;
198
- position: relative;
199
  }
200
 
201
- #imageToVideoApp .logo-icon svg {
202
- width: 100%;
203
- height: 100%;
204
- filter: drop-shadow(var(--studio-glow-primary));
205
- }
206
 
207
  #imageToVideoApp .studio-title {
208
- font-size: 3rem;
209
- font-weight: 900;
210
- background: linear-gradient(135deg, var(--studio-primary) 0%, var(--studio-secondary) 100%);
 
 
211
  -webkit-background-clip: text;
212
  -webkit-text-fill-color: transparent;
213
- background-clip: text;
214
- letter-spacing: -1px;
215
- position: relative;
216
  }
217
 
218
  #imageToVideoApp .studio-subtitle {
219
  font-size: 1.1rem;
220
- color: var(--studio-text-secondary);
221
- margin-top: 10px;
222
- letter-spacing: 2px;
223
- text-transform: uppercase;
224
- font-weight: 500;
225
  }
226
 
227
  /* Control Panel Layout */
228
  #imageToVideoApp .control-panel {
229
  display: grid;
230
  grid-template-columns: 1fr 1fr;
231
- gap: 30px;
232
- margin-bottom: 40px;
 
233
  }
234
 
235
  @media (max-width: 768px) {
236
- #imageToVideoApp .control-panel {
237
- grid-template-columns: 1fr;
238
- }
239
  }
240
 
241
- /* Studio Cards */
242
  #imageToVideoApp .studio-card {
243
- background: var(--studio-surface);
244
- border: 1px solid var(--studio-border);
245
- border-radius: 16px;
246
- padding: 30px;
247
- position: relative;
248
- overflow: hidden;
249
- backdrop-filter: blur(10px);
250
- transition: all 0.3s ease;
251
- }
252
-
253
- #imageToVideoApp .studio-card::before {
254
- content: '';
255
- position: absolute;
256
- top: 0;
257
- left: 0;
258
- right: 0;
259
- height: 3px;
260
- background: linear-gradient(90deg, var(--studio-primary) 0%, var(--studio-secondary) 100%);
261
- opacity: 0;
262
- transition: opacity 0.3s ease;
263
- }
264
-
265
- #imageToVideoApp .studio-card:hover::before {
266
- opacity: 1;
267
  }
268
 
269
  #imageToVideoApp .studio-card:hover {
270
  transform: translateY(-5px);
271
- border-color: var(--studio-border-light);
272
- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
273
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
 
275
- /* Section Headers */
276
  #imageToVideoApp .section-header {
277
  display: flex;
278
  align-items: center;
279
- gap: 12px;
280
- margin-bottom: 25px;
281
- padding-bottom: 15px;
282
- border-bottom: 1px solid var(--studio-border);
283
  }
284
 
285
  #imageToVideoApp .section-icon {
286
  width: 24px;
287
  height: 24px;
288
- color: var(--studio-primary);
289
  }
290
 
291
  #imageToVideoApp .section-title {
292
  font-size: 1.2rem;
293
  font-weight: 700;
294
- color: var(--studio-text);
295
  }
296
 
297
  #imageToVideoApp .section-badge {
298
  margin-right: auto;
299
  padding: 4px 12px;
300
- background: rgba(90, 103, 216, 0.1);
301
- border: 1px solid rgba(90, 103, 216, 0.3);
302
  border-radius: 20px;
303
  font-size: 0.75rem;
304
- color: var(--studio-primary);
305
  font-weight: 600;
306
- text-transform: uppercase;
307
- letter-spacing: 1px;
308
  }
309
 
310
- /* Upload Zone - Cinematic Style */
311
  #imageToVideoApp .upload-zone {
312
  position: relative;
313
  width: 100%;
314
  aspect-ratio: 16/9;
315
- background: var(--studio-bg-dark);
316
- border: 2px dashed var(--studio-border);
317
- border-radius: 12px;
318
  display: flex;
319
  align-items: center;
320
  justify-content: center;
321
  cursor: pointer;
322
  overflow: hidden;
323
- transition: all 0.3s ease;
324
- margin-bottom: 20px;
325
- }
326
-
327
- #imageToVideoApp .upload-zone::before {
328
- content: '';
329
- position: absolute;
330
- top: 0;
331
- left: 0;
332
- right: 0;
333
- bottom: 0;
334
- background:
335
- repeating-linear-gradient(
336
- 0deg,
337
- transparent,
338
- transparent 20px,
339
- rgba(90, 103, 216, 0.03) 20px,
340
- rgba(90, 103, 216, 0.03) 21px
341
- ),
342
- repeating-linear-gradient(
343
- 90deg,
344
- transparent,
345
- transparent 20px,
346
- rgba(128, 90, 213, 0.03) 20px,
347
- rgba(128, 90, 213, 0.03) 21px
348
- );
349
- pointer-events: none;
350
  }
351
 
352
- #imageToVideoApp .upload-zone:hover {
353
- border-color: var(--studio-primary);
354
- background: rgba(90, 103, 216, 0.05);
355
- transform: scale(1.02);
356
  }
357
 
358
  #imageToVideoApp .upload-content {
359
- text-align: center;
360
- z-index: 2;
361
- position: relative;
362
  }
363
-
364
- #imageToVideoApp .upload-icon-wrapper {
365
- width: 100px;
366
- height: 100px;
367
- margin: 0 auto 20px;
368
- position: relative;
369
- }
370
-
371
  #imageToVideoApp .upload-icon-wrapper svg {
372
- width: 100%;
373
- height: 100%;
374
- color: var(--studio-text-muted);
375
- transition: all 0.3s ease;
376
- }
377
-
378
- #imageToVideoApp .upload-zone:hover .upload-icon-wrapper svg {
379
- color: var(--studio-primary);
380
- transform: translateY(-5px);
381
- }
382
-
383
- #imageToVideoApp .upload-title {
384
- font-size: 1.1rem;
385
- font-weight: 600;
386
- color: var(--studio-text);
387
- margin-bottom: 8px;
388
- }
389
-
390
- #imageToVideoApp .upload-subtitle {
391
- font-size: 0.9rem;
392
- color: var(--studio-text-muted);
393
  }
 
 
 
394
 
395
  #imageToVideoApp #imageFile {
396
- position: absolute;
397
- top: 0;
398
- left: 0;
399
- width: 100%;
400
- height: 100%;
401
- opacity: 0;
402
- cursor: pointer;
403
  }
404
-
405
  #imageToVideoApp #imagePreview {
406
- position: absolute;
407
- top: 0;
408
- left: 0;
409
- width: 100%;
410
- height: 100%;
411
- object-fit: contain;
412
- opacity: 0;
413
- visibility: hidden;
414
- transition: all 0.3s ease;
415
  }
416
 
417
  #imageToVideoApp .upload-zone.has-image {
418
- border-style: solid;
419
- border-color: var(--studio-success);
420
- background: rgba(72, 187, 120, 0.05);
421
- }
422
-
423
- #imageToVideoApp .upload-zone.has-image .upload-content {
424
- opacity: 0;
425
- visibility: hidden;
426
- }
427
-
428
- #imageToVideoApp .upload-zone.has-image #imagePreview {
429
- opacity: 1;
430
- visibility: visible;
431
- }
432
-
433
- /* Prompt Input - Professional Style */
434
- #imageToVideoApp .prompt-container {
435
- margin-bottom: 25px;
436
- }
437
-
438
- #imageToVideoApp .prompt-label {
439
- display: flex;
440
- align-items: center;
441
- gap: 8px;
442
- font-size: 0.9rem;
443
- color: var(--studio-text-secondary);
444
- margin-bottom: 12px;
445
- font-weight: 600;
446
- text-transform: uppercase;
447
- letter-spacing: 1px;
448
  }
 
 
449
 
 
 
 
450
  #imageToVideoApp .prompt-textarea {
451
  width: 100%;
452
  min-height: 120px;
453
- padding: 15px;
454
- background: var(--studio-bg-dark);
455
- border: 1px solid var(--studio-border);
456
- border-radius: 8px;
457
- color: var(--studio-text);
458
  font-family: inherit;
459
  font-size: 1rem;
460
  resize: vertical;
461
- transition: all 0.3s ease;
 
462
  }
463
 
464
  #imageToVideoApp .prompt-textarea:focus {
465
  outline: none;
466
- border-color: var(--studio-primary);
467
- background: var(--studio-surface-light);
468
- box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.1);
469
  }
 
470
 
471
- #imageToVideoApp .prompt-textarea::placeholder {
472
- color: var(--studio-text-muted);
473
- }
474
 
475
- /* Generate Button - Cinema Style */
476
  #imageToVideoApp .generate-button {
477
  width: 100%;
478
- padding: 18px 30px;
479
- background: linear-gradient(135deg, var(--studio-primary) 0%, var(--studio-secondary) 100%);
480
  border: none;
481
- border-radius: 8px;
482
  color: white;
483
- font-size: 1.1rem;
484
  font-weight: 700;
485
  cursor: pointer;
486
  display: flex;
487
  align-items: center;
488
  justify-content: center;
489
- gap: 12px;
490
  transition: all 0.3s ease;
491
- text-transform: uppercase;
492
- letter-spacing: 1px;
493
- position: relative;
494
- overflow: hidden;
495
- }
496
-
497
- #imageToVideoApp .generate-button::before {
498
- content: '';
499
- position: absolute;
500
- top: 50%;
501
- left: 50%;
502
- width: 0;
503
- height: 0;
504
- background: rgba(255, 255, 255, 0.2);
505
- border-radius: 50%;
506
- transform: translate(-50%, -50%);
507
- transition: width 0.6s, height 0.6s;
508
- }
509
-
510
- #imageToVideoApp .generate-button:hover::before {
511
- width: 400px;
512
- height: 400px;
513
  }
514
 
515
- #imageToVideoApp .generate-button:hover {
516
- transform: translateY(-2px);
517
- box-shadow: 0 10px 30px rgba(90, 103, 216, 0.4);
518
- }
519
-
520
- #imageToVideoApp .generate-button:active {
521
- transform: translateY(0);
522
  }
523
 
524
  #imageToVideoApp .generate-button:disabled {
525
- background: var(--studio-surface-light);
526
- color: var(--studio-text-muted);
527
  cursor: not-allowed;
528
  transform: none;
529
  box-shadow: none;
 
530
  }
531
 
532
- #imageToVideoApp .generate-button svg {
533
- width: 24px;
534
- height: 24px;
535
- animation: pulse 2s ease-in-out infinite;
536
- }
537
-
538
- @keyframes pulse {
539
- 0%, 100% { transform: scale(1); }
540
- 50% { transform: scale(1.1); }
541
- }
542
-
543
- /* Timeline Progress */
544
- #imageToVideoApp .timeline-container {
545
- grid-column: 1 / -1;
546
- background: var(--studio-surface);
547
- border: 1px solid var(--studio-border);
548
- border-radius: 16px;
549
- padding: 30px;
550
- margin-bottom: 30px;
551
- display: none;
552
- }
553
-
554
- #imageToVideoApp .timeline-container.active {
555
- display: block;
556
- animation: slideUp 0.5s ease-out;
557
- }
558
-
559
- @keyframes slideUp {
560
- from {
561
- opacity: 0;
562
- transform: translateY(20px);
563
- }
564
- to {
565
- opacity: 1;
566
- transform: translateY(0);
567
- }
568
- }
569
 
 
570
  #imageToVideoApp .timeline-header {
571
  display: flex;
572
  align-items: center;
573
  justify-content: space-between;
574
- margin-bottom: 25px;
575
  }
576
-
577
  #imageToVideoApp .timeline-title {
578
- display: flex;
579
- align-items: center;
580
- gap: 12px;
581
- font-size: 1.2rem;
582
- font-weight: 700;
583
- color: var(--studio-text);
584
  }
585
-
586
  #imageToVideoApp .timeline-status {
587
- padding: 6px 16px;
588
- background: rgba(90, 103, 216, 0.1);
589
- border: 1px solid rgba(90, 103, 216, 0.3);
590
- border-radius: 20px;
591
- font-size: 0.85rem;
592
- color: var(--studio-primary);
593
- font-weight: 600;
594
- display: flex;
595
- align-items: center;
596
- gap: 8px;
597
  }
598
-
599
- #imageToVideoApp .timeline-status .pulse-dot {
600
- width: 8px;
601
- height: 8px;
602
- background: var(--studio-primary);
603
- border-radius: 50%;
604
- animation: pulseDot 1.5s ease-in-out infinite;
605
- }
606
-
607
- @keyframes pulseDot {
608
- 0%, 100% {
609
- transform: scale(1);
610
- opacity: 1;
611
- }
612
- 50% {
613
- transform: scale(1.5);
614
- opacity: 0.5;
615
- }
616
- }
617
-
618
- /* Film Timeline Bar */
619
  #imageToVideoApp .film-timeline {
620
- position: relative;
621
- height: 80px;
622
- background: var(--studio-bg-dark);
623
- border-radius: 8px;
624
- overflow: hidden;
625
- margin-bottom: 20px;
626
  }
627
-
628
- #imageToVideoApp .film-timeline::before {
629
- content: '';
630
- position: absolute;
631
- top: 10px;
632
- bottom: 10px;
633
- left: 0;
634
- right: 0;
635
- background: repeating-linear-gradient(
636
- 90deg,
637
- transparent,
638
- transparent 30px,
639
- var(--studio-surface-light) 30px,
640
- var(--studio-surface-light) 31px
641
- );
642
- opacity: 0.3;
643
- }
644
-
645
  #imageToVideoApp .timeline-progress {
646
- position: absolute;
647
- top: 50%;
648
- left: 0;
649
- height: 4px;
650
- background: linear-gradient(90deg, var(--studio-primary) 0%, var(--studio-secondary) 100%);
651
- transform: translateY(-50%);
652
- transition: width 0.3s ease;
653
- box-shadow: 0 0 20px rgba(90, 103, 216, 0.5);
654
- }
655
-
656
- #imageToVideoApp .timeline-frames {
657
- display: flex;
658
- align-items: center;
659
  height: 100%;
660
- padding: 10px;
661
- gap: 10px;
662
- position: relative;
663
- }
664
-
665
- #imageToVideoApp .timeline-frame {
666
- flex: 0 0 100px;
667
- height: 60px;
668
- background: var(--studio-surface-light);
669
  border-radius: 4px;
670
- position: relative;
671
- overflow: hidden;
672
- opacity: 0.3;
673
- transition: all 0.3s ease;
674
- }
675
-
676
- #imageToVideoApp .timeline-frame.active {
677
- opacity: 1;
678
- border: 2px solid var(--studio-primary);
679
- box-shadow: 0 0 15px rgba(90, 103, 216, 0.3);
680
- }
681
-
682
- /* Status Messages - Cinema Style */
683
- #imageToVideoApp .status-container {
684
- max-height: 200px;
685
- overflow-y: auto;
686
- padding-right: 10px;
687
  }
 
 
688
 
 
 
689
  #imageToVideoApp .status-message {
690
- padding: 12px 16px;
691
- background: var(--studio-surface-light);
692
- border-radius: 8px;
693
- margin-bottom: 10px;
694
- display: flex;
695
- align-items: center;
696
- gap: 12px;
697
- animation: slideIn 0.3s ease-out;
698
- border-left: 3px solid var(--studio-primary);
699
- }
700
-
701
- @keyframes slideIn {
702
- from {
703
- opacity: 0;
704
- transform: translateX(20px);
705
- }
706
- to {
707
- opacity: 1;
708
- transform: translateX(0);
709
- }
710
- }
711
-
712
- #imageToVideoApp .status-message.success {
713
- border-left-color: var(--studio-success);
714
- background: rgba(72, 187, 120, 0.1);
715
- }
716
-
717
- #imageToVideoApp .status-message.error {
718
- border-left-color: var(--studio-error);
719
- background: rgba(245, 101, 101, 0.1);
720
- }
721
-
722
- #imageToVideoApp .status-icon {
723
- width: 20px;
724
- height: 20px;
725
- flex-shrink: 0;
726
- }
727
-
728
- #imageToVideoApp .status-text {
729
- font-size: 0.9rem;
730
- color: var(--studio-text-secondary);
731
- line-height: 1.4;
732
- }
733
-
734
- /* Video Output - Theater Mode */
735
- #imageToVideoApp .video-output-container {
736
- grid-column: 1 / -1;
737
- background: var(--studio-bg-darker);
738
- border: 1px solid var(--studio-border);
739
- border-radius: 16px;
740
- padding: 40px;
741
- margin-bottom: 30px;
742
- display: none;
743
- position: relative;
744
- overflow: hidden;
745
- }
746
-
747
- #imageToVideoApp .video-output-container.active {
748
- display: block;
749
- animation: fadeIn 0.5s ease-out;
750
- }
751
-
752
- @keyframes fadeIn {
753
- from { opacity: 0; }
754
- to { opacity: 1; }
755
- }
756
-
757
- #imageToVideoApp .video-output-container::before {
758
- content: '';
759
- position: absolute;
760
- top: -50%;
761
- left: -50%;
762
- width: 200%;
763
- height: 200%;
764
- background: radial-gradient(circle, rgba(90, 103, 216, 0.1) 0%, transparent 70%);
765
- animation: rotate 20s linear infinite;
766
- }
767
-
768
- @keyframes rotate {
769
- from { transform: rotate(0deg); }
770
- to { transform: rotate(360deg); }
771
  }
 
 
 
 
772
 
 
773
  #imageToVideoApp .video-player {
774
- position: relative;
775
- width: 100%;
776
- max-width: 800px;
777
- margin: 0 auto;
778
- background: #000;
779
- border-radius: 12px;
780
- overflow: hidden;
781
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
782
- }
783
-
784
- #imageToVideoApp #outputVideo {
785
- width: 100%;
786
- display: block;
787
- border-radius: 12px;
788
  }
789
-
790
- #imageToVideoApp .video-controls {
791
- display: flex;
792
- justify-content: center;
793
- gap: 20px;
794
- margin-top: 30px;
795
- }
796
-
797
  #imageToVideoApp .video-button {
798
- padding: 12px 24px;
799
- background: var(--studio-surface);
800
- border: 1px solid var(--studio-border);
801
- border-radius: 8px;
802
- color: var(--studio-text);
803
- font-size: 0.95rem;
804
- font-weight: 600;
805
- cursor: pointer;
806
- display: flex;
807
- align-items: center;
808
- gap: 10px;
809
- transition: all 0.3s ease;
810
- }
811
-
812
- #imageToVideoApp .video-button:hover {
813
- background: var(--studio-surface-light);
814
- border-color: var(--studio-primary);
815
- transform: translateY(-2px);
816
  }
 
817
 
818
  #imageToVideoApp .video-button.primary {
819
- background: linear-gradient(135deg, var(--studio-primary) 0%, var(--studio-secondary) 100%);
820
- border: none;
821
- color: white;
822
  }
 
823
 
824
- #imageToVideoApp .video-button.primary:hover {
825
- box-shadow: 0 10px 30px rgba(90, 103, 216, 0.4);
826
  }
827
-
828
- /* Error Panel - Alert Style */
829
- #imageToVideoApp .error-panel {
830
- grid-column: 1 / -1;
831
- background: rgba(245, 101, 101, 0.05);
832
- border: 1px solid rgba(245, 101, 101, 0.3);
833
- border-radius: 16px;
834
- padding: 30px;
835
- margin-bottom: 30px;
836
- display: none;
837
- }
838
-
839
- #imageToVideoApp .error-panel.active {
840
- display: block;
841
- animation: shake 0.5s ease-out;
842
- }
843
-
844
- @keyframes shake {
845
- 0%, 100% { transform: translateX(0); }
846
- 25% { transform: translateX(-10px); }
847
- 75% { transform: translateX(10px); }
848
  }
849
 
 
 
850
  #imageToVideoApp .error-header {
851
- display: flex;
852
- align-items: center;
853
- gap: 12px;
854
- margin-bottom: 20px;
855
- color: var(--studio-error);
856
- font-size: 1.2rem;
857
- font-weight: 700;
858
- }
859
-
860
- #imageToVideoApp .error-content {
861
- color: var(--studio-text-secondary);
862
- line-height: 1.6;
863
- margin-bottom: 25px;
864
- }
865
-
866
- #imageToVideoApp .error-actions {
867
- display: flex;
868
- gap: 15px;
869
  }
 
 
870
 
871
- /* Loading Spinner - Professional */
872
  #imageToVideoApp .spinner-container {
873
- display: flex;
874
- flex-direction: column;
875
- align-items: center;
876
- justify-content: center;
877
- padding: 40px;
878
  }
879
-
880
  #imageToVideoApp .spinner {
881
- width: 60px;
882
- height: 60px;
883
- position: relative;
884
- margin-bottom: 20px;
885
  }
886
-
887
  #imageToVideoApp .spinner-ring {
888
- position: absolute;
889
- width: 100%;
890
- height: 100%;
891
- border: 4px solid var(--studio-surface-light);
892
- border-radius: 50%;
893
- border-top-color: var(--studio-primary);
894
- animation: spin 1s linear infinite;
895
- }
896
-
897
- @keyframes spin {
898
- to { transform: rotate(360deg); }
899
- }
900
-
901
- #imageToVideoApp .spinner-text {
902
- color: var(--studio-text-secondary);
903
- font-size: 0.95rem;
904
- text-align: center;
905
  }
 
906
 
907
  /* Scrollbar Styling */
908
- #imageToVideoApp ::-webkit-scrollbar {
909
- width: 8px;
910
- height: 8px;
911
- }
912
-
913
- #imageToVideoApp ::-webkit-scrollbar-track {
914
- background: var(--studio-surface);
915
- border-radius: 4px;
916
- }
917
-
918
- #imageToVideoApp ::-webkit-scrollbar-thumb {
919
- background: var(--studio-surface-lighter);
920
- border-radius: 4px;
921
- }
922
-
923
- #imageToVideoApp ::-webkit-scrollbar-thumb:hover {
924
- background: var(--studio-primary);
925
- }
926
-
927
- /* Responsive Design */
928
- @media (max-width: 768px) {
929
- #imageToVideoApp .studio-title {
930
- font-size: 2rem;
931
- }
932
-
933
- #imageToVideoApp .studio-container {
934
- padding: 0 15px;
935
- }
936
-
937
- #imageToVideoApp .studio-card {
938
- padding: 20px;
939
- }
940
-
941
- #imageToVideoApp .control-panel {
942
- gap: 20px;
943
- }
944
- }
945
-
946
  /* Utility Classes */
947
- #imageToVideoApp .hidden {
948
- display: none !important;
949
- }
950
-
951
- #imageToVideoApp .fade-in {
952
- animation: fadeIn 0.5s ease-out;
953
- }
954
 
955
- #imageToVideoApp .slide-up {
956
- animation: slideUp 0.5s ease-out;
957
- }
 
 
 
 
 
 
958
  </style>
959
  </head>
960
  <body>
@@ -962,16 +418,11 @@
962
  <div id="imageToVideoApp">
963
  <div class="studio-container">
964
 
965
- <!-- Professional Header -->
966
  <header class="studio-header">
967
- <div class="film-strip">
968
- <div class="hole"></div>
969
- <div class="hole"></div>
970
- <div class="hole"></div>
971
- </div>
972
-
973
  <div class="studio-logo">
974
  <div class="logo-icon">
 
975
  <svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
976
  <circle cx="50" cy="50" r="45" stroke="url(#grad1)" stroke-width="2" opacity="0.3"/>
977
  <circle cx="50" cy="50" r="35" stroke="url(#grad1)" stroke-width="2" opacity="0.5"/>
@@ -979,15 +430,15 @@
979
  <path d="M40 35 L65 50 L40 65 Z" fill="url(#grad1)"/>
980
  <defs>
981
  <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
982
- <stop offset="0%" style="stop-color:#5A67D8;stop-opacity:1" />
983
- <stop offset="100%" style="stop-color:#805AD5;stop-opacity:1" />
984
  </linearGradient>
985
  </defs>
986
  </svg>
987
  </div>
988
- <h1 class="studio-title">CineAI Studio</h1>
989
  </div>
990
- <p class="studio-subtitle">استودیو حرفه‌ای ساخت ویدیو با هوش مصنوعی</p>
991
  </header>
992
 
993
  <!-- Main Control Panel -->
@@ -996,25 +447,18 @@
996
  <!-- Upload Section -->
997
  <div class="studio-card">
998
  <div class="section-header">
999
- <svg class="section-icon" viewBox="0 0 24 24" fill="currentColor">
1000
- <path d="M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"/>
1001
- <path fill-rule="evenodd" d="M4 5a2 2 0 012-2 1 1 0 000 2H6a2 2 0 00-2 2v6h16V7a2 2 0 00-2-2h-.09A1 1 0 0016 4a1 1 0 00-.09 1H18a2 2 0 012 2v10a2 2 0 01-2 2H6a2 2 0 01-2-2V5z"/>
1002
- </svg>
1003
- <span class="section-title">ورودی تصویر</span>
1004
- <span class="section-badge">مرحله ۱</span>
1005
  </div>
1006
 
1007
  <div class="upload-zone" id="image-drop-zone">
1008
  <input type="file" id="imageFile" accept="image/jpeg, image/png, image/webp" />
1009
  <div class="upload-content">
1010
- <div class="upload-icon-wrapper">
1011
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
1012
- <path d="M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"/>
1013
- <path d="M16 11l-4-4m0 0l-4 4m4-4v12"/>
1014
- </svg>
1015
  </div>
1016
  <h3 class="upload-title">بارگذاری تصویر</h3>
1017
- <p class="upload-subtitle">تصویر را بکشید یا کلیک کنید</p>
1018
  </div>
1019
  <img id="imagePreview" src="" alt="Preview" />
1020
  </div>
@@ -1023,31 +467,20 @@
1023
  <!-- Prompt Section -->
1024
  <div class="studio-card">
1025
  <div class="section-header">
1026
- <svg class="section-icon" viewBox="0 0 24 24" fill="currentColor">
1027
- <path d="M7 8h10M7 12h4m1 8l-4-4H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-3l-4 4z"/>
1028
- </svg>
1029
- <span class="section-title">دستور ساخت</span>
1030
- <span class="section-badge">مرحله ۲</span>
1031
  </div>
1032
 
1033
  <div class="prompt-container">
1034
- <label class="prompt-label">
1035
- <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
1036
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
1037
- </svg>
1038
- توضیحات انیمیشن
1039
- </label>
1040
  <textarea
1041
  id="prompt"
1042
  class="prompt-textarea"
1043
- placeholder="نحوه حرکت دوربین، جزئیات انیمیشن و افکت‌های مورد نظر را توصیف کنید..."
1044
  ></textarea>
1045
  </div>
1046
 
1047
  <button id="generateButton" class="generate-button">
1048
- <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
1049
- <path d="M8 5v14l11-7z"/>
1050
- </svg>
1051
  تولید ویدیو
1052
  </button>
1053
  </div>
@@ -1057,59 +490,44 @@
1057
  <div id="statusSection" class="timeline-container">
1058
  <div class="timeline-header">
1059
  <div class="timeline-title">
1060
- <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
1061
- <path d="M17 3a2 2 0 012 2v14a2 2 0 01-2 2H7a2 2 0 01-2-2V5a2 2 0 012-2h10zm0 2H7v14h10V5zm-5 3a1 1 0 011 1v6a1 1 0 11-2 0V9a1 1 0 011-1z"/>
1062
- </svg>
1063
  پردازش ویدیو
1064
  </div>
1065
- <div class="timeline-status">
1066
- <span class="pulse-dot"></span>
1067
- در حال پردازش
1068
- </div>
1069
  </div>
1070
 
1071
  <div class="film-timeline">
1072
  <div class="timeline-progress" id="progressBar" style="width: 0%"></div>
1073
- <div class="timeline-frames">
1074
- <div class="timeline-frame"></div>
1075
- <div class="timeline-frame"></div>
1076
- <div class="timeline-frame"></div>
1077
- <div class="timeline-frame"></div>
1078
- <div class="timeline-frame"></div>
1079
- </div>
1080
  </div>
1081
 
1082
  <div id="aiLoader" class="spinner-container" style="display: none;">
1083
- <div class="spinner">
1084
- <div class="spinner-ring"></div>
1085
- </div>
1086
  <div id="aiLoaderText" class="spinner-text">در حال پردازش تصویر...</div>
1087
  </div>
1088
 
1089
  <div id="statusMessages" class="status-container"></div>
1090
- <div id="progressBarContainer" style="display: none;"></div>
1091
  </div>
1092
 
1093
  <!-- Video Output -->
1094
  <div id="outputSection" class="video-output-container">
 
 
 
 
1095
  <div class="video-player">
1096
  <video id="outputVideo" controls preload="metadata" playsinline></video>
1097
  </div>
1098
 
1099
- <p id="finalSeed" style="text-align: center; color: var(--studio-text-muted); margin-top: 20px;"></p>
1100
- <div id="downloadLinkStatus" style="text-align: center; color: var(--studio-text-secondary); margin-top: 10px;"></div>
1101
 
1102
  <div class="video-controls">
1103
  <button id="btnDownloadVideo" class="video-button primary" style="display: none;">
1104
- <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
1105
- <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>
1106
- </svg>
1107
  دانلود ویدیو
1108
  </button>
1109
  <button id="btnRestart" class="video-button">
1110
- <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
1111
- <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>
1112
- </svg>
1113
  ویدیو جدید
1114
  </button>
1115
  </div>
@@ -1118,27 +536,21 @@
1118
  <!-- Error Panel -->
1119
  <div id="criticalErrorSection" class="error-panel">
1120
  <div class="error-header">
1121
- <svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
1122
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/>
1123
- </svg>
1124
  <span>خطا در پردازش</span>
1125
  </div>
1126
  <div id="criticalErrorMessage" class="error-content"></div>
1127
  <div class="error-actions">
1128
- <button id="btnCriticalErrorGoBack" class="video-button">
1129
- بازگشت
1130
- </button>
1131
- <button id="btnCriticalErrorRetry" class="video-button primary">
1132
- تلاش مجدد
1133
- </button>
1134
  </div>
1135
  </div>
1136
 
1137
  </div>
1138
  </div>
1139
-
 
1140
  <script>
1141
- // Your original JavaScript code remains exactly the same
1142
  (function() {
1143
  // DOM Elements
1144
  const formContainer = document.querySelector('#imageToVideoApp .control-panel');
@@ -1244,13 +656,7 @@
1244
 
1245
  statusMessagesDiv.insertBefore(messageDiv, statusMessagesDiv.firstChild);
1246
  statusMessagesDiv.scrollTop = 0;
1247
-
1248
- // Update timeline frames
1249
- const frames = document.querySelectorAll('.timeline-frame');
1250
- const activeIndex = Math.min(statusMessagesDiv.children.length - 1, frames.length - 1);
1251
- if (activeIndex >= 0 && frames[activeIndex]) {
1252
- frames[activeIndex].classList.add('active');
1253
- }
1254
  }
1255
 
1256
  function clearStatusMessages() {
@@ -1258,16 +664,10 @@
1258
  progressBar.style.width = '0%';
1259
  aiLoader.style.display = 'none';
1260
 
1261
- // Clear timeline frames
1262
- document.querySelectorAll('.timeline-frame').forEach(frame => {
1263
- frame.classList.remove('active');
1264
- });
1265
-
1266
  if (outputVideo.src && outputVideo.src.startsWith('blob:')) {
1267
  URL.revokeObjectURL(outputVideo.src);
1268
  }
1269
  outputVideo.src = '';
1270
- outputVideo.style.display = 'none';
1271
  finalSeedElement.textContent = '';
1272
  downloadLinkStatus.textContent = '';
1273
  btnDownloadVideo.style.display = 'none';
@@ -1418,10 +818,7 @@
1418
  hideCriticalError();
1419
  statusSection.classList.add('active');
1420
  outputSection.classList.remove('active');
1421
- outputVideo.style.display = 'none';
1422
- downloadLinkStatus.textContent = '';
1423
- btnDownloadVideo.style.display = 'none';
1424
-
1425
  const eventSource = new EventSource(`${VIDEO_SPACE_URL_BASE}/queue/data?session_hash=${currentVideoSessionHash}`);
1426
  eventSource.onmessage = function(event) {
1427
  const data = JSON.parse(event.data);
@@ -1451,7 +848,6 @@
1451
  outputSection.classList.add('active');
1452
  outputVideo.src = ltxVideoUrl;
1453
  outputVideo.load();
1454
- outputVideo.style.display = 'block';
1455
  outputVideo.scrollIntoView({ behavior: 'smooth', block: 'center' });
1456
  finalSeedElement.textContent = data.output.data[1] ? `Seed: ${data.output.data[1]}` : '';
1457
  prepareCustomDownloadLink(ltxVideoUrl);
@@ -1627,7 +1023,6 @@
1627
  statusSection.classList.add('active');
1628
  aiLoader.style.display = 'flex';
1629
  outputSection.classList.remove('active');
1630
- outputVideo.style.display = 'none';
1631
 
1632
  // Calculate dimensions
1633
  const [ratioW_str, ratioH_str] = autoSelectedAspectRatio.split(':');
 
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Video Studio - استودیو ویدیو هوش مصنوعی</title>
7
 
8
  <!-- بارگذاری فونت‌ها -->
9
  <link rel="preconnect" href="https://fonts.googleapis.com">
 
11
  <link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap" rel="stylesheet">
12
 
13
  <style>
14
+ /* ========================================================== */
15
+ /* == START: STYLES COPIED & ADAPTED FROM AI PHOTOSHOP PRO == */
16
+ /* ========================================================== */
17
  #imageToVideoApp {
18
+ --app-font: 'Vazirmatn', sans-serif;
19
+ --app-bg: #F8F9FC;
20
+ --panel-bg: #FFFFFF;
21
+ --panel-border: #EAEFF7;
22
+ --input-bg: #F6F8FB;
23
+ --input-border: #E1E7EF;
24
+ --text-primary: #1A202C;
25
+ --text-secondary: #626F86;
26
+ --text-tertiary: #8A94A6;
27
+ --accent-primary: #4A6CFA;
28
+ --accent-primary-hover: #3553D6;
29
+ --accent-primary-glow: rgba(74, 108, 250, 0.25);
30
+ --accent-secondary: #0FD4A8;
31
+ --danger-color: #e53e3e;
32
+ --danger-color-hover: #c53030;
33
+ --success-color: #38A169;
34
+ --shadow-sm: 0 1px 2px 0 rgba(26, 32, 44, 0.03);
35
+ --shadow-md: 0 4px 6px -1px rgba(26, 32, 44, 0.05), 0 2px 4px -2px rgba(26, 32, 44, 0.04);
36
+ --shadow-lg: 0 10px 15px -3px rgba(26, 32, 44, 0.06), 0 4px 6px -4px rgba(26, 32, 44, 0.05);
37
+ --shadow-xl: 0 20px 25px -5px rgba(26, 32, 44, 0.07), 0 8px 10px -6px rgba(26, 32, 44, 0.05);
38
+ --radius-card: 24px;
39
+ --radius-btn: 14px;
40
+ --radius-input: 12px;
41
+ --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
42
+ font-family: var(--app-font);
43
+ color: var(--text-primary);
44
  line-height: 1.6;
45
  direction: rtl;
46
  min-height: 100vh;
 
56
 
57
  body {
58
  margin: 0;
59
+ background: var(--app-bg);
 
60
  }
61
 
62
+ @keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
63
+ @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
 
 
 
 
 
 
 
 
 
 
 
 
65
 
66
  /* Main Container */
67
  #imageToVideoApp .studio-container {
68
  width: 100%;
69
  max-width: 1200px;
70
  margin: 0 auto;
71
+ padding: 40px 20px;
 
 
72
  }
73
 
74
+ /* Header */
75
  #imageToVideoApp .studio-header {
 
76
  text-align: center;
77
+ margin-bottom: 2.5rem;
78
+ animation: fadeIn 0.8s 0.1s ease-out backwards;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
81
  #imageToVideoApp .studio-logo {
82
  display: inline-flex;
83
  align-items: center;
84
+ gap: 1rem;
85
+ margin-bottom: 1rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  }
87
 
88
+ #imageToVideoApp .logo-icon { width: 60px; height: 60px; }
89
+ #imageToVideoApp .logo-icon svg { width: 100%; height: 100%; }
 
 
 
90
 
91
  #imageToVideoApp .studio-title {
92
+ font-size: 2.8rem;
93
+ font-weight: 800;
94
+ letter-spacing: -1px;
95
+ /* Gradient Title from Photoshop Theme */
96
+ background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
97
  -webkit-background-clip: text;
98
  -webkit-text-fill-color: transparent;
 
 
 
99
  }
100
 
101
  #imageToVideoApp .studio-subtitle {
102
  font-size: 1.1rem;
103
+ color: var(--text-secondary);
104
+ margin-top: 0.8rem;
 
 
 
105
  }
106
 
107
  /* Control Panel Layout */
108
  #imageToVideoApp .control-panel {
109
  display: grid;
110
  grid-template-columns: 1fr 1fr;
111
+ gap: 2rem;
112
+ margin-bottom: 2rem;
113
+ animation: fadeIn 0.8s 0.3s ease-out backwards;
114
  }
115
 
116
  @media (max-width: 768px) {
117
+ #imageToVideoApp .control-panel { grid-template-columns: 1fr; }
 
 
118
  }
119
 
120
+ /* Studio Cards (like Photoshop Panels) */
121
  #imageToVideoApp .studio-card {
122
+ background: var(--panel-bg);
123
+ border: 1px solid var(--panel-border);
124
+ border-radius: var(--radius-card);
125
+ padding: 2.5rem;
126
+ box-shadow: var(--shadow-xl);
127
+ transition: var(--transition-smooth);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  }
129
 
130
  #imageToVideoApp .studio-card:hover {
131
  transform: translateY(-5px);
 
 
132
  }
133
+
134
+ /* General Panel Styling for Status/Output/Error */
135
+ #imageToVideoApp .timeline-container,
136
+ #imageToVideoApp .video-output-container,
137
+ #imageToVideoApp .error-panel {
138
+ grid-column: 1 / -1;
139
+ background: var(--panel-bg);
140
+ border: 1px solid var(--panel-border);
141
+ border-radius: var(--radius-card);
142
+ padding: 2.5rem;
143
+ margin-bottom: 2rem;
144
+ box-shadow: var(--shadow-xl);
145
+ display: none; /* Controlled by JS */
146
+ }
147
+
148
+ #imageToVideoApp .timeline-container.active,
149
+ #imageToVideoApp .video-output-container.active,
150
+ #imageToVideoApp .error-panel.active {
151
+ display: block;
152
+ animation: fadeIn 0.5s ease;
153
+ }
154
+
155
 
156
+ /* Section Headers (like Photoshop Form Labels) */
157
  #imageToVideoApp .section-header {
158
  display: flex;
159
  align-items: center;
160
+ gap: 0.75rem;
161
+ margin-bottom: 1.5rem;
162
+ padding-bottom: 1rem;
163
+ border-bottom: 1px solid var(--panel-border);
164
  }
165
 
166
  #imageToVideoApp .section-icon {
167
  width: 24px;
168
  height: 24px;
169
+ color: var(--accent-primary);
170
  }
171
 
172
  #imageToVideoApp .section-title {
173
  font-size: 1.2rem;
174
  font-weight: 700;
175
+ color: var(--text-primary);
176
  }
177
 
178
  #imageToVideoApp .section-badge {
179
  margin-right: auto;
180
  padding: 4px 12px;
181
+ background: var(--input-bg);
182
+ border: 1px solid var(--input-border);
183
  border-radius: 20px;
184
  font-size: 0.75rem;
185
+ color: var(--text-secondary);
186
  font-weight: 600;
 
 
187
  }
188
 
189
+ /* Upload Zone (like Photoshop Upload Area) */
190
  #imageToVideoApp .upload-zone {
191
  position: relative;
192
  width: 100%;
193
  aspect-ratio: 16/9;
194
+ background: var(--input-bg);
195
+ border: 2px dashed var(--input-border);
196
+ border-radius: var(--radius-input);
197
  display: flex;
198
  align-items: center;
199
  justify-content: center;
200
  cursor: pointer;
201
  overflow: hidden;
202
+ transition: var(--transition-smooth);
203
+ text-align: center;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  }
205
 
206
+ #imageToVideoApp .upload-zone:hover:not(.has-image) {
207
+ border-color: var(--accent-primary);
208
+ background-color: #fff;
209
+ box-shadow: 0 0 15px var(--accent-primary-glow);
210
  }
211
 
212
  #imageToVideoApp .upload-content {
213
+ display: flex; flex-direction: column; align-items: center; gap: 1rem;
 
 
214
  }
215
+
 
 
 
 
 
 
 
216
  #imageToVideoApp .upload-icon-wrapper svg {
217
+ width: 48px;
218
+ height: 48px;
219
+ color: var(--accent-primary);
220
+ stroke-width: 1.5;
221
+ opacity: 0.8;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  }
223
+
224
+ #imageToVideoApp .upload-title { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0; }
225
+ #imageToVideoApp .upload-subtitle { font-size: 0.9rem; color: var(--text-secondary); }
226
 
227
  #imageToVideoApp #imageFile {
228
+ position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
 
 
 
 
 
 
229
  }
 
230
  #imageToVideoApp #imagePreview {
231
+ position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain;
 
 
 
 
 
 
 
 
232
  }
233
 
234
  #imageToVideoApp .upload-zone.has-image {
235
+ border-style: solid; border-color: var(--success-color); padding: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  }
237
+ #imageToVideoApp .upload-zone.has-image .upload-content { display: none; }
238
+
239
 
240
+ /* Prompt Input */
241
+ #imageToVideoApp .prompt-label { display: none; } /* Redundant with section header */
242
+
243
  #imageToVideoApp .prompt-textarea {
244
  width: 100%;
245
  min-height: 120px;
246
+ padding: 1rem 1.2rem;
247
+ background: var(--input-bg);
248
+ border: 1px solid var(--input-border);
249
+ border-radius: var(--radius-input);
250
+ color: var(--text-primary);
251
  font-family: inherit;
252
  font-size: 1rem;
253
  resize: vertical;
254
+ transition: var(--transition-smooth);
255
+ box-shadow: var(--shadow-sm) inset;
256
  }
257
 
258
  #imageToVideoApp .prompt-textarea:focus {
259
  outline: none;
260
+ border-color: var(--accent-primary);
261
+ background-color: var(--panel-bg);
262
+ box-shadow: 0 0 0 3px var(--accent-primary-glow), var(--shadow-sm) inset;
263
  }
264
+ #imageToVideoApp .prompt-textarea::placeholder { color: var(--text-tertiary); }
265
 
 
 
 
266
 
267
+ /* Generate Button (like Photoshop Submit Button) */
268
  #imageToVideoApp .generate-button {
269
  width: 100%;
270
+ padding: 1.1rem;
271
+ background: linear-gradient(95deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
272
  border: none;
273
+ border-radius: var(--radius-btn);
274
  color: white;
275
+ font-size: 1.2rem;
276
  font-weight: 700;
277
  cursor: pointer;
278
  display: flex;
279
  align-items: center;
280
  justify-content: center;
281
+ gap: 0.75rem;
282
  transition: all 0.3s ease;
283
+ box-shadow: 0 6px 12px -3px var(--accent-primary-glow), 0 6px 12px -3px rgba(15, 212, 168, 0.25);
284
+ margin-top: 1.5rem;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  }
286
 
287
+ #imageToVideoApp .generate-button:hover:not(:disabled) {
288
+ transform: translateY(-5px) scale(1.02);
289
+ box-shadow: 0 8px 20px -4px var(--accent-primary-glow), 0 8px 20px -4px rgba(15, 212, 168, 0.25);
 
 
 
 
290
  }
291
 
292
  #imageToVideoApp .generate-button:disabled {
293
+ background: var(--text-tertiary);
 
294
  cursor: not-allowed;
295
  transform: none;
296
  box-shadow: none;
297
+ opacity: 0.7;
298
  }
299
 
300
+ #imageToVideoApp .generate-button svg { width: 24px; height: 24px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
+ /* Progress Bar Section */
303
  #imageToVideoApp .timeline-header {
304
  display: flex;
305
  align-items: center;
306
  justify-content: space-between;
307
+ margin-bottom: 2rem;
308
  }
 
309
  #imageToVideoApp .timeline-title {
310
+ display: flex; align-items: center; gap: 0.75rem; font-size: 1.2rem; font-weight: 700; color: var(--text-primary);
 
 
 
 
 
311
  }
312
+
313
  #imageToVideoApp .timeline-status {
314
+ padding: 6px 16px; background: var(--input-bg); border: 1px solid var(--input-border);
315
+ border-radius: 20px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600;
316
+ display: flex; align-items: center; gap: 8px;
 
 
 
 
 
 
 
317
  }
318
+ #imageToVideoApp .timeline-status .pulse-dot { display: none; } /* Not needed in light theme */
319
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  #imageToVideoApp .film-timeline {
321
+ height: 8px; background-color: var(--input-bg); border-radius: 4px; overflow: hidden; margin-bottom: 1.5rem;
 
 
 
 
 
322
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
323
  #imageToVideoApp .timeline-progress {
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  height: 100%;
325
+ background: linear-gradient(90deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
326
+ transition: width 0.3s ease;
 
 
 
 
 
 
 
327
  border-radius: 4px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
328
  }
329
+ /* Hide old film strip frames */
330
+ #imageToVideoApp .timeline-frames { display: none; }
331
 
332
+ /* Status Messages */
333
+ #imageToVideoApp .status-container { max-height: 200px; overflow-y: auto; padding-left: 10px; }
334
  #imageToVideoApp .status-message {
335
+ padding: 12px 16px; background: var(--input-bg); border-radius: var(--radius-input); margin-bottom: 10px;
336
+ display: flex; align-items: center; gap: 12px; animation: fadeIn 0.3s ease-out;
337
+ border-left: 4px solid var(--accent-primary);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
339
+ #imageToVideoApp .status-message.success { border-left-color: var(--success-color); background: rgba(56, 161, 105, 0.1); }
340
+ #imageToVideoApp .status-message.error { border-left-color: var(--danger-color); background: rgba(229, 62, 62, 0.05); }
341
+ #imageToVideoApp .status-icon { width: 20px; height: 20px; flex-shrink: 0; }
342
+ #imageToVideoApp .status-text { font-size: 0.9rem; color: var(--text-secondary); }
343
 
344
+ /* Video Output */
345
  #imageToVideoApp .video-player {
346
+ position: relative; width: 100%; max-width: 800px; margin: 0 auto;
347
+ border-radius: var(--radius-input); overflow: hidden; box-shadow: var(--shadow-lg);
348
+ border: 1px solid var(--panel-border);
 
 
 
 
 
 
 
 
 
 
 
349
  }
350
+ #imageToVideoApp #outputVideo { width: 100%; display: block; background: #000; }
351
+ #imageToVideoApp .video-controls { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
 
 
 
 
 
 
352
  #imageToVideoApp .video-button {
353
+ padding: 0.8rem 1.5rem; border: none; border-radius: var(--radius-btn);
354
+ font-size: 1rem; font-weight: 600; cursor: pointer;
355
+ display: flex; align-items: center; gap: 10px; transition: var(--transition-smooth);
356
+ font-family: var(--app-font);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
357
  }
358
+ #imageToVideoApp .video-button:hover { transform: translateY(-3px); }
359
 
360
  #imageToVideoApp .video-button.primary {
361
+ background-color: var(--accent-primary); color: white;
 
 
362
  }
363
+ #imageToVideoApp .video-button.primary:hover { background-color: var(--accent-primary-hover); }
364
 
365
+ #imageToVideoApp .video-button:not(.primary) {
366
+ background-color: var(--input-bg); color: var(--text-secondary); border: 1px solid var(--input-border);
367
  }
368
+ #imageToVideoApp .video-button:not(.primary):hover {
369
+ background-color: var(--panel-border); color: var(--text-primary);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  }
371
 
372
+ /* Error Panel */
373
+ #imageToVideoApp .error-panel { background: rgba(229, 62, 62, 0.05); border-color: rgba(229, 62, 62, 0.2); }
374
  #imageToVideoApp .error-header {
375
+ display: flex; align-items: center; gap: 12px; margin-bottom: 1.5rem;
376
+ color: var(--danger-color); font-size: 1.2rem; font-weight: 700;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
377
  }
378
+ #imageToVideoApp .error-content { color: var(--text-secondary); line-height: 1.6; margin-bottom: 2rem; }
379
+ #imageToVideoApp .error-actions { display: flex; gap: 1rem; }
380
 
381
+ /* Loading Spinner */
382
  #imageToVideoApp .spinner-container {
383
+ display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem;
 
 
 
 
384
  }
 
385
  #imageToVideoApp .spinner {
386
+ width: 40px; height: 40px; margin-bottom: 1.5rem;
 
 
 
387
  }
 
388
  #imageToVideoApp .spinner-ring {
389
+ width: 100%; height: 100%; border-radius: 50%;
390
+ border: 4px solid var(--input-border);
391
+ border-top-color: var(--accent-primary);
392
+ animation: spin 0.8s linear infinite;
 
 
 
 
 
 
 
 
 
 
 
 
 
393
  }
394
+ #imageToVideoApp .spinner-text { color: var(--text-secondary); font-size: 1rem; text-align: center; }
395
 
396
  /* Scrollbar Styling */
397
+ #imageToVideoApp ::-webkit-scrollbar { width: 8px; height: 8px; }
398
+ #imageToVideoApp ::-webkit-scrollbar-track { background: var(--input-bg); border-radius: 4px; }
399
+ #imageToVideoApp ::-webkit-scrollbar-thumb { background: var(--input-border); border-radius: 4px; }
400
+ #imageToVideoApp ::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }
401
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
402
  /* Utility Classes */
403
+ #imageToVideoApp .hidden { display: none !important; }
 
 
 
 
 
 
404
 
405
+ @media (max-width: 768px) {
406
+ #imageToVideoApp .studio-title { font-size: 2.2rem; }
407
+ #imageToVideoApp .studio-container { padding: 20px 15px; }
408
+ #imageToVideoApp .studio-card,
409
+ #imageToVideoApp .timeline-container,
410
+ #imageToVideoApp .video-output-container,
411
+ #imageToVideoApp .error-panel { padding: 1.5rem; }
412
+ }
413
+
414
  </style>
415
  </head>
416
  <body>
 
418
  <div id="imageToVideoApp">
419
  <div class="studio-container">
420
 
421
+ <!-- Header -->
422
  <header class="studio-header">
 
 
 
 
 
 
423
  <div class="studio-logo">
424
  <div class="logo-icon">
425
+ <!-- SVG updated with new accent colors -->
426
  <svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
427
  <circle cx="50" cy="50" r="45" stroke="url(#grad1)" stroke-width="2" opacity="0.3"/>
428
  <circle cx="50" cy="50" r="35" stroke="url(#grad1)" stroke-width="2" opacity="0.5"/>
 
430
  <path d="M40 35 L65 50 L40 65 Z" fill="url(#grad1)"/>
431
  <defs>
432
  <linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%">
433
+ <stop offset="0%" style="stop-color:#4A6CFA;stop-opacity:1" /> <!-- Updated color -->
434
+ <stop offset="100%" style="stop-color:#0FD4A8;stop-opacity:1" /> <!-- Updated color -->
435
  </linearGradient>
436
  </defs>
437
  </svg>
438
  </div>
439
+ <h1 class="studio-title">AI Video Studio ✨</h1>
440
  </div>
441
+ <p class="studio-subtitle">تصاویر خود را با قدرت هوش مصنوعی به ویدیو تبدیل کنید</p>
442
  </header>
443
 
444
  <!-- Main Control Panel -->
 
447
  <!-- Upload Section -->
448
  <div class="studio-card">
449
  <div class="section-header">
450
+ <svg class="section-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4Z"/></svg>
451
+ <span class="section-title">۱. تصویر ورودی</span>
 
 
 
 
452
  </div>
453
 
454
  <div class="upload-zone" id="image-drop-zone">
455
  <input type="file" id="imageFile" accept="image/jpeg, image/png, image/webp" />
456
  <div class="upload-content">
457
+ <div class="upload-icon-wrapper">
458
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
 
 
 
459
  </div>
460
  <h3 class="upload-title">بارگذاری تصویر</h3>
461
+ <p class="upload-subtitle">تصویر را بکشید یا برای انتخاب کلیک کنید</p>
462
  </div>
463
  <img id="imagePreview" src="" alt="Preview" />
464
  </div>
 
467
  <!-- Prompt Section -->
468
  <div class="studio-card">
469
  <div class="section-header">
470
+ <svg class="section-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>
471
+ <span class="section-title">۲. دستور ساخت</span>
 
 
 
472
  </div>
473
 
474
  <div class="prompt-container">
 
 
 
 
 
 
475
  <textarea
476
  id="prompt"
477
  class="prompt-textarea"
478
+ placeholder="نحوه حرکت دوربین، جزئیات انیمیشن و افکت‌های مورد نظر را توصیف کنید. مثال: زوم آهسته به بیرون، در حالی که برگ‌ها در باد تکان می‌خورند"
479
  ></textarea>
480
  </div>
481
 
482
  <button id="generateButton" class="generate-button">
483
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3L12 8L17 10L12 12L10 17L8 12L3 10L8 8L10 3z"/></svg>
 
 
484
  تولید ویدیو
485
  </button>
486
  </div>
 
490
  <div id="statusSection" class="timeline-container">
491
  <div class="timeline-header">
492
  <div class="timeline-title">
493
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="2" x2="12" y2="6"></line><line x1="12" y1="18" x2="12" y2="22"></line><line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line><line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line><line x1="2" y1="12" x2="6" y2="12"></line><line x1="18" y1="12" x2="22" y2="12"></line><line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line><line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line></svg>
 
 
494
  پردازش ویدیو
495
  </div>
496
+ <div id="statusText" class="timeline-status">در حال پردازش</div>
 
 
 
497
  </div>
498
 
499
  <div class="film-timeline">
500
  <div class="timeline-progress" id="progressBar" style="width: 0%"></div>
 
 
 
 
 
 
 
501
  </div>
502
 
503
  <div id="aiLoader" class="spinner-container" style="display: none;">
504
+ <div class="spinner"><div class="spinner-ring"></div></div>
 
 
505
  <div id="aiLoaderText" class="spinner-text">در حال پردازش تصویر...</div>
506
  </div>
507
 
508
  <div id="statusMessages" class="status-container"></div>
 
509
  </div>
510
 
511
  <!-- Video Output -->
512
  <div id="outputSection" class="video-output-container">
513
+ <div class="section-header" style="border-bottom:none; margin-bottom: 1.5rem;">
514
+ <svg class="section-icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 3L12 8L17 10L12 12L10 17L8 12L3 10L8 8L10 3z"/><path d="M21 14l-1.5 3-3-1.5 3-3 1.5 3z"/><path d="M19.5 2.5l-3 1.5 1.5 3 3-1.5-1.5-3z"/></svg>
515
+ <span class="section-title">۳. نتیجه نهایی</span>
516
+ </div>
517
  <div class="video-player">
518
  <video id="outputVideo" controls preload="metadata" playsinline></video>
519
  </div>
520
 
521
+ <p id="finalSeed" style="text-align: center; color: var(--text-tertiary); margin-top: 1.5rem;"></p>
522
+ <div id="downloadLinkStatus" style="text-align: center; color: var(--text-secondary); margin-top: 1rem;"></div>
523
 
524
  <div class="video-controls">
525
  <button id="btnDownloadVideo" class="video-button primary" style="display: none;">
526
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/></svg>
 
 
527
  دانلود ویدیو
528
  </button>
529
  <button id="btnRestart" class="video-button">
530
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
 
 
531
  ویدیو جدید
532
  </button>
533
  </div>
 
536
  <!-- Error Panel -->
537
  <div id="criticalErrorSection" class="error-panel">
538
  <div class="error-header">
539
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
 
 
540
  <span>خطا در پردازش</span>
541
  </div>
542
  <div id="criticalErrorMessage" class="error-content"></div>
543
  <div class="error-actions">
544
+ <button id="btnCriticalErrorGoBack" class="video-button">بازگشت</button>
545
+ <button id="btnCriticalErrorRetry" class="video-button primary">تلاش مجدد</button>
 
 
 
 
546
  </div>
547
  </div>
548
 
549
  </div>
550
  </div>
551
+
552
+ <!-- Original JavaScript code is untouched -->
553
  <script>
 
554
  (function() {
555
  // DOM Elements
556
  const formContainer = document.querySelector('#imageToVideoApp .control-panel');
 
656
 
657
  statusMessagesDiv.insertBefore(messageDiv, statusMessagesDiv.firstChild);
658
  statusMessagesDiv.scrollTop = 0;
659
+
 
 
 
 
 
 
660
  }
661
 
662
  function clearStatusMessages() {
 
664
  progressBar.style.width = '0%';
665
  aiLoader.style.display = 'none';
666
 
 
 
 
 
 
667
  if (outputVideo.src && outputVideo.src.startsWith('blob:')) {
668
  URL.revokeObjectURL(outputVideo.src);
669
  }
670
  outputVideo.src = '';
 
671
  finalSeedElement.textContent = '';
672
  downloadLinkStatus.textContent = '';
673
  btnDownloadVideo.style.display = 'none';
 
818
  hideCriticalError();
819
  statusSection.classList.add('active');
820
  outputSection.classList.remove('active');
821
+
 
 
 
822
  const eventSource = new EventSource(`${VIDEO_SPACE_URL_BASE}/queue/data?session_hash=${currentVideoSessionHash}`);
823
  eventSource.onmessage = function(event) {
824
  const data = JSON.parse(event.data);
 
848
  outputSection.classList.add('active');
849
  outputVideo.src = ltxVideoUrl;
850
  outputVideo.load();
 
851
  outputVideo.scrollIntoView({ behavior: 'smooth', block: 'center' });
852
  finalSeedElement.textContent = data.output.data[1] ? `Seed: ${data.output.data[1]}` : '';
853
  prepareCustomDownloadLink(ltxVideoUrl);
 
1023
  statusSection.classList.add('active');
1024
  aiLoader.style.display = 'flex';
1025
  outputSection.classList.remove('active');
 
1026
 
1027
  // Calculate dimensions
1028
  const [ratioW_str, ratioH_str] = autoSelectedAspectRatio.split(':');