html,
body {
  margin: 0;
  padding: 0;
}
#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.container {
  width: 70vw;
}
.container .config {
  display: flex;
  justify-content: space-around;
}
.list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 10px;
}
.list > div {
  height: calc(60vh / 4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #eee;
  border-radius: 20px;
  padding: 10px;
  margin: 10px;
}
.main-slots {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  box-sizing: border-box;
}
.main-slots > div {
  width: calc(15vw / 3 - 5px);
  height: calc(15vw / 3 - 5px);
  background: yellow;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 2px;
  user-select: none;
}

.queue-slots {
  display: flex;
  flex-wrap: nowrap;
  margin-top: 10px;
}
.queue-slots > div {
  width: calc(10vw / 3 - 5px);
  height: calc(10vw / 3 - 5px);
  background: green;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  margin: 0 2px;
  user-select: none;
}
.main-slots .empty-card {
  background-color: aqua;
  border: black 1px solid;
}

.main-slots [draggable] {
  cursor: grab;
}
.main-slots [draggable].dragging {
  cursor: grabbing !important;
  background-color: rgb(255, 212, 95);
}
.dragover {
  background: yellow;
}
/* .dragover 子元素中带有 .empty-card 的所有元素的第一个 */
.main-slots > .dragover {
  width: calc(15vw / 3 - 5px);
  height: calc(15vw / 3 - 5px);
  background: rgb(77, 123, 251);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  margin: 0 2px;
  user-select: none;
}

.list .queue-slots .card-shape {
  width: calc(4vw / 3);
  height: calc(4vw / 3);
}

/* 形状 */
/* 三角形 */
.card-shape.triangle {
  width: 0;
  height: 0;
  border-bottom: calc(8vw / 3 - 10px) solid black;
  border-right: calc(8vw / 3 - 10px) solid transparent;
  border-left: calc(8vw / 3 - 10px) solid transparent;
}
.list .queue-slots .card-shape.triangle {
  transform: scale(0.5) translateY(calc(1vw * -1));
}
/* 圆形 */
.card-shape.circle {
  width: calc(8vw / 3 - 5px);
  height: calc(8vw / 3 - 5px);
  border-radius: 50%;
  background-color: black;
}
/* 矩形 */
.card-shape.square {
  width: calc(8vw / 3 - 5px);
  height: calc(8vw / 3 - 5px);
  background-color: black;
}
/* 菱形 */
.card-shape.diamond {
  width: calc(8vw / 3 - 5px);
  height: calc(8vw / 3 - 5px);
  transform: rotate(45deg);
  background-color: black;
}
/* 扇形 */
.card-shape.sector {
  border: calc(8vw / 3 - 10px) solid transparent;
  transform: translateY(calc((8vw / 3 - 10px) / 2));
  border-radius: 50%;
  width: 0;
  height: 0;
  border-top-color: black;
}
.list .queue-slots .card-shape.sector {
  transform: translateY(1.5vw) scale(0.8);
}

@media screen and (max-width: 768px) {
  .container {
    width: 100vw;
  }

  .list {
    display: grid;
    grid-gap: 2px;
  }

  .list > div {
    height: calc(85vh / 4 - 10px);
    margin: 2px;
  }

  .main-slots > div {
    width: calc(85vw / 9 - 5px);
    height: calc(85vw / 9 - 5px);
  }

  .queue-slots > div {
    width: calc(70vw / 9 - 5px);
    height: calc(70vw / 9 - 5px);
  }

  .list .main-slots > .dragover {
    width: calc(85vw / 9 - 5px);
    height: calc(85vw / 9 - 5px);
  }

  .list .list-item .card-shape {
    width: calc(55vw / 9 - 5px);
    height: calc(55vw / 9 - 5px);
  }

  .list .queue-slots .card-shape {
    transform: scale(0.8);
  }
  .list .main-slots .card-shape.triangle,
  .list .queue-slots .card-shape.triangle {
    width: 0;
    height: 0;
    border-bottom: calc(50vw / 9 - 8px) solid black;
    border-right: calc(50vw / 9 - 8px) solid transparent;
    border-left: calc(50vw / 9 - 8px) solid transparent;
  }
  .card-shape.sector {
    border: calc(50vw / 9 - 8px) solid transparent;
    transform: translateY(5vw);
    border-radius: 50%;
    width: 0;
    height: 0;
    border-top-color: black;
  }
  .list .queue-slots .card-shape.sector {
    transform: translateY(4vw) scale(0.9);
  }
}
