*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    background-color: lightgrey;
    flex-direction: column;
    min-width: 100vw;
    min-height: 100vh;
}

h1 {
    text-align: center;
    margin: 20px auto;
}

button {
    font-size: 16px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
}

.white-on-grey {
    color: white;
    background-color: grey;
    border: 2px solid black;
    border-radius: 5px;
}

.grid-container {
    flex-wrap: wrap;
    background-color: white;
    width: 40vw;
    aspect-ratio: 1 / 1;
}

.grid-item {
    aspect-ratio: 1 / 1;
}

.button-container {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
    max-width: 50vw;
}

.color-button {
    width: 80px;
    height: 25px;
}

.grid-button {
    width: 110px;
    height: 30px;
}

#white:hover {
    color: black;
    background-color: white;
}

#black:hover {
    color: white;
    background-color: black;
}

#red:hover {
    color: white;
    background-color: red;
}

#green:hover {
    color: white;
    background-color: green;
}

#blue:hover {
    color: white;
    background-color: blue;
}

#rainbow:hover {
    color: white;
    background: linear-gradient(
        to right,
        red,
        yellow,
        green,
        blue
    );
}

.grid-button:hover {
    background-color: rgba(0, 0, 0, 0.25);
}