body {
    font-family: sans-serif;
    text-align: center;
    background-color: #5892a7;
}

header {
    margin-top: 20px;
    font-family: cursive;
    font-size: xx-large;
}

.board {
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.card {
    width: 100px;
    height: 100px;
    background-color: #97ffea;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
}

.card.flipped,
.card.matched {
    background-color: #eafffb;
}

.card.matched {
    color: #1978b0;
    pointer-events: none;
    transform: scale(1.1);
}
#controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
    font-size: 1.2rem;
    color: #ffffff;
}

#timer {
    background-color: #3b6d85;
    padding: 8px 16px;
    border-radius: 6px;
    
}

#restartBtn {
    background-color: #ffffff;
    border: none;
    color: #1978b0;
    padding: 10px 16px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#restartBtn:hover {
    background-color: #e0f7ff;
    transform: scale(1.05);
}

h2 {
    margin-top: 30px;
    color: #ffffff;
}

#leaderboard {
    list-style: none;
    padding-left: 0;
    color: #ffffff;
    font-size: 1rem;
    margin-top: 10px;
}

#leaderboard li {
    background-color: #3b6d85;
    margin: 4px auto;
    max-width: 200px;
    padding: 8px;
    border-radius: 4px;
}
