Spaces:
Sleeping
Sleeping
| body, html { | |
| margin: 0; | |
| padding: 0; | |
| overflow: hidden; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| flex-direction: column; | |
| height: 100vh; | |
| background-color: rgb(255, 100, 0); /* Optional: sets the background of the entire page */ | |
| width: 100%; | |
| height: 100%; | |
| margin: 0; | |
| padding: 0; | |
| } | |
| #buttonContainer { | |
| display: flex; | |
| gap: 15px; | |
| margin-top: 15px; | |
| } | |
| #startButton { | |
| background-color: black; | |
| color: white; | |
| padding: 10px 20px; | |
| font-size: 20px; | |
| border: none; | |
| border-radius: 10px; | |
| cursor: pointer; | |
| outline: none; | |
| width: 180px; /* Fixed width for uniformity */ | |
| text-align: center; | |
| } | |
| #aiButton { | |
| background-color: rgb(60, 60, 60); | |
| color: white; | |
| padding: 10px 20px; | |
| font-size: 20px; | |
| border: none; | |
| border-radius: 10px; | |
| cursor: pointer; | |
| outline: none; | |
| width: 180px; /* Fixed width for uniformity */ | |
| text-align: center; | |
| } | |
| #startButton:hover { | |
| background-color: #333; | |
| } | |
| #aiButton:hover { | |
| background-color: #5c5c5c; | |
| } | |
| #score { | |
| font-size: 40px; /* Adjust the size as needed */ | |
| color: #FFF; /* Text color */ | |
| text-align: center; | |
| margin-bottom: 0px; /* Adjust spacing around the score display as needed */ | |
| font-family: 'Arial', sans-serif; /* Example font */ | |
| background-color: black; /* Background color of the box */ | |
| padding: 10px 20px; /* Padding around the text */ | |
| border-radius: 10px; /* Rounded corners */ | |
| display: inline-block; /* Allows the box to fit the content's width */ | |
| } | |
| #instructionText { | |
| font-size: 20px; /* Adjust the size as needed */ | |
| font-style: italic; | |
| color: #FFF; /* Text color */ | |
| text-align: center; | |
| margin-top: 10px; | |
| font-family: 'Arial', sans-serif; /* Example font */ | |
| background-color: black; /* Background color of the box */ | |
| padding: 10px 20px; /* Padding around the text */ | |
| border-radius: 10px; /* Rounded corners */ | |
| display: inline-block; /* Allows the box to fit the content's width */ | |
| } | |
| #gameContainer { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| #scoreContainer { | |
| color: rgb(0, 0, 0); | |
| font-family: Arial, sans-serif; | |
| } | |
| /* Styling for high score displays */ | |
| #highScore { | |
| font-size: 20px; | |
| color: #FFF; | |
| background-color: black; | |
| padding: 10px 20px; | |
| border-radius: 10px; | |
| margin-top: 10px; | |
| width: 15vw; | |
| text-align: center; | |
| font-family: 'Arial', sans-serif; | |
| display: inline-block; | |
| } | |
| #aiHighScore { | |
| font-size: 20px; | |
| color: #FFF; | |
| background-color: rgb(60, 60, 60); | |
| padding: 10px 20px; | |
| border-radius: 10px; | |
| margin-top: 10px; | |
| width: 15vw; | |
| text-align: center; | |
| font-family: 'Arial', sans-serif; | |
| display: inline-block; | |
| } | |
| #gameArea { | |
| width: 21vw; /* 85% of the viewport width */ | |
| height: 62vh; /* 70% of the viewport height */ | |
| /* Add any additional styles (background, border, etc.) below */ | |
| border-radius: 20px; /* Rounded corners for the game area */ | |
| background-image: url('icons/background.png'); | |
| background-size: cover; /* Cover the entire area */ | |
| background-position: center; /* Center the background image */ | |
| margin: 0 auto; /* Center the game area horizontally */ | |
| margin-top: 10px; | |
| position: relative; | |
| text-align: center; | |
| } | |
| #astronaut { | |
| position: absolute; | |
| bottom: 10px; /* Adjust based on how you want to position the astronaut from the bottom */ | |
| left: 45%; /* Start the astronaut in the middle of the game area */ | |
| width: 35px; /* Adjust based on the size of your astronaut image */ | |
| height: auto; /* Maintain aspect ratio */ | |
| } | |
| #gameTitle { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| font-family: 'Arial', sans-serif; /* Example font */ | |
| transform: translate(-50%, -50%); | |
| color: lightgrey; | |
| opacity: 0.5; /* Adjust for desired transparency */ | |
| font-size: 60px; /* Adjust based on your design */ | |
| z-index: 1; /* Ensure it's above the background but below interactive elements */ | |
| } | |
| /* Obstacles */ | |
| .planet, .asteroid, .supernova, .blackhole { | |
| position: absolute; | |
| } | |
| .hidden { | |
| display: none; | |
| } | |
| #gameOverScreen { | |
| font-size: 35px; /* Adjust the size as needed */ | |
| border-radius: 20px; /* Rounded corners for the game area */ | |
| color: #FFF; /* Text color */ | |
| font-family: 'Arial', sans-serif; /* Example font */ | |
| display: none; /* Start hidden */ | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| background-color: rgba(0, 0, 0, 0.8); | |
| color: white; | |
| padding: 20px; | |
| z-index: 100; /* Above the game area */ | |
| } | |
| .visible { | |
| display: flex ; | |
| justify-content: center; | |
| align-items: center; | |
| } | |
| /* Responsive adjustments for smaller screens */ | |
| @media (max-width: 800px) { | |
| #buttonContainer { | |
| flex-direction: row; | |
| gap: 10px; | |
| } | |
| #startButton, #aiButton { | |
| width: 130px;/* Full width on smaller screens */ | |
| } | |
| #gameArea { | |
| width: 80vw; /* 85% of the viewport width */ | |
| height: 50vh; /* 70% of the viewport height */ | |
| border-radius: 10px; | |
| } | |
| #astronaut { | |
| width: 25px; /* Reduced */ | |
| height: auto; /* Reduced */ | |
| } | |
| #score { | |
| font-size: 25px; /* Adjusted for smaller screen */ | |
| margin-bottom: 5px; | |
| } | |
| #instructionText{ | |
| font-size: 12px; /* Adjusted for smaller screen */ | |
| } | |
| #gameTitle { | |
| font-size: 50px; | |
| } | |
| #gameOverScreen { | |
| font-size: 15px; /* Adjust the size as needed */ | |
| border-radius: 10px; /* Rounded corners for the game area */ | |
| color: #FFF; /* Text color */ | |
| font-family: 'Arial', sans-serif; /* Example font */ | |
| display: none; /* Start hidden */ | |
| position: fixed; | |
| top: 50%; | |
| left: 50%; | |
| transform: translate(-50%, -50%); | |
| background-color: rgba(0, 0, 0, 0.8); | |
| color: white; | |
| padding: 15px; | |
| z-index: 100; /* Above the game area */ | |
| } | |
| #startButton { | |
| background-color: black; /* Set the background color to black */ | |
| color: white; /* Set the text color to white */ | |
| padding: 5px 10px; /* Add some padding for better visual appearance */ | |
| font-size: 15px; /* Adjust the font size as needed */ | |
| border: none; /* Remove the default border */ | |
| border-radius: 5px; /* Add rounded corners */ | |
| cursor: pointer; /* Change cursor to pointer to indicate it's clickable */ | |
| outline: none; /* Remove the outline to improve aesthetics on focus */ | |
| margin-top: 10px; /* Add more distance from the game area or other elements */ | |
| text-align: center; /* Allows the box to fit the content's width */ | |
| } | |
| #aiButton { | |
| background-color: rgb(60, 60, 60); /* Set the background color to black */ | |
| color: white; /* Set the text color to white */ | |
| padding: 5px 10px; /* Add some padding for better visual appearance */ | |
| font-size: 15px; /* Adjust the font size as needed */ | |
| border: none; /* Remove the default border */ | |
| border-radius: 5px; /* Add rounded corners */ | |
| cursor: pointer; /* Change cursor to pointer to indicate it's clickable */ | |
| outline: none; /* Remove the outline to improve aesthetics on focus */ | |
| margin-top: 10px; /* Add more distance from the game area or other elements */ | |
| text-align: center; /* Allows the box to fit the content's width */ | |
| } | |
| #highScore { | |
| color: rgb(0, 0, 0); | |
| width: 50vw; | |
| font-family: Arial, sans-serif; | |
| margin-bottom: 5px; | |
| margin-top: 5px; | |
| font-size: 15px; /* Adjust the size as needed */ | |
| color: #FFF; /* Text color */ | |
| background-color: black; /* Background color of the box */ | |
| padding: 5px 10px; /* Padding around the text */ | |
| border-radius: 5px; /* Rounded corners */ | |
| display: inline-block; | |
| } | |
| #aiHighScore { | |
| color: rgb(0, 0, 0); | |
| width: 50vw; | |
| font-family: Arial, sans-serif; | |
| margin-bottom: 5px; | |
| margin-top: 5px; | |
| font-size: 15px; /* Adjust the size as needed */ | |
| color: #FFF; /* Text color */ | |
| background-color: rgb(60, 60, 60); /* Background color of the box */ | |
| padding: 5px 10px; /* Padding around the text */ | |
| border-radius: 5px; /* Rounded corners */ | |
| display: inline-block; | |
| } | |
| } | |