.zindex-1 {
  z-index: 1;
}

.battle-event {
  background-color: #d4c6ff;
}

.battle-event-header {
  background-image: url(../images/2024battle/pc-header-bg.png);
  background-repeat: no-repeat;
  background-size: cover;
}

.snow-deco {
  position: relative;
  width: 100%;
}

.snow-deco > img {
  max-width: 100%;
}

.snow-deco::after {
  content: "";
  display: block;
  background-image: url(../images/2024battle/deco-1.png);
  background-repeat: no-repeat;
  width: 150px;
  height: 150px;
  background-size: contain;
  position: absolute;
  border-top-width: 70px;
  left: -50px;
}

.snow-deco::before {
  content: "";
  display: block;
  background-image: url(../images/2024battle/deco-2.png);
  background-repeat: no-repeat;
  width: 100px;
  height: 300px;
  background-size: contain;
  position: absolute;
  bottom: -10%;
  right: 5%;
}

.shape-deco {
  transform: translateX(70px);
}

.shape-deco::before {
  content: "";
  display: block;
  background-image: url(../images/2024battle/shape.png);
  background-repeat: no-repeat;
  width: 35vw;
  height: 35vw;
  background-size: contain;
  position: absolute;
  z-index: -1;
  left: -100px;
  top: 100px;
}

.star-deco-right {
  width: 10%;
  max-width: 100%;
  position: absolute;
  top: 10px;
  animation: rotateYAnimation 10s linear infinite; /* 5s 為動畫時間，可以調整 */
}

.star-deco-left {
  width: 15%;
  max-width: 100%;
  position: absolute;
  left: 10px;
  bottom: 0px;
  animation: rotateYAnimation 8s ease-in-out infinite; /* 5s 為動畫時間，可以調整 */
}

.snow-deco img[src="./images/2024battle/main.png"] {
  animation: slideDownAnimation 2s ease-out forwards;
  opacity: 0;
}

.shape-deco img[src="./images/2024battle/main-title-pc.png"],
.shape-deco img[src="./images/2024battle/main-title-pc-cn.png"],
.shape-deco img[src="./images/2024battle/main-title-pc-en.png"] {
  animation: fadeInAnimation 1.5s ease-in forwards;
  animation-delay: 1s;
  opacity: 0;
}

.image-wrapper {
  width: 50%;
}

.responsive-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-gap {
  padding: 3em 0;
}

.battle-event-body {
  background-image: url(../images/2024battle/body-bg.png);
  background-repeat: repeat-y;
  background-size: 100%;
  padding-bottom: 2em;
}

.frame-top,
.frame-bottom {
  width: 70%;
  margin: 0 auto;
}
.frame-top > img,
.frame-bottom > img {
  vertical-align: bottom;
}

.frame-body {
  width: 70%;
  margin: 0 auto;
  padding: 0 10%;
  background-image: url(../images/2024battle/inner-bg-body.png);
  background-size: 100%;
}

.frame-bottom {
  transform: rotate(180deg);
}

.vote-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5em;
  margin-bottom: 5em;
}
.vote-header .log.popit,
.vote-header .record,
.vote-header .reward {
  background: linear-gradient(
    to bottom,
    #8d83fb 0%,
    #9c8fde 33%,
    #6d5fb2 61%,
    #6c55b4 81%,
    #7e6fbf 100%
  );
  width: 30%;
  border-radius: 15px;
  color: #fff;
  font-size: 1.3em;
  box-shadow: #fff 0px 0px 8px;
  border: 2px solid #f1f0fa;
  text-align: center;
  padding: 10px;
}
.vote-header .log.popit:hover,
.vote-header .record:hover,
.vote-header .reward:hover {
  font-size: 1.5em;
  color: #ffff00;
}

.vote-header .vs {
  width: 12%;
  height: auto;
}

.vote-content {
  display: flex;
  justify-content: center;
  gap: 8em;
  position: relative;
  padding: 100px 0;
}

.vote-content::after,
.vote-content::before {
  content: "";
  display: block;
  background-repeat: no-repeat;
  width: 100%;
  height: 5em;
  background-size: contain;
  position: absolute;
  background-position: center;
}

.vote-content::after {
  background-image: url(../images/2024battle/deco-border.png);
  bottom: -13px;
  transform: rotateX(180deg);
}

.vote-content::before {
  background-image: url(../images/2024battle/deco-border.png);
  top: -13px;
}

.card {
  background-color: #ffffff;
  border-radius: 50px 15px;
  padding: 20px;
  width: 40%;
  text-align: center;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
  transition-duration: 1s;
  transition: transform 1s, background 2s;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 40px 10px;
  margin-bottom: 10px;
  box-shadow: #9896ba 0px 0px 10px;
}

.card h3 {
  font-size: 1.8em !important;
  color: #c0942e;
}

.votes {
  font-size: 1.5em;
  color: #6b6b6b;
  margin-bottom: 15px;
}

.select-btn {
  background: linear-gradient(90deg, #ff94b1, #ffa9a3);
  color: #fff;
  padding: 8px 20px;
  border: none;
  border-radius: 20px;
  font-size: 1.3em;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 80%;
}

.card:hover {
  transform: translateY(-10px);
}

.card:hover .select-btn {
  background: linear-gradient(90deg, #ffa9a3, #ff94b1);
}

.rules-container {
  padding: 20px;
  margin: 0 auto;
  max-width: 1000px;
  margin-top: 2em;
}

.rules-header {
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: url("../images/2024battle/section-title-bg.png");
  background-repeat: no-repeat;
  background-size: 55%;
  background-position: center;
  color: #6a3ec8;
  font-weight: bold;
  font-size: 1.5em;
  height: 70px;
  margin-bottom: 20px;
  position: relative;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: #fff;
  font-size: 1.2em;
  text-align: left;
  font-weight: 500;
  text-shadow: #555555 0 0 5px;
}

.rules-list li {
  margin: 8px 0;
}

/* 表格樣式 */
.reward-table table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 15px;
  overflow: hidden;
}

/* 表頭樣式 */
.reward-table th {
  background-color: #9a70c4;
  color: white;
  padding: 15px;
  font-size: 1.2em;
}

/* 表格列樣式 */
.reward-table td {
  padding: 8px 1.5em;
  font-size: 1.3em;
  color: #7229bb;
}

/* 隔行換色效果 */
.reward-table tr:nth-child(even) {
  background-color: #f8f2ff;
}

.reward-table tr:nth-child(odd) {
  background-color: #ffffff;
}

/* 左側邊框設置 */
.reward-table td:first-child,
.reward-table th:first-child {
  width: 30%;
  text-align: center;
  vertical-align: middle;
}

/* 表格邊框 */
.reward-table tr td,
.reward-table tr th {
  border: 2px solid #d4c6ff;
  vertical-align: middle;
}

/* 彈窗樣式 */
.modal {
  background-color: #d4c6ff;
  border-radius: 10px;
  padding: 20px;
  width: 80%;
  max-width: 700px;
  text-align: center;
  position: absolute;
  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
  color: #4e4e4e;
  border: 3px solid #fff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 關閉按鈕 */
.close-btn {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 1.8em;
  color: #ffffff;
  cursor: pointer;
  background-color: #000000;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

/* 彈窗表格內容 */
.modal-content .reward-table td {
  padding: 10px;
  font-size: 1.2em;
  color: #a0a0a0;
}

.modal-content .getreward td {
  color: #8354b8;
  font-weight: 600;
}

/* 彈窗投票記錄內容 */
.vote-record,
.modal-content .reward-table {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 10px;
}

/* 滾動條的寬度 */
.scroollbar::-webkit-scrollbar {
  width: 8px; /* 滾動條寬度 */
}

/* 滾動條的軌道 */
.scroollbar::-webkit-scrollbar-track {
  background: #bbb6d4; /* 軌道顏色 */
  border-radius: 10px;
}

/* 滾動條的滑塊 */
.scroollbar::-webkit-scrollbar-thumb {
  background: #9a70c4; /* 滑塊顏色 */
  border-radius: 10px;
}

/* 當滑塊被懸停時的顏色 */
.scroollbar::-webkit-scrollbar-thumb:hover {
  background: #6b4a94;
}

.vote-record .vote-day {
  margin-bottom: 15px;
}

.vote-record .vote-date {
  font-size: 1.8em;
  color: #ffffff;
  margin-bottom: 5px;
  font-weight: bold;
  text-shadow: 0 0 3px #61428f;
}

.vote-item {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.contestant {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  font-size: 1.1em;
  color: #4e4e4e;
  width: 40%;
  background-color: #fff;
  border-radius: 30px 15px;
  padding: 10px;
  height: 150px;
}

/* 人物圖片 */
.contestant-img {
  width: 60%;
  aspect-ratio: 1;
  border-radius: 20px 10px;
  overflow: hidden;
}

.contestant-vote {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.contestant-vote p {
  line-height: 20px;
}

.contestant-vote h2 {
  line-height: 30px;
}

.vote-vs {
  width: 10%;
  height: auto;
}

.crown {
  width: 40%;
  aspect-ratio: 1;
}

.vote-select {
  border: #ff6384 3px solid;
}

.winner {
  color: #ff6384;
  font-weight: bold;
}

.loser {
  color: #3f3f3f;
  font-weight: bold;
  background-color: #ddd;
}

.loser img {
  opacity: 0.7;
}

/* 按鈕樣式 */
.confirm-btn {
  margin-top: 30px;
  background-color: #000000;
  color: #ffffff;
  padding: 5px 10%;
  border: none;
  border-radius: 50px;
  font-size: 1.2em;
  cursor: pointer;
}

/* 左側對齊 */
.reward-table td:first-child,
.reward-table th:first-child {
  width: 25%;
  text-align: center;
}

/* RWD設定 */
@media (max-width: 1025px) {
  .shape-deco::before {
    height: 40vw;
    width: 40vw;
    top: 50px;
  }

  .top-gap {
    padding: 0;
  }

  .frame-top,
  .frame-body,
  .frame-bottom {
    width: 80%;
  }

  .card {
    width: 50%;
    border-radius: 35px 10px;
    padding: 10px;
  }

  .vote-content {
    gap: 4em;
  }

  .vote-content::after,
  .vote-content::before {
    width: 60%;
    height: 3em;
  }

  .vote-content {
    padding: 40px 0;
  }

  .vote-header {
    margin-bottom: 2em;
  }

  .rules-header {
    background-size: 80%;
  }

  .shape-deco {
    transform: translateX(40px);
    width: 25%;
  }
  .shape-deco > div {
    width: 100%;
  }
  .snow-deco::before {
    height: 200px;
  }

  .snow-deco::after {
    height: 87px;
    left: 80px;
    bottom: 275px;
  }
}

@media (max-width: 933px) {
  .star-deco-right {
    width: 15%;
    right: -10px;
  }

  .star-deco-left {
    bottom: 45px;
  }

  .snow-deco::before {
    height: 150px;
    right: -20px;
  }

  .snow-deco::after {
    height: 70px;
    left: 50px;
    bottom: 250px;
  }
  .vote-header .record:hover,
  .vote-header .reward:hover {
    font-size: 1em;
  }
}

@media (max-width: 769px) {
  .shape-deco::before {
    width: 25vh;
    height: 25vh;
    top: 80px;
    left: -50px;
  }

  .shape-deco {
    transform: translateX(20px);
  }

  .snow-deco::before {
    right: 7px;
  }

  .snow-deco::after {
    left: 38px;
  }
}

@media (max-width: 570px) {
  .snow-deco {
    flex-direction: column;
  }

  .snow-deco::before {
    right: -10px;
    bottom: 20px;
    height: 184px;
    width: 40px;
  }

  .snow-deco::after {
    left: 0px;
    height: 50px;
    top: 20px;
  }

  .shape-deco::before {
    width: 50vh;
    height: 50vh;
    right: 80px;
    top: -90px;
  }

  .star-deco-left {
    width: 20%;
    bottom: 120px;
    left: 0;
  }

  .image-wrapper {
    width: 90vw;
    max-width: 360px; /* 最大寬度限制 */
  }

  .main-visual {
    transform: translateY(50px);
  }

  img[src="./images/2024battle/main-title-m.png"],
  img[src="./images/2024battle/main-title-m-cn.png"],
  img[src="./images/2024battle/main-title-m-en.png"] {
  animation: fadeInAnimation 1.5s ease-in forwards;
  animation-delay: 1s;
  opacity: 0;
}


  .frame-top,
  .frame-body,
  .frame-bottom {
    width: 100%;
  }

  .frame-body {
    padding: 0 10px;
  }

  .vote-header,
  .vote-content {
    gap: 1em;
  }

  .vote-header .vs {
    width: 50px;
    height: auto;
  }

  .vote-header .record,
  .vote-header .reward {
    width: auto;
    font-size: 1em;
    padding: 0.5em 1.2em;
  }

  .card {
    width: 44%;
    border-radius: 35px 10px;
    padding: 10px;
  }

  .card h3 {
    font-size: 1.5em !important;
  }

  .card img {
    border-radius: 25px 10px;
    box-shadow: #9896ba 0px 0px 5px;
    margin-bottom: 0;
  }

  .votes {
    line-height: 12px;
    font-size: 1.3em;
  }

  .select-btn {
    font-size: 1.3em;
    padding: 0;
    letter-spacing: 3px;
  }

  .rules-container {
    margin-top: 0;
  }

  .rules-header {
    background-size: 100%;
    font-size: 1.2em;
  }

  .rules-list {
    font-size: 0.9em;
  }

  .rules-list li {
    line-height: 18px;
  }

  .reward-table th {
    padding: 4px;
    font-size: 0.9em;
  }

  .reward-table td {
    font-size: 1em;
  }

  .modal {
    width: 90%;
  }

  .modal-content .reward-table td:nth-child(2),
  .modal-content .reward-table th:nth-child(2) {
    width: 45%;
  }

  .modal-content .reward-table td:last-child,
  .modal-content .reward-table th:last-child {
    width: 25%;
  }

  .modal-content .reward-table td {
    font-size: 0.9em;
  }

  .contestant {
    min-height: 28vw;
    padding: 0;
    height: 130px;
  }

  .vote-record,
  .modal-content .reward-table {
    max-height: 370px;
  }

  .contestant-vote {
    width: 100%;
    justify-content: center;
  }

  .crown {
    width: 30%;
  }
}

@keyframes rotateYAnimation {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes slideDownAnimation {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInAnimation {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
