-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
118 lines (105 loc) · 2.34 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
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Poppins', 'sans-serif';
}
.wrapper {
width: 100vw;
height: 100vh;
background-image: url(./assets/gradient-bg.jpg);
background-size: cover;
background-position: center;
display: grid;
place-items: center;
}
.game-info {
color: white;
position: absolute;
top: 3rem;
left: 50%;
transform: translateX(-50%);
background-color: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(7px);
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.25);
padding: 0.5rem 3rem;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.tic-tac-toe {
width: 90%;
max-width: 20rem;
background-color: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(7px);
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.25);
padding: 2rem;
display: grid;
grid-template-columns: repeat(3, 1fr);
aspect-ratio: 1/1;
}
.box {
position: relative;
width: 100%;
aspect-ratio: 1/1;
cursor: pointer;
font-size: 3rem;
color: #f8f8f8;
display: flex;
justify-content: center;
align-items: center;
transition: all 150ms ease-in-out;
}
.box:hover {
background-color: rgba(255, 255, 255, 0.05);
transform: scale(1.05);
}
.box1, .box2, .box4, .box5 {
border-right: 2px solid white;
border-bottom: 2px solid white;
}
.box3, .box6 {
border-bottom: 2px solid white;
}
.box7, .box8 {
border-right: 2px solid white;
}
.btn {
color: white;
position: absolute;
bottom: 3rem;
left: 50%;
transform: translateX(-50%);
background-color: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(7px);
border-radius: 1rem;
border: 1px solid rgba(255, 255, 255, 0.25);
padding: 0.5rem 2rem;
cursor: pointer;
transition: all 150ms ease-in-out;
display: none;
}
.btn.active {
display: flex;
opacity: 0;
animation: fadeIn 1s forwards;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
@keyframes fadeIn {
to {
opacity: 1;
}
}
.win {
background-color: rgba(0, 255, 0, 0.3);
animation: glow 0.7s infinite alternate;
}
@keyframes glow {
from {
box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}
to {
box-shadow: 0 0 20px rgba(0, 255, 0, 1);
}
}