/*關卡頁面樣式TODO:*/

/************************RWD-手機優先(479.99px以下)**********************/

/*****top bar*****/
/*top bar 主容器*/
#level_header_container{
    box-sizing: border-box;
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 9.35vh;
    min-height: 50px;
}

/*top bar子容器*/
#level_header_sub_container{
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 87.2%;
    height: auto;
}

/*top bar子容器的子容器*/
#level_header_sub_container > div{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/*關閉按鈕*/
#level_close_btn{
    display: inline-block;
    width: fit-content;
    height: 1rem
}

#level_close_btn:active{
    cursor: pointer;
    transition: transform 0.15s ease;
    transform: scale(0.95);
}

#level_header_container img{
    display: inline-block;
    width: 1rem;
    height: auto;
}

/*進度條容器*/
#level_progress_bar_container{
    display: inline-block;
    width: calc(100% - 1rem - 15px); /*扣掉icon和間距*/
    height: 0.5rem;

    background-color: #E9E9E9;
    border-radius: 20px;
}

#level_progress_bar_sub_container{
    background-color: #50B5B9;
    border-radius: 20px;
    height: 100%;
    width: 0%;
}


/*****共用*****/
/*題目主容器*/
.level_content_container{
    box-sizing: border-box;
    position: absolute;
    right: 0;
    left: 0;
    margin-left: auto;
    margin-right: auto;
    top: max(9.35vh, 50px);
    width: calc(100vw - 4.53vw - 4.53vw);
    /*高度最後扣掉的2rem是內容跟按鈕的距離*/
    height: calc(100vh - max(9.35vh, 50px) - 50px - max(2rem, calc(15vh * 0.35)) - 2rem);
    overflow-y: auto;
    overflow-x: hidden;

    padding-top: max(20px, 2.5vh);
}

/*題目標題*/
#level_vocabulary_title, #level_connect_title{
    padding-top: max(20px, 2.5vh);
    padding-bottom: max(20px, 2.5vh);
}

/***問題區***/
/*問題的容器*/
.level_question_container{
    box-sizing: border-box;
    position:relative;
    width: 100%;
    height: calc(18.47vh + max(40px, 5vh));
    min-height: 125px;

    display: flex;
}

/*問題區的角色圖片*/
.level_question_container > img{
    position: absolute;
    height: 100%;
    left: 0;
    bottom: 0;
}

/*問題區的角色影片*/
.level_video_container{
    /* margin-left: 7%; */
    aspect-ratio: 1 / 1;  
    /* height: 100%; */
    height: 60%;

    border: 2px solid #50B5B9;
    border-radius: 50%;
    overflow: hidden;
    transform: translateY(25%);
}

/*問題區的角色影片*/
.level_video_container > video{
    /* position: absolute; */
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: 50% 18%; 
    /* left: 7%; */
    /* bottom: 0; */
    
}

.level_question_content_container{
    padding-left: 5%;
}

/*問題區的標題*/
.level_question_content_container > h1{
    padding-top: max(10px, 1.25vh);
}

/*問題區的播放容器*/
.level_voice_container{
    box-sizing: border-box;
    /* position: absolute; */
    /* left: 70%; */
    /* top: 18%; */
    /* transform: translateX(-50%); */
    padding: 0.4rem 1.5rem 1rem 1.25rem;
    margin-top: 8px;

    display: flex;
    gap: 0.35rem;

    background-image: url('../images/svg/level_question_bg.svg');
}

/*問題區的文字容器*/
.level_text_container{
    box-sizing: border-box;
    /* position: absolute; */
    /* left: 50%; */
    /* top: 18%; */
    /* transform: translateX(-50%); */
    padding: 0.4rem 0.5rem 1.5rem 0.5rem;
    margin-top: 8px;

    background-image: url('../images/svg/level_question_bg.svg');
}

/*問題區的播放按鈕*/
#level_sentence_voice{
    /*調整icon位置*/
    display: flex;
    align-items: center;
}

#level_sentence_voice:active{
    cursor: pointer;
    transition: transform 0.15s ease;
    transform: scale(0.9);
}

/*問題區的播放按鈕icon*/
#level_sentence_voice > img{
    width: 1.25rem;
    height: auto;
}

/*問題區的音檔播放特效*/
.level_voice_effect{
    height: 2rem;
    width: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level_voice_effect > div{
    background-color: #FFFFFF;
    height: 100%;
    width: 5%;
    border-radius: 10px;
}

.level_voice_effect > div:nth-child(5n) {
    animation: radius-animation .6s ease infinite alternate;
    animation-delay: -0.1s;
    animation-play-state: paused
}

.level_voice_effect > div:nth-child(5n+1) {
    animation: radius-animation .75s ease infinite alternate;
    animation-delay: -1s;
    animation-play-state: paused
}

.level_voice_effect > div:nth-child(5n+2) {
    animation: radius-animation .93s ease infinite alternate;
    animation-delay: -0.4s;
    animation-play-state: paused
}

.level_voice_effect > div:nth-child(5n+3) {
    animation: radius-animation .67s ease infinite alternate;
    animation-delay: -0.3s;
    animation-play-state: paused
}

.level_voice_effect > div:nth-child(5n+4) {
    animation: radius-animation .7s ease infinite alternate;
    animation-delay: -0.8s;
    animation-play-state: paused
}

.level_voice_effect.playing > div{
    animation-play-state: running !important;
}

@keyframes radius-animation {
    0% { height: 100%; }
    100% { height: 10px;}
}

/*問題區的水平條*/
.level_question_hr{
    position: absolute;
    width: 90%;
    left: 5%;
    bottom: 0;
    height: 0.4rem;
    z-index: -99;

    background-color: rgba(64, 217, 222, 0.50); 
    border-radius: 10px;
}

/***回答區***/
/*回答區的容器*/
.level_answer_container{
    margin-top: 2rem;
    box-sizing: border-box;
    position:relative;
    width: 100%;
    /* height: 14.78vh; */
    height: auto;
    /* min-height: 100px; */

    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex-direction: row;
    overflow: hidden;
}

/*回答的選項*/
.level_answer_container > p{
    background-color: #FFF;
    border-radius: 30px;
    border: 1.5px solid #DCDCDC;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
    padding: 0.5rem 1.5rem;
    margin: 0 0 0.5rem 0;
    height: fit-content;
    width: fit-content;
    position: relative;
}

/*回答的選項-裝飾排版用*/
#level_sentence_answer_composition, #level_translate_answer_composition{
    background-color: transparent !important;
    border: transparent !important;
    color: transparent !important;
    box-shadow: none !important;
}

/*畫底線 (排除裝飾元素)*/
.level_answer_container > p.row-start:not(#level_sentence_answer_composition)::after,
.level_answer_container > p.row-start:not(#level_translate_answer_composition)::after{
    content: '';
    position: absolute;
    left: 0;
    width: 100vw;
    height: 2px;
    background-color: #A1A1A1;
    bottom: 0;
    transform: translateY(0.6rem);
}

.level_answer_container > p:not(#level_sentence_answer_composition):active,
.level_answer_container > p:not(#level_translate_answer_composition):active{
    cursor: pointer;
}

/*畫底線 (裝置元素)*/
#level_sentence_answer_composition::after,
#level_translate_answer_composition::after{
    content: '';
    position: absolute;
    left: 0;
    width: 100vw;
    height: 2px;
    background-color: #A1A1A1;
    bottom: 0;
    transform: translateY(0.55rem);
}


/***選項區***/
/*選項區的容器*/
.level_option_container{
    margin-top: 2rem;
    box-sizing: border-box;
    position:relative;
    width: 100%;
    /*height: 14.78vh;*/
    height: auto;
    /* min-height: 100px; */

    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex-direction: row;

    /* padding-bottom: 20rem; */
}

/*選項*/
.level_option_unselected{
    background-color: #FFF;
    border-radius: 30px;
    border: 1.5px solid #DCDCDC;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
    padding: 0.5rem 1.5rem;
    margin: 0;
    height: fit-content;
    width: fit-content;
}

.level_option_unselected:active{
    cursor: pointer;
}

/*選項已選擇*/
.level_option_selected{
    background-color: #E9E9E9;
    border-radius: 30px;
    border: 1.5px solid #E9E9E9;
    box-shadow: 0px 2px 0px 0px #E9E9E9;
    padding: 0.5rem 1.5rem;
    margin: 0;
    height: fit-content;
    width: fit-content;
}

/***送出按鈕區***/
/*容器-檢查、下一題、錯誤*/
.level_check_btn_container, .level_submit_btn_container, .level_error_btn_container{
    box-sizing: border-box;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: auto;
    z-index: 99;
}

.level_check_btn_container{
    background-color: transparent;
    /* backdrop-filter: blur(6px); 模糊背景 */
}

.level_check_btn_container > button:active,
.level_submit_btn_container > button:active,
.level_error_btn_container > button:active{
    cursor: pointer;
    /* transition: transform 0.15s ease;
    transform: scale(0.95);
    box-shadow: unset; */
}

/*按鈕-檢查*/
.level_check_btn_container > button{
    display: block;
    margin: 0 auto max(2rem, calc(15vh * 0.35)) auto;
    height: 50px;
    width: 90%;

    background-color: #50B5B9;
    border: #399DA0 1px solid;
    border-radius: 30px;
    box-shadow: 0px 4px 0px 0px #399DA0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.level_check_btn_container > button.disabled {
    pointer-events: none;
    user-select: none;

    background-color: #DADADA;
    box-shadow: 0px 4px 0px 0px #CACACA;
    border: unset;
}

.level_check_btn_container > button.disabled > p{
    color: #999999
}

/*題目的下內距*/
#level_sentence_option_container{
    padding-bottom: 50px;
}
#level_vocabulary_option_container{
    /*單字題由JS生成*/
}
#level_translate_option_container{
    padding-bottom: 50px;
}
#level_connect_content{
    padding-bottom: 50px;
}
#level_blank_option_container{
    padding-bottom: 50px;
}
#level_listening_option_container{
    padding-bottom: 50px;
}

/*容器-下一題*/
.level_submit_btn_container{
    background-color: #aeecef;
}

.level_submit_btn_container::before{
    content: "";
    background-color: #aeecef;
    position: absolute;
    top: 0;
    left: 50%;
    border-radius: 200%;
    width: 115vw;
    height: 5rem;
    transform: translate(-50%, -2.5rem);
    z-index: -1;
}

/*按鈕-下一題*/
.level_submit_btn_container > button{
    display: block;
    margin: 0 auto max(2rem, calc(15vh * 0.35)) auto;
    height: 50px;
    width: 90%;

    border-radius: 30px;
    background-color: #D57627;
    box-shadow: 0px 4px 0px 0px #92282D;
    border: unset;

    display: flex;
    align-items: center;
    justify-content: center;
}

/*容器-錯誤*/
.level_error_btn_container{
    background-color: #ffd0d1;
}

.level_error_btn_container::before{
    content: "";
    background-color: #ffd0d1;
    position: absolute;
    top: 0;
    left: 50%;
    border-radius: 200%;
    width: 115vw;
    height: 5rem;
    transform: translate(-50%, -2.5rem);
    z-index: -1;
}

/*按鈕-錯誤*/
.level_error_btn_container > button{
    display: block;
    margin: 0 auto max(2rem, calc(15vh * 0.35)) auto;
    height: 50px;
    width: 90%;

    border-radius: 30px;
    background-color: #EC494C;
    box-shadow: 0px 4px 0px 0px #92282D;
    border: unset;

    display: flex;
    align-items: center;
    justify-content: center;
}

/*正確錯誤訊息*/
.level_btn_message{
    display: flex;
    gap: 0.1rem;

    padding-bottom: 0.5rem;
    width: calc(90% * 0.9);
    margin-left: auto;
    margin-right: auto;
}

.level_error_btn_container > h5{
    width: calc(90% * 0.9);
    margin-left: auto;
    margin-right: auto;
}

.level_btn_message_answer{
    width: calc(90% * 0.9);
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0.7rem;
}

/*單字題型的背景*/
#level_vocabulary_bg{
    position: fixed;
    width: 100vw;
    height: 100vh;
    left: 0;
    top: 0;
    background-color: #FFFFFF;
    z-index: -99;
}

.vocabulary_bg_sola {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(64, 217, 222, 0.30);
    z-index: -98;
}

.vocabulary_bg_grass{
    /* width: 100vw;
    height: auto;
    max-height: 70vh;
    position: absolute;
    bottom: 0;
    z-index: 98; */
    position: absolute;
    width: 100vw;
    height: 55vh;
    left: 0;
    bottom: 0;
    z-index: -98;
}

#vocabulary_cloud1{
    position: absolute;
    z-index: -98;
    width: min(18vw, 5rem);
    height: auto;
    top: 35vh;
    right: 20vw;
}

#vocabulary_cloud2{
    position: absolute;
    z-index: -98;
    width: min(18vw, 5rem);
    height: auto;
    top: 17vh;
    right: 0;
}

#vocabulary_cloud3{
    position: absolute;
    z-index: -98;
    width: min(18vw, 5rem);
    height: auto;
    top: 25vh;
    left: 0;
}

/*單字題型的問題區*/
.level_vocabulary_voice_container{
    box-sizing: border-box;
    position: relative;
    width: fit-content;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;

    background-color: #A0ECEF;
    border: 1px solid #50B5B9;
    border-radius: 5px;

    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/*單字題型的問題區按鈕*/
#level_vocabulary_voice, #level_balloon_voice{
    display: flex;
    align-items: center;
}

#level_vocabulary_voice:active, #level_balloon_voice:active{
    cursor: pointer;
    transition: transform 0.15s ease;
    transform: scale(0.9);
}

/*問題區的播放按鈕icon*/
#level_vocabulary_voice > img, #level_balloon_voice > img{
    width: 2rem;
    height: auto;
}

/*問題區的音檔播放特效svg*/
.level_vocabulary_voice_container > img{
    height: 2rem;
    width: auto;
}

/*單字選項區*/
.level_vocabulary_option_container{
    box-sizing: border-box;
    position: relative;
    height: 0;
}

/*單字題-選項*/
#level_vocabulary_option1_container,
#level_vocabulary_option2_container,
#level_vocabulary_option3_container{
    position: relative;
    width: 40%;
    aspect-ratio: 559/561;
}

.level_mole_hidden_container {
    position: absolute;
    width: 100%;
    height: 90%;
    overflow: hidden;
    top: 0;
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

.level_mole_container {
    width: 100%;
    aspect-ratio: 559/561;
    transform: translateY(75%);
    animation-name: mole_move;
    animation-iteration-count: infinite;
}

.level_mole_after {
    position: absolute;
    width: 100%;
    top: 0;
    z-index: -1;
    user-select: none;
    pointer-events: none;
}

.level_mole_before {
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 2;
    user-select: none;
    pointer-events: none;
}

.level_mole_btn {
    pointer-events: auto;
    cursor: pointer;
    position: absolute;
    left: 30.982%;
    width: 43%;
    top: 4.1%;
    aspect-ratio: 95 / 57;
}

.level_mole_btn p {
    pointer-events: none;
}

.level_mole_btn.success p{
    color: #2e9e4b;
}

.level_mole_btn.wrong p{
    color: #cc3d3d;
}

#level_vocabulary_option2_container{
    margin-left: auto;
    transform: translateY(-40%);
}

#level_vocabulary_option3_container{
    transform: translateY(-80%);
}

#level_vocabulary_option1_container img,
#level_vocabulary_option2_container img,
#level_vocabulary_option3_container img{
    width: 100%;
}

@keyframes mole_move {
    0% {
      transform: translateY(75%);
    }
    20% {
      transform: translateY(0%);
    }
    80% {
      transform: translateY(0%);
    }
    100% {
      transform: translateY(75%);
    }
  }

/*連連看容器*/
.level_connect_conten_box {
    margin-top: 3rem;
    padding-left: 10%;
    padding-right: 10%;
}

#level_connect_content_container{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    box-sizing: border-box;
}

#level_connect_content_container div {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 40%;
}

#level_connect_content_container button{
    width: 100%;
    border-radius: 5px;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#level_connect_content_container button:active{
    cursor: pointer;
}

.connect_btn_unselected{
    border: 1.5px solid #DCDCDC;
    background: #FFF;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
}

.connect_btn_selected{
    border: 1.5px solid #50B5B9;
    background: rgba(64, 217, 222, 0.30);
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
}

.connect_btn_error{
    border: 1.5px solid #EC494C;
    background: rgba(255, 83, 86, 0.30);
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
}

.level_connect_line {
    position: absolute;
    height: 2px;
    background-color: #666666;
    transform-origin: left center;
}

/*鼓勵文本*/
#level_encourage_text{
    width: 80%;
    margin: 0 auto;
    padding: 0.5rem 1rem 1.5rem 1rem;
    text-align: center;

    background-image: url('../images/svg/level_message.svg');
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/*鼓勵圖片*/
#level_encourage_video{
    width: 80%;
    display: block;
    margin: 0 auto 0 auto;
    position: relative;
    z-index: -1;
}

/*訊息按鈕*/
.level_message_btn_container{
    box-sizing: border-box;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: auto;
    z-index: 99;
}

/*訊息頁下距*/
.message_page_padding_bottom{
    height: calc(max(3rem, calc(15vh * 0.4)) + max(6.15vh, 50px) + 2rem);
}

/*按鈕-檢查*/
.level_message_btn_container > button{
    display: block;
    margin: 0 auto max(2rem, calc(15vh * 0.35)) auto;
    height: 50px;
    width: 90%;

    background-color: #50B5B9;
    border: #399DA0 1px solid;
    border-radius: 30px;
    box-shadow: 0px 4px 0px 0px #399DA0;

    display: flex;
    align-items: center;
    justify-content: center;
}

/*填空*/
/*問題區的播放按鈕*/
#level_blank_voice{
    /*調整icon位置*/
    display: flex;
    align-items: center;
}

#level_blank_voice:active{
    cursor: pointer;
    transition: transform 0.15s ease;
    transform: scale(0.9);
}

/*問題區的播放按鈕icon*/
#level_blank_voice > img{
    width: 1.25rem;
    height: auto;
}

/*填空題選項*/
#level_blank_option_container{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;

    padding-top: 10vh;
}

#level_blank_option_container > button{
    width: 100%;
    border-radius: 30px;
    padding: 0.5rem 0;
}

#level_blank_option_container > button:active{
    cursor: pointer;
}

.level_blank_btn_style{
    border: 1.5px solid #DCDCDC;    
    background: #FFF;
    box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.10);
}

.level_blank_btn_style_selected{
    border: 1.5px solid #50B5B9;
    background: rgba(64, 217, 222, 0.30);
    box-shadow: 0px 2px 0px 0px #50B5B9;
}

/*聽力問題*/
#level_listening_question_container .level_voice_container{
    left: 60%;
}


/*聽力選項*/
#level_listening_option_container{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;

    padding-top: 10vh;
}

#level_listening_option_container > button{
    width: 100%;
    border-radius: 30px;
    padding: 0.5rem 0;
}

#level_listening_option_container > button:active{
    cursor: pointer;
}

/*氣球*/
#level_balloon_container {
    pointer-events: none;
}

#level_balloon_bg {
    width: 100%;
    height: calc(100vh - max(50px, 9.35vh) - max(125px, calc(18.47vh + max(40px, 5vh))));
    position: fixed;
    /* position: relative; */
    overflow: hidden;
    /* top: 0; */
    bottom: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    z-index: -99;
    /* transform: translate(-50%, 0); */
}

.balloon_bg {
    position: absolute;
    top: 0;
    min-height: 100%;
    height: 100%;
    /* width: auto; */
    width: 100%;
    z-index: 1;
    object-fit: cover;
}

.grass-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    background-repeat: repeat-x;
    background-size: contain; /* 或 cover，依你需求 */
    background-position: bottom left; /* 或 center、top 等 */
    background-size: auto 100%;
    animation: bg-scroll 80s linear infinite;
    aspect-ratio: 2000/723;
    height: 100%;
    width: 100%;
    flex-shrink: 0;
    z-index: 10;
    pointer-events: none;
  }

  @keyframes bg-scroll {
    from {
      background-position-x: 0;
    }
    to {
      background-position-x: calc(calc(calc(100vh / 723) * 2000) * -1); /* 根據圖案寬度與節奏調整 */
    }
  }
  
  .balloon_shadow {
    position: absolute;
    bottom: -100px;
    animation-name: rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    z-index: 2;
  }

  .balloon_shadow:nth-child(6n) {
    left: 10%;
    width: 80px;
    animation-duration: 53s;
    animation-delay: 0s;
  }

  .balloon_shadow:nth-child(6n+1) {
    left: 30%;
    width: 120px;
    animation-duration: 18s;
    animation-delay: 3s;
  }

  .balloon_shadow:nth-child(6n+2) {
    left: 50%;
    width: 100px;
    animation-duration: 16s;
    animation-delay: 1.5s;
  }

  .balloon_shadow:nth-child(6n+3) {
    left: 70%;
    width: 90px;
    animation-duration: 20s;
    animation-delay: 5s;
  }

  .balloon_shadow:nth-child(6n+4) {
    left: 85%;
    width: 70px;
    animation-duration: 30s;
    animation-delay: 12s;
  }

  .balloon_shadow:nth-child(6n+5) {
    left: 40%;
    width: 110px;
    animation-duration: 40s;
    animation-delay: 6s;
  }

  #level_balloon_quest_container {
    height: 100%;
    width: 100%;
    position: relative;
    z-index: 3;
  }
  
  .balloon_option {
    position: absolute;
    bottom: 0;
    animation-name: rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: 15s;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    z-index: 999;
  }

  .balloon_option > img {
    position: absolute;
    z-index: 0;
    user-select: none;
  }

  .balloon_option > .tag {
    position: absolute;
    top: -50px;
    left: calc(50% - 20px);
    height: 40px;
    width: 40px;
    display: none;
    /* z-index: 999; */
  }

  .balloon_option.success > .tag.success {
    display: block;
  }

  .balloon_option.wrong > .tag.wrong {
    display: block;
  }

  .balloon-text {
    background-color: #FFFFFF;
    font-size: 24px;
    font-weight: 600;
    color: #50B5B9;
    padding: 0 5px;
    z-index: 1;
    box-shadow: 0 2px 3px #666666;
    border-radius: 3px;
    transform: translateY(-20px);
    pointer-events: none;
  }
  
  /* 上升動畫：從畫面底部升到畫面頂端之外 */
  @keyframes rise {
    0% {
      transform: translateY(0);
      opacity: 1;
    }
    90% {
      opacity: 1;
    }
    100% {
      transform: translateY(-120vh);
      opacity: 0;
    }
  }

/*最後一題*/
#level_review_img{
    position: absolute;
    right: 0;
    height: 100vh;
}

#level_review_text{
    position: absolute;
    top: 20vh;
    left: 10vw;
    width: 40vw;
    padding: 0.5rem 1rem 1.5rem 1rem;
    text-align: left;

    background-image: url('../images/svg/level_review.svg');
}

/*結算*/
#level_result_img{
    display: block;
    margin: 0 auto;
    width: 90%;
}

#level_result_title{
    text-align: center;
}

#level_result_star_container{
    width: 70%;
    margin: 1rem auto 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
    gap: 0.5rem;
}

#level_result_score_container{
    position: relative;
    width: 55%;
    margin: 2rem auto 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    flex-direction: row;
}

.result_score{
    border-radius: 10px;
    border: 1.5px solid #F9C26B;
}

.result_score p{
    border-radius: 10px;
    background: #F9C26B;
}

.result_time{
    border-radius: 10px;
    border: 1.5px solid #67A3F1;
}

.result_time p{
    border-radius: 10px;
    background: #67A3F1;
}

.result_score, .result_time{
    position: relative;
    background-color: #FFF;

    width: 40%;
}

.result_score p, .result_time p{
    text-align: center;
    padding: 0.5rem 0;
}

.result_score div, .result_time div{
    width: 100%;
    padding: 1rem 0;
    display: flex;
}

#level_result_score_text span, #level_result_time_text span{
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.2rem;
}

#level_back_index{
    width: 85%;
    display: block;
    margin: 4rem auto 0 auto;

    border-radius: 30px;
    border: 1.5px solid #DCDCDC;
    background: #FFF;box-shadow: 0px 4px 0px 0px rgba(0, 0, 0, 0.10);
    height: 3rem;

    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    flex-direction: row;
}

/*鼓勵容器*/
.level_encourage_container{
    padding-top: 3rem;
}

#level_vocabulary_question_container{
    margin-left: auto;
    margin-right: auto;
}

/************************RWD-極小裝置處理(<290px)*********************/
@media (max-width: 290px){
    /***問題區***/
    /*問題區的角色圖片*/
    .level_question_container > img, .level_question_container > video, .level_video_container{
        display: none;
    }

    /*問題區的播放容器*/
    .level_voice_container{
        left: 50%;
    }

    /*問題區的文字容器*/
    .level_text_container{
        left: 10%;
    }

    /*問題區的播放按鈕icon*/
    #level_vocabulary_voice > img ,#level_balloon_voice > img{
        width: 1.25rem;
    }

    /*問題區的播放按鈕icon*/
    #level_blank_voice > img{
        width: 1.25rem;
    }

    /*問題區的音檔播放特效svg*/
    .level_vocabulary_voice_container > img{
        height: 1.25rem;
    }

    /*單字題-選項1*/
    #level_vocabulary_option1_container,
    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        position: relative;
        width: 100%;
        margin-left: unset;
        transform: unset;
    }

    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        margin-top: 1rem;
    }

    /*最後一題*/
    #level_review_img{
        top: 30vh;
        right: 0;
        height: 50vh;
    }

    #level_review_text{
        top: 20vh;
        left: 10vw;
        width: 35vw;
        padding: 0.5rem 1rem 1.5rem 1rem;
        text-align: left;

        background-image: url('../images/svg/level_review.svg');
    }

    #level_result_score_container{
        width: 100%;
    }
}

/************************RWD < 350px***************************/
@media (min-width: 350px){
    /*問題區的角色影片*/
    .level_video_container{
        height: 80%;
        transform: translateY(10%); 
    }
}

/************************RWD < 480px***************************/
@media((max-width: 479.98px) and (min-width: 290px)){
    /*最後一題*/
    #level_review_img{
        top: 10vh;
        right: 0;
        height: 90vh;
    }

    #level_review_text{
        top: 20vh;
        left: 15vw;
        width: 35vw;
        padding: 0.5rem 1rem 1.5rem 1rem;
        text-align: left;

        background-image: url('../images/svg/level_review.svg');
    }
}

/************************RWD-小平板(480px~767.99px)*********************/
@media (min-width: 480px){
    /*****top bar*****/
    /*關閉按鈕*/
    #level_close_btn{
        display: inline-block;
        width: fit-content;
        height: 1.125rem
    }

    #level_header_container img{
        width: 1.125rem;
    }

    /*進度條容器*/
    #level_progress_bar_container{
        width: calc(100% - 1.125rem - 20px);
        height: 0.5625rem;
    }

    /*問題區的角色影片*/
    .level_video_container{
        height: 100%;
        transform: translateY(5%); 
    }

    /***問題區***/
    /*問題區的播放按鈕icon*/
    #level_sentence_voice > img{
        width: calc(1.25rem * 1.1);
        height: auto;
    }

    /*問題區的播放按鈕icon*/
    #level_blank_voice > img{
        width: calc(1.25rem * 1.1);
        height: auto;
    }

    /*問題區的音檔播放特效svg*/
    .level_voice_container > img{
        height: calc(1.25rem * 1.1);
        width: auto;
    }

    /*問題區的播放容器*/
    .level_voice_container{
        left: 50%;
        padding: 0.5rem 1.75rem 1.2rem 1.4rem;
        gap: 0.5rem;
    }

    /*單字題-選項1*/
    #level_vocabulary_option1_container,
    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        position: relative;
        width: 30%;
    }

    level_vocabulary_option2_container{
        transform: translateY(-60%);
    }
    
    #level_vocabulary_option3_container{
        transform: translateY(-120%) translateX(100%);
    }

    /*鼓勵文本*/
    #level_encourage_text{
        width: 50%;
    }

    /*鼓勵圖片*/
    #level_encourage_video{
        width: 50%;
        margin-top: -3rem;
    }

    /*結算*/
    #level_result_img{
        width: 65%;
    }
}

/************************RWD-大平板、小電腦(768px~1199.99px)*************/
@media (min-width: 768px){
    /*****top bar*****/
    /*top bar 主容器*/
    #level_header_container{
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        width: 80vw;
        height: 9.35vh;
        min-height: 50px;
    }

    /*****共用*****/
    /*題目主容器*/
    .level_content_container{
        width: calc(80vw - 4.53vw - 4.53vw);
        height: calc(100vh - max(9.35vh, 50px) - max(6.15vh, 50px) - max(3rem, calc(15vh * 0.4)) - 1rem);
    }

    /*題目標題*/
    #level_vocabulary_title h1{
        padding-top: max(30px, 3.5vh);
        padding-bottom: max(30px, 3.5vh);
    }

    /***回答區***/
    /*回答區的容器*/
    .level_answer_container{
        margin-top: 2rem;
    }

    /*畫底線*/
    .level_answer_container > p.row-start::after{
        height: 2px;
    }

    /***選項區***/
    /*選項區的容器*/
    .level_option_container{
        margin-top: 2rem;
    }

    /***問題區***/
    /*問題區的播放按鈕icon*/
    #level_sentence_voice > img{
        width: calc(1.25rem * 1.2);
        height: auto;
    }

    /*問題區的播放按鈕icon*/
    #level_blank_voice > img{
        width: calc(1.25rem * 1.2);
        height: auto;
    }

    /*問題區的音檔播放特效svg*/
    .level_voice_container > img{
        height: calc(1.25rem * 1.2);
        width: auto;
    }

    /*問題區的角色圖片*/
    .level_question_container > img{
        left: 20%;
    }

    /*問題區的播放容器*/
    .level_voice_container{
        left: 60%;
    }

    /*按鈕-檢查*/
    .level_check_btn_container > button{
        margin: 0 auto max(3rem, calc(15vh * 0.4)) auto;
        height: max(6.15vh, 50px);
        width: 50%;
    }

    /*按鈕-下一題*/
    .level_submit_btn_container > button{
        margin: 0 auto max(3rem, calc(15vh * 0.4)) auto;
        height: max(6.15vh, 50px);
        width: 50%;
    }

    /*按鈕-錯誤*/
    .level_error_btn_container > button{
        margin: 0 auto max(3rem, calc(15vh * 0.4)) auto;
        height: max(6.15vh, 50px);
        width: 50%;
    }

    /*正確錯誤訊息*/
    .level_btn_message{
        gap: 0.25rem;
        padding-bottom: 0.5rem;
        width: calc(50% * 0.9);
    }

    .level_error_btn_container > h5{
        width: calc(50% * 0.9);
    }

    .level_btn_message_answer{
        width: calc(50% * 0.9);
        padding-bottom: 0.7rem;
    }

    /*單字題-選項1*/
    #level_vocabulary_option1_container,
    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        position: relative;
        width: 30%;
    }

    #level_vocabulary_option2_container{
        transform: translateY(-70%);
    }
    
    #level_vocabulary_option3_container{
        transform: translateY(-110%) translateX(100%);
    }

    /*連連看容器*/
    #level_connect_content_container{
        gap: 1.5rem;
    }

    /*鼓勵文本*/
    #level_encourage_text{
        width: 45%;
    }

    /*鼓勵圖片*/
    #level_encourage_video{
        width: 45%;
    }

    /*按鈕-檢查*/
    .level_message_btn_container > button{
        margin: 0 auto max(3rem, calc(15vh * 0.4)) auto;
        height: max(6.15vh, 50px);
        width: 50%;
    }

    /*填空選項*/
    #level_blank_option_container{
        gap: 1.5rem;
    }

    #level_blank_option_container > button{
        width: 60%;
    }

    /*聽力選項*/
    #level_listening_option_container{
        gap: 1.5rem;
    }

    #level_listening_option_container > button{
        width: 60%;
    }

    /*最後一題*/
    #level_review_img{
        top: 10vh;
        right: 0;
        height: 100vh;
    }

    #level_review_text{
        top: 20vh;
        left: 30vw;
        width: 35vw;
        padding: 0.5rem 1rem 1.5rem 1rem;
        text-align: left;

        background-image: url('../images/svg/level_review.svg');
    }

    /*結算*/
    #level_result_img{
        width: 55%;
    }

    #level_result_score_container{
        width: 30%;
    }

    /*聽力題IP*/
    #level_listening_question_img{
        left: 30% !important;
    }

    #level_balloon_bg {
        width: 80%;
        height: calc(100vh - max(50px, 9.35vh) - max(125px, calc(18.47vh + max(40px, 5vh))) - max(6.15vh, 50px) - 1rem);
        position: fixed;
        /* position: relative; */
        overflow: hidden;
        /* top: 0; */
        bottom: calc(max(6.15vh, 50px) + 1rem);
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        z-index: -99;
        /* transform: translate(-50%, 0); */
    }
}

/************************RWD-大螢幕(950px)**************************/
@media (min-width: 950px){
    /*單字題型的背景*/
    /* #level_vocabulary_bg > img{
        width: calc(65vw * 0.87);
        height: auto;
        max-height: 70vh;
        position: absolute;
        bottom: 0;
        left: calc((100vw - (65vw * 0.87)) / 2);
        z-index: 98;
    } */

    /*單字題-選項1*/
    #level_vocabulary_option1_container,
    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        position: relative;
        width: 25%;
    }

    #level_vocabulary_option2_container{
        transform: translateY(-80%);
    }
    
    #level_vocabulary_option3_container{
        transform: translateY(-160%) translateX(150%);
    }

    /*最後一題*/
    #level_review_img{
        top: 10vh;
        right: 0;
        height: 100vh;
    }

    #level_review_text{
        top: 20vh;
        left: 60vw;
        width: 20vw;
        padding: 0.5rem 1rem 1.5rem 1rem;
        text-align: left;

        background-image: url('../images/svg/level_review.svg');
    }

    
}

/************************RWD-大螢幕(1050px~1200px)**************************/
@media (min-width: 1050px){
    /*問題區的角色圖片*/
    .level_question_container > img{
        left: 30%;
    }

    /*鼓勵文本*/
    #level_encourage_text{
        width: 40%;
    }

    /*鼓勵圖片*/
    #level_encourage_video{
        width: 40%;
    }

    /*結算*/
    #level_result_img{
        width: 45%;
    }
}

/************************RWD-大螢幕(1200px以上)**************************/
@media (min-width: 1200px){
    /*****top bar*****/
    /*關閉按鈕*/
    #level_close_btn{
        display: inline-block;
        width: fit-content;
        height: 1.25rem
    }

    #level_header_container img{
        width: 1.25rem;
    }

    /*進度條容器*/
    #level_progress_bar_container{
        width: calc(100% - 1.25rem - 20px);
        height: 0.625rem;
    }

    /***問題區***/
    /*問題區的角色圖片*/
    .level_question_container > img{
        left: 35%;
    }

    /*單字題-選項1*/
    #level_vocabulary_option1_container,
    #level_vocabulary_option2_container,
    #level_vocabulary_option3_container{
        position: relative;
        width: 25%;
    }

    #level_vocabulary_option2_container{
        transform: translateY(-80%);
    }
    
    #level_vocabulary_option3_container{
        transform: translateY(-160%) translateX(150%);
    }

    /*結算*/
    #level_result_img{
        width: 30%;
    }

}

/************************RWD-手機、小平板橫置處理(寬768以內、高600.01以內)******************************/
@media (orientation: landscape) and (max-height: 600px){
    /*問題區的播放按鈕icon*/
    #level_vocabulary_voice > img{
        width: 1rem;
    }

    /*問題區的播放按鈕icon*/
    #level_blank_voice > img{
        width: 1rem;
    }

    /*問題區的音檔播放特效svg*/
    .level_vocabulary_voice_container > img{
        height: 1rem;
    }

    /*單字題型的背景-草地*/
    .vocabulary_bg_grass{
        height: 40vh;
        
    }
}

/************************全版氣球******************************/
@media (max-height: 600px){
    #level_balloon_bg {
        width: 100%;
        height: 100vh;
        position: fixed;
        overflow: hidden;
        top: 0;
        left: 0;
        z-index: -99;
    }
}

/************************hover偽類處理***********************************/
@media (hover: hover) and (pointer: fine){
    /*關閉按鈕*/
    #level_close_btn:hover{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(1.2);
    }

    #level_close_btn:active{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(0.95);
    }

    /***問題區***/
    /*問題區的播放按鈕*/
    #level_sentence_voice:hover{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(1.2);
    }

    #level_sentence_voice:active{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(0.95);
    }

    #level_vocabulary_voice:hover{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(1.2);
    }

    #level_vocabulary_voice:active{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(0.9);
    }

    #level_blank_voice:hover{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(1.2);
    }

    #level_blank_voice:active{
        cursor: pointer;
        transition: transform 0.15s ease;
        transform: scale(0.9);
    }

    /***答案區***/
    .level_answer_container > p:not(#level_sentence_answer_composition):hover,
    .level_answer_container > p:not(#level_translate_answer_composition):hover{
        cursor: pointer;
    }

    .level_answer_container > p:not(#level_sentence_answer_composition):active,
    .level_answer_container > p:not(#level_translate_answer_composition):active{
        cursor: pointer;
    }

    /***選項區***/
    .level_option_unselected:hover{
        cursor: pointer;
    }

    .level_option_unselected:active{
        cursor: pointer;
    }

    #level_vocabulary_option1_container button:active,
    #level_vocabulary_option2_container button:active,
    #level_vocabulary_option3_container button:active{
        cursor: pointer;
    }

    #level_vocabulary_option1_container button:hover,
    #level_vocabulary_option2_container button:hover,
    #level_vocabulary_option3_container button:hover{
        cursor: pointer;
    }

    /***下一題按鈕***/
    .level_check_btn_container > button:hover,
    .level_submit_btn_container > button:hover,
    .level_error_btn_container > button:hover{
        cursor: pointer;
        /* transition: transform 0.15s ease;
        transform: scale(1.05); */
    }

    .level_check_btn_container > button:active,
    .level_submit_btn_container > button:active,
    .level_error_btn_container > button:active{
        cursor: pointer;
        /* transition: transform 0.15s ease;
        transform: scale(0.95);
        box-shadow: unset; */
    }

    /*連連看按鈕*/
    #level_connect_content_container button:hover{
        cursor: pointer;
    }

    #level_connect_content_container button:active{
        cursor: pointer;
    }

    /*填空題選項*/
    #level_blank_option_container > button:hover{
        cursor: pointer;
    }

    #level_blank_option_container > button:active{
        cursor: pointer;
    }

    /*聽力題選項*/
    #level_listening_option_container > button:hover{
        cursor: pointer;
    }

    #level_listening_option_container > button:active{
        cursor: pointer;
    }
}