auth.scss 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. /* auth.component.css */
  2. :host {
  3. display: flex;
  4. justify-content: center;
  5. align-items: center;
  6. min-height: 100vh;
  7. background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  8. font-family: 'Inter', 'Alibaba PuHuiTi', sans-serif;
  9. color: white;
  10. }
  11. .auth-container {
  12. width: 100%;
  13. max-width: 420px;
  14. padding: 2.5rem;
  15. background: rgba(30, 41, 59, 0.8);
  16. border-radius: 1rem;
  17. box-shadow: 0 0 30px rgba(37, 99, 235, 0.3);
  18. border: 1px solid rgba(37, 99, 235, 0.2);
  19. backdrop-filter: blur(10px);
  20. position: relative;
  21. overflow: hidden;
  22. }
  23. .auth-container::before {
  24. content: '';
  25. position: absolute;
  26. top: -50%;
  27. left: -50%;
  28. width: 200%;
  29. height: 200%;
  30. background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
  31. animation: rotate 20s linear infinite;
  32. z-index: -1;
  33. }
  34. @keyframes rotate {
  35. from {
  36. transform: rotate(0deg);
  37. }
  38. to {
  39. transform: rotate(360deg);
  40. }
  41. }
  42. .auth-header {
  43. text-align: center;
  44. margin-bottom: 2rem;
  45. }
  46. .auth-title {
  47. font-size: 1.8rem;
  48. font-weight: 600;
  49. margin-bottom: 0.5rem;
  50. background: linear-gradient(90deg, #2563EB, #7C3AED);
  51. -webkit-background-clip: text;
  52. background-clip: text;
  53. color: transparent;
  54. }
  55. .auth-subtitle {
  56. font-size: 0.9rem;
  57. color: #94a3b8;
  58. }
  59. .auth-form {
  60. display: flex;
  61. flex-direction: column;
  62. gap: 1.5rem;
  63. }
  64. .form-group {
  65. display: flex;
  66. flex-direction: column;
  67. gap: 0.5rem;
  68. }
  69. .form-label {
  70. font-size: 0.9rem;
  71. color: #e2e8f0;
  72. display: flex;
  73. align-items: center;
  74. gap: 0.5rem;
  75. }
  76. .form-label::before {
  77. content: '>';
  78. color: #7C3AED;
  79. font-weight: bold;
  80. }
  81. .form-input {
  82. padding: 0.8rem 1rem;
  83. background: rgba(15, 23, 42, 0.5);
  84. border: 1px solid rgba(37, 99, 235, 0.3);
  85. border-radius: 0.5rem;
  86. color: white;
  87. font-family: inherit;
  88. font-size: 1rem;
  89. transition: all 0.3s ease;
  90. }
  91. .form-input:focus {
  92. outline: none;
  93. border-color: #2563EB;
  94. box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  95. }
  96. .submit-btn {
  97. padding: 0.8rem;
  98. background: linear-gradient(90deg, #2563EB, #7C3AED);
  99. color: white;
  100. border: none;
  101. border-radius: 0.5rem;
  102. font-size: 1rem;
  103. font-weight: 600;
  104. cursor: pointer;
  105. transition: all 0.3s ease;
  106. margin-top: 0.5rem;
  107. position: relative;
  108. overflow: hidden;
  109. }
  110. .submit-btn::after {
  111. content: '';
  112. position: absolute;
  113. top: -50%;
  114. left: -50%;
  115. width: 200%;
  116. height: 200%;
  117. background: linear-gradient(
  118. to bottom right,
  119. rgba(255, 255, 255, 0.3) 0%,
  120. rgba(255, 255, 255, 0) 60%
  121. );
  122. transform: rotate(30deg);
  123. transition: all 0.3s ease;
  124. }
  125. .submit-btn:hover {
  126. transform: translateY(-2px);
  127. box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
  128. }
  129. .submit-btn:hover::after {
  130. left: 100%;
  131. }
  132. .submit-btn:active {
  133. transform: translateY(0);
  134. }
  135. .mode-toggle {
  136. text-align: center;
  137. margin-top: 1.5rem;
  138. font-size: 0.9rem;
  139. color: #94a3b8;
  140. }
  141. .toggle-link {
  142. color: #7C3AED;
  143. cursor: pointer;
  144. font-weight: 600;
  145. text-decoration: none;
  146. transition: color 0.3s ease;
  147. }
  148. .toggle-link:hover {
  149. color: #2563EB;
  150. text-decoration: underline;
  151. }
  152. .message {
  153. padding: 0.8rem;
  154. border-radius: 0.5rem;
  155. margin-bottom: 1rem;
  156. font-size: 0.9rem;
  157. text-align: center;
  158. }
  159. .error-message {
  160. background-color: rgba(245, 158, 11, 0.1);
  161. border: 1px solid rgba(245, 158, 11, 0.3);
  162. color: #F59E0B;
  163. }
  164. .success-message {
  165. background-color: rgba(16, 185, 129, 0.1);
  166. border: 1px solid rgba(16, 185, 129, 0.3);
  167. color: #10B981;
  168. }
  169. /* 科幻风格的装饰元素 */
  170. .decorator {
  171. position: absolute;
  172. background: rgba(37, 99, 235, 0.1);
  173. border: 1px solid rgba(37, 99, 235, 0.3);
  174. }
  175. .decorator-1 {
  176. width: 100px;
  177. height: 100px;
  178. border-radius: 50%;
  179. top: -50px;
  180. right: -50px;
  181. }
  182. .decorator-2 {
  183. width: 60px;
  184. height: 60px;
  185. border-radius: 10px;
  186. bottom: -30px;
  187. left: -30px;
  188. transform: rotate(45deg);
  189. }
  190. /* 响应式设计 */
  191. @media (max-width: 480px) {
  192. .auth-container {
  193. padding: 1.5rem;
  194. margin: 0 1rem;
  195. }
  196. }