-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tom van Weersch
committed
Oct 21, 2024
1 parent
fc27931
commit 33d533d
Showing
3 changed files
with
175 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
/* Add some basic styling to make the game look decent */ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
height: 100vh; /* Full viewport height */ | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; /* Center content vertically */ | ||
align-items: center; /* Center content horizontally */ | ||
background-color: #f0f0f0; /* Light background */ | ||
} | ||
|
||
#start-screen { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background-color: #f0f0f0; | ||
} | ||
|
||
#start-screen h1 { | ||
font-size: 36px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
#start-screen p { | ||
font-size: 18px; | ||
margin-bottom: 40px; | ||
} | ||
|
||
#start-screen button { | ||
width: 100px; | ||
height: 40px; | ||
font-size: 18px; | ||
margin: 5px; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
background-color: #4CAF50; | ||
color: #fff; | ||
} | ||
|
||
#game-container { | ||
display: none; /* Hide the game container initially */ | ||
flex-direction: column; | ||
justify-content: space-between; /* Space between elements */ | ||
align-items: center; /* Center elements horizontally */ | ||
height: 80%; /* Adjust height as needed */ | ||
width: 80%; /* Adjust width as needed */ | ||
text-align: center; | ||
background: white; /* White background for the game area */ | ||
border-radius: 8px; /* Rounded corners */ | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow */ | ||
padding: 20px; /* Padding around the content */ | ||
} | ||
|
||
#character-image { | ||
width: 250px; | ||
margin: 20px auto; | ||
} | ||
|
||
#input-field { | ||
width: 80%; /* Full width of the input field */ | ||
height: 30px; | ||
font-size: 18px; | ||
padding: 10px; | ||
margin-bottom: 10px; /* Space below the input */ | ||
} | ||
|
||
button { | ||
width: 100px; | ||
height: 40px; | ||
font-size: 18px; | ||
margin: 5px; /* Space between buttons */ | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} | ||
|
||
#submit-button { | ||
background-color: #4CAF50; /* Green */ | ||
color: #fff; | ||
} | ||
|
||
#skip-button { | ||
background-color: #ccc; /* Gray */ | ||
color: #333; | ||
} | ||
|
||
#give-up-button { | ||
background-color: #f44336; /* Red */ | ||
color: #fff; | ||
} | ||
|
||
/* Modal styles */ | ||
.modal { | ||
display: none; /* Hidden by default */ | ||
position: fixed; /* Stay in place */ | ||
z-index: 1; /* Sit on top */ | ||
left: 0; | ||
top: 0; | ||
width: 100%; /* Full width */ | ||
height: 100%; /* Full height */ | ||
overflow: auto; /* Enable scroll if needed */ | ||
background-color: rgba(0, 0, 0, 0.5); /* Black w/ opacity */ | ||
display: flex; /* Use flexbox for centering */ | ||
justify-content: center; /* Center horizontally */ | ||
align-items: center; /* Center vertically */ | ||
} | ||
|
||
.modal-content { | ||
background-color: #fefefe; | ||
padding: 20px; | ||
border: 1px solid #888; | ||
width: 80%; /* Could be more or less, depending on screen size */ | ||
max-width: 500px; /* Limit the width for larger screens */ | ||
text-align: center; /* Center text inside modal */ | ||
border-radius: 8px; /* Rounded corners for the modal */ | ||
} | ||
|
||
.close-button { | ||
color: #aaa; | ||
float: right; | ||
font-size: 28px; | ||
font-weight: bold; | ||
} | ||
|
||
.close-button:hover, | ||
.close-button:focus { | ||
color: black; | ||
text-decoration: none; | ||
cursor: pointer; | ||
} | ||
|
||
#restart-button { | ||
background-color: #4CAF50; /* Green */ | ||
color: white; | ||
width: 100%; /* Full width for the button */ | ||
padding: 10px; /* Padding for the button */ | ||
border-radius: 5px; /* Rounded corners */ | ||
cursor: pointer; | ||
} | ||
|
||
/* Center the game over modal */ | ||
#game-over-modal .modal-content { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
|
||
} | ||
|
||
.popup-message { | ||
position: fixed; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
padding: 10px 20px; | ||
border-radius: 5px; | ||
color: white; | ||
font-size: 16px; | ||
display: none; /* Initially hidden */ | ||
} | ||
|
||
.correct-message { | ||
background-color: #4CAF50; /* Green background for correct messages */ | ||
} | ||
|
||
.wrong-message { | ||
background-color: #f44336; /* Red background for wrong messages */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.