-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
177 lines (157 loc) · 3.66 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/* Styles for the game board */
#game-board {
display: grid;
grid-template-columns: repeat(var(--grid-size), var(--cell-size));
grid-template-rows: repeat(var(--grid-size), var(--cell-size));
background-color: #CCC;
gap: var(--cell-gap);
border-radius: 1vmin;
padding: var(--cell-gap);
position: relative;
}
/* Styles for each cell in the game board */
.cell {
background-color: #AAA;
border-radius: 1vmin;
}
/* Styles for the game tiles */
.tile {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
width: var(--cell-size);
height: var(--cell-size);
background-color: red;
border-radius: 1vmin;
top: calc(var(--y) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
left: calc(var(--x) * (var(--cell-size) + var(--cell-gap)) + var(--cell-gap));
font-weight: bold;
background-color: hsl(200, 50%, var(--background-lightness));
color: hsl(200, 25%, var(--text-lightness));
animation: show 200ms ease-in-out;
transition: 100ms ease-in-out;
}
/* Animation for showing tiles */
@keyframes show {
0% {
opacity: .5;
transform: scale(0);
}
}
/* Styles for the body of the document */
body {
color: #776e65;
font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif;
font-size: 18px;
background-image: url('d3.jpg');
}
/* Styles for anchor tags */
a {
color: #776e65;
}
/* Styles for horizontal rule */
hr {
border: none;
border-bottom: 1px solid #d8d4d0;
margin-top: 20px;
margin-bottom: 30px;
overflow: hidden;
}
/* Styles for the main container */
.container {
width: 500px;
margin: 0 auto;
margin-top: 30px;
position: absolute;
left: 50%;
transform: translate(-50%, 0);
}
/* Styles for the heading section */
.heading {
height: 112px;
display: flex;
justify-content: center;
}
/* Styles for the title element */
.title {
font-size: 80px;
margin: 0;
}
/* Styles for the score container */
.score-container {
display: flex;
margin: 0;
}
/* Styles for the score box */
.score-box {
margin-top: 8px;
height: 30%;
background-color: #BBADA0;
color: white;
border-radius: 3px;
text-align: center;
top: 0;
padding: 15px 25px;
font-weight: bold;
}
/* Styles for the max score */
#max-score {
margin-left: 5px;
}
/* Styles for the score type */
.score-type {
color: #eee4da;
width: 100%;
font-size: 13px;
padding-bottom: 3px;
}
/* Styles for the section above the game board */
.above-game {
display: flex;
justify-content: space-between;
}
/* Styles for the restart button */
.restart-button {
background: #8f7a66;
border-radius: 3px;
padding: 0 20px;
color: #f9f6f2;
height: 40px;
line-height: 42px;
cursor: pointer;
text-align: center;
font-weight: bold;
}
/* Styles for the game container */
.game-container {
margin-top: 40px;
position: relative;
padding: 15px;
background: #bbada0;
border-radius: 6px;
width: 500px;
height: 500px;
box-sizing: border-box;
}
/* Styles for the "How to play" section */
.how-to-play {
margin-bottom: 10px;
line-height: 1.65;
margin-top: 30px;
border-radius: 1px;
}
/* Styles for the footer section */
footer {
text-align: center;
}
/* Styles for the "Thank You" message */
.thank-you {
font-weight: bold;
}
/* Styles for the salutation */
.salutation {
font-size: 13px;
color: #BBADA0;
margin-bottom: 30px;
}