-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
1246 lines (1084 loc) · 34.3 KB
/
Copy pathstyles.css
File metadata and controls
1246 lines (1084 loc) · 34.3 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
/*==========================
全局变量和基础样式
==========================*/
:root {
/* 颜色变量 */
--color-primary: 124, 58, 237;
--color-primary-dark: 109, 40, 217;
--color-secondary: 220, 220, 225;
--color-secondary-dark: 209, 213, 219;
--color-body-bg: 247, 247, 250;
--color-gray-50: 249, 250, 251;
--color-gray-100: 243, 244, 246;
--color-gray-500: 107, 114, 128;
--color-gray-700: 55, 65, 81;
--color-gray-800: 31, 41, 55;
--color-white: 255, 255, 255;
--color-black: 0, 0, 0;
/* 阴影变量 */
--shadow-apple-soft: 0 1px 3px rgba(0, 0, 0, 0.08);
--shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
--shadow-btn: 0 1px 3px rgba(var(--color-primary), 0.2);
--shadow-btn-hover: 0 3px 10px rgba(var(--color-primary), 0.3);
--shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.05);
/* 过渡动画 */
--transition-fast: 0.2s;
--transition-normal: 0.35s;
--transition-slow: 0.6s;
/* 字体大小 */
--font-base: clamp(12px, 0.4vw + 0.5rem, 16px);
--font-sm: clamp(10px, 0.3vw + 0.5rem, 14px);
--font-lg: clamp(8px, 0.5vw + 0.5rem, 18px);
--btn-font-size: clamp(14px, 1.1vw, 18px);
--control-btn-font-size: clamp(12px, 1.2vw, 18px);
/* 响应式断点 */
--mobile-breakpoint: 640px;
}
html,
body {
height: 100%;
/* 占满屏幕高度 */
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
background-color: rgb(var(--color-body-bg));
transition: background-color 0.3s ease;
min-height: 100vh;
}
.shadow-apple {
box-shadow: var(--shadow-card);
}
.bg-primary {
background-color: rgb(var(--color-primary));
}
.hover\:bg-primary-dark:hover {
background-color: rgb(var(--color-primary-dark));
}
.text-primary {
color: rgb(var(--color-primary));
}
.border-primary {
border-color: rgb(var(--color-primary));
}
.focus\:border-primary:focus {
border-color: rgb(var(--color-primary));
}
.bg-secondary {
background-color: rgb(var(--color-secondary));
}
.hover\:bg-secondary-dark:hover {
background-color: rgb(var(--color-secondary-dark));
}
/*==========================
基础组件样式
==========================*/
/* 控制栏容器 */
#statsBar {
padding: clamp(1px, 0.1vw, 2px) clamp(2px, 0.2vw, 4px) !important;
margin: clamp(1px, 0.1vw, 2px) 0 !important;
min-height: auto !important;
/* 禁止固定最小高度 */
height: auto !important;
/* 由内容决定高度 */
display: flex !important;
}
.controls-container {
display: flex !important;
flex-wrap: wrap !important;
justify-content: flex-end !important;
align-items: center !important;
width: 100% !important;
gap: clamp(4px, 0.6vw, 8px) !important;
padding: clamp(1px, 0.1vw, 2px) !important;
box-sizing: border-box !important;
overflow-x: auto !important;
/* 允许横向滚动 */
}
/* 子容器保持不换行(布局和清晰度内部不拆分) */
.controls-container>div {
display: flex !important;
flex-wrap: nowrap !important;
align-items: center !important;
margin: 0 !important;
padding: 0 !important;
gap: 0 !important;
/* 统一由父元素 gap 控制间距 */
}
/* 最后一组移除右边距,避免整体右移 */
.controls-container>div:last-child {
margin: 0 !important;
}
/* 滚动条样式 */
.controls-container::-webkit-scrollbar {
height: 3px !important;
}
.controls-container::-webkit-scrollbar-thumb {
background-color: rgba(var(--color-primary), 0.3) !important;
border-radius: 3px !important;
}
#emptyState {
position: absolute !important;
top: 30% !important;
left: 50% !important;
transform: translate(-50%, -50%) !important;
text-align: center !important;
z-index: 1 !important;
display: none !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
padding: clamp(1rem, 1vh, 3rem) !important;
margin: 0 !important;
gap: clamp(1rem, 2vw, 2rem) !important;
}
/* 仅针对功能型隐藏元素生效,不影响响应式文本 */
#emptyState.hidden,
#loadingState.hidden,
#actionDropdown.hidden,
#imageModal.hidden,
#downloadOverlay.hidden {
display: none !important;
}
/* 保留空状态显示逻辑 */
#emptyState:not(.hidden) {
display: flex !important;
}
.rect-item {
position: absolute;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
background-color: transparent;
cursor: pointer;
box-sizing: border-box !important;
}
.rect-item img {
width: 100%;
height: 100%;
object-fit: contain !important;
transition: transform var(--transition-normal) ease !important;
}
.rect-item:hover img {
transform: scale(1.05);
}
.fade-in {
animation: fadeIn 0.5s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* 水印层样式 */
#domWatermark {
position: absolute;
/* 保持绝对定位 */
z-index: 100;
font-weight: bold;
text-align: center;
-webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.85);
text-stroke: 0.8px rgba(255, 255, 255, 0.85);
color: rgba(var(--color-primary), 0.7);
opacity: 0.8;
pointer-events: none;
user-select: none;
transform: rotate(-15deg);
/* 保留旋转效果 */
white-space: nowrap;
overflow: hidden;
line-height: 1.2;
max-height: 80%;
font-size: clamp(2.5rem, 10vw, 6rem);
}
.controls-bar {
display: flex;
align-items: center;
justify-content: center;
gap: clamp(1rem, 2vw, 2rem) !important;
box-sizing: border-box;
padding: clamp(1px, 0.1vw, 2px) clamp(2px, 0.2vw, 4px) !important;
width: 100% !important;
max-width: 100% !important;
}
.controls-bar .stats-group,
.controls-bar .actions-group {
display: flex;
align-items: center;
flex-wrap: nowrap;
gap: clamp(1rem, 2vw, 2rem) !important;
}
.controls-bar>* {
margin: 0 !important;
flex-shrink: 0;
}
/*==========================
按钮和输入框样式
==========================*/
/* 通用按钮 */
.unified-btn {
padding: calc(clamp(1px, 0.1vw, 2px) + 2px) calc(clamp(2px, 0.2vw, 4px) + 2px) !important;
min-height: clamp(30px, 3vw, 38px) !important;
line-height: normal !important;
/* 关键:将行高改为normal,避免文字强制贴顶 */
align-items: center;
/* 确保flex布局下内容垂直居中(原有可能遗漏) */
color: white;
background-color: rgb(var(--color-primary));
box-shadow: var(--shadow-btn) !important;
gap: clamp(4px, 0.3vw, 6px) !important;
white-space: nowrap !important;
border-radius: clamp(8px, 1vw, 16px) !important;
justify-content: center !important;
border: 1px solid transparent !important;
font-size: var(--control-btn-font-size) !important;
transition: all var(--transition-normal) ease !important;
display: inline-flex !important;
/* 强制flex布局 */
vertical-align: middle !important;
/* 与容器基线对齐 */
margin: 0 !important;
/* 清除默认外边距 */
}
button.unified-btn:disabled {
background: #6b7280 !important;
color: #d1d5db !important;
box-shadow: none !important;
cursor: not-allowed !important;
border-color: #6b7280 !important;
border-radius: 12px;
opacity: 0.6 !important;
}
button.unified-btn:disabled:hover,
button.unified-btn[disabled]:hover {
cursor: not-allowed !important;
transform: none !important;
position: relative;
}
button.unified-btn:disabled:hover::after,
button.unified-btn[disabled]:hover::after {
content: "请先添加图片";
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background: #374151;
color: white;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
white-space: nowrap;
z-index: 1000;
margin-bottom: 4px;
opacity: 0;
transition: opacity 0.2s;
}
button.unified-btn:disabled:hover::before,
button.unified-btn[disabled]:hover::before {
content: "";
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
border: 4px solid transparent;
border-top-color: #374151;
margin-bottom: 0;
opacity: 0;
transition: opacity 0.2s;
}
button.unified-btn:disabled:hover::after,
button.unified-btn[disabled]:hover::after,
button.unified-btn:disabled:hover::before,
button.unified-btn[disabled]:hover::before {
opacity: 1;
}
.unified-btn:hover:not(:disabled) {
background-color: rgb(var(--color-primary-dark));
box-shadow: var(--shadow-btn-hover) !important;
transform: translateY(-1px);
}
.unified-btn:active:not(:disabled) {
background-color: rgb(var(--color-primary-dark));
box-shadow: 0 2px 5px rgba(var(--color-primary), 0.2);
transform: translateY(0);
}
/* 下拉菜单样式 */
#actionDropdown {
position: absolute;
z-index: 1000 !important;
transition: opacity 0.2s ease, transform 0.2s ease;
opacity: 0;
transform: translateY(-5px);
pointer-events: none;
}
#actionDropdown:not(.hidden) {
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
#actionDropdown button {
border: none;
background: none;
cursor: pointer;
color: inherit;
/* 继承父容器颜色 */
}
#actionDropdown button:hover {
background-color: rgb(var(--color-secondary));
}
#actionDropdown button {
padding: calc(0.5rem + 2px) calc(1rem + 2px) !important;
}
/* 布局/清晰度选择器按钮 */
.ratio-quality-btn {
padding: clamp(2px, 0.3vw, 4px) clamp(6px, 0.6vw, 8px) !important;
border: 1px solid rgb(var(--color-secondary));
border-left: none;
border-radius: 0;
min-height: clamp(26px, 2.5vw, 34px) !important;
display: inline-flex;
align-items: center;
justify-content: center;
border-width: 1px !important;
font-size: var(--btn-font-size) !important;
box-shadow: var(--shadow-btn) !important;
line-height: 1 !important;
transition: all var(--transition-normal) ease !important;
}
.ratio-quality-btn:first-of-type {
border-top-left-radius: 9999px;
border-bottom-left-radius: 9999px;
}
.ratio-quality-btn:last-of-type {
border-top-right-radius: 9999px;
border-bottom-right-radius: 9999px;
}
.ratio-quality-btn.active {
background-image: linear-gradient(to top, rgb(var(--color-primary-dark)) 0%, rgb(var(--color-primary)) 100%);
padding: clamp(2px, 0.3vw, 4px) clamp(6px, 0.6vw, 8px) !important;
border-color: rgb(var(--color-primary)) !important;
color: white;
box-shadow: var(--shadow-btn-hover) !important;
z-index: 1;
margin: 0;
}
.ratio-quality-btn.active:first-of-type {
border-top-left-radius: 9999px;
border-bottom-left-radius: 9999px;
border-top-right: 0;
border-bottom-right: 0;
}
.ratio-quality-btn.active:last-of-type {
border-top-right-radius: 9999px;
border-bottom-right-radius: 9999px;
border-top-left: 0;
border-bottom-left: 0;
}
.ratio-quality-btn.active:not(:first-of-type):not(:last-of-type) {
border-radius: 0;
}
.ratio-quality-btn.active:only-child {
border-radius: 9999px;
}
.ratio-quality-btn.active~.ratio-quality-btn:not(.active) {
border-left: 2px solid rgb(var(--color-secondary));
}
.route-input-base {
width: clamp(70px, 6vw, 120px) !important;
max-width: clamp(70px, 6vw, 120px) !important;
height: clamp(28px, 3vw, 36px) !important;
padding: 0 clamp(8px, 0.8vw, 10px) !important;
border: 1px solid rgb(var(--color-primary)) !important;
border-radius: clamp(6px, 0.6vw, 10px) !important;
text-align: center;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
line-height: clamp(28px, 3vw, 36px) !important;
box-sizing: border-box;
outline: none;
border-width: 1px !important;
font-size: clamp(12px, 0.9vw, 16px) !important;
transition: all var(--transition-normal) ease !important;
}
.route-input-base:focus {
border-color: rgb(var(--color-primary));
box-shadow: 0 0 0 3px rgba(var(--color-primary), 0.3), inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.route-input-base::-webkit-input-placeholder,
.route-input-base:-ms-input-placeholder,
.route-input-base::placeholder {
text-align: center;
color: #9ca3af;
line-height: inherit;
vertical-align: middle;
}
/* 模态框控制按钮 */
#closeModal,
#prevImageBtn,
#nextImageBtn {
padding: calc(clamp(4px, 0.4vw, 6px) + 2px) calc(clamp(8px, 0.8vw, 10px) + 2px) !important;
}
/* 动画与错误样式 */
.animate-pulse-primary {
animation: pulse-primary 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-primary {
0%,
100% {
box-shadow: 0 0 0 0 rgba(var(--color-primary), 0.7);
}
50% {
box-shadow: 0 0 0 8px rgba(var(--color-primary), 0);
}
}
.border-error {
border-color: rgb(var(--color-primary));
}
/* 下载按钮样式 */
.download-temp-style {
box-shadow: none !important;
border: none !important;
overflow: hidden !important;
}
footer {
height: clamp(50px, 8vw, 70px) !important;
padding: clamp(3px, 0.5vw, 8px) !important;
}
/* 主题栏父容器:清除所有边距限制,全屏显示 */
.w-full.sticky.top-0.z-10 {
display: block !important;
padding: 0 !important;
margin: 0 !important;
}
/* 主题栏内部容器:保持左右分散对齐 */
header .w-full.flex.justify-between.items-center.flex-wrap.gap-2 {
gap: clamp(1rem, 2vw, 2rem) !important;
align-items: center !important;
padding: 0 !important;
flex-wrap: nowrap !important;
/* 禁止换行 */
min-width: 0 !important;
/* 允许内容收缩 */
}
header .flex.items-center.space-x-2:last-child {
align-items: center !important;
/* 强制垂直居中 */
gap: clamp(1rem, 2vw, 2rem) !important;
margin: auto !important;
width: auto !important;
max-width: 100% !important;
padding: 0 !important;
/* 清除容器内边距 */
}
/* 强制按钮组靠右 */
header .flex.items-center.space-x-2 {
margin: auto !important;
width: auto !important;
max-width: 100% !important;
}
/* 标题区域强制靠左 */
header .flex.items-end.flex-wrap {
justify-content: flex-start !important;
margin: 0 !important;
padding: 0 !important;
width: auto !important;
flex: 1 1 auto !important;
/* 允许标题区域收缩 */
}
/* 合并容器宽度限制 */
.w-full.sticky.top-0.z-10,
main>div:last-child,
.text-center.bg-white.rounded-xl.shadow-apple.italic.w-full {
width: 100% !important;
max-width: 100% !important;
}
/* 2. 父容器:明确Flex垂直排列,确保高度传递 */
#imageContainerParent {
padding: clamp(8px, 1vw, 16px) !important;
display: flex !important;
flex-direction: column !important; /* 关键添加:子元素垂直排列 */
align-items: center !important; /* 水平居中 */
justify-content: flex-start !important; /* 从顶部开始布局 */
box-sizing: border-box !important;
background-color: #ffffff !important;
position: relative !important;
margin: clamp(0.25rem, 1vw, 0.5rem);
height: auto !important;
min-height: clamp(240px, 40vw, 420px) !important;
overflow: visible !important;
}
.image-container-empty {
min-height: 0 !important;
height: auto !important;
}
/* ======== 一键美化合集 ======== */
/* 1. 玻璃拟态头部 */
header {
background-color: rgba(255,255,255,0.55);
backdrop-filter: blur(12px) saturate(180%);
-webkit-backdrop-filter: blur(12px) saturate(180%);
border-bottom: 1px solid rgba(255,255,255,0.35);
}
/* 2. 按钮3D微动效 */
.unified-btn {
transform: translateY(0);
box-shadow:
0 2px 4px rgba(var(--color-primary),0.25),
0 1px 2px rgba(0,0,0,0.08);
transition: all var(--transition-normal) ease !important;
}
/* unified hover/active handled above; remove duplicate micro-effect */
/* 3. 拖拽区域炫光呼吸 */
#rectContainer:not(:has(.rect-item)) {
border: 2px solid transparent;
background:
linear-gradient(#fff,#fff) padding-box,
linear-gradient(45deg,rgb(var(--color-primary)),#93c5fd) border-box;
animation: border-breath 2.5s ease-in-out infinite;
}
@keyframes border-breath {
0%,100% { opacity: 0.45; }
50% { opacity: 1; }
}
/* 4. 拼图块悬停放大 */
.rect-item {
transition: transform 0.25s cubic-bezier(.4,0,.2,1),
box-shadow 0.25s cubic-bezier(.4,0,.2,1);
}
.rect-item:hover {
transform: scale(1.03);
box-shadow: 0 8px 24px rgba(0,0,0,.12);
z-index: 10;
}
/* 5. Toast卡片圆角+进度条渐变 */
#successToast, #errorToast {
border-radius: 1rem;
box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
#successToast .bg-primary { /* 成功进度条 */
background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
height: 4px;
border-radius: 2px;
}
#errorToast .bg-rose-600 { /* 失败进度条 */
background: linear-gradient(90deg, #e11d48 0%, #be123c 100%);
height: 4px;
border-radius: 2px;
}
/* 7. 空状态图标浮动 */
#emptyState svg {
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%,100% { transform: translateY(0); }
50% { transform: translateY(-6px); }
}
/* 8. 按钮彩虹光扫过 */
.unified-btn {
position: relative;
overflow: hidden;
}
.unified-btn::after {
content: '';
position: absolute;
top: 0; left: -100%;
width: 100%; height: 100%;
background: linear-gradient(90deg,
transparent, rgba(255,255,255,.6), transparent);
transform: skewX(-20deg);
transition: left .6s;
}
.unified-btn:hover::after { left: 100%; }
/* ======== 按钮二次美化 ======== */
/* 1. 工具栏/操作按钮:低调微渐变 + 统一圆角 */
/* conflict removed: unified-btn gradient block */
/* remove gradient hover/active block to unify animations */
/* 2. 主行动按钮(添加图片、下载)高亮 accent */
#fileInputTopBtn:not(.disabled):not(:disabled),
#downloadBtn:not(:disabled) {
background: linear-gradient(145deg, #38b2ac 0%, #319795 100%);
border-color: #2c7a7b;
color: #fff;
}
#fileInputTopBtn:hover:not(:disabled),
#downloadBtn:hover:not(:disabled) {
background: linear-gradient(145deg, #319795 0%, #2c7a7b 100%);
border-color: #285e61;
}
/* ======== 按钮字号统一 ======== */
/* 1. 顶部工具栏按钮 */
.unified-btn {
font-size: var(--control-btn-font-size) !important;
}
/* ======== 容器对齐优化 ======== */
/* 统一容器间距 */
#statsBar, #imageContainerParent {
box-sizing: border-box !important;
}
/* 响应式调整 */
@media (max-width: 640px) {
.px-3 {
padding-left: 0.75rem !important;
padding-right: 0.75rem !important;
}
#statsBar, #imageContainerParent {
padding: 0.75rem !important;
}
.layout-container {
padding-left: 0.75rem !important;
padding-right: 0.75rem !important;
}
/* 小屏幕下清晰度和线路编号适配 */
.controls-bar .flex.items-center.gap-0 {
gap: 0 !important; /* 清晰度按钮无间距 */
}
.ratio-quality-btn {
padding: 0.25rem 0.5rem !important; /* 减小按钮内边距 */
font-size: 0.75rem !important; /* 保持小字体 */
min-width: 2rem !important; /* 最小宽度 */
border-radius: 0 !important; /* 移除圆角 */
border-right-width: 0 !important; /* 移除右边框 */
}
.ratio-quality-btn:last-of-type {
border-top-right-radius: 0.375rem !important;
border-bottom-right-radius: 0.375rem !important;
border-right-width: 1px !important; /* 恢复最后一个的右边框 */
}
}
/* 中等小屏幕适配 */
@media (max-width: 480px) {
.ratio-quality-btn {
padding: 0.25rem 0.4rem !important;
font-size: 0.7rem !important;
border-radius: 0 !important; /* 移除圆角 */
border-right-width: 0 !important; /* 移除右边框 */
}
.ratio-quality-btn:last-of-type {
border-top-right-radius: 0.375rem !important;
border-bottom-right-radius: 0.375rem !important;
border-right-width: 1px !important; /* 恢复最后一个的右边框 */
}
#routeNumberInput {
width: 5.5rem !important;
font-size: 0.7rem !important;
}
.controls-bar .flex.items-center.gap-0 span {
font-size: 0.8rem !important;
}
}
/* 超小屏幕适配 */
@media (max-width: 390px) {
.ratio-quality-btn {
padding: 0.2rem 0.4rem !important;
font-size: 0.7rem !important;
min-width: 1.8rem !important;
}
#routeNumberInput {
width: 5rem !important;
font-size: 0.7rem !important;
}
.controls-bar > * {
flex-shrink: 0 !important; /* 防止元素被压缩 */
}
.controls-container {
flex-wrap: wrap !important; /* 允许换行 */
gap: 0.25rem !important;
}
/* 清晰度标签在小屏幕上隐藏 */
.controls-bar .flex.items-center.gap-0 span {
display: none !important;
}
.ratio-quality-btn {
margin-right: 0.125rem !important;
}
/* 随机重排和下载按钮调小,但保持工具栏高度统一 */
#regenerateBtn,
#downloadBtn {
padding: 0.375rem 0.75rem !important; /* 减小内边距 */
font-size: 0.75rem !important;
min-height: 2rem !important; /* 保持最小高度 */
line-height: 1.25 !important; /* 统一行高 */
}
/* 确保所有按钮高度一致 */
.ratio-quality-btn,
#routeNumberInput,
#regenerateBtn,
#downloadBtn {
height: 2rem !important; /* 统一高度 */
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
#routeNumberInput {
line-height: 1.25 !important; /* 输入框行高统一 */
}
}
/* 精确对齐修复 */
#statsBar {
margin-bottom: 0.375rem !important; /* 6px,间距减半 */
}
/* 确保所有容器边框一致 */
header.container-unified,
#statsBar,
#imageContainerParent {
border-width: 1px !important;
border-style: solid !important;
}
/* 移除可能的额外间距 */
.space-y-1\.5 > * + * {
margin-top: 0.375rem !important; /* 6px,间距减半 */
}
/* 移除之前的冲突样式,使用新的布局容器方案 */
/* 修复可能的box-sizing差异 */
* {
box-sizing: border-box !important;
}
/* 强制所有容器使用相同的box-shadow和圆角 */
header,
#statsBar,
#imageContainerParent {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
border-radius: 0.75rem !important;
}
/* 确保header的底部边框不会增加额外高度 */
header {
border-bottom-width: 1px !important;
border-bottom-style: solid !important;
border-bottom-color: #f3f4f6 !important;
}
/* 新的布局容器确保完美对齐 */
.layout-container {
padding-left: 12px !important;
padding-right: 12px !important;
}
.layout-container > * {
width: 100% !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
/* 确保space-y-1.5的间距为6px */
.layout-container.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) {
margin-top: 0.375rem !important;
}
/* 确保sticky header在layout-container内正常工作 */
.layout-container > header {
position: sticky !important;
top: 0 !important;
z-index: 10 !important;
margin-bottom: 6px !important; /* 间距减半 */
}
/* 拖拽区域定位修复 */
#imageContainerParent {
position: relative !important;
min-height: 400px !important; /* 确保有足够高度 */
}
/* 工具栏高度统一 */
#statsBar {
min-height: 3rem !important; /* 统一工具栏最小高度 */
}
.controls-bar {
align-items: center !important; /* 确保垂直居中对齐 */
min-height: 2.5rem !important; /* 控制栏最小高度 */
}
/* 所有控制元素高度统一 */
.ratio-quality-btn,
#routeNumberInput,
.unified-btn {
height: 2rem !important; /* 统一高度 */
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
vertical-align: middle !important; /* 确保行内对齐 */
}
#routeNumberInput {
line-height: normal !important; /* 重置行高 */
box-sizing: border-box !important; /* 确保高度计算一致 */
}
/* 清晰度按钮合并在一起 - 移除间距 */
.ratio-quality-btn {
border-radius: 0 !important; /* 移除圆角 */
margin: 0 !important; /* 移除外边距 */
border-right-width: 0 !important; /* 移除右边框 */
}
/* 第一个按钮保持左侧圆角 */
.ratio-quality-btn:first-of-type {
border-top-left-radius: 0.375rem !important;
border-bottom-left-radius: 0.375rem !important;
}
/* 最后一个按钮保持右侧圆角和右边框 */
.ratio-quality-btn:last-of-type {
border-top-right-radius: 0.375rem !important;
border-bottom-right-radius: 0.375rem !important;
border-right-width: 1px !important; /* 恢复右边框 */
}
/* 选中状态边框修复 */
.ratio-quality-btn.active {
border-right-width: 1px !important; /* 选中时恢复右边框 */
position: relative !important; /* 用于层级调整 */
z-index: 1 !important; /* 提高层级 */
}
/* 确保按钮之间没有间隙 */
.flex.items-center.gap-0 {
gap: 0 !important;
}
#emptyState {
height: 100% !important;
display: flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center !important;
z-index: 5 !important;
}
#loadingState {
position: absolute !important;
inset: 0 !important;
z-index: 10 !important; /* 高于emptyState */
}
#rectContainer {
position: relative !important;
z-index: 1 !important; /* 基础层 */
}
/* 2. 单张预览弹窗按钮 */
#imageModal button {
font-size: var(--control-btn-font-size) !important;
}
/* ======== 按钮字号统一结束 ======== */
.unified-btn i { font-size: 1em !important; margin-right: 0 !important; color: inherit !important; }
.unified-btn i:only-child { margin-right: 0 !important; }
.rect-container {
position: relative !important;
overflow: visible !important;
background-color: #ffffff !important;
cursor: default !important;
border: none !important;
margin: 0 auto !important;
display: block !important; /* 关键修改:inline-block改为block,避免高度塌陷 */
width: 100% !important;
min-width: clamp(200px, 30vw, 300px) !important;
transition: all 0.3s ease !important;