-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathstyle.css
103 lines (92 loc) · 1.94 KB
/
style.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Basic body styling */
body {
font-family: 'Arial', sans-serif;
background: linear-gradient(to bottom right, #1d3557, #457b9d, #a8dadc);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
flex-direction: column;
gap: 20px;
}
/* Title styling */
h1 {
text-align: center;
font-size: 40px;
font-weight: bold;
color: #333;
}
/* Score Board */
#score-board {
text-align: center;
font-size: 18px;
color: #e0d8d8;
background-color: rgba(0, 0, 0, 0.3);
padding: 10px;
border-radius: 10px;
}
/* Game grid styling */
.grid {
display: grid;
grid-template-columns: repeat(4, 120px);
grid-template-rows: repeat(4, 120px);
gap: 10px;
justify-content: center;
align-items: center;
}
/* Card styling */
.card {
width: 100px;
height: 100px;
background-color: #fff;
perspective: 1000px;
cursor: pointer;
}
/* Inner card styling */
.card-inner {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.5s ease-in-out;
}
/* Front side of the card */
.card-front,
.card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
font-size: 30px;
color: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
/* Back side of the card */
.card-back {
background-color: #2ecc71;
transform: rotateY(180deg);
}
/* Flipped card styling */
.card.flipped .card-inner {
transform: rotateY(180deg);
}
/* Add some hover effect for the card */
.card:hover .card-inner {
transform: rotateY(180deg);
}
/* Responsive adjustments */
@media (max-width: 500px) {
.grid {
grid-template-columns: repeat(2, 80px);
grid-template-rows: repeat(2, 80px);
}
}