html {
    position: relative;
    min-height: 100%;
}

body {
    background-color: #2E3440;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 100px;
    color: white;
}

/* Header Settings */
.header {
    padding: 30px 0;
}

.title {
    text-align: center;
    font-size: 80px;
}

/* Main Content Settings */
.main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.options {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 200px;
}

.grid {
    display: grid;
    width: 500px;
    height: 500px;
    background-color: white;
    box-shadow: 10px 10px 10px black;
}

/* Button & Input Settings */
button,
input  {
    width: 100%;
    cursor: pointer;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/*Div Wrapper for input color - only way I found for all browsers to be the same*/
.color-wrap {
    width: 80px;
    height: 80px;
    border-radius: 80px;
    overflow: hidden;
    box-shadow: 10px 10px 10px black;
    transition: .5s;
    opacity: 0;
    animation-name: latefade;
    animation-fill-mode: forwards;
    animation-duration: 2s;
    animation-delay: 2s;
}

input[type='color'] {
    border: 0;
    padding: 0;
    width: 200%;
    height: 200%;
    cursor: pointer;
    background-color: black;
    transform: translate(-25%, -25%);
}

.color-wrap:hover {
  box-shadow: .2em .2em .2rem black;
}

button {
    padding: 10px 20px;
    border: none;
    background-color: #4C566A;
    border-radius: 10px;
    color: white;
    box-shadow: .5em .5em .5em black;
    font-weight: bold;
    transition: 0.5s;
    visibility: hidden;
}

button:hover {
    box-shadow: 
    .1em .1em .2em black;
    
}

/*Slider Value Read-out*/

.slideValue {
    margin-top: 20px;
    margin-bottom: -20px;
    font-size: 25px;
}

input[type='range'] {
    background-color: #73bda8;
    border: 1px solid black;
    height: 25px;
    color: black;
}

/*This allows the mouse to be held down on painting*/
.grid-element {
    user-select: none;
    transition: .2s;
}

/* on Load up transitions */

#erase,
#clear,
#colorOn {
  animation-duration: 1s;
  animation-name: fadein;
  animation-fill-mode: forwards;
}

#erase {
  animation-delay: .5s
}

#clear {
  animation-delay: 1s
}

@keyframes fadein {
  0% {
    margin-right: 300px;
    opacity: 0;
    box-shadow: 0 0 0 black;
    visibility: hidden;
  } 
  
  75% {
    margin-right: -100px;
    box-shadow: 0 0 0 black;
    opacity: .5;
    visibility: visible;
  }
  100% {
    margin-right: 0px;
    opacity: 1;
    visibility: visible;
  }
}

@keyframes latefade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}



/* Media Query */

@media (max-width: 1200px) {
    .main {
      justify-content: center;
    }
  }
  
@media (max-width: 850px) {
    .main {
      gap: 50px;
    }
  
    .settings {
      width: 150px;
      gap: 16px;
    }
  
    .size-value {
      margin-bottom: -4px;
    }
  
    .grid {
      width: 400px;
      height: 400px;
    }
  }
  
@media (max-width: 650px) {
    .title {
      font-size: 50px;
    }
  
    .main {
      flex-direction: column-reverse;
    }
  
    .grid {
      width: 300px;
      height: 300px;
    }
  }