body {
    font-family: 'Calibri',"Arial";
		text-align: center; /* 將所有文字置中 */
		align-items: center;
		background-color: rgba(17, 74, 59, 0.89);
    margin: 0 auto;
    color: whitesmoke;
    font-size: 1.1em;
    text-shadow: 1px 1px 1px #050505c7;
    position: relative;
    width: 100%;
    overflow-x: hidden;
	}
  /* sweetalert2的彈出提示框文字*/
  .swal2-container{
    text-shadow: none;
  }
  ul{
    list-style-type: none;
    text-align: left;
  }
  li{
    margin-bottom: 6px;
  }
  img{
    display: block;
    
  }
  button {
    padding: 6px 12px;
    background-color: #38b0b9;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    z-index: 2;
  }
  button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    background-color: #aaa; /* 禁用時背景變灰色 */
  }
  .button_shadow{
    box-shadow: 1px 1px 1px 1px skyblue;
  }
	button:hover {
		opacity: 0.7;
	}
  p{
    margin: 0 0 0.5em 0;
  }
  pre{
    margin: 0 0.5em 0 0;
    white-space: pre-wrap;
    font-size: 1.1em;
    font-family: inherit;
    line-height: 1.68;
  }
.allContainer{
  display: flex; 
  justify-content: space-evenly;
  align-items: flex-start;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.bottomTextContainer{
  background-color: #ffffffbf;
  border-radius: 10px;
  position: absolute;
  left: 3.5%;
  bottom: 5.6%;
  width: 88%;
  padding: 1vw 2vw;
  color: black;
  text-shadow: none;
  font-size: calc(0.66rem + 0.5vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#downControlButton{
  border-radius: 50%;
  width: 3.9em;
  height: 3.9em;
}

#sendContainer{
    position: absolute;
    display: flex; align-items: center;
    max-width: 100%;
    bottom: 9%;
    left: 50%;
    transform: translate(-50%,-50%);
    margin: 0 auto;
    background-color: #daf7fbd9;
    padding: 0.3em 0.5em;
    border-radius: 11px;
    border: calc(0.2vw + 3px) groove powderblue;
}
  .speakbutton{
    min-width: calc(2em + 0.5vw);
    font-size: calc(1em + 0.5vw);
    border: rgba(255, 255, 255, 0.51) 0.15em ridge;
    border-radius: 10px;
    transition: 0.33s;
  }
  input[type='text']{
    padding:0.15em 0.3em;
    padding-left:10px;
    margin: 0 10px;
    border:1px solid #E7EAEC;
    width:calc(7em + 16vw);
    font-size: 1.2em;
    line-height: 1.2em;
    border-left:3px solid #3FB7EB;
    background:#FAFAFB;
    border-radius:2px;
    box-shadow: #00000085 1px 1px 2px;
  }
  #sendTextBtn1{
    background-color: blueviolet;
    box-shadow: rgb(176, 115, 233) 1px 1px 1px;
  }

  #mainPicDiv{
    aspect-ratio: 16 / 9;
    width: 100%;
    max-height: 90vh; 
    max-width: 1100px; 
    margin: 0 auto;
    position: relative; 
    overflow: hidden;
  }
  #toggleChecklogButton{
    position: absolute;
    top: 10px;
    right: 10px;
  }
  #tipsBtn{
    position: absolute;
    top: 5px;
    left: 3.5em;
    background-color: #2995fff7;
    opacity: 0;
  }
  #taskRemindBtn{
    position: absolute;
    top: 5px;
    left: 7px;
    background-color: #4aa714da;
    box-shadow:#54ae1fda 1px 1px 1px 1px;
  }
  #endGameButton{
    position: absolute;
    top: 5px;
    right: 7px;
    background-color: rgb(215, 141, 84);
    box-shadow: rgb(241, 167, 143) 1px 1px 1px 1px;
  }

  .hintText{
    text-align: left;
    position: absolute;
    top: 50px;
    padding: 8px;
    border-radius: 5px;
    max-width: 80%;
  }
  #tips{
    left: 3.5em;
    background-color: #2994ffbe;
  }
  #taskRemindText{
    left: 10px;
    background-color: #4aa714da;
  }
  #guideText{
    padding-left: 0.5em;
    text-align: left;
  }


  .conversation-history {
    max-width: 600px;
    margin: 20px auto;
    padding: 10px calc(0.5vw + 3px);
    background-color: lightgray;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /*overflow-y: auto;*/
    text-align: left;
    text-shadow: none;
    color: #000;
}
.message {
    margin: 10px 6px 10px 2px;
    padding: 10px;
    border-radius: 8px;
    max-width: 22rem;
}
.chatlogPlayButton{
  background-color: forestgreen;
}

.none{
  display: none;
}
.user {
    background-color: #d1dfff;
}
.bot {
  background-color: #eeffc2;
}
span{
  display: inline-block;
}
.tleft{
  text-align: left;
}
.tright{
  text-align: right;
}



.coverimg{
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  display: none;
}
.hide_at_first{
  visibility: hidden;
  opacity: 0;           /* 完全透明 */
  transition: opacity 0.7s linear; /* 透明度變化需要0.5秒，可見性在0.5秒後變化 */
}
.opacity1{
  opacity: 1;
  visibility: visible;
}
.shining{
  animation: shining 3s infinite ease-in-out; /* 持續時間為 3 秒，無限次重複 */
}

#rightSide{
  min-width: 380px; 
  max-width: 100vw;
  margin-top: 1rem; 
  display: none; 
  transition: 0.5s;
  position: static;
}

#showResultWordContainer{
  display: none;
  position: fixed; 
  z-index: 101;
  top: 5%; left: 50%; 
  transform: translateX(-50%); 
  padding: 20px 0 30px 0;
  border-radius: 10px;
  min-width: 20em;
  max-width: 40%;
  color: whitesmoke;
  background-color: rgba(188, 188, 188, 0.88);
}

#missionStatusWord{
    margin:0 0 5px 0;
    font-size: calc(30px + 1vw);
}
#showWord{
  font-size: calc(36px + 1vw);
  padding: 0.2em 0.5em;
  margin: 5px;
  border-radius: 10px;
}

#chatlogDiv{
  color: black;
  text-shadow: none;
}


.summaryNreviewBtn{
  margin: 3vh 2vw;
  font-size: calc(24px + 0.4vw);
  border: 2px solid white;
  justify-self: center;
}
.summaryWord, #summaryItem{
  background-color: cadetblue;
}
.reviewWord, #reviewItem{
  background-color: steelblue;
}
.bigWord{
  font-size: 1.4em;
  font-weight: 600;
}

#playAgainBtn{
  font-size: calc(28px + 1vw);
  padding: 8px 16px;
  margin: 0 8vw;
  background-color: darkgray;
}
#playAgainBtn:hover{
  background-color: dimgray;
  opacity: 1;
}

#summaryNreviewContainer{
  width: 100%;
  margin-top: 0.5rem;
  /*background-color: rgba(158, 190, 94, 0.5);*/
  border-radius: 10px;
  /*display: grid;*/
  grid-template-columns: 1fr 1fr; 
  grid-template-rows: auto auto;  /* 每行的高度由內容決定 */               
  justify-self: center;
  position: relative;
}


.item{
  padding: 20px 30px;
  margin: 2px 5px;
  border-radius: 20px;
  visibility: hidden;
}

#genieDiv{
  position: fixed;
  bottom: 0px;
  right: 0px;
  z-index: 2;
  width: calc(55px + 0.5vw);
  height: calc(55px + 0.5vw);
  display: none;
}
#genieBtn{
  background-image: url(asset/img/help.png);
  background-size: cover;
  background-color: unset;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 0.9px rgb(234, 234, 73));
}
#genieBtn:hover + #genieText{
  display: inline-block;
  opacity: 1 !important;
}
#genieText{
  position: absolute;
  opacity: 0;
  transition: 0.25s;
  bottom: 1rem;
  right: 3rem;
  width: max-content;
  max-width: calc(24vw + 12rem);
  background-color: rgba(57, 57, 57, 0.4);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: calc(15px + 0.1vw);
  text-align: justify;
}
.none{
  display: none;
}
#gameSelecter{
  display: flex; 
  justify-content: space-evenly;
  align-items: center;
  background-color: darkslategrey;
  padding: 3px 0;
}
#gameSelecter > button{
  padding: 8px;
  flex-grow: 1;
  font-size: calc(1.1rem + 0.5vw);
  border-radius: unset;
  background-color: darkslategrey;
}
#gameSelecter button:not(:last-child) {
  border-right: whitesmoke 2px solid;
}
#gameSelecter > button.active{
  background-color: rgb(7, 168, 169);
  opacity: 1;
}
#whoIsSpeaking{
  display: flex;
  align-items: center;
  width: 90%;
  padding: 5px 0 5px 10%;
  position: absolute;
  bottom: 0;
  text-align: left;
  background-color: rgba(245, 245, 245, 0.7);
}
#whoIsSpeaking > *{
  margin-right: calc(10px + 1vw);
}
#npcText{
  text-shadow: none;
  color: #000;
}

/* 定義閃爍動畫 */

@keyframes shining{
  0% {
    filter: drop-shadow(0 0 1px rgba(234, 234, 73));
  }
  50% {
    filter: drop-shadow(0 0 0.2rem rgb(255, 250, 96));
  }
}
#textInput:focus {
  outline: none;
  box-shadow: 0 0 0 0.15em rgb(98, 43, 226);
}

#npcHead, #npcSpeaking{
  width: calc(30px + 2.7vw);
  transition: 0.3s ease-in-out;
}
#npcHead{
  border-radius: 50%;
}

.loader26 {
  display: flex;
}

.loader26 div {
  width: calc(10px + 0.5vw);
  height: calc(10px + 0.5vw);
  border-radius: 100%;
  opacity: 0;
  margin: 6px;
  background-color: rgb(1, 66, 66);
}

.loader26 div:nth-child(1) {
  animation: loader26-animation 1s ease-in-out infinite;
}

.loader26 div:nth-child(2) {
  animation: loader26-animation 1s ease-in-out 0.33s infinite;
}

.loader26 div:nth-child(3) {
  animation: loader26-animation 1s ease-in-out 0.66s infinite;
}

@keyframes loader26-animation {
  0%,
  100% {
    opacity: 1;
  }

  60% {
    opacity: 0;
  }
}

@media (max-width: 1023.9px) {
  body{
    font-size: 1rem;
  }
  h1{
    margin: 2.5rem 0 1.68rem 0;
  }
  #whoIsSpeaking{
    padding: 5px 0 5px 3%;
    width: 97%;
  }
}

@media (max-width: 575.9px) {
  #mainPicDiv{
    padding-top: 46px;
    background-color: rgba(255, 255, 255, 0.15);
  }
  .bgimg{
    padding-top: 46px;
  }
  #tips{
    right: 10px;
    max-width: 90vw;
  }
  #sendContainer{
    bottom: calc(-2vw - 4.8rem);
  }
  #rightSide{
    margin-top: 3.8em;
    min-width: auto;  
  }
  #summaryNreviewContainer {
      grid-template-columns: 1fr;
  }
  .summaryWord {
    order: 1; 
  }
  #summaryItem {
    order: 2; 
  }
  .reviewWord {
    order: 3; 
  }
  #reviewItem {
    order: 4; 
  }
}


#genieDiv_open{
  max-height: 80vh;
  overflow-y: auto;
  transition: 0.3s ease-in-out;
  background-color: rgb(108, 158, 200);
  border-radius: 10px;
  width: calc(300px + 10vw);
  position: fixed;
  bottom: calc(50px + 0.8vw);
  right: 1vw;
  z-index: 2;
  padding: 15px;
  box-shadow: rgba(0, 0, 0, 0.5) 1px 1px 5px;
}

.fade-in {
  animation: fadeIn 0.5s ease forwards; /* 2秒淡入 */
}
.fade-out {
  animation: fadeOut 0.5s ease forwards; /* 2秒淡入 */
}

@keyframes fadeIn {
  from { opacity: 0; } 
  to { opacity: 1; }   
}
@keyframes fadeOut {
  from { opacity: 1; } 
  to { opacity: 0; }   
} 

/*底下為toggle按鈕*/
.btn-box {
  display:inline-block;
  width: 40px;
  height: 20px;
  border-radius:100px;
  background-color: #eae3dfc2;
  vertical-align: middle;
  box-shadow: 0px 3px 0px rgba(0,0,0,.13) inset;
  transition: .5s;
}
.btn-box .btn {
  display:inline-block;
  width: 20px;
  height: 20px;
  border-radius:50%;
  background-color: #ffffff;
  margin-left: 0;/*動畫從ml為0開始*/
    transition: .5s;
    box-shadow:1px 2px 5px rgba(0,0,0,.3);
}
.checkbox:checked + .btn-box .btn {
  margin-left: 20px;
}
.checkbox:checked + .btn-box {
  background-color: dodgerblue;
  transition: .5s;
}

.checkbox {
  position:absolute;
  opacity: 0;
}
#volumeSliderDiv {
    display: none;
    margin: auto;
    width: 280px;
    background-color: lightgray;
    position: fixed; /* 改為 fixed 定位 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 置中 */
    padding: 20px; /* 增加內邊距 */
    border-radius: 10px; /* 圓角邊框 */
    z-index: 100; /* 確保在最上層 */
    line-height: 2.8;
  }

  #volumeButton {
    position: fixed;
    bottom: 2px;
    left: 2px;
    z-index: 10;
    background-color: unset;
  }

  #BGMvolumeSlider, #clickVolumeSlider {
    width: 150px;
  }
#volumeCloseButton{
  position: absolute;
  top: 0;
  right: 0;
  background-color: unset;
    color: orangered;
    font-weight: 700;
    font-size: larger;
}
  /* 新增一個遮罩層的樣式 */
  #overlay {
    display: none; /* 初始隱藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色 */
    z-index: 99; /* 在音量控制面板之下 */
  }
  .bgimg{
  position: absolute;
  top: 0;
  left: 0;
  z-index: -2;
}
.moving-car {
    position: absolute;
    /*animation-name: moveRight;
    animation-duration: 11s; /* 動畫時長，可按需調整 
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite; /* 持續不停地重復動畫 */
    animation: moveRight 16s ease-in infinite, verticalBounce 0.8s linear infinite;
}

@keyframes moveRight {
    from {
        left: -80%;
    }
    to {
        left: 100%; /* 從左邊開始，移動到右邊 */
    }
}

@keyframes verticalBounce {
    0%, 100% {
        top: 0px;
    }
    50% {
        top: 2px; /* 根據需要調整此值，代表車輛在移動中的最大垂直偏移 */
    }
}
.bgdodgerblue{
  background-color: dodgerblue;
}
.blur16{
  filter: blur(16px);
}
.bg-red{
  background-color: red !important;
}
#genieReply{
  margin: 10px 0; 
  font-family: '微軟正黑體'; 
  text-align: left;
}
#genieReply p {
  display: inline;
}