-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.css
More file actions
101 lines (91 loc) · 2 KB
/
App.css
File metadata and controls
101 lines (91 loc) · 2 KB
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
* {
margin: 0;
padding: 0;
}
body {
background: linear-gradient(90deg, rgba(84, 255, 57, 0.833), rgba(152, 253, 74, 0.824));
height: 100%;
width: 100%;
display: flex;
justify-content: center;
}
.controls {
display: flex;
justify-content: center;
align-items: center;
gap: 30px;
margin-top: 15px;
font-family: 'Courier New', Courier, monospace;
}
.controls p {
font-size: 1.5rem;
color: #2ecc71;
margin: 0;
background-color: #f0f9f5;
padding: 10px 20px;
border-radius: 10px;
border: 2px dashed #2ecc71;
}
.controls button {
padding: 10px 20px;
font-size: 1rem;
background-color: #27ae60;
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
transition: background 0.3s ease, transform 0.2s ease;
}
.controls button:hover {
background-color: #1e8449;
transform: scale(1.05);
}
h1 {
font-family: 'Courier New', Courier, monospace;
color: #27ae60;
text-align: center;
font-size: 2.5rem;
margin-top: 20px;
text-shadow: 2px 2px #d1f2eb;
letter-spacing: 2px;
border-bottom: 3px solid #2ecc71;
padding-bottom: 10px;
width: fit-content;
margin-left: auto;
margin-right: auto;
}
.board {
position: relative;
height: 550px;
width: 550px;
background: rgb(147, 212, 147);
border: 10px solid white;
border-radius: 15px;
display: grid;
grid-template-columns: repeat(20, 1fr);
grid-template-rows: repeat(20, 1fr);
box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.2);
}
.snake{
background: linear-gradient(90deg, rgb(0, 100, 0), rgb(0, 180, 0));
border-radius: 5px;
box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.3);
}
.snake-food{
background: radial-gradient(circle, rgb(255, 0, 0), rgb(200, 50, 50));
border-radius: 40%;
box-shadow: 0px 0px 10px rgba(255, 0, 0, 0.6);
}
.game-over {
position: absolute;
display: flex;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 2rem;
color: red;
text-align: center;
background-color: rgba(0, 0, 0, 0.7);
padding: 20px 40px;
border-radius: 10px;
}