Sebastiankay commited on
Commit
9127d12
·
verified ·
1 Parent(s): c29b222

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +355 -17
style.css CHANGED
@@ -1,28 +1,366 @@
 
 
 
 
 
 
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
 
 
 
 
 
 
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  margin-bottom: 10px;
15
- margin-top: 5px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
28
  }
 
1
+ @font-face {
2
+ font-family: "Caveat Brush";
3
+ font-style: normal;
4
+ font-weight: 400;
5
+ font-display: swap;
6
+ src: url(https://fonts.gstatic.com/s/caveatbrush/v11/EYq0maZfwr9S9-ETZc3fKXtMWw.ttf) format("truetype");
7
+ }
8
+
9
  body {
10
+ background-color: rgba(var(--active-background-color), 1);
11
+ /* background-image: radial-gradient(circle, rgba(var(--active-background-color), 1) 0%, color-mix(in srgb, rgba(var(--active-background-color), 1) 60%, black) 100%); */
12
+ background-image: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);
13
+ color: #222;
14
+ font-family: Arial, sans-serif;
15
+ margin: 0;
16
+ padding: 0;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ height: 100vh;
21
+ max-height: 100vh;
22
+ width: 100vw;
23
+ max-width: 100vw;
24
+ overflow: hidden;
25
+ transition: background-color 0.6s ease-out;
26
  }
27
 
28
+ #game-container {
29
+ padding: 20px;
30
+ border-radius: 8px;
31
+ text-align: center;
32
+ position: relative;
33
+ display: flex;
34
+ flex-direction: column;
35
+ justify-content: center;
36
+ align-items: center;
37
  }
38
 
39
+ .buttons {
40
+ position: relative;
41
+ z-index: 20;
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ justify-content: center;
45
+ align-items: center;
46
+ gap: 4px;
47
+ margin-top: 15px;
48
+ #new-game {
49
+ padding: 10px 20px;
50
+ background-color: #555;
51
+ border: none;
52
+ color: #fff;
53
+ font-size: 16px;
54
+ border-radius: 4px;
55
+ cursor: pointer;
56
+ }
57
+
58
+ #new-game:hover {
59
+ background-color: #777;
60
+ }
61
+ }
62
+
63
+ #status {
64
  margin-bottom: 10px;
65
+ font-family: "Caveat Brush", serif;
66
+ font-size: 3rem;
67
+ font-weight: 600;
68
+ color: color-mix(in srgb, rgba(var(--active-background-color), 1) 30%, black);
69
+ }
70
+
71
+ #board {
72
+ display: grid;
73
+ grid-template-columns: repeat(8, 1fr);
74
+ gap: 2px;
75
+ margin: 0;
76
+ background-color: rgba(68, 68, 68, 1);
77
+ border: none;
78
+ border-radius: 0.35rem;
79
+ overflow: hidden;
80
+ padding: 8px;
81
+ width: 90%;
82
+ max-height: 90vw;
83
+ }
84
+
85
+ @media screen and (orientation: landscape) {
86
+ #game-container {
87
+ width: 100vh;
88
+ max-width: 100vh;
89
+ aspect-ratio: 4 / 3;
90
+ }
91
+
92
+ #board {
93
+ display: grid;
94
+ grid-template-columns: repeat(8, 1fr);
95
+ gap: 2px;
96
+ width: 70vh;
97
+ max-width: 70vh;
98
+ }
99
+ }
100
+
101
+ @media screen and (orientation: portrait) {
102
+ #game-container {
103
+ width: 90vw;
104
+ max-width: 90vw;
105
+ aspect-ratio: 4 / 3;
106
+ }
107
+ }
108
+
109
+ .cell {
110
+ width: 100%;
111
+ aspect-ratio: 1 / 1;
112
+ box-sizing: border-box;
113
+ position: relative;
114
+ cursor: pointer;
115
+ }
116
+
117
+ .light {
118
+ background-color: #666;
119
+ }
120
+
121
+ .dark {
122
+ background-color: rgb(68, 68, 68);
123
+ }
124
+
125
+ .cell.highlight:after {
126
+ background-image: repeating-linear-gradient(-45deg, rgba(var(--active-background-color), 0.1), rgba(var(--active-background-color), 0.1) 1rem, rgba(var(--active-background-color), 0.4) 1rem, rgba(var(--active-background-color), 0.4) 2rem);
127
+ background-size: 200% 200%;
128
+ animation: barberpole 10s linear infinite;
129
+ position: absolute;
130
+ content: "";
131
+ width: 80%;
132
+ height: 80%;
133
+ top: 50%;
134
+ left: 50%;
135
+ transform: translate(-50%, -50%);
136
+ border-radius: 50%;
137
+ opacity: 0.4;
138
+ }
139
+
140
+ @keyframes barberpole {
141
+ 100% {
142
+ background-position: 100% 100%;
143
+ }
144
+ }
145
+
146
+ .piece {
147
+ width: 80%;
148
+ height: 80%;
149
+ border-radius: 50%;
150
+ margin: 0;
151
+ position: relative;
152
+ top: 50%;
153
+ left: 50%;
154
+ transform: translate(-50%, -50%);
155
+ background-color: rgba(var(--player-color), 1);
156
+ /* border:0.35rem solid rgb(var(--player-color)); */
157
+ box-shadow: 0.2rem 0.2rem 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0 0.2rem inset rgba(0, 0, 0, 0.2);
158
+ /* filter: drop-shadow(0px 0px red);*/
159
+
160
  }
161
 
162
+ .cell.selected .piece {
163
+ filter: brightness(0.6);
164
+ /* animation-name: pulse;
165
+ animation-duration: 1.4s;
166
+ animation-timing-function: linear;
167
+ animation-iteration-count: infinite; */
168
  }
169
+ .piece.must-capture {
170
+ /* filter: brightness(0.6); */
171
+ animation-name: pulse;
172
+ animation-duration: 1.4s;
173
+ animation-timing-function: linear;
174
+ animation-iteration-count: infinite;
175
+ }
176
+
177
+ /* .piece::after {
178
+ position: absolute;
179
+ content: "";
180
+ width: 100%;
181
+ height: 100%;
182
+ border-radius: 50%;
183
+ margin: 0;
184
+ top: 50%;
185
+ left: 50%;
186
+ transform: translate(-50%, -50%) rotate(0deg);
187
+ /* border:0.35rem var(--border-style) var(--border-color); * /
188
+ animation-duration: 6s;
189
+ animation-timing-function: linear;
190
+ animation-iteration-count: infinite;
191
+ }
192
+
193
+ .piece.spin-ani::after {
194
+ transform: translate(-50%, -50%) rotate(0deg);
195
+ border: 0.35rem var(--border-style) var(--border-color);
196
+ animation-name: spin;
197
+ } */
198
+
199
+ .piece.king {
200
+ background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'><path fill='rgba(68,68,68,0.5)' d='M309 106c11.4-7 19-19.7 19-34c0-22.1-17.9-40-40-40s-40 17.9-40 40c0 14.4 7.6 27 19 34L209.7 220.6c-9.1 18.2-32.7 23.4-48.6 10.7L72 160c5-6.7 8-15 8-24c0-22.1-17.9-40-40-40S0 113.9 0 136s17.9 40 40 40c.2 0 .5 0 .7 0L86.4 427.4c5.5 30.4 32 52.6 63 52.6l277.2 0c30.9 0 57.4-22.1 63-52.6L535.3 176c.2 0 .5 0 .7 0c22.1 0 40-17.9 40-40s-17.9-40-40-40s-40 17.9-40 40c0 9 3 17.3 8 24l-89.1 71.3c-15.9 12.7-39.5 7.5-48.6-10.7L309 106z'/></svg>");
201
+ background-size: 50%;
202
+ background-repeat: no-repeat;
203
+ background-position: center;
204
+ }
205
+
206
+ #winMessage {
207
+ position: absolute;
208
+ top: 50%;
209
+ left: 50%;
210
+ transform: translate(-50%, -50%);
211
+ background-color: #222;
212
+ padding: 20px 30px;
213
+ border: 8px solid rgb(68, 68, 68);
214
+ color: rgb(68, 68, 68);
215
+ border-radius: 8px;
216
+ font-size: 24px;
217
+ display: none;
218
+ z-index: 10;
219
+ cursor: pointer;
220
+ }
221
+
222
+ #setPlayerNamesWrapper {
223
+ position: absolute;
224
+ top: 50%;
225
+ left: 50%;
226
+ width: 40%;
227
+ aspect-ratio: 16 / 9;
228
+ transform: translate(-50%, -50%);
229
+ border-radius: 8px;
230
+ padding: 20px 30px;
231
+ display: flex;
232
+ flex-direction: column;
233
+ justify-content: center;
234
+ align-items: center;
235
+ gap: 0;
236
+ background-image: url(http://62.68.75.171/themes/prismify-bootstrap-starter-kit/assets/images/dame_header_image.png);
237
+ background-repeat: no-repeat;
238
+ background-size: contain;
239
+ background-position: center;
240
+ #setPlayerNamesInputs {
241
+ position: relative;
242
+ display: flex;
243
+ flex-direction: column;
244
+ align-items: center;
245
+ input,
246
+ label {
247
+ font-family: "Caveat Brush", serif;
248
+ font-size: 2rem;
249
+ font-weight: 600;
250
+ border-radius: 4px;
251
+ border-width: 8px;
252
+ border-style: solid;
253
+ border-color: transparent;
254
+ background-color: transparent;
255
+ }
256
+
257
+ #inputPlayerName1 {
258
+ padding: 10px 20px;
259
+ background-color: rgb(var(--player1-color));
260
+ border-color: rgb(var(--player1-color));
261
+ color: color-mix(in srgb, rgba(var(--player1-color), 1) 20%, rgb(14, 14, 64));
262
+ transform: rotate(0.2deg);
263
+ margin-left: 4px;
264
+ margin-right: -4px;
265
+ }
266
+
267
+ #modeSelect {
268
+ padding: 10px 20px;
269
+ background-color: rgb(var(--player2-color));
270
+ border-color: rgb(var(--player2-color));
271
+ transform: rotate(-0.2deg);
272
+ border-radius: 4px;
273
+ border-width: 8px;
274
+ margin-top: -8px;
275
+ max-width: 60%;
276
+ margin-left: 60px;
277
+ #inputPlayerName2 {
278
+ color: color-mix(in srgb, rgba(var(--player2-color), 1) 20%, rgb(38, 7, 7));
279
+ text-align: right;
280
+ max-width: calc(100% - 60px);
281
+ }
282
+
283
+ #cpuToggle {
284
+ display: none;
285
+ }
286
+
287
+ label {
288
+ padding: 10px 20px;
289
+ background-color: rgb(var(--player2-color));
290
+ border: 8px solid rgb(var(--player2-color));
291
+ color: #555;
292
+ font-size: 16px;
293
+ cursor: pointer;
294
+ transition: all 0.3s ease-in-out;
295
+ background-repeat: no-repeat;
296
+ background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='rgba(81,40,42,1)' d='M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z'/></svg>");
297
+ }
298
+
299
+ label:has(#cpuToggle:checked) {
300
+ background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path fill='rgba(81,40,42,1)' d='M320 0c17.7 0 32 14.3 32 32l0 64 120 0c39.8 0 72 32.2 72 72l0 272c0 39.8-32.2 72-72 72l-304 0c-39.8 0-72-32.2-72-72l0-272c0-39.8 32.2-72 72-72l120 0 0-64c0-17.7 14.3-32 32-32zM208 384c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zm96 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0zM264 256a40 40 0 1 0 -80 0 40 40 0 1 0 80 0zm152 40a40 40 0 1 0 0-80 40 40 0 1 0 0 80zM48 224l16 0 0 192-16 0c-26.5 0-48-21.5-48-48l0-96c0-26.5 21.5-48 48-48zm544 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-16 0 0-192 16 0z'/></svg>");
301
+ }
302
+ }
303
+
304
+ input:focus {
305
+ outline: none;
306
+ }
307
+
308
+ span#vs {
309
+ position: absolute;
310
+ top: 50%;
311
+ margin-top: -10px;
312
+ font-family: "Caveat Brush", serif;
313
+ font-size: 2rem;
314
+ font-weight: 600;
315
+ left: 50%;
316
+ transform: translate(-50%, -50%);
317
+ color: rgba(255, 255, 255, 1);
318
+ text-shadow: #444 2px 2px 0px, #444 2px -2px 0px, #444 -2px 2px 0px, #444 -2px -2px 0px, #444 2px 0px 0px, #444 0px 2px 0px, #444 -2px 0px 0px, #444 0px -2px 0px;
319
+ }
320
+ }
321
+
322
+ #savePlayerNames {
323
+ padding: 10px 20px;
324
+ background-color: #555;
325
+ border: none;
326
+ color: #fff;
327
+ font-size: 16px;
328
+ border-radius: 4px;
329
+ cursor: pointer;
330
+ margin-top: 12px;
331
+ }
332
+ }
333
+
334
+ #setPlayerNamesWrapperBackdrop {
335
+ position: absolute;
336
+ content: "";
337
+ width: 100vw;
338
+ height: 100vh;
339
+ top: 0px;
340
+ left: 0;
341
+ backdrop-filter: blur(10px);
342
+ }
343
+
344
+ @keyframes pulse {
345
+ 0% {
346
+ filter: brightness(1);
347
+ }
348
+
349
+ 50% {
350
+ filter: brightness(0.4);
351
+ }
352
+
353
+ 100% {
354
+ filter: brightness(1);
355
+ }
356
+ }
357
+
358
+ @keyframes spin {
359
+ from {
360
+ transform: translate(-50%, -50%) rotate(0deg);
361
+ }
362
 
363
+ to {
364
+ transform: translate(-50%, -50%) rotate(360deg);
365
+ }
366
  }