*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{background-color: #CEC;
    color: #234;
    font-family: verdana, sans-serif;
    }

h1{
    text-align: center;
    margin: 8px 0;
    border-bottom: 2px solid #234;
    padding-bottom: 8px;
}

h2{
    margin: 8px;
    font-weight: normal;
    background-color: #234;
    color: #CEC;
    padding: 4px;
}

.flex-parent{
    border: 4px solid red;
    min-height: 100px;
    display: flex;
    margin: 8px 8px 40px 8px;
}

.flex-child{
 border: 4px solid green;
 min-height: 80px;
 margin: 8px;
 flex-grow: 1;
 text-align: center;
 font-weight: bold;
}

.demo2 .flex-parent{
    border: 4px solid blue;
    justify-content: space-around;
}

.demo2 .flex-child{
    border: 4px solid green;
    flex-grow: 0;
    min-width: 16px;
}

.demo3 .flex-parent{
    border: 4px solid blue;
    justify-content: space-between;
}

.demo3 .flex-child{
    flex-grow: 0;
    min-width: 16px;
}

.demo4 .flex-parent{
    border: 4px solid blue;
    justify-content: space-evenly;
}

.demo4 .flex-child{
    flex-grow: 0;
    min-width: 16px;
}

.demo5 .flex-parent,
.demo6 .flex-parent{
    border: 4px solid;
    justify-content: center;
}

.demo5 .flex-parent{
    flex-direction: column-reverse;
}

.demo5 .flex-child:last-child{
    background-color: cyan;
}

.demo6 .flex-parent{
    flex-flow: row wrap;
}

.demo6 .flex-child{
    min-width: 250px;
}

.demo7 .flex-parent{
    border: 4px solid orange;
    min-height: 200px;
    justify-content: center; /* horizontal centering */
}

.demo7 .flex-child{
    flex-grow: 0;
    min-width: 100px;
    aspect-ratio: 1/1;
}

.demo7 .flex-child:last-child{
    background-color: cyan;
    max-height: 100px;
    align-self: center; /* vertical centering */
}

.demo8 .flex-parent{
    border: 4px solid yellow;
    flex-flow: row wrap;
    gap: 10px;
}

.demo8 .flex-child{
    flex-basis: 30%;
    margin: 0;
}