|
| 1 | +/* Base styles for the body to set font, alignment, and background */ |
| 2 | +body { |
| 3 | + font-family: 'Orbitron', sans-serif; |
| 4 | + text-align: center; |
| 5 | + margin: 0; |
| 6 | + padding: 0; |
| 7 | + background: linear-gradient(165deg, #002c08, #000000); /* Dark green to black gradient */ |
| 8 | + height: 100vh; /* Full viewport height */ |
| 9 | + display: flex; |
| 10 | + flex-direction: column; |
| 11 | + justify-content: center; /* Center content vertically */ |
| 12 | + align-items: center; /* Center content horizontally */ |
| 13 | +} |
| 14 | + |
| 15 | +/* Styling for the main title with specific margin, color, and a smooth scaling transition */ |
| 16 | +h1 { |
| 17 | + text-align: center; |
| 18 | + margin-top: 30px; /* Fixed redundant margin-top */ |
| 19 | + color: rgb(0, 210, 39); /* Neon green color */ |
| 20 | + transition: transform 0.5s ease-in-out; |
| 21 | +} |
| 22 | + |
| 23 | +/* Styling for images, ensuring they fill their container and are rounded */ |
| 24 | +img { |
| 25 | + width: 100%; /* Full width of their container */ |
| 26 | + height: 100%; /* Full height, adjusted to maintain aspect ratio */ |
| 27 | + display: block; /* Block display to remove bottom space */ |
| 28 | + border-radius: 10px; /* Rounded corners */ |
| 29 | +} |
| 30 | + |
| 31 | +/* Additional text color settings for headings and paragraphs */ |
| 32 | +h2, p { |
| 33 | + color: rgb(0, 210, 39); /* Uniform neon green text color for consistency */ |
| 34 | +} |
| 35 | + |
| 36 | +/* Styling for the game container with gradients, shadows, and rounded borders */ |
| 37 | +#game { |
| 38 | + margin: 20px auto; |
| 39 | + padding: 20px; |
| 40 | + width: 50%; |
| 41 | + height: 500px; |
| 42 | + background-color: linear-gradient(165deg, #001952, #000000); /* Gradient background */ |
| 43 | + box-shadow: 0 4px 8px rgba(5, 158, 66, 0.6); |
| 44 | + border-radius: 8px; |
| 45 | +} |
| 46 | + |
| 47 | +/* Styling for choice buttons to ensure the image and label fit perfectly */ |
| 48 | +.choice { |
| 49 | + padding: 0; |
| 50 | + width: 150px; |
| 51 | + height: 150px; |
| 52 | + margin: 10px; |
| 53 | + display: inline-block; |
| 54 | + border: none; |
| 55 | + cursor: pointer; |
| 56 | + box-shadow: 0 4px 8px rgba(5, 158, 66, 0.6); |
| 57 | + position: relative; |
| 58 | + background: none; |
| 59 | + border-radius: 10px; |
| 60 | +} |
| 61 | + |
| 62 | +/* Hidden span elements that show on hover, providing interactive feedback */ |
| 63 | +.choice span { |
| 64 | + position: absolute; |
| 65 | + top: 0; |
| 66 | + left: 0; |
| 67 | + right: 0; |
| 68 | + bottom: 0; |
| 69 | + background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent overlay */ |
| 70 | + color: green; |
| 71 | + display: flex; |
| 72 | + justify-content: center; |
| 73 | + align-items: center; |
| 74 | + opacity: 0; /* Hidden by default */ |
| 75 | + transition: opacity 0.3s; |
| 76 | + font-size: 20px; |
| 77 | + border-radius: 10px; |
| 78 | +} |
| 79 | + |
| 80 | +/* Hover effect to show the text within the choice button */ |
| 81 | +.choice:hover span { |
| 82 | + opacity: 1; |
| 83 | +} |
| 84 | + |
| 85 | +/* Reset button styling with transition effects on hover */ |
| 86 | +#reset { |
| 87 | + padding: 10px 20px; |
| 88 | + margin-top: 20px; |
| 89 | + background-color: transparent; |
| 90 | + color: rgb(130, 204, 130); |
| 91 | + border: none; |
| 92 | + cursor: pointer; |
| 93 | + font-size: 15px; |
| 94 | + box-shadow: 0 4px 8px rgba(5, 158, 66, 0.6); |
| 95 | + border-radius: 5px; |
| 96 | +} |
| 97 | + |
| 98 | +#reset:hover { |
| 99 | + background-color: green; /* Changes to solid green on hover */ |
| 100 | + color: black; |
| 101 | +} |
| 102 | + |
| 103 | +/* Animation for zoom effect used in the game title */ |
| 104 | +@keyframes zoomInZoomOut { |
| 105 | + 0%, 100% { transform: scale(1); } |
| 106 | + 50% { transform: scale(1.5); } |
| 107 | +} |
| 108 | + |
| 109 | +/* Apply transformation properties to the title spans */ |
| 110 | +h1 span { |
| 111 | + display: inline-block; /* Allows transformation */ |
| 112 | + transition: transform 1s ease-in-out; |
| 113 | +} |
| 114 | + |
| 115 | +/* Class for animating title spans, called dynamically */ |
| 116 | +.zoom-effect { |
| 117 | + animation: zoomInZoomOut 2s ease-in-out; |
| 118 | +} |
0 commit comments