-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
124 lines (109 loc) · 2.34 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
#game-area {
display: grid;
grid-template-columns: repeat(20, 1fr);
grid-template-rows: repeat(20, 1fr);
gap: 1px;
background-color: #fff;
border: 2px solid #000;
padding: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
border-radius: 10px;
}
.cell {
width: calc(400px / 20 - 2px);
height: calc(400px / 20 - 2px);
background-color: #fff;
box-sizing: border-box;
}
.snake {
background: linear-gradient(45deg, #00FF00, #019701);
border-radius: 50%;
}
.head {
background-color: #011f01;
border: 2px solid #fff;
}
.food {
background-color: #f00;
border-radius: 50%;
animation: pulse 1s infinite alternate;
}
@keyframes pulse {
from {
transform: scale(1);
}
to {
transform: scale(1.1);
}
}
#start-button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
font-size: 1.2rem;
margin-top: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}
.start,
.restart {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
font-size: 1.2rem;
margin-top: 20px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}
.start:hover,
.restart:hover {
background-color: #45a049;
}
#game-over-message {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
text-align: center;
font-size: 1.5rem;
display: none;
}
#game-over-message p {
margin-bottom: 20px;
}
#game-over-message button {
padding: 10px 20px;
background-color: #f44336;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
outline: none;
font-size: 1.2rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: background-color 0.3s ease;
}
#game-over-message button:hover {
background-color: #d32f2f;
}