|
|
|
* { |
|
margin: 0; |
|
padding: 0; |
|
box-sizing: border-box; |
|
} |
|
|
|
|
|
body { |
|
font-family: 'Arial', sans-serif; |
|
display: flex; |
|
justify-content: center; |
|
align-items: center; |
|
height: 100vh; |
|
background-color: #121212; |
|
} |
|
|
|
|
|
.game-container { |
|
width: 80vw; |
|
height: 60vh; |
|
position: relative; |
|
background: linear-gradient(45deg, #00b3b3, #cc00cc); |
|
border-radius: 10px; |
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.8); |
|
overflow: hidden; |
|
} |
|
|
|
|
|
.ball { |
|
position: absolute; |
|
width: 30px; |
|
height: 30px; |
|
background-color: #ffcc00; |
|
border-radius: 50%; |
|
top: 10%; |
|
left: 50%; |
|
transform: translateX(-50%); |
|
animation: ballAnimation 4s linear infinite; |
|
} |
|
|
|
|
|
@keyframes ballAnimation { |
|
0% { top: 10%; } |
|
50% { top: 90%; } |
|
100% { top: 10%; } |
|
} |
|
|
|
|
|
.platform { |
|
position: absolute; |
|
bottom: 5%; |
|
width: 15vw; |
|
height: 5vh; |
|
background-color: #ff6600; |
|
border-radius: 5px; |
|
left: 50%; |
|
transform: translateX(-50%); |
|
} |
|
|
|
|
|
.controls { |
|
position: absolute; |
|
bottom: 20px; |
|
display: flex; |
|
justify-content: space-between; |
|
width: 80%; |
|
padding: 10px; |
|
} |
|
|
|
.controls button { |
|
font-size: 1.5rem; |
|
padding: 10px 15px; |
|
background-color: #333; |
|
color: white; |
|
border: none; |
|
border-radius: 5px; |
|
cursor: pointer; |
|
transition: background-color 0.3s; |
|
} |
|
|
|
.controls button:hover { |
|
background-color: #555; |
|
} |
|
|
|
|
|
.score-board, .lives { |
|
position: absolute; |
|
top: 10px; |
|
font-size: 1.2rem; |
|
color: white; |
|
font-weight: bold; |
|
} |
|
|
|
.score-board { |
|
left: 10px; |
|
} |
|
|
|
.lives { |
|
right: 10px; |
|
} |
|
|
|
|
|
.game-over-message { |
|
position: absolute; |
|
top: 50%; |
|
left: 50%; |
|
transform: translate(-50%, -50%); |
|
background-color: rgba(0, 0, 0, 0.8); |
|
color: white; |
|
text-align: center; |
|
padding: 30px; |
|
border-radius: 15px; |
|
display: none; |
|
box-shadow: 0 0 30px rgba(0, 255, 255, 0.7); |
|
} |
|
|
|
.game-over-message h2 { |
|
font-size: 2rem; |
|
} |
|
|
|
.game-over-message p { |
|
font-size: 1.5rem; |
|
} |
|
|
|
.game-over-message button { |
|
padding: 12px 25px; |
|
background-color: #ff6600; |
|
color: white; |
|
font-size: 1.2rem; |
|
border-radius: 10px; |
|
cursor: pointer; |
|
transition: background-color 0.2s ease; |
|
} |
|
|
|
.game-over-message button:hover { |
|
background-color: #e64a19; |
|
} |