You can't get rid of the white space around the edges of a dialog box.
If you want to stay with Google products and want an alternative, you'd need to use an Apps Script Web App for your app.
You could have the user use the link for the Web App rather than the link to the Sheet.
Do they need to see the Sheet? If they must see the Sheet, then you could have the Sheet open in one browser tab
and the Web App open in another browser tab. If that's not acceptable, then you'd need to embed the Sheet into the Web App maybe.
You could still use the spreadsheet for the data source of the random questions.
I looked at your Stack Overflow question.
I don't use HTML design tools, so I don't know what's out there, but there are probably some that could help you.
The problem with using something that does the work for you, is that you don't understand the HTML and CSS,
then you're creating something that you don't understand.
Then it can be very difficult to make even the slightest change.
There are CSS frameworks that you can use to help you style the HTML. Which one you want to use is personal preference.
But, learning how to use the framework and setting it up to work with Apps Script can be more work than it's worth depending upon how much time you can afford to invest in this.
This is the documentation for a Web App.
You need to use doGet() you'll never use doPost() to display the Web App.
I'd be shocked if there isn't someone who has already designed something like you need.
Hopefully someone will see this and have something for you.