-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMemoryGamePage.css
More file actions
122 lines (108 loc) · 2.52 KB
/
MemoryGamePage.css
File metadata and controls
122 lines (108 loc) · 2.52 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
/* src/styles/MemoryGamePage.css */
.memory-game-area {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
max-width: 600px; /* Adjust as needed */
margin: 0 auto;
position: relative;
}
.game-info {
color: #cbd5e0; /* Light gray text */
margin-bottom: 20px;
}
.cards-grid {
display: grid;
grid-template-columns: repeat(4, 1fr); /* 4 columns */
gap: 10px;
perspective: 1000px; /* For 3D flip effect */
}
.memory-card {
width: 100px; /* Adjust card size */
height: 100px; /* Adjust card size */
position: relative;
transform-style: preserve-3d;
transition: transform 0.6s;
cursor: pointer;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.memory-card.flipped {
transform: rotateY(180deg);
}
.memory-card.matched {
opacity: 0.5;
cursor: default;
}
.memory-card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
transition: transform 0.6s;
transform-style: preserve-3d;
border-radius: 8px;
}
.memory-card-face {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
align-items: center;
justify-content: center;
font-size: 2.5rem; /* Adjust emoji size */
border-radius: 8px;
border: 2px solid #4a5568; /* gray-600 */
}
.memory-card-back {
background-color: #4299e1; /* Blue for card back */
color: white;
transform: rotateY(0deg);
}
.memory-card-front {
background-color: #2d3748; /* Dark gray for card front */
color: white;
transform: rotateY(180deg);
}
.game-over-message,
.start-game-message {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.8);
z-index: 20;
color: white;
font-size: 2rem;
border-radius: 8px;
padding: 20px; /* Add padding to ensure content is not squished */
min-width: 250px; /* Ensure a minimum width */
text-align: center; /* Ensure text is centered within the message box */
}
.game-over-message button,
.start-game-message button {
margin-top: 20px;
padding: 10px 20px;
font-size: 1.2rem;
cursor: pointer;
background-color: #4299e1;
color: white;
border: none;
border-radius: 5px;
transition: background-color 0.3s ease;
}
.game-over-message button:hover,
.start-game-message button:hover {
background-color: #3182ce;
}
.cards-grid.blurred {
filter: blur(5px);
pointer-events: none; /* Disable interaction when blurred */
}