-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
123 lines (106 loc) · 2.92 KB
/
style.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #121212; /* Deep black background for minimal look */
color: #d3d3d3; /* Lighter grey text color */
font-family: 'Poppins', sans-serif; /* A cleaner modern font */
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.heading {
font-size: 48px;
margin-bottom: 20px;
color: #f5f5f5; /* Brighter text for better contrast */
letter-spacing: 1px; /* A slight spacing for aesthetic */
}
.start-button {
padding: 12px 25px;
font-size: 22px;
margin-bottom: 20px;
cursor: pointer;
background-color: #1e90ff; /* Cool blue for button */
color: white;
border: none;
border-radius: 50px; /* Rounded edges for a modern feel */
transition: background-color 0.3s ease;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Slight shadow for depth */
}
.start-button:hover {
background-color: #00bfff; /* Slightly lighter on hover */
}
#score {
position: absolute;
top: 20px;
right: 50px;
font-size: 24px;
font-weight: bold;
color: #00ff7f; /* Neon green for score */
}
#board {
background: #222; /* Darker shade for the board */
width: 60vw;
height: 70vh;
border: 2px solid #f5f5f5; /* Lighter border for contrast */
display: grid;
grid-template-rows: repeat(18, 1fr);
grid-template-columns: repeat(18, 1fr);
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4); /* Depth effect */
border-radius: 10px; /* Slight rounding of the board edges */
}
/* Snake Styling */
.snake {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px; /* Snake size for visibility */
background-color: #4be34b; /* Bright green for snake */
border-radius: 5px; /* Rounded for smooth appearance */
}
/* Food Styling */
.food {
text-align: center;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
background-color: #ff6347; /* Tomato red for food */
border-radius: 50%; /* Circular food shape */
}
/* Media Queries for Smaller Devices */
/* For tablets and medium-sized devices */
@media (max-width: 768px) {
#board {
width: 80vw; /* Increase width for tablets */
}
.heading {
font-size: 36px; /* Adjust heading size */
}
.start-button {
font-size: 20px; /* Adjust button font size */
}
}
/* For small devices like smartphones */
@media (max-width: 480px) {
#board {
width: 90vw; /* Further increase width for smaller screens */
}
.heading {
font-size: 28px; /* Adjust heading size for small devices */
}
.start-button {
font-size: 18px; /* Smaller button font size */
padding: 10px 20px; /* Adjust padding */
}
#score {
font-size: 20px; /* Adjust score font size */
}
}