* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: #928cff;
  border-radius: 5px;
}

::-webkit-scrollbar-track {
  background-color: #f0f0f0;
  border-radius: 5px;
}

body {
  background-color: #928cff;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  gap: 50px;
  padding-top: 70px;
}

.inputs {
  background-color: #fff;
  padding: 10px;
  border-radius: 10px;
  width: 100%;
  max-width: 350px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
  font-size: 24px;
  text-align: center;
  margin-bottom: 10px;
}

.data {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.data input,
.data button {
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #928cff;
  outline: none;
}

.data input {
  width: 100%;
}

.data button {
  transition: 0.3s;
  background-color: #928cff;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  max-width: 1200px;
  justify-content: center;
  align-items: flex-start;
}

.box {
  background-color: #fff;
  padding: 10px;
  border-radius: 10px;
  width: calc(25% - 20px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  height: auto;
  max-height: 420px;
  transition: 0.3s;
}

.container {
  overflow-y: auto;
  overflow-x: hidden;
  word-wrap: break-word;
  max-height: 350px;
  border-radius: 5px;
  display: flex;
  flex-direction: column-reverse;
}

.box h2 {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 2px;
  margin: 5px;
}

.item-container {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.up-btn,
.down-btn {
  display: none;
}

.item {
  color: #fff;
  padding: 10px;
  margin: 3px 0;
  cursor: move;
  transition: transform 0.2s;
  border-radius: 5px;
  text-align: center;
  width: 100%;
  max-width: calc(100% - 108px);
  outline: none;
  
}

.box1 .item {
  background-color: #7463ff;
}

.box2 .item {
  background-color: #8c63ff;
}

.box3 .item {
  background-color: #7463ff;
}

.box4 .item {
  background-color: #8c63ff;
}

.box h2 img {
  width: 20px;
}

.edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  outline: none;
}

.item:active {
  transform: scale(0.9);
}

.edit-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-left: 10px;
  transition: color 0.3s;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-right: 10px;
  transition: color 0.3s;
}

.edit-input {
  width: 70%;
  padding: 5px;
  border: 1px solid #928cff;
  border-radius: 5px;
  font-size: 32px;
  text-align: center;
  border: none;
  outline: none;
  padding: 0;
  font-weight: bold;
  transition: 0.3s;
}

@media (max-width: 768px) {
  body {
    padding-top: 50px;
  }

  .inputs {
    width: 96%;
    max-width: none;
  }

  .box {
    width: calc(100% - 20px);
    display: none;
    max-height: none;
  }

  .container {
    max-height: none;
  }

  .box1 {
    display: block;
  }

  .up-btn,
  .down-btn {
    display: block;
    background: none;
    font-size: 16px;
    border: none;
    outline: none;
    cursor: pointer;
    flex: 1;
  }

  .item-container:last-child .up-btn {
    display: none;
  }

  .item-container:first-child .down-btn {
    display: none;
  }

  ::-webkit-scrollbar {
    display: none;
  }
}

@media (max-width: 480px) {
  .inputs {
    padding: 15px;
  }

  .data input,
  .data button {
    font-size: 14px;
  }

  .box-title {
    font-size: 20px;
  }

  .box {
    padding: 15px;
  }

  ::-webkit-scrollbar {
    display: none;
  }
}
