/* 登录/注册页面样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; overflow: hidden; } /* 半透明背景遮罩 */ .login-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 1000000; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fadeIn 0.3s ease; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } /* 登录容器 */ .login-container { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 480px; max-width: 90vw; max-height: 90vh; background: #ffffff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); z-index: 1000001; animation: slideUp 0.3s ease; overflow-y: auto; } @keyframes slideUp { from { opacity: 0; transform: translate(-50%, -40%); } to { opacity: 1; transform: translate(-50%, -50%); } } /* 关闭按钮 */ .close-btn { position: absolute; top: 16px; right: 16px; width: 32px; height: 32px; border: none; background: #f3f4f6; border-radius: 50%; font-size: 24px; line-height: 1; color: #6b7280; cursor: pointer; transition: all 0.2s ease; z-index: 10; display: flex; align-items: center; justify-content: center; } .close-btn:hover { background: #e5e7eb; color: #374151; } /* 标签切换 */ .tab-switcher { display: flex; border-bottom: 2px solid #e5e7eb; padding: 0 24px; margin-top: 24px; } .tab-btn { flex: 1; padding: 16px 0; border: none; background: transparent; font-size: 16px; font-weight: 600; color: #6b7280; cursor: pointer; transition: all 0.3s ease; position: relative; } .tab-btn.active { color: #8b5cf6; } .tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: #8b5cf6; } .tab-btn:hover { color: #8b5cf6; } /* 表单容器 */ .form-container { padding: 32px 24px; } /* 登录方式切换 */ .login-type-switcher { display: flex; gap: 8px; margin-bottom: 24px; background: #f9fafb; padding: 4px; border-radius: 8px; } .type-btn { flex: 1; padding: 8px 16px; border: none; background: transparent; font-size: 14px; color: #6b7280; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; } .type-btn.active { background: #ffffff; color: #8b5cf6; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); } .type-btn:hover { color: #8b5cf6; } .login-type-content { animation: fadeIn 0.3s ease; } /* 表单组 */ .form-group { margin-bottom: 20px; } .form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #374151; } .form-group input[type="text"], .form-group input[type="password"], .form-group input[type="tel"] { width: 100%; padding: 12px 16px; font-size: 14px; border: 2px solid #e5e7eb; border-radius: 8px; transition: all 0.2s ease; outline: none; } .form-group input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1); } .form-group input::placeholder { color: #9ca3af; } /* 验证码输入组 */ .code-input-group { display: flex; gap: 12px; } .code-input-group input { flex: 1; } .code-btn { padding: 12px 20px; border: 2px solid #8b5cf6; background: #ffffff; color: #8b5cf6; font-size: 14px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; } .code-btn:hover:not(:disabled) { background: #8b5cf6; color: #ffffff; } .code-btn:disabled { opacity: 0.6; cursor: not-allowed; } .code-btn.countdown { color: #6b7280; border-color: #d1d5db; } /* 密码提示 */ .password-hint { margin-top: 6px; } .hint-text { font-size: 12px; color: #6b7280; line-height: 1.5; } /* 头像上传 */ .avatar-upload { display: flex; align-items: center; justify-content: center; } .avatar-preview { width: 80px; height: 80px; border: 2px dashed #d1d5db; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; overflow: hidden; background: #f9fafb; } .avatar-preview:hover { border-color: #8b5cf6; background: #faf5ff; } .avatar-preview img { width: 100%; height: 100%; object-fit: cover; } .avatar-placeholder { font-size: 12px; color: #9ca3af; text-align: center; } /* 提交按钮 */ .submit-btn { width: 100%; padding: 14px; margin-top: 8px; border: none; background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%); color: #ffffff; font-size: 16px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); } .submit-btn:hover { background: linear-gradient(135deg, #7c3aed 0%, #9333ea 100%); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); } .submit-btn:active { transform: translateY(0); } .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; } /* 错误提示 */ .error-message { margin-top: 12px; margin-bottom: 8px; padding: 10px 16px; font-size: 14px; color: #ef4444; background-color: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; display: none; text-align: center; } .error-message.show { display: block; animation: fadeIn 0.3s ease; } /* 响应式设计 */ @media (max-width: 600px) { .login-container { width: 95vw; max-height: 95vh; } .form-container { padding: 24px 16px; } .code-input-group { flex-direction: column; } .code-btn { width: 100%; } }