-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
121 lines (104 loc) · 2.18 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
body {
font-family: 'Roboto', Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
background-image: url('rm251-mind-16.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
color: #ffffff;
}
.container {
background-color: rgba(0, 0, 0, 0.7);
padding: 30px;
border-radius: 15px;
box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.score {
display: flex;
justify-content: space-around;
font-size: 18px;
margin-bottom: 20px;
color: #4ecdc4;
}
.board {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
margin: 20px auto;
max-width: 300px;
}
.cell {
aspect-ratio: 1 / 1;
background-color: rgba(255, 255, 255, 0.1);
border: 2px solid #4ecdc4;
font-size: 48px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.3s ease;
}
.cell:hover, .cell:focus {
background-color: rgba(255, 255, 255, 0.2);
transform: scale(1.05);
outline: none;
}
.cell.x, .cell.o {
cursor: not-allowed;
}
.cell.x::before, .cell.o::before {
display: block;
animation: appear 0.3s ease-in-out;
}
.cell.x::before {
content: 'X';
color: #ff6b6b;
}
.cell.o::before {
content: 'O';
color: #4ecdc4;
}
@keyframes appear {
0% { transform: scale(0); }
100% { transform: scale(1); }
}
.status {
font-size: 24px;
margin: 20px 0;
min-height: 1.2em;
color: #feca57;
text-shadow: 0 0 5px #feca57;
}
button {
font-size: 18px;
padding: 10px 20px;
cursor: pointer;
background-color: #ff6b6b;
color: white;
border: none;
border-radius: 5px;
transition: background-color 0.3s ease, transform 0.3s ease;
}
button:hover, button:focus {
background-color: #ff5252;
transform: scale(1.05);
outline: none;
}
@media (max-width: 480px) {
.board {
grid-template-columns: repeat(3, 1fr);
}
.cell {
font-size: 36px;
}
.status {
font-size: 18px;
}
button {
font-size: 16px;
}
}