* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(to right, #6a1b9a, #000000);
    color: white;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.game-container {
    text-align: center;
    width: 80%;
    max-width: 600px;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.card {
    width: 100px;
    height: 100px;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 8px;
    font-size: 2rem;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-in-out;
}

.card.flipped {
    background-color: #6a1b9a;
    transform: rotateY(180deg);
}

.card span {
    transform: rotateY(180deg);
    backface-visibility: hidden;
}

.card .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    color: transparent; /* Hide back text */
}

.card .front {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.score-board {
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    background-color: #6a1b9a;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #9c27b0;
}
