/* 顏色設定 */
:root{
    --body-background: #eaefe6;
    --body-font-color: #666666;
    --body-font-opposite-color: #ffffff;
    --body-light-font-color: #ffffff;
    --body-red-font-color: #f78da7;
    --menu-background: #a7c3a7;
    --menu-select-font-color: #333333;
    --area-background: #fcfcfc;
    --title-font-color: #333333;
    --en-title-font-color:#666666;
    --table-head-background: #c9e0b6;
    --table-list-odd-background: #eaefe6;
    --table-hover-background: #8db9f7;
    --button-background: #504F4C;
    --button-hover-background: #A9C3A7;
    --button-shadow: #cccccc;

    --dictionary-button-background: #504F4C;
    --dictionary-button-hover-background: #fcfcfc;
    --card-background: #fcfcfc;
    --card-banner-button-hover-background: #b8d6b8;
    --jump-color: #ddc1e4;
    --light-jump-color: #e1d1e5;
    --KK-color: #006cb7;
    --shadow: rgba(0, 0, 0, 0.1);
    --search-icon: url(/images/search.png);
}

/* 深色模式顏色設定 */
html[data-theme=dark]{
    --body-background: #111111;
    --body-font-color: #CFCFD1;
    --body-font-opposite-color: #666666;
    --body-red-font-color: rgb(197, 54, 54);
    --menu-background: #363636;
    --menu-select-font-color: #96b97d;
    --area-background: #242424;
    --title-font-color: #96b97d;
    --en-title-font-color: #527539;
    --table-head-background: #5f5f62;
    --table-list-odd-background: #363636;
    --table-hover-background: #555555;
    --button-background: #363636;
    --button-hover-background: #565656;
    --button-shadow: #323232;

    --search-icon: url(/images/search_white.png);
}




body{
    justify-content: center;
    background-color: var(--body-background);
    font-family: "Montserrat", "Noto Sans TC", Helvetica, Arial, "微軟正黑體", Heiti TC, "メイリオ", sans-serif;
    font-size: 16px;
    color: var(--body-font-color);
    margin: 0;
}

a, a:visited{
    text-decoration: none;
    color: var(--body-font-color);
}

body nav{
    display: flex;
    justify-content: center;
}


/* 選單列 */
.menu_bar{
    position: fixed;
    background-color: var(--menu-background);
    flex: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 60px;
    left: 0;
    top: 0;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.09);
    z-index: 100;
}

.menu_bar ul{
    flex: none;
    display: flex;
    width: 60%;
    height: 50px;
    margin: 0;
}

.menu_bar ul li{
    width: 150px;
    list-style-type: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}



.menu_bar ul li a{
    width: 100%;
    letter-spacing: 1px;
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    color: var(--menu-select-font-color);
}

.enTxt{
    text-align: center;
    position: relative;
    display: block;
    flex: none;
    letter-spacing: 1px;
    font-weight: 500;
    font-size: 18px;
    top: 15px;
    transition: top 0.3s ease-out;
    color: var(--body-font-color);
    white-space:nowrap;
}

.chTxt{
    text-align: center;
    position: relative;
    display: block;
    flex: none;
    letter-spacing: 1px;
    font-weight: 500;
    font-size: 18px;
    top: 39px;
    transition: top 0.3s ease-out;
    color: var(--body-font-color);
    white-space:nowrap;
}

.menu_bar ul li:hover span.enTxt{
    top: -35px;
}

.menu_bar ul li:hover span.chTxt{
    top: -11px;
}

.member{
    margin-left: 100px;
    display: flex;
    align-items: center;
}

.member > img{
    width: 30px;
    margin-right: 15px;
    cursor: pointer;
}

.member > img:nth-last-child(2){
    display: none;
}

#lightSwitch{
    display: flex;
    flex: none;
    width: 52px;
    height: 26px;
    border-radius: 100px;
    align-items: center;
    background-color: var(--area-background);
    cursor: pointer;
    transition: 0.3s;
    justify-content: center;
    align-items: center;
}

#buttonSunMoon{
    display: flex;
    background-image: url("/images/moon.svg"), url("/images/sun.svg");
    background-repeat: no-repeat;
    background-size: 18px 18px;
    background-position: 0px, 22px;
    position: relative;
    width: 42px;
    height: 18px;
    
}


#lightSwitchButton{
    background-color: var(--body-font-color);
    width: 18px;
    height: 18px;
    border-radius: 100px;
    position: relative;
    transition: 0.3s;
    left: 0;
}

#lightSwitchButton[data-theme=dark]{
    left: 22px;
    transition: 0.3s;
}

.mini_menubar_gray_screen{
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.6);
    z-index: 2;
}

.mini_menubar_area{
    position: fixed;
    background-color: var(--area-background);
    width: 200px;
    left: 100%;
    top: 60px;
    transform: translateX(-100%);
    box-shadow: 0px 0px 10px 5px rgba(0,0,0,0.09);
    z-index: 3;
}

.mini_menubar_area ul{
    margin: 0;
    padding-inline-start: 0;
}


.mini_menubar_area ul li a{
    display: block;
    width: 100%;
    height: 100%;
    line-height: 50px;
    letter-spacing: 2px;
    font-weight: 600;
    text-align: center;
}



.mini_menubar_area ul li a:hover{
    color: var(--button-hover-background);
}

@media (max-width: 1300px) {
    .menu_bar ul li{
        width: 120px;
    }
    
    .menu_bar ul li a{
        font-size: 14px;
    }

    .enTxt{
        font-size: 14px;
        top: 11px;
    }

    .chTxt{
        font-size: 14px;
        top: 42;
    }

    .menu_bar ul li:hover span.enTxt{
        top: -39px;
    }

    .menu_bar ul li:hover span.chTxt{
        top: -8px;
    }
}

@media (max-width: 900px){
    .menu_bar{
        justify-content: end;
    }

    .menu_bar ul{
        display: none;
    }

    .member{
        margin-right: 50px;
        margin-left: 30px;
    }

    .member > img:nth-last-child(2){
        display: block;
    }
}

@media (max-width: 500px){
    .member{
        margin-right: 20px;
        margin-left: 10px;
    }
}

/* 首頁 */
.main_nav_frame{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    
}

.main_nav{
    width: 90%;
    margin-top: 90px;
    display: flex;
}

.index_main_div{
    width: 80%;
    height: 80vh;
    background-color: var(--area-background);
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.09);
    padding: 20px;
    background-image: url("/images/fire_fighter.png");
    background-position: left bottom;
    background-size: contain;
    background-repeat: no-repeat;
}

.index_title{
    flex: none;
    margin-top: 180px;
}

.index_title > p{
    font-size: 50px;
    color: var(--title-font-color);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: center;
}

.index_small_title > p{
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-align: center;
}

.second_floor_divide{
    margin-top: 100px;
    width: 100%;
    height: 800px;
    background-color: var(--area-background);
}

.second_floor_divide img{
    width: 100%;
    
}


/* user 使用者介面 */
.user_main_div{
    background-color: var(--area-background);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30vh;
}

.user_main_logout_title{
    font-weight: bold;
    border-bottom: Var(--body-font-color) 1px solid;
    margin-bottom: 10px;
    padding: 10px;
}

.user_main_logout_title > div:first-child{
    font-size: 20px;
}

.user_main_logout_title > div:last-child{
    font-size: 27px;
}

.user_content{
    display: flex;
}


.user_content_picture_div > img{
    display: block;
    width: 60px;
    padding: 5px;
    margin: 0 20px 10px 0;
}

.user_content_picture_div > button{
    height: 30px;
}

.user_content > table{
    height: 80px;
}

.user_content > table > tbody > tr > td{
    padding: 5px;
}

.user_content > table > tbody > tr > td:last-child{
    margin-left: 5px;
}


/* Json Viewer */

.json_viewer_left_area{
    width: 600px;
    margin-top: 30px;
}

.json_input{
    width: 95%;
    height: 700px;
    color: var(--body-font-color);
    background-color: var(--area-background);
    margin-top: 30px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.09);
    padding: 2%;
}


.json_viewer_right_area{
    width: 800px;
    margin-left: 80px;
    margin-top: 30px;
}

.json_viewer_title{
    color: var(--title-font-color);
    font-size: 26px;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
}

#json-renderer{
    margin-top: 30px;
}


.json_viewer_button_area{
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
}

.json_black_button{
    padding: 7px;
    background-color: var(--button-background);
    color: var(--body-light-font-color);
    font-size: 16px;
    letter-spacing: 0.5px;
    border: 1px solid var(--body-font-color);
    border-radius: 5px;
    transition: .1s;
    width: 185px;
    
}

.json_black_button:hover{
    cursor: pointer;
    background-color: var(--button-hover-background);
    transform: translateY(-2px);
    box-shadow: 2px 2px 6px 2px var(--button-shadow);
}

.json_black_button:active{
    transform: translateY(-2px) scale(0.98);
}

.json_white_button{
    padding: 7px;
    background-color: var(--body-background);
    color: var(--body-font-color);
    font-size: 16px;
    letter-spacing: 0.5px;
    border: 1px solid var(--body-font-color);
    border-radius: 5px;
    transition: .1s;
    width: 185px;
}

.json_white_button:hover{
    cursor: pointer;
    background-color: var(--area-background);
    transform: translateY(-2px);
    box-shadow: 2px 2px 6px 2px var(--button-shadow);
}

.json_white_button:active{
    transform: translateY(-2px) scale(0.98);
}

@media (max-width: 1000px){
    .json_viewer_left_area{
        width: 100%;
    }

    #json-input{
        height: 200px;
    }

    .json_viewer_right_area{
        width: 100%;
        margin-left: 0;
    }

    .json_viewer_right_area{
        width: 100%;
    }

    .json_viewer_right_area li{
        white-space: normal;
    }
}




/* SQLite Viewer */
.sqlite_title{
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 10px;
}

.sqlite_sidebar{
    width: 250px; /* 設定左側欄位的固定寬度 */
    border-right: 1px solid #ddd;
    padding: 0 10px 20px 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sqlite_table{
    border-collapse: collapse;
    width: 100%;
}

.sqlite_table > details{
    margin-bottom: 10px;
}

.sqlite_table > details > summary > img{
    width: 20px;
    transform: translate(10px, 5px);
    cursor: pointer;
}

.sqlite_table > details > div{
    margin-top: 10px;
    margin-left: 30px;
    font-size: 14px;
}

.sqlite_table > details > div > span{
    padding: 2px;
    margin-left: 5px;
    border: var(--body-font-color) solid 1px;
    background-color: var();
}

.sqlite_main{
    flex: 90%;
    padding: 0 20px 20px 20px;
    box-sizing: border-box;
    min-width: 400px;
    max-width: 1600px;
}

.sqlite_textarea_div{
    width: 100%;
    display: flex;
    flex-direction: row;
    margin-top: 10px;
}

.sqlite_textarea_div > textarea{
    height: 100px;
    padding: 10px;
}

.sqlite_commit{
    flex-grow: 1;
}

.sqlite_value{
    width: 200px;
    margin-left: 10px;
}

.sqlite_button_div > button{
    margin: 5px;
}

.sqlite_output{
    height: 70vh;
    overflow-y: auto;
    margin-top: 20px;
    background-color: var(--area-background);
    border: var(--body-font-color) solid 1px;
}

.sqlite_output table{
    width: 100%;
}

.sqlite_output thead{
    position: sticky;
    top: 0;
}

.sqlite_output thead > tr > th{
    padding: 10px;
    background-color: var(--table-head-background);
}

.sqlite_output tbody > tr > td{
    padding: 10px;
    max-width: 250px;
    white-space: nowrap;        /* 文字不換行 */
    overflow: hidden;           /* 超出邊界隱藏 */
    text-overflow: ellipsis;    /* 多的文字以...表示 */
}

.sqlite_output tbody > tr > td:hover{
    background-color: var(--table-hover-background);
    color: var(--body-light-font-color);
}

.sqlite_output tbody > tr:nth-child(2n+1){
    background-color: var(--table-list-odd-background);
}


/* 作戰編組operationMap */

.operationMap_title{
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 10px;
}

.operationMap_sidebar{
    width: 250px; /* 設定左側欄位的固定寬度 */
    border-right: 1px solid #ddd;
    padding: 0 10px 20px 10px;
    box-sizing: border-box;
    overflow-y: auto;
}

.operationMap_main{
    flex: 90%;
    padding: 0 20px 20px 20px;
    box-sizing: border-box;
    min-width: 400px;
    max-width: 1600px;
}

.operationMap_output{
    height: 70vh;
    overflow-y: auto;
    margin-top: 20px;
    background-color: var(--area-background);
    border: var(--body-font-color) solid 1px;
}

.operationMap_output_table{
    border-collapse: collapse;
    width: 100%;
}

.operationMap_output_table > tr > td {
    padding: 8px;
    text-align: center;
}

td.has-value {
    border: 1px solid #000;
}


/* IFS */
.case_card{
    margin-bottom: 30px;
    background-color: var(--area-background);
}


/* 字典 Dictionary */

.card-main{
    width: 100%;
}

.banner{
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    width: 100vw;
    height: 60px;
    position: fixed;
    left: 0;
    top: 60px;
    z-index: 1;
}

.banner_start{
    width: 180px;
}

.search-area{
    display: flex;
    justify-content: center;
}

.search-area input[type=button]{
    height: 43px;
    font-weight: 600;
    border: none;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    background: var(--light-jump-color);
    padding: 10px 20px 10px 20px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
}

.search-area input[type=button]:hover{
    background-color: var(--jump-color);
}

.search-bar{
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.search-bar > input{
    background-image: var(--search-icon);
    background-size: 20px;
    background-position: 14px 12px;
    background-repeat: no-repeat;
    background-color: var(--card-background);
    color: var(--body-font-color);
    font-size: 16px;
    padding: 12px 20px 12px 45px;
    border: none;
    border-bottom: 1px solid var(--card-background);
    border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
}

.search-bar-reviews{
    position: fixed;
    top: 114px;
    width: 260px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
}


.search-review{
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    background-color: var(--light-jump-color);
}

.search-review:hover{
    background-color: var(--jump-color);
    color: var(--body-light-font-color);
}

.banner-end{
    display: flex;
}

.banner-end > input{
    border-radius: 10px;
    margin-right: 10px;
    padding: 5px;
    width: 80px;
    height: 40px;
    border: 2px solid var(--dictionary-button-background);
    font-size: 14px;
    font-weight: bold;
}

.banner-end > input[status="1"]{
    background-color: var(--dictionary-button-hover-background);
}

.banner-end > input[status="0"]{
    background-color: var(--dictionary-button-background);
    color: var(--body-light-font-color);
}

.banner-end > input[status="0"]:not([disabled]):hover{
    background-color: var(--dictionary-button-hover-background);
    color: var(--body-font-color);
    cursor: pointer;
}

.en-card-container{
    position: relative;
    top: 50px;
    width: 100%;
}

.en-card{
    position: absolute;
    background-color: var(--card-background);
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px var(--shadow);
    width: 30%;
    min-width: 400px;
    max-width: 460px;
}

.en-card > div{
    padding: 1px 25px 0 25px;
}

.en-card > div:last-child{
    padding: 1px 25px 10px 25px;
}

.en-card li > div{
    padding-top: 10px;
}

.en-card ul, .en-card ol{
    padding-inline-start: 20px
}

.en-card > div > ul > li, .en-card details > div > ul > li{
    margin-top: 10px;
    list-style: none;
}

.en-output-banner{
    display: flex;
    justify-content: space-between;
}

.en-output-banner img{
    position: relative;
    top: 16px;
    width: 18px;
    margin-left: 10px;
    padding: 5px;
    border-radius: 5px;
}

.en-output-banner img:hover{
    background-color: var(--card-banner-button-hover-background);
}

.en-output-banner img:active{
    background-color: var(-- main-color);
}

.en-output-KK > span{
    cursor: pointer;
}

.en-output-pos{
    display: inline-block;
    min-width: 32px;
    height: 22px;
    background-color: var(--KK-color);
    color: var(--body-light-font-color);
    text-align: center;
    margin-right: 12px;
    padding: 2px 6px 2px 6px;
    line-height: 22px;
    border-radius: 2px;
}

.en-output-notations{
    padding: 10px 25px 15px 25px;
    margin-top: 20px;
    background-color: var(--light-jump-color);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.en-output-notations > details{
    margin-top: 10px;
}

.en-output-details{
    margin-top: 10px;
}

/* 字典 Dictory 卡片移除動畫 */
@keyframes card-delete {
    0% {
      transform: rotateZ(0deg) translateY(0);
      opacity: 1;
    }
    25% {
      transform: rotateZ(-15deg) translateY(100px);
    }
    100% {
      transform: rotateZ(-5deg) translateY(300px);
      opacity: 0;
    }
}

.card-delete{
    animation: card-delete forwards 1s ease-out 1;
}

@media (max-width: 800px){
    .banner{
        flex-direction: column;
        height: 120px;
    }

    .en-card-container {
        top: 110px;
    }
}

/* 聯絡我們CONTACT */

.contact_us_area{
    width: 80%;
    padding: 5%;
    background-color: var(--area-background);
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.09);
    font-weight: 500;
}

.contact_us_area form{
    width: 100%;
    display: flex;
    justify-content: center;
    
}

.contact_left{
    display: flex;
    width: 45%;
}

.contact_right{
    display: flex;
    width: 45%;
    margin-left: 5%;
}

.contact_title{
    width: 40%;
}

.contact_title > div:nth-child(1){
    font-size: 20px;
    font-weight: 600;
}

.contact_title > div:nth-child(2){
    font-size: 27px;
    font-weight: bold;
}

.contact_input{
    width: 60%;
}

.contact_input label{
    font-weight: 600;
}

.contact_input label > img{
    height: 16px;
    margin-right: 10px;
}

.contact_input label > span{
    color: var(--course-list-red-font);
    font-size: 18px;
}

.contact_input > select{
    width: 100%;
    height: 30px;
    color: var(--body-font-color);
    border: none;
    border-bottom: 1px solid var(--body-font-color);
    background-color: var(--area-background);
    cursor: pointer;
    margin: 7px 0 20px 0;
}

.contact_input > textarea{
    display: block;
    width: 100%;
    color: var(--body-font-color);
    border: none;
    border-bottom: 1px solid var(--body-font-color);
    background-color: transparent;
    margin: 5px 0 20px 0;
}

.contact_input > input{
    display: block;
    width: 100%;
    height: 30px;
    color: var(--body-font-color);
    border: none;
    border-bottom: 1px solid var(--body-font-color);
    background-color: transparent;
    margin: 5px 0 20px 0;
}

.contact_input > input[type=submit]{
    background-color: var(--button-background);
    color: var(--body-light-font-color);
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    border: 1px solid var(--body-font-color);
    border-radius: 5px;
    transition: .1s;
    width: 50%;
    float: right;
    margin: 10px 0 0 0;
}

.contact_input > input[type=submit]:hover{
    cursor: pointer;
    background-color: var(--button-hover-background);
    transform: translateY(-2px);
    box-shadow: 2px 2px 6px 2px var(--button-shadow);
}

.contact_input > input[type=submit]:active{
    transform: translateY(-2px) scale(0.98);
}

@media (max-width: 1400px){
    .contact_us_area form{
        flex-wrap: wrap;
        
    }
    
    .contact_left{
        width: 95%;
    }
    
    .contact_right{
        width: 95%;
        margin-left: 0;
        margin-top: 5%;
    }
}

@media (max-width: 650px){
    .contact_us_area form{
        font-size: 14px;
    }

    .contact_title > div:nth-child(1){
        font-size: 18px;
    }

    .contact_title > div:nth-child(2){
        font-size: 16px;
    }

    .contact_input label > span{
        font-size: 14px;
    }

    .contact_input > input[type=submit]{
        font-size: 14px;
    }

    .contact_left, .contact_right{
        flex-wrap: wrap;
    }

    .contact_title{
        width: 100%;
    }

    .contact_input{
        width: 100%;
        margin-top: 10%;
    }
    
}


/* 隱私政策 */
.privacy_area{
    width: 80%;
    background-color: var(--area-background);
    border-radius: 10px;
    box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.09);
    padding: 5%;
    
}

.privacy_title{
    font-size: 24px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 20px;
}

.privacy_area > ul{
    margin: 0;
}

.privacy_area > ul > li{
    margin-top: 10px;
}


