* {
  -webkit-box-sizing: border-box;
   box-sizing: border-box;
  padding: 0;
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  -webkit-touch-callout: none;
 
  -webkit-user-select: none;
 
  -moz-user-select: none;
 
  -ms-user-select: none;
 
  user-select: none;
  
}

body {
  position: relative;
  margin: 0;
  padding: 0;
  overflow-y: scroll;
}

.overlay-spinner {
  position: fixed;
  z-index: 1000;
  height: 100vh;
  width: 100vw;
  top: 0;
  background-color: #ffffff;
  text-align: center;
  padding: 50px;
}

.wrapper {
  position: relative;
  overflow: hidden;
}

.header {
  position: fixed;
  top: 0;
  background: whitesmoke;
  -webkit-box-shadow: 0px 0px 5px #a8a8a8;
          box-shadow: 0px 0px 5px #a8a8a8;
  border-bottom: 1px solid #cfcfcf;
  width: 100vw;
  height: 70px;
  z-index: 100;
  padding: 5px 0;
}

#title a {
  text-decoration: none;
  position: relative;
  color: #7c7c7c;
  top: 25%;
}

#title {
  text-align: center;
  width: 100px;
}

.tools {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -ms-flex-pack: distribute;
      justify-content: space-around;
  z-index: 3;
  margin: auto;
  gap: 20px;
  color: #141414;
  width: 60vw;
  padding: 5px;
  height: 60px;
}

.colorpallete {
  position: absolute;
  display: none;
  left: 10%;
  height: 60px;
  top: 65px;
  padding-right: 10px;
  background-color: whitesmoke;
  -webkit-box-shadow: 0px 3px 8px #a8a8a8;
          box-shadow: 0px 3px 8px #a8a8a8;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}

.show {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-orient: horizontal;
  -webkit-box-direction: normal;
      -ms-flex-direction: row;
          flex-direction: row;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
}

#pensize {
  width: 100px;
  margin-left: 20px;
  background-color: whitesmoke;
}

.color {
  font-size: 0;
  width: 40px;
  height: 40px;
  border-radius: 100%;
  margin: 5px;
  border: none;
  cursor: pointer;
  background-image: url("pen.png");
  background-size: cover;
  background-repeat: no-repeat;
}

.collapse-btn {
  display: none;
}

.scroll-pad {
  display: none;
}

@media screen and (max-width: 775px) {
  .header {
    height: 100vh;
    width: 100px;
    padding: 10px;
    left: 0;
  }
  .tools {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    margin: 0;
    left: 0;
    margin: 0;
    top: 0px;
    width: 80px;
    height: 700px;
    -webkit-box-pack: start;
        -ms-flex-pack: start;
            justify-content: flex-start;
  }
  .colorpallete {
    position: fixed;
    left: 101px;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    margin-top: 35px;
  }
  .show {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: 200px;
    width: 100px;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
  }
  .lg-button {
    height: 70px;
  }
  .color {
    width: 30px;
    height: 30px;
  }
  #title {
    margin-bottom: 20px;
    width: auto;
  }
  .overlay-spinner {
    padding: 0;
  }
  .overlay-spinner img {
    margin-top: 100px;
    -webkit-transform: translateX(-70px);
            transform: translateX(-70px);
    width: 500px;
  }
  .collapse-btn {
    position: absolute;
    display: block;
    padding: 15px 10px;
    top: 350px;
    background-color: #d6d6d6;
    left: 90px;
    margin: 20px 0;
    border-left: none;
    border-top: #cfcfcf 1px solid;
    border-right: #cfcfcf 1px solid;
    border-bottom: #cfcfcf 1px solid;
    cursor: pointer;
    color: #474747;
    border-radius: 5px;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
  }
  .collapse-btn .fa-chevron-right {
    -webkit-transform: rotate(-180deg);
            transform: rotate(-180deg);
  }
  .collapse-btn:hover {
    background-color: #a8a8a8;
  }
  .collapse-btn:focus {
    outline: none;
  }
  .collapsed .fa-chevron-right {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  .header-collapsed {
    -webkit-transform: translateX(-100%);
            transform: translateX(-100%);
  }
  .scroll-pad {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    position: fixed;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    background-color: #f5f5f5;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23272727' fill-opacity='0.47' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    right: 0px;
    height: 60vh;
    width: 35px;
    top: 90px;
    border: 2px solid #dddddd;
    border-radius: 10px;
    text-align: center;
    color: #a8a8a8;
    font-size: 12px;
  }
  .scroll-pad p {
    margin: 5px;
    font-size: 14px;
    -webkit-transform: rotate(-90deg);
            transform: rotate(-90deg);
  }
}

.content {
  background: #0f0f0f;
}

.active-options {
  display: block;
}

#canvas {
  background-color: #ffffff;
  background-image: url("../grid.jpg");
  margin: 0;
  padding: 0;
}

.canvas-grid {
  background-color: #ffffff;
  background-image: none;
  margin: 0;
  padding: 0;
}

.grid-toggle {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 5px;
}

.lg-button {
  color: #2a2a2a;
  font-size: 1.2em;
  background: whitesmoke;
  border: #cfcfcf 1px solid;
  border-radius: 4px;
  height: 50px;
  width: 80px;
  cursor: pointer;
}

.lg-button:hover {
  background: #dddddd;
}

.small-btn {
  margin: 0;
  color: white;
  font-size: 1em;
  margin-top: 50px;
  background: #242424;
  border: #efefef 1px solid;
  border-radius: 4px;
  height: 50px;
  width: 100%;
  cursor: pointer;
}

.small-btn:hover {
  background: white;
}

.export-btn {
  display: inline-block;
  text-align: center;
  position: absolute;
  top: 10px;
  right: 30px;
  background-color: #00acee;
  border-radius: 15px;
  padding: 10px;
  z-index: 50;
  color: whitesmoke;
  -webkit-box-shadow: 0px 0px 8px #a8a8a8;
          box-shadow: 0px 0px 8px #a8a8a8;
  cursor: pointer;
  font-size: 12px;
}

/* #undo, #redo, #select, #erase, #draw, #clear {
	border-radius: 100%;
	width: 50px;
} */
.pensize {
  cursor: pointer;
  width: 100px;
  height: 100%;
}

.pensize-btn {
  display: table;
  width: 30px;
  border: #efefef 1px solid;
  height: 100%;
  cursor: pointer;
}

.pensize-btn:hover {
  background-color: #efefef;
}

.pensize-btn-icon {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.size {
  position: relative;
  width: 60px;
  height: 100%;
  background-color: white;
  border: #efefef 1px solid;
}

.width {
  position: relative;
  border-radius: 100%;
  background-color: black;
}

.w-10 {
  position: relative;
  left: 40%;
  top: 40%;
  height: 10px;
  width: 10px;
}

.w-6 {
  position: relative;
  left: 44%;
  top: 44%;
  height: 6px;
  width: 6px;
}

.w-4 {
  position: relative;
  left: 44%;
  top: 44%;
  height: 4px;
  width: 4px;
}

.w-3 {
  position: relative;
  left: 44%;
  top: 44%;
  height: 3px;
  width: 3px;
}

.modal-bg {
  z-index: 100;
  position: fixed;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  top: 0;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  opacity: 0;
  visibility: 0;
  display: none;
}

.modal-active {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  opacity: 1;
  visibility: visible;
  -webkit-transition: all 0.7s ease-in-out;
  transition: all 0.7s ease-in-out;
}

.modal {
  position: relative;
  background-color: whitesmoke;
  padding: 30px 40px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 20px;
  border-radius: 5px;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-weight: bold;
  cursor: pointer;
}

#filename {
  padding: 10px 10px;
  width: 100%;
}

#save-img {
  max-width: 300px;
  min-width: 100%;
  padding: 10px 50px;
  color: whitesmoke;
  border: none;
  background-color: #1d69b1;
  cursor: pointer;
}

#save-img:hover {
  background-color: #1b497e;
}

#save-pdf {
  max-width: 300px;
  min-width: 100%;
  padding: 10px 50px;
  color: whitesmoke;
  border: none;
  background-color: #1d69b1;
  cursor: pointer;
}

#save-pdf:hover {
  background-color: #1b497e;
}

.download-status {
  position: fixed;
  display: none;
  top: 90px;
  right: 50px;
  color: #141414;
  background-color: whitesmoke;
  padding: 10px 70px;
  border: 1px solid #cfcfcf;
}

.download-status-active {
  display: block;
}
