html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgb(51, 51, 51);
overflow: hidden;
white-space: nowrap;
color: white;
font-family: arial;
}
#root, #canvas {
position: absolute;
margin: 0;
padding: 0;
width: 100%;
max-height: 100%;
aspect-ratio: 16/9;
overflow: hidden;
}
#canvas {
background: rgb(31, 31, 31);
}
#root div {
transform: translate(-50%, -50%);
position: absolute;
}
.cloud-particle {
border-radius: 50%;
background: rgb(255, 255, 255);
animation-name: cloud;
animation-iteration-count: infinite;
animation-direction: alternate;
}
.result {
left: 50%;
top: 50%;
font-size: 108px;
}
.result:after {
content: 'Press any key to continue';
position: absolute;
font-size: 48px;
width: fit-content;
top: 85%;
left: 50%;
transform: translate(-50%);
}
#lives {
position: absolute;
top: 15px;
left: 15px;
font-size: 32px;
}
#sound {
position: absolute;
display: block;
top: 15px;
right: 15px;
font-size: 32px;
border: none;
background: transparent;
outline: none;
cursor: pointer;
}
#lives:before {
content: '❤ ';
color: red;
}
@keyframes cloud {
from {
transform: translate(-50%) scale(1.2);
opacity: 0.7;
}
to {
transform: translate(-50%) scale(0.2);
opacity: 0.1;
}
}