
.card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: scale(1.03);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2rem;
}

.card-front {
    background: white;
    transform: rotateY(180deg);
}

.card-front img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

@keyframes match {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.matched {
    animation: match 0.5s ease;
    pointer-events: none;
}
