blob: ab1e24c9e02f7e6f32543af6ca4550ab54069b72 [file] [log] [blame]
TRM-codingc4b4f3d2025-06-18 19:02:46 +08001/* 登录页面容器 */
2.login-container {
3 min-height: 100vh;
4 min-height: 100dvh; /* 动态视口高度,避免移动端地址栏影响 */
5 height: 100vh;
6 height: 100dvh;
7 display: flex;
8 align-items: center;
9 justify-content: center;
10 position: relative;
11 overflow: hidden;
12 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
13 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
14 sans-serif;
15 /* 确保容器稳定定位 */
16 box-sizing: border-box;
17 margin: 0;
18 padding: 0;
19 /* 重置文本对齐 */
20 text-align: initial;
21}
22
23/* 小红书风格背景 */
24.login-background {
25 position: absolute;
26 top: 0;
27 left: 0;
28 right: 0;
29 bottom: 0;
30 background: #f8f8f8;
31 z-index: -1;
32}
33
34/* 登录内容区域 */
35.login-content {
36 width: 100%;
37 max-width: 500px; /* 增加桌面端最大宽度 */
38 padding: 0;
39 z-index: 1;
40 /* 确保内容稳定定位 */
41 box-sizing: border-box;
42 position: relative;
43 display: flex;
44 justify-content: center;
45}
46
47/* 小红书风格登录卡片 */
48.login-card {
49 background: #fff;
50 border-radius: 8px;
51 padding: 40px; /* 增加桌面端内边距 */
52 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
53 border: 1px solid #e1e1e1;
54 width: 100%;
55 max-width: 450px; /* 增加桌面端卡片最大宽度 */
56 transition: none;
57}
58
59/* 登录头部 */
60.login-header {
61 text-align: center;
62 margin-bottom: 40px;
63}
64
65/* Logo样式 */
66.logo-section {
67 margin-bottom: 24px;
68}
69
70.logo-icon {
71 width: 60px;
72 height: 60px;
73 background: #ff2442;
74 border-radius: 12px;
75 display: flex;
76 align-items: center;
77 justify-content: center;
78 font-size: 28px;
79 margin: 0 auto 16px;
80 box-shadow: 0 4px 12px rgba(255, 36, 66, 0.2);
81}
82
83.login-title {
84 font-size: 24px;
85 font-weight: 600;
86 color: #333;
87 margin: 0 0 12px 0;
88 text-align: center;
89}
90
91.login-title::after {
92 display: none;
93}
94
95.login-subtitle {
96 font-size: 14px;
97 color: #999;
98 margin: 0 0 32px 0;
99 font-weight: 400;
100 text-align: center;
101}
102
103/* 表单样式 */
104.login-form {
105 display: flex;
106 flex-direction: column;
107 gap: 24px;
108 width: 100%;
109}
110
111.form-group {
112 display: flex;
113 flex-direction: column;
114 gap: 6px;
115 width: 100%;
116 box-sizing: border-box;
117 margin-bottom: 2px;
118 position: relative; /* 为绝对定位的错误提示提供参考点 */
119}
120
121.form-group .input-wrapper {
122 width: 100%;
123 box-sizing: border-box;
124}
125
126.form-label {
127 font-size: 14px;
128 font-weight: 500;
129 color: #333;
130 margin-bottom: 8px;
131}
132
133.input-wrapper {
134 position: relative;
135 display: flex;
136 align-items: center;
137 width: 100%;
138 box-sizing: border-box;
139}
140
141.form-input {
142 width: 100% !important;
143 height: 44px;
144 padding: 12px 16px 12px 48px;
145 border: 1px solid #e1e1e1;
146 border-radius: 6px;
147 font-size: 14px;
148 transition: border-color 0.2s ease;
149 background: #fff;
150 color: #333;
151 box-sizing: border-box !important;
152 flex: 1;
153 min-width: 0;
154}
155
156/* 针对 Antd Input 组件的特定样式 */
157.form-input.ant-input,
158.form-input.ant-input-affix-wrapper {
159 width: 100% !important;
160 height: 44px !important;
161 border: 1px solid #e1e1e1 !important;
162 border-radius: 6px !important;
163 padding: 12px 48px 12px 48px !important;
164 font-size: 14px !important;
165 background: #fff !important;
166 color: #333 !important;
167 box-sizing: border-box !important;
168 flex: 1 !important;
169 min-width: 0 !important;
170 display: flex !important;
171 align-items: center !important;
172}
173
174.form-input.ant-input-affix-wrapper .ant-input {
175 width: 100% !important;
176 height: 100% !important;
177 padding: 0 !important;
178 border: none !important;
179 background: transparent !important;
180 flex: 1 !important;
181 min-width: 0 !important;
182 box-sizing: border-box !important;
183}
184
185.form-input:focus {
186 outline: none;
187 border-color: #ff2442;
188 box-shadow: none;
189 transform: none;
190}
191
192/* Antd Input focus 样式 */
193.form-input.ant-input:focus,
194.form-input.ant-input-affix-wrapper:focus,
195.form-input.ant-input-affix-wrapper-focused {
196 outline: none !important;
197 border-color: #ff2442 !important;
198 box-shadow: none !important;
199 transform: none !important;
200}
201
202.form-input::placeholder {
203 color: #9ca3af;
204}
205
206.input-icon {
207 position: absolute;
208 left: 16px;
209 top: 50%;
210 transform: translateY(-50%);
211 color: #9ca3af;
212 pointer-events: none;
213 transition: color 0.3s ease;
214 z-index: 2;
215}
216
217.form-input:focus + .input-icon {
218 color: #ff2442;
219}
220
221.password-toggle {
222 position: absolute;
223 right: 12px;
224 top: 50%;
225 transform: translateY(-50%);
226 background: none;
227 border: none;
228 color: #9ca3af;
229 cursor: pointer;
230 padding: 4px;
231 border-radius: 4px;
232 transition: all 0.3s ease;
233 display: flex;
234 align-items: center;
235 justify-content: center;
236 z-index: 2;
237 width: 24px;
238 height: 24px;
239}
240
241.password-toggle:hover {
242 color: #ff2442;
243 background-color: rgba(255, 36, 66, 0.1);
244}
245
246/* 表单选项 */
247.form-options {
248 display: flex;
249 justify-content: space-between;
250 align-items: center;
251 margin-top: 8px;
252 margin-bottom: 16px;
253 width: 100%;
254 flex-wrap: nowrap; /* 确保不换行 */
255 min-height: 24px;
256 gap: 8px; /* 添加基础间距 */
257}
258
259/* Ant Design Checkbox 样式兼容 */
260.form-options .ant-checkbox-wrapper {
261 flex: 0 0 auto; /* 不伸缩,保持原始大小 */
262 font-size: 14px;
263 color: #64748b;
264 white-space: nowrap; /* 防止文字换行 */
265 overflow: hidden;
266 text-overflow: ellipsis;
267 max-width: 50%; /* 限制最大宽度 */
268}
269
270.form-options .ant-checkbox-wrapper .ant-checkbox {
271 margin-right: 8px;
272}
273
274.form-options .forgot-password {
275 flex: 0 0 auto; /* 不伸缩,保持原始大小 */
276 margin-left: auto;
277 white-space: nowrap;
278 color: #ff2442;
279 text-decoration: none;
280 font-size: 14px;
281 transition: color 0.3s ease;
282 max-width: 45%; /* 限制最大宽度 */
283 overflow: hidden;
284 text-overflow: ellipsis;
285}
286
287.form-options .forgot-password:hover {
288 color: #ff1a3a;
289 text-decoration: underline;
290}
291
292.checkbox-wrapper {
293 display: flex;
294 align-items: center;
295 gap: 8px;
296 cursor: pointer;
297 font-size: 14px;
298 color: #64748b;
299 -webkit-user-select: none;
300 -moz-user-select: none;
301 -ms-user-select: none;
302 user-select: none;
303 flex-shrink: 0;
304}
305
306.checkbox {
307 position: relative;
308 width: 18px;
309 height: 18px;
310 margin: 0;
311 cursor: pointer;
312 opacity: 0;
313}
314
315.checkmark {
316 position: absolute;
317 top: 0;
318 left: 0;
319 width: 18px;
320 height: 18px;
321 background-color: #fff;
322 border: 1px solid #e1e1e1;
323 border-radius: 3px;
324 transition: all 0.2s ease;
325}
326
327.checkbox:checked + .checkmark {
328 background-color: #ff2442;
329 border-color: #ff2442;
330}
331
332.checkmark:after {
333 content: "";
334 position: absolute;
335 display: none;
336 left: 5px;
337 top: 2px;
338 width: 4px;
339 height: 8px;
340 border: solid white;
341 border-width: 0 2px 2px 0;
342 transform: rotate(45deg);
343}
344
345.checkbox:checked + .checkmark:after {
346 display: block;
347}
348
349.forgot-password {
350 font-size: 14px;
351 color: #ff2442;
352 text-decoration: none;
353 font-weight: 400;
354 transition: color 0.2s ease;
355 margin-left: auto;
356 flex-shrink: 0;
357 white-space: nowrap;
358}
359
360.forgot-password:hover {
361 color: #d91e3a;
362 text-decoration: underline;
363}
364
365/* 小红书风格登录按钮 */
366.login-button {
367 width: 100%;
368 height: 48px; /* 固定高度,防止布局变化 */
369 padding: 12px;
370 background: #ff2442;
371 color: white;
372 border: none;
373 border-radius: 6px;
374 font-size: 14px;
375 font-weight: 500;
376 cursor: pointer;
377 transition: background-color 0.2s ease;
378 display: flex;
379 align-items: center;
380 justify-content: center;
381 gap: 8px;
382 margin-top: 8px;
383 box-sizing: border-box; /* 确保padding包含在总尺寸内 */
384 min-width: 0; /* 防止flex子元素造成宽度变化 */
385}
386
387.login-button:hover:not(:disabled) {
388 background: #d91e3a;
389 transform: none;
390 box-shadow: none;
391}
392
393.login-button:active:not(:disabled) {
394 transform: none;
395}
396
397.login-button:disabled {
398 background: #ccc;
399 cursor: not-allowed;
400 opacity: 0.8;
401}
402
403.login-button.loading {
404 background: #ff7b8a;
405 cursor: not-allowed;
406}
407
408.loading-spinner {
409 width: 16px;
410 height: 16px;
411 border: 2px solid rgba(255, 255, 255, 0.3);
412 border-radius: 50%;
413 border-top-color: #fff;
414 animation: spin 1s ease-in-out infinite;
415}
416
417@keyframes spin {
418 to { transform: rotate(360deg); }
419}
420
421/* 加载遮罩层 */
422.loading-overlay {
423 position: fixed;
424 top: 0;
425 left: 0;
426 right: 0;
427 bottom: 0;
428 background: rgba(0, 0, 0, 0.5);
429 display: flex;
430 align-items: center;
431 justify-content: center;
432 z-index: 1000;
433 backdrop-filter: blur(4px);
434}
435
436.loading-content {
437 display: flex;
438 flex-direction: column;
439 align-items: center;
440 gap: 16px;
441 background: white;
442 padding: 32px;
443 border-radius: 12px;
444 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
445}
446
447.loading-spinner-large {
448 width: 40px;
449 height: 40px;
450 border: 4px solid rgba(255, 36, 66, 0.2);
451 border-radius: 50%;
452 border-top-color: #ff2442;
453 animation: spin 1s ease-in-out infinite;
454}
455
456.loading-text {
457 margin: 0;
458 color: #333;
459 font-size: 16px;
460 font-weight: 500;
461}
462
463/* 分隔线 */
464.login-divider {
465 position: relative;
466 text-align: center;
467 margin: 32px 0;
468 color: #9ca3af;
469 font-size: 14px;
470}
471
472.login-divider::before {
473 content: '';
474 position: absolute;
475 top: 50%;
476 left: 0;
477 right: 0;
478 height: 1px;
479 background: linear-gradient(to right, transparent, #e5e7eb, transparent);
480}
481
482.login-divider span {
483 background: rgba(255, 255, 255, 0.95);
484 padding: 0 16px;
485 position: relative;
486 z-index: 1;
487}
488
489/* 社交登录 */
490.social-login {
491 display: flex;
492 flex-direction: column;
493 gap: 12px;
494}
495
496.social-button {
497 width: 100%;
498 padding: 12px 16px;
499 border: 1px solid #e1e1e1;
500 border-radius: 6px;
501 background: white;
502 color: #333;
503 font-size: 14px;
504 font-weight: 400;
505 cursor: pointer;
506 transition: border-color 0.2s ease;
507 display: flex;
508 align-items: center;
509 justify-content: center;
510 gap: 8px;
511}
512
513.social-button:hover {
514 border-color: #ccc;
515}
516
517.social-button.google:hover {
518 border-color: #4285f4;
519 box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
520}
521
522.social-button.github:hover {
523 border-color: #333;
524 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
525}
526
527.social-button.xiaohongshu:hover {
528 border-color: #ff2442;
529 box-shadow: 0 4px 12px rgba(255, 36, 66, 0.2);
530}
531
532/* 注册链接 */
533.signup-link {
534 text-align: center;
535 margin-top: 20px;
536 padding-top: 20px;
537 border-top: 1px solid #e5e7eb;
538}
539
540.signup-link p {
541 margin: 0;
542 font-size: 14px;
543 color: #64748b;
544}
545
546.signup-link a {
547 color: #ff2442;
548 text-decoration: none;
549 font-weight: 500;
550 transition: color 0.2s ease;
551}
552
553.signup-link a:hover {
554 color: #d91e3a;
555 text-decoration: underline;
556}
557
558/* 有左侧图标时的内边距调整 */
559.input-wrapper.has-icon .form-input {
560 padding-left: 48px !important;
561}
562
563.input-wrapper.has-icon .form-input.ant-input,
564.input-wrapper.has-icon .form-input.ant-input-affix-wrapper {
565 padding-left: 48px !important;
566}
567
568/* 有右侧切换按钮时的内边距调整 */
569.input-wrapper.has-toggle .form-input {
570 padding-right: 48px !important;
571}
572
573.input-wrapper.has-toggle .form-input.ant-input,
574.input-wrapper.has-toggle .form-input.ant-input-affix-wrapper {
575 padding-right: 48px !important;
576}
577
578/* 没有图标时的内边距调整 */
579.input-wrapper:not(.has-icon) .form-input {
580 padding-left: 16px !important;
581}
582
583.input-wrapper:not(.has-icon) .form-input.ant-input,
584.input-wrapper:not(.has-icon) .form-input.ant-input-affix-wrapper {
585 padding-left: 16px !important;
586}
587
588/* 没有切换按钮时的内边距调整 */
589.input-wrapper:not(.has-toggle) .form-input {
590 padding-right: 16px !important;
591}
592
593.input-wrapper:not(.has-toggle) .form-input.ant-input,
594.input-wrapper:not(.has-toggle) .form-input.ant-input-affix-wrapper {
595 padding-right: 16px !important;
596}
597
598/* 确保输入框内容完全填充 */
599.form-input.ant-input-affix-wrapper .ant-input-suffix {
600 position: absolute !important;
601 right: 12px !important;
602 top: 50% !important;
603 transform: translateY(-50%) !important;
604 margin: 0 !important;
605 padding: 0 !important;
606}
607
608.form-input.ant-input-affix-wrapper .ant-input-prefix {
609 position: absolute !important;
610 left: 16px !important;
611 top: 50% !important;
612 transform: translateY(-50%) !important;
613 margin: 0 !important;
614 padding: 0 !important;
615}
616
617/* 确保所有输入框完全填充其容器 */
618.form-group {
619 display: flex;
620 flex-direction: column;
621 gap: 8px;
622 width: 100%;
623 box-sizing: border-box;
624}
625
626.form-group .input-wrapper {
627 width: 100%;
628 box-sizing: border-box;
629}
630
631/* 防止输入框溢出容器 */
632.form-input,
633.form-input.ant-input,
634.form-input.ant-input-affix-wrapper {
635 max-width: 100% !important;
636 overflow: hidden !important;
637}
638
639/* 确保内部输入元素不会超出边界 */
640.form-input.ant-input-affix-wrapper .ant-input {
641 max-width: 100% !important;
642 overflow: hidden !important;
643 text-overflow: ellipsis !important;
644}
645
646/* 精细间距控制 */
647.login-header + .login-form {
648 margin-top: -4px;
649}
650
651.login-form .form-group:not(:last-child) {
652 margin-bottom: 2px;
653}
654
655.login-form .form-group:last-of-type {
656 margin-bottom: 6px;
657}
658
659.login-button + .signup-link {
660 margin-top: 14px;
661}
662
663/* 响应式设计 */
664@media (max-width: 768px) {
665 /* 重置body和html确保一致性 */
666 html, body {
667 height: 100%;
668 height: 100dvh;
669 margin: 0;
670 padding: 0;
671 overflow-x: hidden;
672 box-sizing: border-box;
673 }
674
675 .login-container {
676 padding: 16px;
677 align-items: center;
678 justify-content: center;
679 min-height: 100vh;
680 min-height: 100dvh; /* 动态视口高度 */
681 /* 强制重置可能影响定位的样式 */
682 margin: 0;
683 box-sizing: border-box;
684 /* 防止内容溢出影响布局 */
685 overflow-x: hidden;
686 overflow-y: auto;
687 /* 确保flexbox在所有移动设备上表现一致 */
688 -webkit-box-align: center;
689 -webkit-box-pack: center;
690 display: flex !important;
691 position: relative;
692 }
693
694 .login-content {
695 max-width: 100%;
696 padding: 20px;
697 /* 确保内容区域稳定 */
698 margin: 0 auto;
699 box-sizing: border-box;
700 /* 防止宽度计算问题 */
701 width: calc(100% - 40px);
702 max-width: 480px; /* 增加最大宽度 */
703 position: relative;
704 display: flex;
705 justify-content: center;
706 }
707
708 .login-card {
709 padding: 32px 28px; /* 增加内边距 */
710 border-radius: 16px;
711 /* 确保卡片稳定定位 */
712 margin: 0;
713 box-sizing: border-box;
714 width: 100%;
715 max-width: 450px; /* 增加卡片最大宽度 */
716 /* 防止backdrop-filter导致的渲染差异 */
717 will-change: auto;
718 position: relative;
719 /* 防止触摸操作影响布局 */
720 -webkit-touch-callout: none;
721 -webkit-user-select: none;
722 -moz-user-select: none;
723 -ms-user-select: none;
724 user-select: none;
725 -webkit-tap-highlight-color: transparent;
726 }
727
728 .login-title {
729 font-size: 24px;
730 }
731
732 .form-input {
733 width: 100% !important;
734 height: 44px !important;
735 padding: 12px 48px 12px 48px;
736 font-size: 16px; /* 防止iOS Safari缩放 */
737 box-sizing: border-box !important;
738 flex: 1 !important;
739 min-width: 0 !important;
740 }
741
742 .form-input.ant-input,
743 .form-input.ant-input-affix-wrapper {
744 width: 100% !important;
745 height: 44px !important;
746 padding: 12px 48px 12px 48px !important;
747 font-size: 16px !important;
748 box-sizing: border-box !important;
749 flex: 1 !important;
750 min-width: 0 !important;
751 }
752
753 .form-input.ant-input-affix-wrapper .ant-input {
754 width: 100% !important;
755 height: 100% !important;
756 padding: 0 !important;
757 border: none !important;
758 background: transparent !important;
759 flex: 1 !important;
760 min-width: 0 !important;
761 box-sizing: border-box !important;
762 }
763
764 .social-login {
765 gap: 10px;
766 }
767
768 .social-button {
769 padding: 12px 16px;
770 font-size: 14px;
771 }
772
773 .form-options {
774 display: flex !important;
775 flex-direction: row !important;
776 justify-content: space-between !important;
777 align-items: center !important;
778 gap: 8px !important;
779 width: 100% !important;
780 flex-wrap: nowrap !important;
781 min-height: 22px !important;
782 margin-top: 8px !important;
783 margin-bottom: 16px !important;
784 }
785
786 .checkbox-wrapper {
787 font-size: 13px;
788 flex: 0 0 auto !important;
789 white-space: nowrap !important;
790 overflow: hidden !important;
791 text-overflow: ellipsis !important;
792 max-width: 48% !important;
793 }
794
795 .forgot-password {
796 font-size: 13px;
797 margin-left: auto;
798 flex: 0 0 auto !important;
799 white-space: nowrap !important;
800 overflow: hidden !important;
801 text-overflow: ellipsis !important;
802 max-width: 48% !important;
803 }
804
805 /* Ant Design Checkbox 的特殊处理 */
806 .form-options .ant-checkbox-wrapper {
807 flex: 0 0 auto !important;
808 font-size: 13px !important;
809 white-space: nowrap !important;
810 overflow: hidden !important;
811 text-overflow: ellipsis !important;
812 max-width: 48% !important;
813 }
814}
815
816@media (max-width: 480px) {
817 .login-container {
818 padding: 16px;
819 align-items: center;
820 justify-content: center;
821 min-height: 100vh;
822 min-height: 100dvh; /* 动态视口高度 */
823 /* 强制重置样式 */
824 margin: 0;
825 box-sizing: border-box;
826 position: relative;
827 /* 确保垂直居中 */
828 display: flex !important;
829 }
830
831 .login-content {
832 /* 更严格的尺寸控制 */
833 width: calc(100vw - 32px);
834 max-width: 420px; /* 增加最大宽度 */
835 padding: 16px;
836 margin: 0 auto;
837 box-sizing: border-box;
838 display: flex;
839 justify-content: center;
840 }
841
842 .login-card {
843 padding: 28px 24px; /* 增加内边距 */
844 border-radius: 12px;
845 /* 确保卡片完全稳定 */
846 margin: 0;
847 box-sizing: border-box;
848 width: 100%;
849 position: relative;
850 /* 防止变换导致的位置偏移 */
851 transform: none !important;
852 /* 防止触摸操作影响布局 */
853 -webkit-touch-callout: none;
854 -webkit-user-select: none;
855 -khtml-user-select: none;
856 -moz-user-select: none;
857 -ms-user-select: none;
858 user-select: none;
859 /* 防止点击时的高亮效果影响布局 */
860 -webkit-tap-highlight-color: transparent;
861 }
862
863 .login-title {
864 font-size: 22px;
865 }
866
867 .form-input {
868 width: 100% !important;
869 height: 44px !important;
870 padding: 12px 48px 12px 48px;
871 font-size: 16px; /* 防止iOS Safari缩放 */
872 box-sizing: border-box !important;
873 flex: 1 !important;
874 min-width: 0 !important;
875 }
876
877 .form-input.ant-input,
878 .form-input.ant-input-affix-wrapper {
879 width: 100% !important;
880 height: 44px !important;
881 padding: 12px 48px 12px 48px !important;
882 font-size: 16px !important;
883 box-sizing: border-box !important;
884 flex: 1 !important;
885 min-width: 0 !important;
886 }
887
888 .form-input.ant-input-affix-wrapper .ant-input {
889 width: 100% !important;
890 height: 100% !important;
891 padding: 0 !important;
892 border: none !important;
893 background: transparent !important;
894 flex: 1 !important;
895 min-width: 0 !important;
896 box-sizing: border-box !important;
897 }
898
899 .social-login {
900 gap: 10px;
901 }
902
903 .social-button {
904 padding: 12px 16px;
905 font-size: 14px;
906 }
907
908 .form-options {
909 display: flex !important;
910 flex-direction: row !important;
911 justify-content: space-between !important;
912 align-items: center !important;
913 gap: 6px !important;
914 width: 100% !important;
915 min-height: 20px !important;
916 flex-wrap: nowrap !important;
917 margin-top: 8px !important;
918 margin-bottom: 16px !important;
919 }
920
921 .checkbox-wrapper {
922 flex: 0 0 auto !important;
923 font-size: 12px !important;
924 white-space: nowrap !important;
925 overflow: hidden !important;
926 text-overflow: ellipsis !important;
927 max-width: 45% !important;
928 }
929
930 .forgot-password {
931 flex: 0 0 auto !important;
932 font-size: 12px !important;
933 margin-left: auto !important;
934 white-space: nowrap !important;
935 overflow: hidden !important;
936 text-overflow: ellipsis !important;
937 max-width: 45% !important;
938 }
939
940/* 移动端优化 */
941 .background-pattern {
942 display: none;
943 }
944
945 /* 禁用可能影响位置的悬停效果 */
946 .login-card:hover {
947 transform: none !important;
948 }
949}
950
951/* 超小屏幕优化(320px及以下) */
952@media (max-width: 320px) {
953 .login-content {
954 padding: 16px;
955 }
956
957 .login-card {
958 padding: 24px;
959 }
960
961 .form-options {
962 display: flex !important;
963 flex-direction: row !important;
964 justify-content: space-between !important;
965 align-items: center !important;
966 gap: 4px !important;
967 width: 100% !important;
968 flex-wrap: nowrap !important;
969 min-height: 18px !important;
970 margin-top: 6px !important;
971 margin-bottom: 14px !important;
972 }
973
974 .checkbox-wrapper {
975 flex: 0 0 auto !important;
976 font-size: 11px !important;
977 white-space: nowrap !important;
978 overflow: hidden !important;
979 text-overflow: ellipsis !important;
980 max-width: 42% !important;
981 line-height: 1.2 !important;
982 }
983
984 .forgot-password {
985 flex: 0 0 auto !important;
986 font-size: 11px !important;
987 margin-left: auto !important;
988 white-space: nowrap !important;
989 overflow: hidden !important;
990 text-overflow: ellipsis !important;
991 max-width: 42% !important;
992 line-height: 1.2 !important;
993 }
994
995 /* Ant Design Checkbox 的特殊处理 */
996 .form-options .ant-checkbox-wrapper {
997 flex: 0 0 auto !important;
998 font-size: 11px !important;
999 white-space: nowrap !important;
1000 overflow: hidden !important;
1001 text-overflow: ellipsis !important;
1002 max-width: 42% !important;
1003 line-height: 1.2 !important;
1004 }
1005}
1006
1007/* 极小屏幕优化(280px及以下) */
1008@media (max-width: 280px) {
1009 .form-options {
1010 display: flex !important;
1011 flex-direction: row !important;
1012 justify-content: space-between !important;
1013 align-items: center !important;
1014 gap: 2px !important;
1015 width: 100% !important;
1016 flex-wrap: nowrap !important;
1017 min-height: 16px !important;
1018 margin-top: 6px !important;
1019 margin-bottom: 14px !important;
1020 }
1021
1022 .form-options .ant-checkbox-wrapper {
1023 flex: 0 0 auto !important;
1024 font-size: 10px !important;
1025 white-space: nowrap !important;
1026 overflow: hidden !important;
1027 text-overflow: ellipsis !important;
1028 max-width: 40% !important;
1029 line-height: 1.1 !important;
1030 }
1031
1032 .form-options .forgot-password {
1033 flex: 0 0 auto !important;
1034 font-size: 10px !important;
1035 margin-left: auto !important;
1036 white-space: nowrap !important;
1037 overflow: hidden !important;
1038 text-overflow: ellipsis !important;
1039 max-width: 40% !important;
1040 line-height: 1.1 !important;
1041 }
1042
1043 .form-options .ant-checkbox-wrapper .ant-checkbox {
1044 margin-right: 2px !important;
1045 transform: scale(0.8) !important; /* 进一步缩小checkbox */
1046 }
1047}
1048
1049/* 高对比度模式支持 */
1050@media (prefers-contrast: high) {
1051 .login-card {
1052 background: white;
1053 border: 2px solid #000;
1054 }
1055
1056 .form-input {
1057 border-color: #000;
1058 }
1059
1060 .form-input:focus {
1061 border-color: #0066cc;
1062 box-shadow: 0 0 0 2px #0066cc;
1063 }
1064}
1065
1066/* 减少动画模式 */
1067@media (prefers-reduced-motion: reduce) {
1068 .background-pattern {
1069 animation: none;
1070 }
1071
1072 .login-card,
1073 .form-input,
1074 .login-button,
1075 .social-button {
1076 transition: none;
1077 }
1078}
1079
1080/* 深色模式支持 */
1081@media (prefers-color-scheme: dark) {
1082 .login-background {
1083 background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
1084 }
1085
1086 .login-card {
1087 background: rgba(26, 32, 44, 0.95);
1088 border-color: rgba(255, 255, 255, 0.1);
1089 }
1090
1091 .login-title {
1092 color: #f7fafc;
1093 }
1094
1095 .login-subtitle {
1096 color: #a0aec0;
1097 }
1098
1099 .form-label {
1100 color: #e2e8f0;
1101 }
1102
1103 .form-input {
1104 background: #2d3748;
1105 border-color: #4a5568;
1106 color: #f7fafc;
1107 }
1108
1109 .form-input:focus {
1110 border-color: #ff2442;
1111 }
1112
1113 .social-button {
1114 background: #2d3748;
1115 border-color: #4a5568;
1116 color: #f7fafc;
1117 }
1118
1119 .signup-link {
1120 border-color: #4a5568;
1121 }
1122
1123 .signup-link p {
1124 color: #a0aec0;
1125 }
1126
1127 /* 深色模式下的错误提示样式 */
1128 .error-message {
1129 background: rgba(26, 32, 44, 0.95);
1130 color: #ff6b6b;
1131 }
1132
1133 /* 深色模式下的错误弹窗样式 */
1134 .error-modal .ant-modal-header {
1135 background: #2d3748;
1136 border-color: #4a5568;
1137 }
1138
1139 .error-modal .ant-modal-title {
1140 color: #f7fafc;
1141 }
1142
1143 .error-modal .ant-modal-body {
1144 background: #2d3748;
1145 color: #f7fafc;
1146 }
1147
1148 .error-modal .ant-modal-footer {
1149 background: #2d3748;
1150 }
1151
1152 .error-modal .ant-modal-content {
1153 background: #2d3748;
1154 }
1155}
1156
1157/* 错误提示样式 - 使用绝对定位避免影响布局 */
1158.error-message {
1159 position: absolute;
1160 top: 95%;
1161 left: 4px;
1162 right: 4px;
1163 font-size: 12px;
1164 color: #ff4d4f;
1165 margin-top: 4px;
1166 display: flex;
1167 align-items: center;
1168 min-height: 16px;
1169 animation: fadeInDown 0.3s ease-out;
1170 font-weight: 400;
1171 line-height: 1.2;
1172 background: rgba(255, 255, 255, 0.95);
1173 backdrop-filter: blur(4px);
1174 padding: 2px 4px;
1175 border-radius: 4px;
1176 z-index: 10;
1177 pointer-events: none; /* 避免干扰用户交互 */
1178}
1179
1180@keyframes fadeInDown {
1181 from {
1182 opacity: 0;
1183 transform: translateY(-8px);
1184 }
1185 to {
1186 opacity: 1;
1187 transform: translateY(0);
1188 }
1189}
1190
1191/* 输入框错误状态样式 */
1192.form-input.input-error,
1193.form-input.input-error.ant-input,
1194.form-input.input-error.ant-input-affix-wrapper {
1195 border-color: #ff4d4f !important;
1196 box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.1) !important;
1197 transition: all 0.3s ease !important;
1198}
1199
1200.form-input.input-error:focus,
1201.form-input.input-error.ant-input:focus,
1202.form-input.input-error.ant-input-affix-wrapper:focus,
1203.form-input.input-error.ant-input-affix-wrapper-focused {
1204 border-color: #ff4d4f !important;
1205 box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2) !important;
1206}
1207
1208/* 错误状态下的图标颜色 */
1209.form-input.input-error .anticon {
1210 color: #ff4d4f !important;
1211}
1212
1213/* 确保表单组间距一致 */
1214.form-group {
1215 margin-bottom: 0px;
1216}
1217
1218.form-group:last-of-type {
1219 margin-bottom: 0px;
1220}
1221
1222/* 错误弹窗样式 */
1223.error-modal .ant-modal-header {
1224 background: #fff;
1225 border-bottom: 1px solid #f0f0f0;
1226 padding: 16px 24px;
1227}
1228
1229.error-modal .ant-modal-title {
1230 color: #333;
1231 font-weight: 600;
1232 font-size: 16px;
1233}
1234
1235.error-modal .ant-modal-body {
1236 padding: 16px 24px 24px;
1237}
1238
1239.error-modal .ant-modal-footer {
1240 padding: 12px 24px 24px;
1241 border-top: none;
1242 text-align: center;
1243}
1244
1245.error-modal .ant-btn-primary {
1246 background: #ff2442;
1247 border-color: #ff2442;
1248 font-weight: 500;
1249 height: 40px;
1250 padding: 0 24px;
1251 border-radius: 6px;
1252 transition: all 0.2s ease;
1253}
1254
1255.error-modal .ant-btn-primary:hover {
1256 background: #d91e3a;
1257 border-color: #d91e3a;
1258 transform: translateY(-1px);
1259 box-shadow: 0 4px 12px rgba(255, 36, 66, 0.3);
1260}
1261
1262.error-modal .ant-modal-content {
1263 border-radius: 12px;
1264 overflow: hidden;
1265 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
1266}
1267
1268/* 错误弹窗遮罩层 */
1269.error-modal .ant-modal-mask {
1270 background: rgba(0, 0, 0, 0.6);
1271 backdrop-filter: blur(4px);
1272}
1273
1274/* 错误弹窗动画 */
1275.error-modal .ant-modal {
1276 animation: errorModalSlideIn 0.3s ease-out;
1277}
1278
1279@keyframes errorModalSlideIn {
1280 from {
1281 opacity: 0;
1282 transform: translateY(-20px) scale(0.95);
1283 }
1284 to {
1285 opacity: 1;
1286 transform: translateY(0) scale(1);
1287 }
1288}