| /* src/components/AuthForm.css */ | |
| .auth-container { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| min-height: 100vh; | |
| background-color: #f5f5f5; | |
| padding: 20px; | |
| } | |
| .auth-title { | |
| color: #333; | |
| font-size: 2.5rem; | |
| margin-bottom: 2rem; | |
| text-align: center; | |
| } | |
| .auth-form-wrapper { | |
| width: 100%; | |
| max-width: 400px; | |
| background: white; | |
| padding: 2rem; | |
| border-radius: 8px; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| .auth-form { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 1rem; | |
| } | |
| .auth-form h2 { | |
| color: #333; | |
| text-align: center; | |
| margin-bottom: 1.5rem; | |
| } | |
| .form-group { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0.5rem; | |
| } | |
| .form-group input { | |
| padding: 0.8rem; | |
| border: 1px solid #ddd; | |
| border-radius: 4px; | |
| font-size: 1rem; | |
| width: 100%; | |
| box-sizing: border-box; /* 确保padding不会影响宽度 */ | |
| height: 42px; /* 固定高度 */ | |
| } | |
| .form-group input:focus { | |
| outline: none; | |
| border-color: #007bff; | |
| } | |
| .auth-button { | |
| padding: 0.8rem; | |
| background-color: #007bff; | |
| color: white; | |
| border: none; | |
| border-radius: 4px; | |
| font-size: 1rem; | |
| cursor: pointer; | |
| transition: background-color 0.3s; | |
| height: 42px; /* 与输入框高度一致 */ | |
| } | |
| .auth-button:hover { | |
| background-color: #0056b3; | |
| } | |
| .auth-button:disabled { | |
| background-color: #cccccc; | |
| cursor: not-allowed; | |
| } | |
| .auth-switch { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| gap: 0.5rem; | |
| margin-top: 1rem; | |
| font-size: 0.9rem; | |
| color: #666; | |
| } | |
| .switch-button { | |
| background: none; | |
| border: none; | |
| color: #007bff; | |
| cursor: pointer; | |
| text-decoration: underline; | |
| font-size: 0.9rem; | |
| padding: 0; | |
| } | |
| .switch-button:hover { | |
| color: #0056b3; | |
| } | |
| .error-message { | |
| color: #dc3545; | |
| background-color: #f8d7da; | |
| padding: 0.5rem; | |
| border-radius: 4px; | |
| text-align: center; | |
| margin-bottom: 1rem; | |
| } |