-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
1575 lines (1380 loc) · 51.8 KB
/
Copy pathstyles.css
File metadata and controls
1575 lines (1380 loc) · 51.8 KB
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
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* --- CSS Variables --- */
:root {
/* Font Families */
--font-family-sans: 'Inter', sans-serif;
--font-family-mono: 'Fira Code', monospace;
--font-family-base: var(--font-family-sans);
/* Transitions */
--transition-speed: 0.2s;
--transition-timing: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth ease-out-quad */
--transition-timing-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* Subtle overshoot/spring for bounces */
--transition-fast: 0.15s;
/* Radii */
--border-radius-sm: 4px;
--border-radius-md: 6px;
/* Slightly smaller */
--border-radius-lg: 10px;
/* Slightly smaller */
/* Sidebar */
--sidebar-min-width: 255px;
--sidebar-max-width: 500px;
--sidebar-default-width: 255px;
--sidebar-resize-handle-width: 5px;
/* Shadows (More Pronounced for Depth) */
--shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 1px rgba(0, 0, 0, 0.05);
--shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.08);
--shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
--shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);
--shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2), 0 10px 20px rgba(0, 0, 0, 0.15);
/* Z-Indexes */
--z-sticky: 10;
--z-dropdown: 50;
/* Example */
--z-modal: 100;
--z-toast: 1000;
/* For notifications */
/* --- Light Theme --- */
--primary-color: #D32F2F;
--primary-color-dark: #B71C1C;
--primary-color-light: #FFEBEE;
/* Keep this light for contrast */
--background-color: #ffffff;
/* Pure white */
--surface-color: #fdfdfd;
/* Slightly off-white */
--surface-color-alt: #f5f5f5;
/* Lighter grey */
--text-color: #1a1a1a;
/* Darker text */
--text-color-muted: #555555;
/* Adjusted grey */
--text-color-subtle: #888888;
/* Lighter subtle grey */
--border-color: #e0e0e0;
--border-color-second: #e0e0e0;
/* Lighter border */
--border-color-light: #ebebeb;
--hover-bg-color: #f0f0f0;
/* Subtle hover */
--focus-ring-color: rgba(211, 47, 47, 0.2);
/* Slightly softer focus */
--icon-color: #444444;
--icon-color-hover: var(--text-color);
--toast-bg: #333333;
--toast-text: #f8f9fa;
--resizer-color: var(--border-color);
--resizer-hover-color: var(--primary-color);
/* Add Primary RGB for potential use */
--primary-color-rgb: 211, 47, 47;
}
html[data-theme="dark"] {
--primary-color: #E57373;
/* Keep red vibrant */
--primary-color-dark: #bb6262;
/* Lighter red for hover/active */
--primary-color-light: rgba(229, 115, 115, 0.1);
/* Subtle highlight */
--background-color: #131316;
/* Much darker background */
--surface-color: #131316;
/* Darker surface */
--surface-color-alt: #2a2a2a;
/* Slightly lighter dark */
--text-color: #e1e1e1;
/* Slightly less bright white */
--text-color-muted: #a0a0a0;
/* Lighter muted */
--text-color-subtle: #707070;
/* Darker subtle */
--border-color: transparent;
/* Changed to transparent */
--border-color-light: #282828;
/* Second Color */
--border-color-second: #333333;
/* Button Color */
--button-color: #18181b;
/* Subtle inner border */
--hover-bg-color: #2c2c2c;
/* Darker hover */
--focus-ring-color: rgba(229, 115, 115, 0.3);
/* Keep focus visible */
--icon-color: #a0a0a0;
--icon-color-hover: var(--text-color);
--toast-bg: #e1e1e1;
/* Light toast on dark bg */
--toast-text: #1a1a1a;
--resizer-color: var(--border-color);
--resizer-hover-color: var(--primary-color);
/* Add Primary RGB for potential use */
--primary-color-rgb: 229, 115, 115;
--video-card-background: #18181b;
}
/* --- Base & Reset --- */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html {
font-size: 16px;
scroll-behavior: smooth;
height: 100%;
}
body {
background-color: var(--background-color);
color: var(--text-color);
font-family: var(--font-family-base);
line-height: 1.6;
transition: background-color var(--transition-speed) var(--transition-timing), color var(--transition-speed) var(--transition-timing);
overscroll-behavior-y: contain;
height: 100%;
min-height: 100%;
opacity: 0;
animation: fadeIn 0.5s var(--transition-timing) forwards; /* Use new timing */
padding-top: env(safe-area-inset-top, 0px);
padding-bottom: env(safe-area-inset-bottom, 0px);
padding-left: env(safe-area-inset-left, 0px);
padding-right: env(safe-area-inset-right, 0px);
}
/* Disable animation for iOS PWA */
html.ios-pwa body {
opacity: 1 !important;
animation: none !important;
}
/* Apple-like fade-in animation */
@keyframes fadeIn {
from { opacity: 0; margin-top: 10px; }
to { opacity: 1; margin-top: 0; }
}
img,
svg {
display: block;
max-width: 100%;
}
button,
input {
font-family: inherit;
font-size: inherit;
}
*:focus-visible {
/* Consistent focus outline */
outline: 2px solid var(--focus-ring-color);
outline-offset: 2px;
box-shadow: 0 0 0 4px var(--focus-ring-color);
border-radius: var(--border-radius-sm);
}
*:focus {
outline: none;
}
/* Remove default focus for non-keyboard */
/* --- Layout --- */
.container {
display: flex;
height: 100%;
overflow: hidden;
}
/* --- Sidebar --- */
.sidebar {
width: var(--sidebar-default-width);
min-width: var(--sidebar-min-width);
max-width: var(--sidebar-max-width);
border-right: 1px solid var(--border-color-light);
display: flex;
flex-direction: column;
flex-shrink: 0;
transition: background-color var(--transition-speed) var(--transition-timing), border-color var(--transition-speed) var(--transition-timing);
position: relative;
will-change: background-color, border-color;
}
/* Sidebar Resizer */
.sidebar-resizer {
position: absolute;
top: 0;
right: -3px;
width: var(--sidebar-resize-handle-width);
height: 100%;
background-color: transparent;
cursor: col-resize;
z-index: var(--z-dropdown);
}
.sidebar-resizer:hover::after,
.sidebar-resizer.resizing::after {
content: "";
position: absolute;
top: 0;
left: 0px; /* Adjust to expand from center */
width: 5px; /* Make it wider on hover/active */
height: 100%;
background-color: var(--resizer-hover-color);
opacity: 1; /* Make it fully opaque */
transition: background-color var(--transition-speed) var(--transition-timing), width var(--transition-speed) var(--transition-timing), opacity var(--transition-speed) var(--transition-timing), left var(--transition-speed) var(--transition-timing);
border-radius: 2px; /* Slight roundness */
}
.sidebar-resizer::after {
content: "";
position: absolute;
top: 0;
left: 1px;
width: 3px;
height: 100%;
background-color: var(--resizer-color);
opacity: 0.3;
transition: background-color var(--transition-speed) var(--transition-timing), width var(--transition-speed) var(--transition-timing), opacity var(--transition-speed) var(--transition-timing), left var(--transition-speed) var(--transition-timing);
border-radius: 2px;
}
.sidebar-content {
/* Scrollable area */
padding: 15px; /* Adjusted padding */
overflow-y: auto;
flex-grow: 1;
border: 1px solid var(--border-color-light); /* Added border */
border-radius: var(--border-radius-lg); /* Added border-radius */
margin: 10px 10px 5px 10px; /* Added margin (Top, Sides, Bottom) */
background-color: var(--surface-color); /* Ensure background color */
transition: background-color var(--transition-speed) var(--transition-timing), border-color var(--transition-speed) var(--transition-timing), padding var(--transition-speed) var(--transition-timing), margin var(--transition-speed) var(--transition-timing); /* Added transition */
}
.sidebar-footer {
padding: 15px; /* Adjusted padding */
/* border-top: 1px solid var(--border-color-light); */ /* Removed original border-top */
flex-shrink: 0;
background-color: var(--background-color);
transition: background-color var(--transition-speed) var(--transition-timing), border-color var(--transition-speed) var(--transition-timing), padding var(--transition-speed) var(--transition-timing), margin var(--transition-speed) var(--transition-timing); /* Added transition */
border: 1px solid var(--border-color-light); /* Added border */
border-radius: var(--border-radius-lg); /* Added border-radius */
margin: 5px 10px 10px 10px; /* Added margin (Top, Sides, Bottom) */
}
.sidebar-header {
/* Keep default or remove if not needed */
/* Add horizontal padding to align with margined content/footer */
}
.sidebar h2 {
font-weight: 700;
font-size: 1.2rem;
color: var(--text-color);
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 16px;
margin-top: -4px;
transition: color var(--transition-speed) var(--transition-timing);
}
.sidebar h2 svg {
width: 30px;
height: 30px;
color: var(--primary-color);
}
/* Form Styles */
.form-section {
margin-bottom: 20px;
}
.form-section label {
display: block;
font-weight: 500;
margin-bottom: 6px;
font-size: 0.875rem;
color: var(--text-color-muted);
}
input[type="text"],
input[type="url"],
input[type="search"] {
width: 100%;
padding: 8px 12px;
border: 1px solid var(--border-color);
border-radius: var(--border-radius-md);
font-size: 0.9rem;
background-color: var(--button-color);
color: var(--text-color);
transition: border-color var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing), background-color var(--transition-speed) var(--transition-timing), color var(--transition-speed) var(--transition-timing);
}
input[type="text"]:focus,
input[type="url"]:focus,
input[type="search"]:focus {
border-color: var(--primary-color);
background-color: var(--surface-color);
box-shadow: 0 0 0 3px var(--focus-ring-color);
/* Keep focus ring */
}
input::placeholder {
color: var(--text-color-subtle);
}
input[type="search"] {
padding-left: 30px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: 10px center;
background-size: 14px 14px;
}
html[data-theme="dark"] input[type="search"] {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23b0b3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
}
/* Button Styles */
button {
background-color: #d75f5f;
color: white;
border: none;
padding: 8px 16px;
border-radius: var(--border-radius-md);
cursor: pointer;
font-size: 0.9rem;
font-weight: 600;
transition: background-color var(--transition-speed) var(--transition-timing),
transform var(--transition-speed) var(--transition-timing-spring), /* Use spring for transform */
box-shadow var(--transition-speed) var(--transition-timing-spring), /* Use spring for shadow */
opacity var(--transition-speed) var(--transition-timing);
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
box-shadow: var(--shadow-xs);
line-height: 1.4;
/* Prevent text jump on loading */
will-change: transform, background-color, box-shadow; /* Hint to the browser for better performance */
}
button:not(:disabled):hover {
transform: translateY(-2px) scale(1.02) translateZ(0); /* Add translateZ(0) for GPU acceleration */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: #bb6262;
}
button:not(:disabled):active {
transform: translateY(0px) translateZ(0); /* Ensure consistency and make it "press" in */
box-shadow: var(--shadow-xs);
}
button:disabled {
background-color: var(--surface-color-alt);
color: var(--text-color-subtle);
cursor: not-allowed;
transform: none;
box-shadow: none;
opacity: 0.7;
}
button.is-loading {
pointer-events: none;
}
/* Loading spinner inside button */
.spinner {
width: 1em;
height: 1em;
border: 2px solid currentColor;
border-right-color: transparent;
border-radius: 50%;
animation: spin 0.6s linear infinite;
margin-left: -2px;
/* Adjust alignment */
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
button.secondary {
font-size: 0.8rem;
background-color: var(--surface-color);
color: var(--text-color-muted);
border: 1px solid var(--border-color-second);
padding: 6px 10px;
font-weight: 500;
box-shadow: none;
}
button.secondary:not(:disabled):hover {
background-color: var(--hover-bg-color);
color: var(--text-color);
transform: none;
box-shadow: none;
}
button.icon-button {
background: none;
color: var(--icon-color);
padding: 6px;
font-size: 1.1rem;
/* Icon size */
line-height: 1;
border-radius: 50%;
box-shadow: none;
}
button.icon-button:not(:disabled):hover {
background-color: var(--hover-bg-color);
color: var(--icon-color-hover);
transform: none;
box-shadow: none;
}
button.icon-button svg {
width: 1.1em;
height: 1.1em;
}
/* Playlist List */
.playlist-list {
list-style: none;
margin-top: 16px;
}
.playlist-item {
padding: 8px 12px;
margin-bottom: 4px;
border-radius: var(--border-radius-md);
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: transform 0.3s var(--transition-timing), opacity 0.3s var(--transition-timing), background-color 0.2s var(--transition-timing), border-color 0.2s var(--transition-timing), box-shadow 0.2s var(--transition-timing); /* Add shadow transition */
position: relative;
font-size: 0.9rem;
border: 1px solid transparent;
will-change: transform, background-color, box-shadow;
}
.playlist-item:hover {
background-color: var(--hover-bg-color);
box-shadow: var(--shadow-xs); /* Slight shadow */
}
.playlist-item.active {
background-color: var(--primary-color-light);
color: var(--primary-color-dark);
font-weight: 600;
border-color: var(--primary-color-light);
}
html[data-theme="dark"] .playlist-item.active {
color: var(--primary-color);
border-color: rgba(var(--primary-color-rgb), 0.3);
}
.playlist-item.dragging {
opacity: 0.4;
cursor: grabbing;
background: var(--surface-color-alt);
box-shadow: var(--shadow-md);
border-color: var(--border-color);
will-change: transform, opacity;
}
/* Playlist drag-over style (similar to video card drag-over) */
.playlist-item.drag-over {
outline: 2px dashed var(--primary-color);
outline-offset: -2px;
background-color: var(--primary-color-light); /* Use a more active background */
transform: scale(1.01); /* Subtle "target" scale */
transition: all var(--transition-fast) ease-in-out; /* Quick transition for drag feedback */
}
.playlist-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-right: 8px;
flex-grow: 1;
/* pointer-events: none; */ /* Removed to allow clicking name to select */
}
.playlist-count {
font-size: 0.8rem;
color: var(--text-color-subtle);
margin-left: 4px;
font-weight: 400;
flex-shrink: 0;
pointer-events: none;
}
.playlist-item.active .playlist-count {
color: var(--primary-color);
}
html[data-theme="dark"] .playlist-item.active .playlist-count {
color: var(--primary-color);
}
.playlist-item .controls {
display: flex;
gap: 2px;
opacity: 0;
transition: opacity var(--transition-speed) var(--transition-timing);
flex-shrink: 0;
margin-left: 8px;
align-items: center; /* Align controls vertically */
}
.playlist-item:hover .controls,
.playlist-item.active .controls,
.playlist-item .controls:focus-within {
/* Show on focus too */
opacity: 1;
}
.playlist-item .controls button,
.playlist-item .controls .playlist-drag-handle { /* Include drag handle */
/* Make control buttons smaller */
padding: 4px;
font-size: 0.9rem;
line-height: 1;
min-width: auto;
background-color: transparent;
color: var(--text-color-muted);
box-shadow: none;
}
.playlist-item .controls button:hover,
.playlist-item .controls .playlist-drag-handle:hover { /* Include drag handle */
background-color: var(--surface-color-alt);
color: var(--text-color);
}
html[data-theme="dark"] .playlist-item .controls button:hover,
html[data-theme="dark"] .playlist-item .controls .playlist-drag-handle:hover {
background-color: var(--background-color);
}
.playlist-item .controls button svg,
.playlist-item .controls .playlist-drag-handle svg { /* Include drag handle */
width: 0.9em;
height: 0.9em;
}
.playlist-drag-handle {
cursor: grab; /* Use grab cursor for the handle */
}
.playlist-drag-handle:active {
cursor: grabbing; /* Use grabbing cursor while dragging */
color: var(--text-color); /* Change color while active */
}
/* --- Main Content --- */
.main-content {
flex: 1;
padding: 10px 25px;
overflow-y: auto;
transition: background-color var(--transition-speed) var(--transition-timing);
border: 1px solid var(--border-color-light);
border-radius: var(--border-radius-lg);
margin: 10px 10px 10px 10px;
will-change: background-color;
}
.main-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
flex-wrap: wrap;
gap: 16px;
padding-bottom: 16px;
border-bottom: 1px solid var(--border-color-light);
transition: all var(--transition-speed) var(--transition-timing);
opacity: 0;
animation: fadeIn var(--transition-speed) var(--transition-timing) 0.1s forwards; /* Use new timing */
}
#currentPlaylistTitle {
font-weight: 700;
font-size: 1.5rem;
/* Slightly smaller */
color: var(--text-color);
min-height: 1.5rem;
flex-grow: 1;
transition: color var(--transition-speed) var(--transition-timing);
}
.playlist-actions {
/* Combined controls */
display: flex;
align-items: center;
gap: 12px;
flex-shrink: 0;
}
.control-group {
display: flex;
align-items: center;
gap: 8px;
}
.control-group label,
.control-group span {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-color-muted);
cursor: pointer;
}
/* Autoplay Toggle Switch (No change needed, uses vars) */
.switch {
position: relative;
display: inline-block;
width: 34px;
height: 20px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--surface-color-alt);
transition: .4s;
border-radius: 20px;
}
.slider:before {
position: absolute;
content: "";
height: 14px;
width: 14px;
left: 3px;
bottom: 3px;
background-color: var(--surface-color);
transition: .4s;
border-radius: 50%;
box-shadow: var(--shadow-xs);
}
input:checked+.slider {
background-color: var(--primary-color);
}
input:checked+.slider:before {
transform: translateX(14px);
}
html[data-theme="dark"] .slider:before {
background-color: var(--text-color-muted);
}
html[data-theme="dark"] input:checked+.slider:before {
background-color: var(--surface-color);
}
/* Add Video Form */
.video-form {
background-color: var(--surface-color);
padding: 10px 20px;
border-radius: var(--border-radius-lg);
box-shadow: var(--shadow-sm);
margin-bottom: 20px;
border: 1px solid var(--border-color-light);
transition: background-color var(--transition-speed) var(--transition-timing), border-color var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
display: flex;
align-items: center;
gap: 10px;
}
.video-form label {
margin-bottom: 0;
flex-shrink: 0;
}
.video-form input[type="url"] {
flex-grow: 1;
margin-bottom: 0;
}
.video-form button {
flex-shrink: 0;
}
/* Player Wrapper */
.player-wrapper {
margin-top: 24px;
margin-bottom: 24px;
border-radius: var(--border-radius-lg);
overflow: hidden;
box-shadow: var(--shadow-md);
position: relative;
z-index: var(--z-sticky);
border: 1px solid var(--border-color-light);
transition: border-color var(--transition-speed) var(--transition-timing), box-shadow var(--transition-speed) var(--transition-timing);
background-color: #000;
/* Black background behind player */
}
.close-player-btn {
position: absolute;
top: 5px;
right: 5px;
z-index: calc(var(--z-sticky) + 1);
background-color: rgba(0, 0, 0, 0.5);
color: white;
border: none;
border-radius: 50%;
width: 28px;
height: 28px;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
opacity: 0.7;
transition: opacity 0.2s ease, background-color 0.2s ease;
transform: translateY(0);
}
.close-player-btn:hover {
opacity: 1;
background-color: rgba(0, 0, 0, 0.7);
}
.close-player-btn svg {
width: 16px;
/* Adjust size as needed */
height: 16px;
}
/* Player Container */
.player-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
transition: opacity var(--transition-speed) ease-in-out, height var(--transition-speed) ease-in-out;
will-change: opacity, height;
}
/* Style to hide the video when audio-only is active */
body.audio-only-active .player-container {
height: 0 !important;
padding-bottom: 0 !important;
overflow: hidden;
opacity: 0;
}
/* Keep the wrapper visible but maybe add an indicator? */
body.audio-only-active .player-wrapper {
min-height: auto;
padding: 5px 40px 5px 15px;
background-color: var(--surface-color-alt);
box-shadow: var(--shadow-sm);
display: block;
position: sticky;
}
/* New styles for audio-only info */
.audio-only-info {
display: none;
align-items: center;
gap: 6px;
font-size: 0.85rem;
color: var(--text-color-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.audio-only-info .audio-title {
font-weight: 600;
color: var(--text-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
body.audio-only-active .audio-only-info {
display: flex;
}
/* End new styles */
/* Audio-only mode close button */
body.audio-only-active .close-player-btn {
top: 50%;
right: 8px;
transform: translateY(-50%); /* Center vertically using transform */
background-color: transparent;
color: var(--icon-color);
/* Add these to prevent layout shift on hover */
margin: 0;
transition: opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
body.audio-only-active .close-player-btn:hover {
background-color: var(--hover-bg-color);
color: var(--icon-color-hover);
/* Maintain position on hover */
transform: translateY(-50%);
}
#player {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}
/* Video Grid */
.video-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
/* Smaller min */
gap: 16px;
margin-top: 24px;
transition: all 0.3s ease;
will-change: transform, opacity;
}
.video-card {
background-color: var(--video-card-background);
border-radius: var(--border-radius-md);
overflow: hidden;
box-shadow: var(--shadow-xs);
cursor: pointer;
transition: transform 0.3s var(--transition-timing-spring), opacity 0.3s var(--transition-timing), box-shadow 0.3s var(--transition-timing); /* Use spring for transform, smooth for others */
display: flex;
flex-direction: column;
position: relative;
border: 1px solid transparent;
/* Placeholder for hover/drag */
will-change: transform, opacity, box-shadow;
}
.video-card:hover {
transform: translateY(-5px) scale(1.02) translateZ(0);
opacity: 0.98; /* Slightly less opaque */
box-shadow: var(--shadow-md); /* More pronounced shadow on hover */
will-change: transform, opacity, box-shadow;
}
/* Drag & Drop Styles */
.video-card.dragging {
opacity: 0.4;
box-shadow: var(--shadow-lg);
transform: scale(0.98);
cursor: grabbing;
/* border-color: var(--primary-color); */ /* Removed border */
background: var(--surface-color-alt);
will-change: transform, opacity;
}
/* Style for the active/playing video card */
.video-card.playing {
border-color: var(--primary-color);
box-shadow: var(--shadow-md);
background-color: var(--primary-color-light);
/* Keep the transparent border placeholder for consistency */
border-width: 1px;
border-style: solid;
}
html[data-theme="dark"] .video-card.playing {
background-color: rgba(var(--primary-color-rgb), 0.15);
border-color: var(--primary-color-dark);
}
/* Remove ::before/::after and inset box-shadow styles */
/*
.video-card::before,
.video-card::after { ... }
.video-card::before { ... }
.video-card::after { ... }
.video-card.drag-over-top::before,
.video-card.drag-over-bottom::after { ... }
.video-card.drag-over-top { ... }
.video-card.drag-over-bottom { ... }
*/
/* Restore the original drag-over outline style */
.video-card.drag-over {
box-shadow: var(--shadow-md); /* Keep hover shadow */
/* Use border or outline for drop indicator */
outline: 2px dashed var(--primary-color);
outline-offset: -2px; /* Inside the card */
transform: scale(1.01); /* Subtle "target" scale */
background-color: var(--primary-color-light); /* Use a more active background */
transition: all var(--transition-fast) ease-in-out; /* Quick transition for drag feedback */
}
html[data-theme="dark"] .video-card.drag-over {
background-color: rgba(var(--primary-color-rgb), 0.2);
}
/* Optional: Add space indicator between cards (Removed as we use ::before/::after now) */
/* .drop-indicator { ... } */
.thumbnail-wrapper {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
background-color: var(--surface-color-alt);
transition: background-color var(--transition-speed) var(--transition-timing);
}
.thumbnail {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transition: transform 0.3s ease-out;
}
.video-card:hover .thumbnail {
transform: scale(1.03);
}
.video-info {
padding: 10px 12px;
flex-grow: 1;
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 8px;
}
.video-info h4 {
font-size: 0.85rem;
font-weight: 600;
margin: 0;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1;
transition: color var(--transition-speed) var(--transition-timing);
}