Zs / styles.css
Reaperxxxx's picture
Update styles.css
aa8ea94 verified
Raw
History Blame Contribute Delete
2 kB
/* General Styles */
body {
margin: 0;
font-family: Arial, sans-serif;
background: linear-gradient(to bottom, #1a1a1a, #333);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
#game-container {
text-align: center;
}
#play-button {
padding: 12px 25px;
font-size: 18px;
cursor: pointer;
background: #00aaff;
color: white;
border: none;
border-radius: 8px;
box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.3);
margin-bottom: 15px;
}
#game-area {
position: relative;
width: 900px;
height: 600px;
background: #1e1e1e;
border: 3px solid #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
overflow: hidden;
}
/* Squares */
.square {
position: absolute;
width: 30px;
height: 30px;
border-radius: 5px;
}
.yellow { background-color: yellow; }
.blue { background-color: blue; }
.red { background-color: red; }
.green { background-color: green; }
/* Finish Line */
#finish-line {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 30px;
background: #00ff00;
border-top: 3px solid #fff;
}
/* Obstacles */
.obstacle {
position: absolute;
background: #ff5555;
border-radius: 8px;
}
#obstacle-1 {
width: 150px;
height: 20px;
top: 120px;
left: 150px;
transform: rotate(15deg);
}
#obstacle-2 {
width: 200px;
height: 20px;
top: 250px;
left: 400px;
}
#obstacle-3 {
width: 100px;
height: 20px;
top: 50px;
left: 600px;
transform: rotate(-45deg);
}
#obstacle-4 {
width: 100px;
height: 20px;
top: 400px;
left: 300px;
animation: move-horizontal 3s infinite alternate;
}
#obstacle-5 {
width: 150px;
height: 20px;
top: 100px;
left: 700px;
animation: move-vertical 4s infinite alternate;
}
/* Animations */
@keyframes move-horizontal {
from {
transform: translateX(0);
}
to {
transform: translateX(150px);
}
}
@keyframes move-vertical {
from {
transform: translateY(0);
}
to {
transform: translateY(150px);
}
}