@import url("https://fonts.googleapis.com/css2?family=Viaoda+Libre&display=swap");
:root {
  --font: "Viaoda Libre", serif;
  --color1: #f7feff;
  --color2: #dab0ff;
  --color3: #7339a6;
  --color4: #2a2a2a;
}

* {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background-color: var(--color1);
  color: var(--color4);
}

header {
  background-color: var(--color2);
  padding: 20px 80px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 40%;
}

.logo{
    animation: flipInX 2s infinite;
    animation-direction: alternate;
}

main {
  padding: 20px 80px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 5%;
}

#canvas {
  border: var(--color3) 11px solid;
  border-radius: 10px;
  touch-action: none;
}

.panel {
  background-color: var(--color2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 2%;
  flex-wrap: wrap;
}

#pen {
  background-image: url(images/pen.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#eraser {
  background-image: url(images/eraser.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#line {
  background-image: url(images/line.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#square {
  background-image: url(images/square.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#circle {
  background-image: url(images/circle.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#cancel {
  background-image: url(images/cancel.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#weight {
  margin: 10px;
  width: 64px;
  height: auto;
}

.color {
  height: 100px;
  width: 64px;
}

#color {
  background-image: url(images/color.png);
  background-size: cover;
  margin-top: 300px;
}

#color input {
  width: 64px;
  height: 64px;
  opacity: 0%;
}

.touch {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 50%;
  position: absolute;
  right: 5vw;
  z-index: 1;
}

#download {
  background-image: url(images/download.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

#trashbin {
  background-image: url(images/trashbin.png);
  width: 64px;
  height: 64px;
  background-size: cover;
  border: none;
  background-color: transparent;
}

@media (min-width: 300px) and (max-width: 500px) {
  header {
    width: calc(100vw - 40px);
    padding: 20px;
    gap: 30%;
  }
  main {
    flex-direction: column-reverse;
  }
  .panel {
    flex-direction: row;
    gap: 10px;
    margin-top: 20px;
  }
  #pen,
  #eraser,
  #line,
  #square,
  #circle,
  #cancel {
    width: 42px;
    height: 42px;
  }
  #color {
    margin-top: 0px;
    width: 42px;
    height: 42px;
  }
  #weight {
    width: 42px;
    height: auto;
  }
  .touch {
    position: static;
    flex-direction: row;
    gap: 20px;
  }
  .logo {
    width: 64px;
    height: auto;
  }
}
