Spaces:
Sleeping
Sleeping
File size: 3,613 Bytes
2ab2b3d | 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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | /* ========================================
NOVA AI GAMES - Memory Game Styles
3D Cards, Flip Animations & Effects
======================================== */
.memory-game-wrapper {
width: 100%;
max-width: 340px;
position: relative;
}
.memory-grid-enhanced {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
perspective: 1000px;
}
.memory-card-3d {
aspect-ratio: 1;
cursor: pointer;
position: relative;
transform-style: preserve-3d;
animation: cardEntrance 0.5s ease backwards;
}
@keyframes cardEntrance {
from {
opacity: 0;
transform: scale(0.5) rotateY(180deg);
}
to {
opacity: 1;
transform: scale(1) rotateY(0);
}
}
.memory-card-3d .card-inner {
position: absolute;
inset: 0;
transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
transform-style: preserve-3d;
}
.memory-card-3d.flipped .card-inner {
transform: rotateY(180deg);
}
.memory-card-3d .card-face {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
backface-visibility: hidden;
border-radius: var(--radius-md);
font-size: 28px;
}
.memory-card-3d .card-front-3d {
background: linear-gradient(145deg, #1e1e2e, #2a2a40);
border: 2px solid rgba(99, 102, 241, 0.3);
box-shadow:
0 4px 15px rgba(0, 0, 0, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
overflow: hidden;
}
.memory-card-3d .card-pattern {
position: absolute;
inset: 0;
background:
repeating-linear-gradient(45deg,
transparent,
transparent 5px,
rgba(99, 102, 241, 0.05) 5px,
rgba(99, 102, 241, 0.05) 10px);
}
.memory-card-3d .card-question {
position: relative;
z-index: 1;
font-size: 32px;
color: var(--text-muted);
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.memory-card-3d .card-back-3d {
background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
transform: rotateY(180deg);
box-shadow:
0 8px 25px rgba(99, 102, 241, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.memory-card-3d .card-emoji {
filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
animation: emojiPop 0.3s ease;
}
@keyframes emojiPop {
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
.memory-card-3d:hover:not(.flipped):not(.matched) {
transform: translateY(-3px);
}
.memory-card-3d:hover:not(.flipped):not(.matched) .card-front-3d {
border-color: rgba(99, 102, 241, 0.6);
box-shadow:
0 8px 25px rgba(99, 102, 241, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.memory-card-3d.matched .card-inner {
animation: matchCelebrate 0.5s ease;
}
@keyframes matchCelebrate {
0%,
100% {
transform: rotateY(180deg) scale(1);
}
50% {
transform: rotateY(180deg) scale(1.1);
}
}
.memory-card-3d.matched .card-back-3d {
background: linear-gradient(135deg, #22c55e, #16a34a);
box-shadow:
0 8px 30px rgba(34, 197, 94, 0.5),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.memory-moves {
text-align: center;
margin-top: var(--spacing-lg);
font-size: 14px;
color: var(--text-secondary);
}
.moves-value {
font-weight: 700;
color: var(--accent-primary);
margin-left: 4px;
} |