.img-responsive {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.absolute {
  position: absolute;
}

.red-envelope-event {
  background-color: #ee0000;
  background-image: url(../images/202501red_packet_rain/pattern.png);
}
/* 主視覺區 */
.main-visual {
  background-image: url(../images/202501red_packet_rain/orang-flannel.png);
  background-repeat: no-repeat;
  background-size: cover;
  padding: 0;
  overflow: hidden;
  padding-top: 4em;
}

.main-visual > .absolute {
  margin-top: -4em;
}

.window-deco {
  height: 43vh;
  background-image: url(../images/202501red_packet_rain/red-window.png);
  background-repeat: no-repeat;
  background-size: 150%;
  background-position: 100% 17%;
  flex: 0 1 38vw;
}

.window-deco.right {
  background-position: 0% 17%;
}

.visual-title-block {
  transform: translate(-50%, 0%);
  position: absolute;
  top: 50px;
  left: 65%;
  width: 65vw;
  z-index: 10;
  aspect-ratio: 1 / 1;
  background-image: url(../images/202501red_packet_rain/green-block.png);
  background-size: contain;
  max-width: 550px;
  background-repeat: no-repeat;
}

.side-deco {
  padding: 0;
  position: relative;
}

.side-deco-r,
.side-deco-l {
  transform: scale(1.15);
  width: 50%;
}

.title-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 65vw;
}

.title-content > p {
  font-size: 1.5em;
  font-weight: 500;
  color: #fff;
  text-shadow: 0px -3px 8px #1a0000;
}

.caption {
  padding-bottom: 35px;
  background: linear-gradient(
    to bottom,
    #c60303 0%,
    #ed0804 31%,
    #ff5900 52%,
    #e20000 54%
  );
  color: #fff;
  font-weight: 500;
  font-size: 16px;
  text-shadow: #360000 0px 0 6px;
  line-height: 40px;
}

.red-stage {
  transform: translateY(-10px);
  overflow: hidden;
  position: absolute;
  z-index: 2;
}

/* 活動按鈕區 */

.activity-wrap {
  width: 100%;
}
.rain-btn {
  position: relative;
}
.rain-btn::before {
  content: "";
  display: block;
  width: 100%;
  height: 20vw;
  background: linear-gradient(
    to bottom,
    rgba(100, 1, 11, 0.91) 30%,
    rgba(0, 0, 0, 0) 100%
  );
  top: 0vw;
  position: absolute;
}

.rain-btn-group {
  position: relative;
  aspect-ratio: 8 / 1;
  background-image: url(../images/202501red_packet_rain/nav-ribbon-bg.png);
  padding: 0 7%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: bottom;
  margin-top: 40px;
  margin-left: auto;
  margin-right: auto;
  z-index: 3;
}

.rain-btn-group > li {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rain-btn-group > li a {
  color: #6e3511;
  width: 100%;
  padding: 15px 0;
  text-align: center;
}

.rain-btn-group .start-btn {
  margin: 4px -14px;
  background-image: url(../images/202501red_packet_rain/start-btn.png);
  background-size: 100% 98%;
  background-repeat: no-repeat;
}

.rain-btn-group .start-btn a {
  color: #fff;
}

.rain-btn-group .start-btn a:hover,
.rain-btn-group > li a:hover {
  transform: scale(1.3);
}

/* 規則內容 */
.activity-head-img {
  width: 80%;
}
.activity-rules {
  border: 3px solid #ff5900;
  border-radius: 10px;
  padding: 1.5em;
  background-color: #fcec9d;
  background-image: url(../images/202501red_packet_rain/inner-content-bg.png);
  background-size: 100%;
  background-repeat: repeat-y;
  position: relative;
  width: 100%;
}

.activity-rules-title {
  background-color: #bc0e0e;
  border: 4px solid #c39738;
  padding: 5px 10px;
  border-radius: 50px;
  text-align: center;
  color: #fff;
  position: absolute;
  top: -15px;
  width: 90%;
  font-size: 1.1em;
  left: 50%;
  transform: translate(-50%, 0);
}

.activity-rules-title::after,
.activity-rules-title::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #c39738;
  position: absolute;
  top: 50%;
}

.activity-rules-title::after {
  transform: translate(3px, -50%);
}

.activity-rules-title::before {
  right: 0;
  transform: translate(-10px, -50%);
}

.gift-item {
  background-image: url(../images/202501red_packet_rain/reward-bg.png);
  background-size: contain;
  background-repeat: no-repeat;
  padding: 10px 30px 60px;
  aspect-ratio: 7/8;
  width: 45%;
}

.activity-rules-text {
  justify-content: center;
}

.PrizeHistoryList{
  height: 60vh;
  overflow-y: auto;
}

.content-sticky-bg {
  position: sticky;
  top: 10%;
}

.verse-left {
  width: 7%;
  position: absolute;
  right: 3%;
}
.verse-right {
  width: 7%;
  position: absolute;
  left: 3%;
}
@media (min-width: 768px) {
  .window-deco {
    height: 52vw;
    flex: 0 1 25vw;
  }
  .side-deco {
    padding: 0 8%;
  }
  .side-deco-r,
  .side-deco-l {
    width: 38%;
  }

  .visual-title-block {
    width: 45vw;
    left: 50%;
  }
  .title-content {
    width: 40vw;
  }

  .rain-btn::before {
    top: -3vw;
  }

  .rain-btn-group {
    width: 70%;
  }

  .activity-wrap {
    width: 70%;
  }

  .gift-item {
    width: 32%;
  }
}

@media (min-width: 1024px) {
  .rain-btn-group {
    width: 55%;
  }

  .activity-wrap {
    width: 55%;
  }
}

@media (min-width: 1200px) {
  .window-deco {
    height: 35vw;
    flex: 0 1 18vw;
  }

  .side-deco {
    padding: 0 4%;
  }

  .side-deco-r,
  .side-deco-l {
    width: 28%;
  }

  .title-content {
    width: 32vw;
  }

  .title-content > p {
    font-size: 2em;
  }

  .rain-btn-group {
    width: 40%;
  }

  .rain-btn-group .start-btn {
    margin: 9px -13px;
    background-size: 100% 98%;
  }

  .verse-left,
  .verse-right {
    width: 4%;
  }

  .activity-head-img {
    width: 50%;
  }

  .activity-rules {
    padding: 4em;
  }

  .activity-rules-title {
    font-size: 1.3em;
    width: 75%;
  }

  .activity-rules-text {
    font-size: 1.1em;
  }

  .rain-btn::before {
    top: -1vw;
  }

  .rain-btn-group {
    font-size: 1.2em;
    padding: 0 3%;
  }

  .gift-item {
    width: 22%;
    margin: 15px;
  }
}

/* ------彈窗設定------ */
.award-modal {
  padding: 20px;
  width: 80%;
  max-width: 700px;
  position: absolute;
  /* box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3); */
  color: #4e4e4e;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.close-x {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.8em;
  color: #000000;
  cursor: pointer;
  background-color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  z-index: 3;
}

.award-modal > .activity-head-img {
  width: 80%;
}

.award-modal > .activity-rules {
  background-color: #ffc898;
  border: 5px solid #d66e1f;
  padding-bottom: 25px;
}
.award-modal .activity-rules-text {
  color: #000000;
}

.confirm-btn {
  margin: 0 auto;
  background-color: #bc0e0e;
  padding: 8px 35px;
  border-radius: 50px;
  color: #ffffff;
  border: 3px solid #c39738;
  display: block;
  font-size: 1.1em;
}

.win-award-animate {
  width: 85%;
  max-width: 400px;
  position: absolute;
  color: #4e4e4e;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  animation: win-award 3s;
  z-index: 3;
}

.award-bg {
  position: relative;
  width: 100%; /* 彈窗的寬度 */
  height: 57vh; /* 彈窗的高度 */
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
}

.envelope-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain; /* 確保圖片完整顯示 */
}

.award-text {
  position: relative;
  z-index: 2; /* 確保文字顯示在圖片上方 */
  color: white; /* 文字顏色 */
  text-align: center;
  font-size: 16px;
  padding: 10px;
  color: #080808;
  margin-top: 4vw;
  animation: win-award-text 3s;
}

.award-item {
  font-size: 1.5em;
  font-weight: bold;
  color: #980000;
}

.count-text {
  font-size: 4em;
  color: #980000;
}

.count-text small {
  font-size: 0.3em;
}

.win-close {
  margin: 0 auto;
  padding: 10px;
  background-color: #bc0e0e;
  color: #fff;
  width: 80%;
  border-radius: 50px;
  border: #c39738 2px solid;
  font-size: 16px;
  font-weight: bold;
  transition: 0.5s ease;
}

.win-close:hover {
  cursor: pointer;
  font-size: 18px;
}

.red-envelope {
  position: absolute;
  width: 55px;
  height: 90px;
  cursor: pointer;
}

@media (min-width: 390px) {
  .award-bg {
    height: 44vh;
  }
}

@media (min-width: 820px) {
  .award-bg {
    height: 34vh;
  }
  .red-envelope {
    width: 70px;
    height: 120px;
  }
}
@media (min-width: 1200px) {
  .win-award-animate {
    width: 50%;
  }

  .award-bg {
    height: 52vh;
  }
}

/* ------動畫效果------ */
.bounce {
  animation: bounce 1.5s ease infinite;
}

.fadein-title {
  animation: fadein-title 1.5s;
}

@keyframes win-award-text {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes win-award {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  100% {
    opacity: 1;
  }
}

@keyframes bounce {
  0% {
    transform: translateY(-10px);
  }

  50% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-10px);
  }
}

@keyframes fadein-title {
  0% {
    transform: translateY(50px) scale(1.15);
    opacity: 0;
  }
  100% {
    transform: translateY(0px) scale(1.15);
    opacity: 1;
  }
}
