@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

body {
    background-color: #f0f8ff;
    font-family: 'Fredoka One', cursive;
}

#main-content {
    max-width: 600px;
    margin: auto;
    text-align: center;
    color: #333;
}

h1 {
    color: #ff6347;
    text-shadow: 2px 2px #f0f0f0;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    grid-gap: 15px;
    justify-content: center;
    margin-top: 20px;
    perspective: 1000px;
}

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

.card .card-front,
.card .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
}

.card .card-front {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.card .card-back {
    background-color: #fff;
    transform: rotateY(180deg);
    border: 3px solid #ff6b6b;
}


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

.card.matched .card-back {
    border: 3px solid #2ecc71; /* green border for matched cards */
}


#game-info {
    display: flex;
    justify-content: space-around;
    font-size: 1.5em;
    color: #576574;
    margin-top: 20px;
}

#restart-btn {
    margin-top: 20px;
    padding: 15px 30px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #ff6347;
    color: white;
    border: none;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s;
    font-family: 'Fredoka One', cursive;
}

#restart-btn:hover {
    background-color: #ff472e;
    transform: translateY(-2px);
}
