-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
352 lines (306 loc) · 8.81 KB
/
style.css
File metadata and controls
352 lines (306 loc) · 8.81 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
body {
font-family: 'Roboto', Arial, sans-serif;
background: linear-gradient(to bottom, #f0f0f0, #d9d9d9);
text-align: center;
margin: 0;
padding: 0;
color: #333;
height: 100vh; /* Full viewport height */
overflow: hidden; /* Prevent scrolling */
display: flex; /* Center content */
justify-content: center; /* Horizontally center */
align-items: center; /* Vertically center */
}
h1 {
margin-bottom: 20px;
font-size: 2.5em;
color: #444;
}
.dashboard {
display: flex;
justify-content: flex-start; /* Align content to the left */
gap: 30px;
align-items: flex-start;
flex-wrap: nowrap; /* Prevent wrapping */
max-width: 100%; /* Ensure it doesn't exceed the screen width */
max-height: 100%; /* Ensure it doesn't exceed the screen height */
overflow: hidden; /* Prevent overflow */
}
#chessboard {
display: grid;
grid-template-columns: repeat(8, 80px); /* Adjust size as needed */
grid-template-rows: repeat(8, 80px);
gap: 1px;
border: 3px solid #333;
border-radius: 12px; /* Rounded corners */
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Add shadow */
background: #444;
overflow: hidden;
}
.square {
display: flex;
align-items: center;
justify-content: center;
font-size: 36px;
font-weight: bold;
transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effect */
}
.square:hover {
background-color: rgba(255, 215, 0, 0.7); /* Highlight on hover */
transform: scale(1.05);
}
.square.active {
background-color: rgba(144, 238, 144, 0.6); /* Light green with transparency */
outline: 1px solid rgba(0, 0, 0, 0.2); /* Subtle border to maintain block boundaries */
box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Add a slight shadow for better visibility */
}
.white {
background-color: #f0d9b5;
}
.black {
background-color: #b58863;
color: black; /* Ensure black pieces are always displayed in black */
}
.active {
background-color: yellow !important;
}
.info-panel, .player-panel {
width: 220px;
padding: 15px;
background: #fff;
border: 1px solid #ccc;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: left;
}
.info-panel {
flex-grow: 1; /* Take the remaining width */
padding: 20px;
background: #f9f9f9; /* Subtle background color */
border: 1px solid #ddd; /* Light border */
border-radius: 12px; /* Rounded corners */
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Softer shadow */
text-align: left;
min-width: 300px; /* Ensure a minimum width */
max-width: 500px; /* Optional: Limit maximum width */
overflow: hidden; /* Prevent content overflow */
}
.info-panel h2, .player-panel h2 {
margin-bottom: 10px;
font-size: 1.2em;
color: #555;
}
.info-panel h2 {
font-size: 1.5em;
margin-bottom: 15px;
color: #333;
border-bottom: 2px solid #ddd; /* Underline for the title */
padding-bottom: 5px;
}
.captured {
min-height: 40px;
font-size: 28px;
color: #444;
}
#move-log {
list-style: none;
padding: 0;
margin: 0;
font-family: 'Courier New', monospace; /* Cleaner font for logs */
font-size: 16px;
max-height: 400px; /* Keep height consistent */
overflow-y: auto; /* Scrollable if content exceeds height */
border-top: 1px solid #ddd;
padding-top: 10px;
}
#move-log li {
padding: 8px 12px; /* Add padding for better spacing */
border-bottom: 1px solid #eee; /* Subtle separator between moves */
}
#move-log li:nth-child(odd) {
background-color: #fdfdfd; /* Light background for odd rows */
}
#move-log li:nth-child(even) {
background-color: #f7f7f7; /* Slightly darker background for even rows */
}
.side-column {
display: flex;
flex-direction: column;
align-items: flex-start; /* Align items to the left */
}
.player-panel {
width: 640px; /* Match the chessboard width (8 squares * 80px each) */
padding: 10px;
background: #f7f7f7; /* Match the move log theme */
border: 1px solid #ddd;
border-radius: 25px; /* Capsule-like shape */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: left; /* Align text content to the left */
display: flex; /* Use flexbox for layout */
flex-direction: row; /* Arrange items horizontally */
align-items: center; /* Vertically align items */
justify-content: space-between; /* Space between title and timer */
gap: 10px; /* Space between elements */
position: relative; /* Ensure child elements can be positioned absolutely if needed */
}
.player-panel h2 {
font-size: 1.5em;
margin: 0;
color: #333;
display: flex;
align-items: center;
justify-content: flex-start; /* Align text to the left */
gap: 10px; /* Space between "Black"/"White" and captured pieces */
width: 100%; /* Ensure it spans the full width of the container */
text-align: left; /* Align text content to the left */
}
.captured {
font-size: 1.2em;
color: #555;
background: #fff; /* Capsule background */
border: 1px solid #ddd;
border-radius: 15px; /* Capsule-like shape */
padding: 5px 15px; /* Add padding for capsule effect */
display: inline-block;
min-width: 50px; /* Ensure space for captured pieces */
text-align: left; /* Align content to the left */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Optional: Add hover effect for capsules */
.captured:hover {
background: #f0f0f0;
border-color: #ccc;
}
.controls, .time-controls {
display: flex;
justify-content: space-between; /* Space between elements */
margin-top: 20px;
width: 100%; /* Match the width of the info-panel */
}
.controls button, .time-controls input, .time-controls button {
flex: 1; /* Equal width for all elements */
padding: 10px;
font-size: 16px;
font-weight: bold;
border-radius: 8px;
text-align: center;
}
.controls button {
color: #fff;
background-color: #444;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
margin: 0 5px; /* Add spacing between buttons */
}
.controls button:hover {
background-color: #666; /* Darker background on hover */
}
.controls button:active {
background-color: #333; /* Even darker background on click */
}
@media (max-width: 768px) {
#chessboard {
grid-template-columns: repeat(8, 40px);
grid-template-rows: repeat(8, 40px);
}
.info-panel, .player-panel {
width: 100%; /* Full width on smaller screens */
text-align: center;
}
.player-panel {
width: 100%; /* Full width on smaller screens */
}
}
#logo {
position: absolute;
top: 20px;
left: 20px;
font-family: 'Cursive', 'Roboto', Arial, sans-serif; /* Fancy font */
font-size: 2.0em; /* Set font size */
font-weight: bold;
color: #444;
display: flex;
align-items: center;
gap: 10px;
}
#logo span {
color: #222;
font-size: 0.8em; /* Match font size */
font-weight: normal;
}
#time-limit, #start-button {
flex: 1; /* Equal width for both input and button */
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 8px;
text-align: center;
}
#time-limit {
margin-right: 10px; /* Add spacing between input and button */
}
#start-button {
background-color: #444;
color: #fff;
border: none;
cursor: pointer;
transition: background-color 0.3s ease;
}
#start-button:hover {
background-color: #666;
}
#start-button:active {
background-color: #333;
}
.player-panel.black {
position: relative;
}
.player-panel.white {
position: relative;
}
.timer {
font-size: 1.2em;
font-weight: bold;
background: #f7f7f7;
border: 1px solid #ddd;
border-radius: 8px;
padding: 5px 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
width: 100px; /* Set a fixed width for consistency */
color: #000; /* Ensure the font color is black */
}
.time-controls input {
border: 1px solid #ccc;
margin-right: 10px; /* Space between input and button */
}
.time-controls button {
flex: 1; /* Button takes less space */
padding: 10px;
font-size: 16px;
font-weight: bold;
color: #fff;
background-color: #444;
border: none;
border-radius: 8px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.time-controls button:hover {
background-color: #666; /* Darker background on hover */
}
.time-controls button:active {
background-color: #333; /* Even darker background on click */
}
.time-controls select {
flex: 2; /* Dropdown takes more space */
padding: 10px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 8px;
text-align: center;
margin-right: 10px; /* Space between dropdown and button */
background-color: #fff; /* White background for dropdown */
cursor: pointer;
}