Score: 0
How to Play
- Use arrow keys or WASD to control the snake
- Eat the red food to grow longer
- Avoid hitting the walls or your own tail
- Try to get the highest score possible
.mobile-controls {
display: grid;
}
h1 {
font-size: 2em;
}
.score {
font-size: 1.2rem;
}
.button {
padding: 8px 16px;
font-size: 14px;
}
}
/* 返回按钮样式 */
.back-button {
position: fixed;
top: 20px;
left: 20px;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 50%;
width: 50px;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 0 4px 10px rgba(0,0,0,0.2);
z-index: 1000;
transition: all 0.3s ease;
}
.back-button:hover {
transform: scale(1.1);
background-color: #388E3C;
}
.back-button i {
font-size: 1.5rem;
}
Snake Game
How to Play
- Use arrow keys or touch controls to guide the snake
- Eat food to grow longer and score points
- Avoid hitting the walls or yourself
- Try to achieve the highest score possible