01-todolist/css/index.less
@import url("https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");
:root {
  --medium1: #f8f9faff;
  --medium2: #e9ecefff;
  --medium3: #dee2e6ff;
  --medium4: #ced4daff;
  --medium5: #adb5bdff;
  --medium6: #6c757dff;
  --medium7: #495057ff;
  --medium8: #343a40ff;
  --medium9: #212529ff;

  --secondary1: #223843ff;
  --primary5: #eff1f3ff;
  --primary4: #dbd3d8ff;
  --primary3: #d8b4a0ff;
  --primary2: #d77a61ff;
  --primary1: rgba(213, 79, 42, 0.895);
}

body {
  font-family: "Courier Prime", "Playfair Display", "Microsoft Yahei", Arial,
    sans-serif;

  margin: 20vh auto;
  min-height: 100vh;
  width: 100vw;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image: linear-gradient(to right, #ffecd2 0%, #fcb69f 100%);
}
.content {
  margin: 10vh auto;
  width: 400px;
  padding: 20px;
  background: var(--medium-color-7);
  box-shadow: 0 15px 25px var(--medium5);
  border-radius: 10px;
  margin-bottom: 100px;
}
h1,
h2,
h3,
h4 {
  color: var(--primary1);
  margin: 8px 0;
  font-weight: 600;
}
@keyframes slide-in-right {
  0% {
    transform: translateX(1000px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-out-left {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-1000px);
    opacity: 0;
  }
}

@keyframes scale-in-center {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.slide-in-right {
  animation: slide-in-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.slide-out-left {
  animation: slide-out-left 0.5s cubic-bezier(0.55, 0.085, 0.68, 0.53) both;
}

li {
  list-style: none;
}
.box-hd {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 12px;
  h2 {
    font-size: 30px;

    color: var(--primary1);
    margin: 0;
    text-align: center;
    margin-bottom: 30px;
  }
  .hd-content {
    position: relative;
    padding-right: 50px;
    #todoInput {
      width: 100%;
      margin: 8px 0;
      padding: 8px;
      font-size: 16px;
      border-radius: 5px;
      border: none;
      &:focus {
        outline: none;
      }
    }
    .add {
      position: absolute;
      top: 50%;
      right: 0;
      transform: translateY(-50%);
      width: 30px;
      height: 30px;
      line-height: 30px;
      border-radius: 50%;
      background-color: var(--medium1);
      margin-right: 0;
      font-size: 30px;
      text-align: center;

      cursor: pointer;
      user-select: none;
      color: var(--primary3);
      font-family: "Poppins", sans-serif;
      box-sizing: border-box;
      &:hover {
        background-color: var(--primary1);
        color: var(--medium1);
        // border: #e0e1e4;
        box-shadow: 1px 2.5px 10px var(--medium6);
      }
    }
  }
}

.todo,
.complete {
  position: relative;
  margin: 30px 0;
  padding: 6px 0;
  .clear {
    position: absolute;
    top: 12px;
    right: 0;
    height: 28px !important;
    width: 60px !important;
    color: var(--secondary1);
    line-height: 20px !important;
    text-align: center;
    box-shadow: 4px;
    padding: 0 !important;
    &:hover {
      background-color: var(--primary1);
      color: var(--medium1);
    }
  }
}

#todoList,
#completedList {
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  border: 0;
  border-top: 2px solid var(--primary1);
  li {
    // width: 100%;
    box-sizing: border-box;
    position: relative;
    padding: 6px 12px 6px 40px;
    margin: 12px 0;
    // margin-top: 0;
    color: var(--medium1);
    background-color: var(--primary2);
    border-radius: 6px;
    // border: 2.5px solid #e0e1e4;
    font-size: 18px;
    overflow: hidden;

    &:hover .delet {
      right: 0;
      color: rgb(246, 245, 245);
      background-color: var(--primary1);
      animation: slide-in-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
    }
    .checkbox {
      position: absolute;
      top: 58%;
      left: 10px;
      transform: translateY(-50%);
      color: var(--medium2);
      font-size: 20px;
      &:hover {
        // text-shadow: 0 2px 10px var(--primary3);
        color: var(--primary1);
        font-weight: 600;
      }
    }
    .delet {
      position: absolute;
      top: 0px;
      right: -60px;
      height: 40px;
      width: 60px;
      text-align: center;
      color: var(--primary1);
      font-family: -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
      font-size: 24px;
      border-radius: 2px;
      &:hover {
        right: 0;
        background-color: var(--secondary1);
        color: var(--medium1);
        // animation: slide-in-right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
      }
    }

    &:hover {
      box-shadow: 2px 2px 10px var(--medium1);
    }
  }
}

.listOperater {
  margin: 24px 0;
  margin-bottom: 4px;
  button {
    margin-right: 10px;
  }
  .visual {
    display: none;
  }
}

.completedList {
  background-color: var(--medium8);
  border-radius: 5px;
  border: 2.5px solid var(--medium1);
  // box-shadow: 0px 0px 20px -20px;
  margin-top: 24px;
}

.listOperater {
  margin: 24px 0;
  margin-bottom: 4px;
  button {
    margin-right: 10px;
    color: var(--secondary1);
    &:hover {
      background-color: var(--primary1);
      color: var(--medium1);
    }
  }
  .visual {
    display: none;
  }
}
