.header {
    position: relative;
    background-color: #ababab;
    padding: 10px;
    text-align: center;
    color: #fff;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header img {
    margin-right: 10px;
    vertical-align: middle;
}
#container_USE {
    color: white; /* 确保文本颜色可见 */
}

.headertitle {
    font-size: 18px;
    font-weight: bolder;
}

.gradient-custom {
    min-height:100vh;
    /* fallback for old browsers */
    background: rgb(0 0 0 / 50%);

    /* Chrome 10-25, Safari 5.1-6 */
    background: -webkit-linear-gradient(to bottom right, rgb(0 0 0 / 50%), rgb(0 0 0 / 50%));

    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    background: linear-gradient(to bottom right, rgb(0 0 0 / 50%), rgb(0 0 0 / 50%));
}

.mask-custom {
    background: rgb(73 73 71);
    border-radius: 2em;
    backdrop-filter: blur(15px);
    border: 2px solid rgb(180 180 180);;
    background-clip: padding-box;
    box-shadow: 10px 10px 10px rgba(46, 54, 68, 0.03);
}

.mask-custom2 {
    background: rgba(0, 0, 0, .23);
    backdrop-filter: blur(15px);
    border: 2px solid rgb(180 180 180);;
    background-clip: padding-box;
    box-shadow: 10px 10px 10px rgba(46, 54, 68, 0.03);
    max-height: 75vh;
    overflow-y: auto;
}

.mask-custom3 {
    background: rgba(60,60,57);
}

.mb-0 {
    color: #fff;
    font-size: 20px;
}

.databasename {
    font-size: 25px;
}

.pt-2 {
    padding-top: .7rem !important;
}

.font-weight-bold {
    font-weight: bolder;
}

.w-80 {
    width: auto !important;
    max-width: 80% !important;
}

.w-bot {
    min-width: 250px !important;
    max-width: 80% !important;
}

.databaseQA {
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 5px;
    height: 70vh;
    overflow-y: auto;
}

.inputQA {
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    border-radius: 20px !important;
    background-color: #fff3 !important;
    font-size: 20px !important;
    color: #fff !important;
}
.form-group{
    padding-bottom: 20px;

}
.inputEDIT{
    border: 0 !important;
    margin-top: 10px;
    border-radius: 10px !important;
    background-color: #ffffff1c !important;
    font-size: 20px !important;
    color: #fff !important;
}
.button-right {
    display: flex;
    justify-content: flex-end;
}
.button-center {
    display: flex;
    justify-content: center;
}
.gifandQA {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.QAfont{
    padding: 10px;
    font-size: 25px;
    max-height: 90px; /* 4 行文字，每行高度 1.5em */
    overflow-y: auto; /* 使用滾輪 */
    border: 1px solid #adabab;
    border-radius: 20px;
    margin: 10px;
    margin-bottom: 10px !important;
}
#input_topic {
    min-height: 40px; /* 最小高度 */
    max-height: calc(3 * 1.5em); /* 4 行文字，每行高度 1.5em */
    overflow-y: auto; /* 使用滾輪 */
}
#input_content {
    min-height: 35vh; /* 最小高度 */
    max-height: 45vh;;
    overflow-y: auto; /* 使用滾輪 */
}
#input_img {
    min-height: 35vh; /* 最小高度 */
    max-height: 45vh;;
    overflow-y: auto; /* 使用滾輪 */
}

#photo_upload {
    display: none; /* 隱藏原始的file input */
  }
.custom-file-upload {
    width: 110px;
    display: block;
    padding: 12px 23px;
    margin-top: 5px;
    cursor: pointer;
    background-color: #f5f5f5;
    color: #737373;
    font-size: 16px;
    border: none;
    border-radius: 10rem;
}
.custom-file-upload:hover {
  background-color: #cccaca;
}

#time_content {
    background-color: #ffffff00 !important;
    border: 0!important;
    padding: 0;
    margin-top: 0;
}
.card-body-padding {
    padding-top: 5px;
    padding-bottom: 5px;
}

.border-bottom-custom {
    border-bottom: 1px solid rgba(255,255,255,.3) !important;
}

#user-input {
    min-height: 40px; /* 最小高度 */
    max-height: calc(4 * 1.5em); /* 4 行文字，每行高度 1.5em */
    overflow-y: auto; /* 使用滾輪 */
}

.microphone-icon {
    width: 24px; /* 設置圖片的寬度 */
    height: 24px; /* 設置圖片的高度 */
    vertical-align: middle; /* 垂直對齊方式，使圖片居中 */
    margin-right: 5px; /* 可以根據需要調整圖片與按鈕文本之間的距離 */
    filter: contrast(0.4);
}

.gif-icon {
    height: 45vh; /* 設置圖片的高度 */
    vertical-align: middle; /* 垂直對齊方式，使圖片居中 */
}

.speakbutton.selected {
    background-color: #8b8b8b;
}

@keyframes recordingAnimation {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.speakbutton.selected .microphone-icon {
    filter: contrast(1);
    animation: recordingAnimation 1s infinite; /* 調整動畫時間和效果 */
}

@keyframes blink {
    0%, 50%, 100% {
      opacity: 0;
    }
    25%, 75% {
      opacity: 1;
    }
  }

.waiting-message {
    animation: blink 2s infinite; /* 2s 是動畫的持續時間，infinite 表示無限循環 */
    color: #fff;
}

#displayalldata {
    display: none;
}
#displayalldata_edit {
    display: none;
}
#displayalldata_edit_topic {
    display: none;
}

.custom-audio {
    width: 100%;
    height: 40px;
}

#selectusedatabase li:hover {
    background-color: #5a5b5c;
}
#selecteditdatabase li:hover {
    background-color: #5a5b5c;
}
#alltopics li:hover {
    background-color: #5a5b5c;
}

.custom-p {
    color: white;
}

.headbtn {
    margin: 0 10px 0 10px;
    padding: 10px;
    font-size: 16px;
    background-color: #404141;
    border: 1px solid #8e8e8e;
}


#head_QA.selected{
    background-color: #262626;
}

#head_EDIT.selected {
    background-color: #262626;
}

#head_PHOTO.selected {
    background-color: #262626;
}

#head_QAEDIT {
    display: none; 
    background-color: #181818;
}

#section_EDIT {
    display: none; 
}

#section_PHOTO {
    display: none; 
}

.outbuttonframe{
    display: block; 
}

#edit_button{
    font-size: 16px;
}
#delete_button{
    font-size: 16px;
    background-color: #f7e2ea;
    color: #8d2929;

}
#check_edit_button{
    font-size: 16px;
    background-color: #cef4ff;
    color: #214c59;

}
#cancel_edit_button{
    font-size: 16px;

}
#input_topic[contentEditable="true"] {
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    margin-top: 10px;
    border-radius: 10px !important;
    background-color: #fff3 !important;
    font-size: 20px !important;
    color: #fff !important;
}
#input_content[contentEditable="true"] {
    border: 2px solid rgba(255, 255, 255, 0.65) !important;
    margin-top: 10px;
    border-radius: 10px !important;
    background-color: #fff3 !important;
    font-size: 20px !important;
    color: #fff !important;
}
@media (max-width: 580px) {
    #head_QAEDIT {
        display: block; 
    }
    .outbuttonframe{
        flex-wrap: wrap;
        position: absolute; /* 子容器设置为绝对定位 */
        top: 100%; /* 相对于父容器底部定位 */
        left: 0; /* 相对于父容器左边定位 */
        width: 100%; /* 宽度占满父容器 */
        background-color: #181818; /* 设置背景颜色 */
        z-index: 1; /* 确保子容器显示在其他内容之上 */
        border: 1px solid #8f8f8f;
        padding: 10px;
        justify-content: center;
        display: none; 
    }
    #head_QA{
        margin-bottom: 8px;
    }
    #head_EDIT{
        margin-bottom: 8px;
    }
    #head_Typofix{
        margin-bottom: 8px;
    }
    #head_upload{
        margin-bottom: 8px;
    }
    #head_Setting{
        margin-bottom: 8px;
    }
    #head_USE{
        margin-bottom: 8px;
    }
    #head_KM{
        margin-bottom: 8px;
    }
    #head_LOGOUT{
        margin-bottom: 8px;
    }
}

#databasedisplay {
    display: block;
}
#databasedisplay_edit {
    display: block;
}
#databasedisplay_edit_topic {
    display: block;
}

.selectioncss {
    width: 200px; 
    margin: 0 auto; 
    background-color: #00000045;
    color: #ffff;
}
.selectioncss optgroup {
    background-color: #000000a6;
    color: #ffff;
}

.selectioncss option {
    background-color: #000000a6;
    color: #ffffffcf;
}

#searchInput {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 15px;
    font-size: 18px;
    color: #fff;
    padding: 5px;
    margin-right: 10px;

}
#searchInput_user {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 15px;
    font-size: 18px;
    color: #fff;
    padding: 5px;
    margin-right: 10px;
}
#sortTopics {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 5px;
    color: #fff;
    margin-right: 10px;
}
#sortusers {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 5px;
    color: #fff;
    margin-right: 10px;
}

@media (max-width: 768px) {
    #databasedisplay {
        display: none;
        opacity: 0; /* 初始透明度為 0 */
        transition: opacity 0.3s ease; /* 淡入淡出效果，0.5秒的持續時間 */
        margin-bottom: 20px;
        max-height: 50vh;
        
    }
    #databasedisplay_edit {
        display: block;
        opacity: 1; /* 初始透明度為 0 */
        transition: opacity 0.3s ease; /* 淡入淡出效果，0.5秒的持續時間 */
        margin-bottom: 20px;
        max-height: 50vh;
        
    }
    #databasedisplay_edit_topic {
        display: block;
        opacity: 1; /* 初始透明度為 0 */
        transition: opacity 0.3s ease; /* 淡入淡出效果，0.5秒的持續時間 */
        margin-bottom: 20px;
        max-height: 50vh;
        
    }
    #displayalldata {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }
    #displayalldata_edit {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }
    #displayalldata_edit_topic {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }
  }

  
/*頁腳設定*/
footer {
    background-color: #ABABAB; /* 背景顏色灰色 */
    color: white; /* 文字顏色白色 */
    text-align: center; /* 文字置中 */
    padding: 10px 0; /* 上下內距 */
    font-size: 14px; /* 字體大小 */
}
/*圖片設定*/
.carousel {
    width: 100%;
}
.carousel-inner {
    width: 100%; /* 確保容器寬度正確 */
    transition: transform 0.5s ease-in-out;
}
.carousel-item {
    display: flex; /* 用於讓內容居中 */
    min-width: 100%; /* 每個滑塊佔滿父容器的寬度 */
    flex-shrink: 0; /* 防止縮放 */
    justify-content: center; /* 水平置中 */
    position: relative;
    opacity: 0; /* 隱藏非活躍滑塊，但保留空間 */
    transition: opacity 0.5s ease-in-out;
}

.carousel-item.active {
    opacity: 1; /* 當前區塊可見 */
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
}
.carousel-prev {
    left: 10px;
}
.carousel-next {
    right: 10px;
}
.carousel-item img, 
.carousel-item video {
    transition: transform 0.5s ease-in-out;
    cursor: pointer;
}

/* .carousel-item img.enlarged, 
.carousel-item video.enlarged {
    position: fixed; 固定位置，避免受父容器影響 
    transform: translate(25%,-25%) scale(1.5);  置中並放大 1.5 倍 
    z-index: 1000;  確保圖片位於最上層 
} */

.enlarged-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

.enlarged-backdrop {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

img.enlarged,
video.enlarged {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    z-index: 1000 !important;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    background: black;
    border-radius: 8px;
    cursor: zoom-out;
}
    
/*設定回覆文字字體大小*/
p {
font-size: 20px;
}
strong {
font-size: 22px;
}

input[type="file"] {
    margin-bottom: 5px;
    padding: 5px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 13px;
    outline: none;
}
button {
    background-color: #607D8B;
    color: white;
    font-size: 15px;
    padding: 8px 15px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: #45a049;
}
input[type="file"] {
    color: pink; /* 改變 "未選擇任何檔案" 的文字顏色 */
}

/* 按鈕樣式與位置 */
    .available-button {
    position: absolute;
    top: 20px;   /* 調整Y軸位置 */
    left: 20px;  /* 調整X軸位置 */
    /* width: 50px;
    height: 50px; */
    border-radius: 50%;
    border: none;
    background-color: #ff5722;
    color: white;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.dropdown {
    display: none;
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    z-index: 100;
}
.dropdown button {
    display: block;
    width: 100%;
}