183 lines
3.2 KiB
CSS
183 lines
3.2 KiB
CSS
:root {
|
|
--primary-blue: #4A90E2;
|
|
--highlight-orange: #F39C12;
|
|
--soft-cream: #FFF9E5;
|
|
--dark-gray: #34495E;
|
|
--success-green: #2ECC71;
|
|
--error-red: #E74C3C;
|
|
--light-gray: #ECF0F1;
|
|
--button-height: 50px;
|
|
--road-height: 30px;
|
|
--gap: 10px;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background-color: var(--soft-cream);
|
|
color: var(--dark-gray);
|
|
}
|
|
|
|
.game-container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.game-area {
|
|
display: grid;
|
|
grid-template-columns: 50px 1fr 50px;
|
|
gap: var(--gap);
|
|
min-width: 600px;
|
|
border: 2px solid var(--dark-gray);
|
|
border-radius: 8px;
|
|
padding: var(--gap);
|
|
background-color: var(--light-gray);
|
|
}
|
|
|
|
.button-column {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
width: 50px;
|
|
height: 170px;
|
|
}
|
|
|
|
.pipe {
|
|
height: 50px;
|
|
width: 50px;
|
|
background-color: var(--primary-blue);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.square {
|
|
width: 40px;
|
|
height: 20px;
|
|
background-color: var(--highlight-orange);
|
|
position: absolute;
|
|
left: 5px;
|
|
transition: top 0.3s ease-out;
|
|
}
|
|
|
|
.square.top {
|
|
top: 5px;
|
|
}
|
|
|
|
.square.bottom {
|
|
top: 25px;
|
|
}
|
|
|
|
.road-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--gap);
|
|
}
|
|
|
|
.road-pair {
|
|
height: var(--button-height);
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-evenly;
|
|
}
|
|
|
|
.road {
|
|
height: 15px;
|
|
background-color: var(--primary-blue);
|
|
border-radius: 4px;
|
|
position: relative;
|
|
overflow: visible;
|
|
}
|
|
|
|
.obstacle {
|
|
position: absolute;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
top: -2.5px;
|
|
left: calc(50% - 10px);
|
|
will-change: transform;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
}
|
|
|
|
.collision {
|
|
animation: flash 0.3s;
|
|
animation-fill-mode: both;
|
|
}
|
|
|
|
@keyframes flash {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
transform: scale(1.2);
|
|
}
|
|
50% {
|
|
opacity: 0.3;
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.controls {
|
|
margin-top: var(--gap);
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
gap: 20px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.score-container {
|
|
flex-grow: 1;
|
|
text-align: left;
|
|
}
|
|
|
|
button {
|
|
padding: 10px 20px;
|
|
font-size: 1.2em;
|
|
background-color: var(--primary-blue);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
order: 2;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: var(--highlight-orange);
|
|
}
|
|
|
|
.score, .timer {
|
|
font-size: 1.5em;
|
|
margin-top: var(--gap);
|
|
}
|
|
|
|
.timer {
|
|
color: var(--dark-gray);
|
|
}
|
|
|
|
.collection {
|
|
width: 100%;
|
|
margin-top: 10px;
|
|
padding: 10px;
|
|
background-color: rgba(255, 255, 255, 0.1);
|
|
border-radius: 8px;
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
word-wrap: break-word;
|
|
order: 3;
|
|
}
|
|
|
|
.collection:empty {
|
|
display: none;
|
|
|