Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
81 lines (71 loc) · 2.97 KB
/
Copy pathstyle.css
File metadata and controls
81 lines (71 loc) · 2.97 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
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
display: flex; align-items: center; justify-content: center;
min-height: 100vh;
background: linear-gradient(135deg, #7c3aed, #2563eb);
padding: 1rem;
}
.game-container { text-align: center; }
h1 { color: #fff; font-size: 2rem; margin-bottom: 1rem; }
h1 i { color: #c4b5fd; margin-right: 0.5rem; }
.stats { display: flex; gap: 1rem; margin-bottom: 1.5rem; justify-content: center; }
.stat {
background: rgba(255,255,255,0.1); border-radius: 12px; padding: 0.75rem 1.25rem;
display: flex; flex-direction: column; align-items: center; min-width: 80px;
backdrop-filter: blur(8px);
}
.stat-label { color: rgba(255,255,255,0.6); font-size: 0.75rem; font-weight: 600; }
.stat-value { color: #fff; font-size: 1.25rem; font-weight: 800; }
.board {
display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.6rem;
width: 380px; max-width: 100%; margin: 0 auto 1.5rem;
}
.card {
aspect-ratio: 1; perspective: 600px; cursor: pointer;
}
.card-inner {
width: 100%; height: 100%; position: relative;
transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
transform-style: preserve-3d;
}
.card.flipped .card-inner { transform: rotateY(180deg); }
.card.matched .card-inner { transform: rotateY(180deg); }
.card-face {
position: absolute; width: 100%; height: 100%;
border-radius: 14px; display: flex; align-items: center; justify-content: center;
font-size: 2rem; backface-visibility: hidden;
}
.card-front {
background: linear-gradient(135deg, #6366f1, #818cf8); color: #fff;
}
.card-front i { font-size: 1.5rem; opacity: 0.5; }
.card-back {
background: #fff; transform: rotateY(180deg);
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.card.matched .card-back { background: #d1fae5; box-shadow: 0 0 15px rgba(16,185,129,0.4); }
.restart-btn {
padding: 0.75rem 2rem; border: none; border-radius: 50px;
background: rgba(255,255,255,0.15); color: #fff; font-weight: 700;
font-size: 1rem; cursor: pointer; font-family: inherit;
transition: all 0.25s ease; backdrop-filter: blur(8px);
}
.restart-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.restart-btn i { margin-right: 0.5rem; }
.win-message {
position: fixed; inset: 0; background: rgba(0,0,0,0.7);
display: flex; flex-direction: column; align-items: center; justify-content: center;
color: #fff; z-index: 100; animation: fadeIn 0.4s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.win-message i { font-size: 5rem; color: #fbbf24; margin-bottom: 1rem; animation: bounce 0.6s ease; }
@keyframes bounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.win-message h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.win-message p { font-size: 1.1rem; color: #c4b5fd; }
@media (max-width: 400px) {
.board { width: 300px; }
.card-face { font-size: 1.5rem; }
.stats { gap: 0.5rem; }
.stat { min-width: 65px; padding: 0.5rem 0.75rem; }
}