/* 彈跳視窗S */
.popBG {
  position: fixed;
  width: 100vw;
  height: 100vh;
  left: 0%;
  top: 0%;
  z-index: 1000;
  background-color: rgb(0, 0, 0, 0.9);
  transition: all 0.5s;
  opacity: 0;
  visibility: hidden;
  overflow-y: hidden;
}
.popContain {
  opacity: 0;
  visibility: hidden;
  overflow-y: hidden;
  display: none;
}
.popupcontainer {
  max-width: 1000px;
  margin: 0 auto;
}
.popControl--active {
  opacity: 1;
  visibility: visible;
  overflow-y: scroll;
  display: block;
}

.popContainer {
  max-width: 1000px;
  width: 100%;
  /* 這裡回推高度要跟【js-xmark】的字體大小一致 且要【負數】 */
  margin: -3rem auto 0 auto;
}

.xmarkControl {
  position: sticky;
  top: 2%;
  cursor: pointer;
  border-radius: 5px;
}

.js-xmark {
  position: absolute;
  right: 2%;
  font-size: 3rem;
  padding: 0 0.5%;
  border-radius: 5px;
  background-color: #000;
  color: #fff;
  transition: all 0.3s;
}

.js-xmark:hover {
  background-color: #fff;
  color: #000;
  rotate: 180deg;
}

@media (max-width: 768px) {
  .popContainer {
    width: 90%;
    /* 這裡回推高度要跟【js-xmark】的字體大小一致 且要【負數】 */
    margin: -2.5rem auto 0 auto;
  }

  .js-xmark {
    font-size: 2.5rem;
    padding: 0 1%;
  }
}
.popImg {
  margin: 0 auto;
}
.popContain::-webkit-scrollbar {
  display: none;
}
.xmarkControl {
  position: absolute;
  top: 95%;
  cursor: pointer;
  border-radius: 5px;
  z-index: 10;
  left: 34.35%;
  width: 32.35%;
}
/* 彈跳視窗E */

.drawbox {
  position: relative;
  margin-top: 5%;
}
.shake_bottle {
  width: 54.3%;
  bottom: 11%;
  left: 22.85%;
  z-index: 3;
}
.popup-04 {
  position: absolute;
  top: 80%;
  left: 20.5%;
  width: 58.8%;
}
.popup-05 {
  position: absolute;
  top: 77%;
  left: 21.1%;
  width: 58.8%;
}
.popup-06 {
  position: absolute;
  top: 72%;
  left: 21.1%;
  width: 58.8%;
}

.shake_btn {
  cursor: pointer;
  width: 25.1%;
  bottom: 24%;
  left: 37.45%;
  z-index: 2;
  transition: all 0.3s;
}

.shake_hand {
  width: 11.9%;
  bottom: 22%;
  left: 50.45%;
  z-index: 2;
  animation: scale 1s infinite ease-in-out;
  transition: all 0.3s;
  pointer-events: none;
}

.shake_btn--close {
  opacity: 0;
  visibility: hidden;
}

.shake_anBottle {
  animation: shake-bottle 2s ease-in-out;
  transform-origin: center center;
}

.shake_an_A {
  animation: shake-crazya 2s linear;
  transform-origin: bottom center;
}

.shake_an_B {
  animation: shake-crazyb 2s linear;
  transform-origin: bottom center;
}

.shake_cardAnswer {
  width: 14.3%;
  top: 40.5%;
  left: 43.3%;
  transition: all 0.5s;
  opacity: 0;
}

.shake_cardAnswer--show {
  opacity: 1;
  transform: translateY(-10%);
  transition: all 0.5s;
}

/* 卡片定位 */

.shake_card1 {
  width: 23.9%;
  top: 27%;
  left: 30.9%;
  z-index: 2;
  transition: all 0.5s;
}

.shake_card2 {
  width: 14.8%;
  top: 9%;
  left: 40%;
  z-index: 2;
  transition: all 0.5s;
}

.shake_card3 {
  width: 18.3%;
  top: 20.5%;
  left: 35.3%;
  z-index: 2;
  transition: all 0.5s;
}

.shake_card4 {
  width: 15.2%;
  top: 14%;
  left: 48%;
  z-index: 2;
  transition: all 0.5s;
}

.shake_card5 {
  width: 8.9%;
  top: 22%;
  left: 47%;
  z-index: 2;
  transition: all 0.5s;
}
.shake_card6 {
  width: 19.8%;
  top: 24%;
  left: 49%;
  z-index: 2;
  transition: all 0.5s;
}

/* 動畫 */
@keyframes shake-crazya {
  10% {
    transform: translate(-8px, 10px) rotate(-5deg);
  }

  20% {
    transform: translate(-5px, -3px) rotate(6deg);
  }

  30% {
    transform: translate(10px, 8px) rotate(-4deg);
  }

  40% {
    transform: translate(8px, -10px) rotate(-6deg);
  }

  50% {
    transform: translate(-10px, 10px) rotate(4deg);
  }

  60% {
    transform: translate(12px, 0px) rotate(5deg);
  }

  70% {
    transform: translate(-10px, 5px) rotate(-5deg);
  }

  80% {
    transform: translate(12px, -8px) rotate(-7deg);
  }

  90% {
    transform: translate(-12px, 3px) rotate(-5deg);
  }

  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
}

@keyframes shake-crazyb {
  10% {
    transform: translate(8px, -10px) rotate(5deg);
  }

  20% {
    transform: translate(5px, 3px) rotate(-6deg);
  }

  30% {
    transform: translate(-10px, -8px) rotate(4deg);
  }

  40% {
    transform: translate(-8px, 10px) rotate(6deg);
  }

  50% {
    transform: translate(10px, -10px) rotate(-4deg);
  }

  60% {
    transform: translate(-12px, 0px) rotate(-5deg);
  }

  70% {
    transform: translate(10px, -5px) rotate(5deg);
  }

  80% {
    transform: translate(-12px, 8px) rotate(7deg);
  }

  90% {
    transform: translate(12px, -3px) rotate(5deg);
  }

  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
}

@keyframes shake-bottle {
  10% {
    transform: translate(-3px, 5px) rotate(-1deg);
  }

  20% {
    transform: translate(-2px, -1px) rotate(2deg);
  }

  30% {
    transform: translate(5px, 4px) rotate(-3deg);
  }

  40% {
    transform: translate(7px, -8px) rotate(-3deg);
  }

  50% {
    transform: translate(-6px, 8px) rotate(1deg);
  }

  60% {
    transform: translate(5px, 0px) rotate(2deg);
  }

  70% {
    transform: translate(-6px, 4px) rotate(-2deg);
  }

  80% {
    transform: translate(5px, -8px) rotate(-2deg);
  }

  90% {
    transform: translate(-5px, 1px) rotate(2deg);
  }

  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
}

.scaleShow {
  animation: scaleShow 1.5s linear;
  opacity: 0;
  transition: all 0.5s;
}

@keyframes scaleShow {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}
@media (max-width: 768px) {
  .drawbox {
    padding-top: 80%;
  }
  .shake_bottle {
    width: 93.8%;
    bottom: 11%;
    left: 3.1%;
    z-index: 3;
  }
  .xmarkControl {
    position: absolute;
    top: 100%;
    cursor: pointer;
    border-radius: 5px;
    z-index: 10;
    left: 12.25%;
    width: 75%;
  }
  .shake_card1 {
    width: 35.3%;
    top: 36%;
    left: 18.9%;
    z-index: 2;
    transition: all 0.5s;
  }
  .shake_card3 {
    width: 18.3%;
    top: 38.5%;
    left: 29.3%;
    z-index: 2;
    transition: all 0.5s;
  }
  .shake_card2 {
    width: 18.8%;
    top: 27%;
    left: 35%;
    z-index: 2;
    transition: all 0.5s;
  }
  .shake_card5 {
    width: 11.9%;
    top: 36%;
    left: 46%;
    z-index: 2;
    transition: all 0.5s;
  }
  .shake_card4 {
    width: 18.4%;
    top: 34%;
    left: 48%;
    z-index: 2;
    transition: all 0.5s;
  }
  .shake_card6 {
    width: 31.5%;
    top: 34%;
    left: 49%;
    z-index: 2;
    transition: all 0.5s;
  }
  .popup-06 {
    position: absolute;
    top: 72.5%;
    left: 21.1%;
    width: 58.8%;
  }
  .popup-04 {
    position: absolute;
    top: 80%;
    left: 21.1%;
    width: 58.8%;
  }
  .popup-05 {
    position: absolute;
    top: 77%;
    left: 21.1%;
    width: 58.8%;
  }
}
