/* style.css */
html {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: MS Gothic, Trebuchet MS, sans-serif;
  font-size: 18px;
}

canvas {
  background-color: #e5e5e5;
  opacity: 1;
  background-image:  repeating-linear-gradient(45deg, #c4c4c4 25%, transparent 25%, transparent 75%, #c4c4c4 75%, #c4c4c4), repeating-linear-gradient(45deg, #c4c4c4 25%, #e5e5e5 25%, #e5e5e5 75%, #c4c4c4 75%, #c4c4c4);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;


  border: 8px ridge brown;
  border-radius: 5px;
  width: 512px;
  height: 512px;
}

#fullscreen {
  position: fixed;
  top: 4px;
  right: 4px;
  opacity: 0.8;
  background: white;
  color: black;
  padding: 4px;
  border: 4px outset black;
  cursor: default;
}

#fullscreen:active {
  border: 4px ridge black;
}

@media (min-width: 768px) {
  #fullscreen {
    display: none;
  }
}

#main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items:  center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

#paint {
  display: flex;
  align-items: top;
  justify-content: top;
  flex-direction: column;
}

#target-area {
  display: flex;
  flex-direction: column;
  align-items:  center;
  gap: 10px;
}

#compare {
  text-shadow: 0 0 8px #000;
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  transition: transform .25s, text-shadow .25s;
  font-size: 32px;
}

#compare:hover {
  text-shadow: 0 0 8px #00f;
  transform: scale(1.2);
}

#compare:after {
  text-shadow: 0 0 4px #000;
  content: "Finished!";
  position: absolute;
  width: 64px text-align: center;
  font-family: MS Gothic, Trebuchet MS, sans-serif;
  font-size: 12px;
  bottom: -16px;
  left: 0;
}

#canvases {
  display: flex;
  gap: 10px;
}

#toolbox {
  display: flex;
  background: #fff;
  border: 8px ridge gray;
  border-radius: 5px;
  flex-direction: row;
  place-content: space-between;
  align-items:  center;
  margin-top: 10px;
  padding: 10px 30px;
}

#toolbox input[type="color"] {
  display: none;
}

#toolbox #palette {
  text-shadow: 0 0 8px #000;
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  transition: transform .25s, text-shadow .25s;
  font-size: 32px;
  cursor: pointer;


  &:hover {
    text-shadow: 0 0 8px blue;
    transform: scale(1.2)
  }
}

#toolbox #palette:after {
  text-shadow: 0 0 4px #000;
  content: "Color";
  position: absolute;
  font-size: 12px;
  bottom: -12px;
  left: 8px;
}

#brushSize {
  display: flex;
  flex-direction: column;
  align-items:  center;
}

body {
  opacity: 1;
  background-color: #ecf0f1;
  background-image: linear-gradient(#c4c6ec 1px, #0000 1px), linear-gradient(to right, #c4c6ec 1px, #ecf0f1 1px);
  background-size: 20px 20px;
  width: 100%;
  height: 100vh;
  margin: 0;
  padding: 0;
}

#compare-area {
  display: flex;
  visibility: hidden;
  box-sizing: border-box;
  position: absolute;
  display: hidden;
  align-items: top;
  background-color: #87b3e6;
  flex-direction: column;
  align-items:  center;
  gap: 32px;
  width: 100%;
  height: calc(512px + 20rem);
  max-height: 90vh;
  padding: 32px;
  transition: transform 1.5s;
  top: 50%;
  left: 0;
  transform: translateY(-150vh);
  box-shadow: 0 0 8px #000;
}

#compare-canvas {
  display: flex;
  flex-direction: row;
}

#similarity {
  text-align: center;
  text-shadow: 0 0 8px #000;
  color: #fff;
  font-family: Tahoma, Trebuchet MS, Lucida Sans Unicode, Lucida Grande, Lucida Sans, Arial, sans-serif;
  font-size: 24px;
  line-height: 2em;
}

#compare-area.visible {
  visibility: visible;
  transform: translateY(-50%);
}

#goback {
  cursor: pointer;
  text-shadow: 0 0 8px #fff;
  position: relative;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  transition: transform .25s, text-shadow .25s;
  font-size: 32px;
}

#goback:hover {
  text-shadow: 0 0 8px #0f0;
  transform: scale(1.25);
}

#goback:before {
  position: absolute;
  text-align: center;
  content: "Retry";
  width: 100%;
  font-family: MS Gothic, Trebuchet MS, sans-serif;
  font-size: 12px;
  bottom: -12px;
  left: 0;
}

#next {
  cursor: pointer;
  text-shadow: 0 0 8px #fff;
  position: relative;
  background: none;
  border: none;
  width: 48px;
  height: 48px;
  transition: transform .25s, text-shadow .25s;
  font-size: 32px;
}

#next:hover {
  text-shadow: 0 0 8px #0f0;
  transform: scale(1.25);
}

#next:before {
  position: absolute;
  text-align: center;
  content: "Next";
  width: 100%;
  font-family: MS Gothic, Trebuchet MS, sans-serif;
  font-size: 12px;
  bottom: -12px;
  left: 0;
}

#buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items:  center;
  gap: 10px;
}

@media (max-width: 768px) {
  #canvases {
    flex-direction: column;
    gap: 0;
  }

  #canvases canvas {
    aspect-ratio: 1 / 1;
    width: 100%;
    height: auto;
    max-height: 50vh;
  }

  #compare-canvas {
    overflow: hidden;
    flex-direction: column;
    gap: 5px;
  }

  #compare-canvas canvas {
    overflow-x: scroll;
    width: 216px;
    height: 216px;
  }

  #paint {
    align-items:  center;
  }
}

input[name="color"] {
  width: 0px;
  padding: 0;
  border: none;
  height: 0;
}
