@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;900&display=swap');

body {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    margin: 0;
}
.header {
    text-align: center;
    font-weight: 900;
}

h1 {
    font-size: 3em;
}

.main {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.grid {
    display: grid;
    width: 500px;
    height: 500px;
    outline: 10px black solid;
}

.menu {
    display: flex;
    align-items: center;
}

button {
    display: inline-block;
    border: black;
    border-style: solid;
    border-width: 5px;
    border-radius: 50px;

    padding: 0.5rem 1rem;
    margin: 50px 10px;
    margin-bottom: 20px;

    text-decoration: none;
    background: white;
    color: black;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    text-align: center;
    transition: background 250ms ease-in-out, 
                transform 150ms ease,
                background-image 250ms ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: none;
}

button:hover, .eraser:hover {
    transform: scale(1.05);
}

button:active, .eraser:active{
    transform: scale(0.97);
}

button.rainbow:hover,
.rainbow.active {
    background-image:     linear-gradient(
      to right, 
      #E7484F,
      #E7484F 16.65%,
      #F68B1D 16.65%,
      #F68B1D 33.3%,
      #FCED00 33.3%,
      #FCED00 49.95%,
      #009E4F 49.95%,
      #009E4F 66.6%,
      #00AAC3 66.6%,
      #00AAC3 83.25%,
      #732982 83.25%,
      #732982 100%,
      #E7484F 100%
     
     
     
    );
    animation:slidebg 3s linear infinite;
    color: white;
}

button.color:hover, 
.color.active {
    background-color: black;
    color: white;
}

.eraser:hover,
.eraser.active {
    outline: black;
    outline-style: solid;
    outline-width: 5px;
    border-radius: 50px;
}

@keyframes slidebg {
    to {
      background-position:20vw;
    }
}

.eraser {
    padding: 10px;
    width: 50px;
    padding: 0.5rem 1rem;
    margin: 50px 20px;
    margin-bottom: 20px;
    transition: transform 150ms ease-in-out,
                outline 150ms ease-in-out;
}

input[type='range'] {
  -webkit-appearance: none;
  background-color: white;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 20px;
  border: 5px solid black;
  border-radius: 25px;
  background: white;
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  border-radius: 30px;
  margin-top: -9px;
  background: black;
}

#sizeValue {
    font-size: 20px;
    font-weight: 500;
    margin: 6px;
}

@media (max-width: 850px) {
    .grid {
        width: 350px;
        height: 350px;
    }
    button {
        font-size: 0.8rem;
        margin: 50px 5px;
    }
    .eraser {
        width: 40px;
        margin: 50px 5px;
    }
}