*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


* {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  outline: none;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 100%;
  line-height: 1.5;
}

*:active,
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

body {
  font-family: Arial, sans-serif;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100svh;
  /* aspect-ratio: 9 / 16; */
  width: 56.221889055vh;
  max-width: 100%;
}


body {
  height: 100%;
  width: 100%;
  display: flex;
  justify-self: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
}

.step1,
.step2,
.game1-result,
.game3-result {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}


.step1-games {
  position: absolute;
  width: 30%;
  height: 9%;
  top: 24%;
}

.step1-info {
  position: absolute;
  width: 61%;
  height: 11%;
  top: 34%;
}

.step1-news {
  position: absolute;
  width: 32%;
  height: 7%;
  top: 46%;
}

.step2-game1-btn {
  position: absolute;
  width: 78%;
  height: 13%;
  top: 26%;
}

.step2-game2-btn {
  position: absolute;
  width: 78%;
  height: 13%;
  top: 41%;
}

.step2-game3-btn {
  position: absolute;
  width: 78%;
  height: 10%;
  top: 56%;
}

.step2-go-back {
  position: absolute;
  width: 23%;
  height: 5%;
  bottom: 9%;
  right: 6%;
}

.game1-result-download {
  position: absolute;
  width: 31%;
  height: 7%;
  top: 67%;
  left: 18%;
}

.game1-result-replay {
  position: absolute;
  width: 31%;
  height: 7%;
  top: 67%;
  right: 18%;
}

.game1-result-to-game2 {
  position: absolute;
  width: 64%;
  height: 7%;
  top: 75%;
}

.game1-result-menu {
  position: absolute;
  width: 64%;
  height: 7%;
  top: 82%;
}

.game3-result-share {
  position: absolute;
  height: 6%;
  width: 30%;
  bottom: 11%;
  left: 4%;
}

.game3-result-replay {
  position: absolute;
  height: 6%;
  width: 30%;
  bottom: 11%;
}

.game3-result-menu {
  position: absolute;
  height: 6%;
  width: 30%;
  bottom: 11%;
  right: 4%;
}

.step2-game1-finish {
  position: absolute;
  width: 20%;
  top: 24%;
  right: 6%;
}

.step2-game2-finish {
  position: absolute;
  width: 20%;
  top: 39%;
  right: 6%;
}

.result-pic {
  position: absolute;
  width: 56%;
  aspect-ratio: 9 / 16;
  top: 3%;
  border: 4px solid black;
}

.switch-camera-btn {
  position: absolute;
  right: 6%;
  top: 18%;
  width: 16%;
}

.capture-btn {
  position: absolute;
  bottom: 11%;
  width: 32%;
  left: 33%;
}

.links-modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.links-modal-wrapper {
  position: relative;
  width: 80%;
}

.links-modal-close {
  position: absolute;
  width: 15%;
  height: 13%;
  right: 0;
}

.links-modal-link1 {
  position: absolute;
  bottom: 57%;
  height: 17%;
  width: 62%;
  left: 18%;

}

.links-modal-link2 {
  position: absolute;
  bottom: 32%;
  height: 17%;
  width: 62%;
  left: 18%;
}

.links-modal-go-back {
  position: absolute;
  bottom: 0;
  height: 12%;
  width: 36%;
  left: 32%;
}

.event-info {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;
  background-color: #dbeff6;
}

.event-list {
  display: flex;
  align-items: center;
  position: absolute;
  top: 18%;
  flex-direction: column;
  gap: 2rem;
}

.desktop-event-list {
  display: flex;
  align-items: center;
  flex-direction: column;
  flex-grow: 1;
  padding: 5%;
  gap: 2rem;
  overflow: auto;
}

.event-item {
  position: relative;
  width: 80%;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.desktop-event-item {
  position: relative;
  width: 80%;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.event-item-btn {
  position: absolute;
  right: 0%;
  width: 10%;
  top: 6%;
  padding: 2% 2% 2% 90%;
  box-sizing: content-box;
}

.event-item-btn img {
  transform: rotate(180deg);
}

.desktop-event-item-btn {
  position: absolute;
  right: 0%;
  width: 10%;
  top: 6%;
  padding: 1% 0% 2% 90%;
  box-sizing: content-box;
}

.desktop-event-item-btn img {
  transform: rotate(180deg);
  width: 70%;
}


.news-title {
  position: absolute;
  top: 23%;
  font-size: 1rem;
  color: white;
  left: 6%;
  width: 80%;
  text-wrap-mode: nowrap;
  overflow: auto;
}

.desktop-news-title {
  position: absolute;
  top: 23%;
  font-size: 3vh;
  color: white;
  left: 6%;
  width: 80%;
  text-wrap-mode: nowrap;
  overflow: auto;
}

.news-header {
  position: relative;
  z-index: 2;
}

.desktop-news-header {
  position: relative;
  z-index: 2;
  width: 80%;
}

.news-content {
  width: 90%;
  margin-top: -2%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.1s ease;
  background-image: url(assets/%E5%85%A7%E6%96%87_1@2x.png);
  background-size: 100% 193px;
}

.news-content.expanded {
  max-height: 193px;
  overflow: scroll;
  padding: 15px;
  /* 根據實際內容高度調整 */
}

.desktop-news-content{
  transition: max-height 0.1s ease;
  background-image: url(assets/%E5%85%A7%E6%96%87_1@2x.png);
  background-size: 100% 500px;
}


.desktop-news-content.expanded{
  overflow: scroll;
      height: 500px;
      padding: 25px;
}

.desktop-news-content {
  width: 70%;
  margin-top: -2%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.1s ease;
}

.desktop-news-content.expanded {

  max-height: 1000px;
  /* 根據實際內容高度調整 */
}


.event-item-btn.rotated img {
  transform: rotate(0deg);
  /* 點擊後旋轉回來 */
  transition: transform 0.1s ease;
}

.desktop-event-item-btn.rotated img {
  transform: rotate(0deg);
  /* 點擊後旋轉回來 */
  transition: transform 0.1s ease;
}


.desktop-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;

  height: 100%;
  /* width: 100%; */
  max-height: 100%;
  max-width: 100%;
}

.desktop-wrapper-bg {

}

.desktop-step1 {
  position: relative;
}

.desktop-step2 {
  max-height: 100%;
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  background-color: #dbeff6;

}

.desktop-footer {
  position: absolute;
  bottom: 0;
}

.desktop-btn1 {
  position: absolute;
  width: 13%;
  height: 10%;
  top: 44%;
  right: 28%;
}

.desktop-btn2 {
  position: absolute;
  width: 19%;
  height: 13%;
  top: 57%;
  right: 25%;
}

.desktop-btn3 {
  position: absolute;
  width: 12%;
  height: 10%;
  top: 71%;
  right: 28%;
}

.qrcode-modal {
  height: 100%;
  width: 100%;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);

}

.qrcode-modal-wrapper {
  width: 60%;
  position: relative;
}

.qrcode-modal-go-back {
  position: absolute;
  width: 15%;
  height: 13%;
  left: 0;
}


.qrcode-modal-close {
  position: absolute;
  width: 11%;
  height: 15%;
  right: 0;
  top: 0;
}

.qrcode-modal-go-back {
  position: absolute;
  width: 20%;
  height: 9%;
  left: 40%;
  bottom: 1%;
}

.desktop-links-modal {
  height: 100%;
  width: 100%;
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);

}

.desktop-links-modal-wrapper {
  width: 60%;
  position: relative;
}

.desktop-links-modal-close {
  position: absolute;
  width: 11%;
  height: 13%;
  right: 0;
  top: 0;
}

.desktop-links-modal-go-back {
  position: absolute;
  bottom: 0;
  height: 12%;
  width: 20%;
  left: 40%;
}

.desktop-link1-btn {
  position: absolute;
  width: 43%;
  height: 19%;
  top: 27%;
  left: 29%;
}

.desktop-link2-btn {
  position: absolute;
  width: 43%;
  height: 19%;
  top: 53%;
  left: 29%;
}

.event-info-go-back-btn {
  position: absolute;
  width: 32%;
  bottom: 14%;
}

.desktop-event-info-go-back-btn {
  width: 15%;
  margin-top: 5%;
}

.hidden {
  display: none;
}

.loading, .loadingImg{
  z-index: 999;
  width: 100%;
  height: 100%;
  position: absolute;
}
