@font-face {
    font-family: 'Inter';
    src: url('../font/Inter/Inter-VariableFont_slnt,wght.ttf');
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #e3e3e3;
    display: flex;
    flex-direction: column;
    align-items: center;
}


input, textarea {
    outline: none !important;
}


#main-container {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    width: 65%;
}

#chat-window,
#settings-panel {
    padding: 10px;
    box-sizing: border-box;
    height: 100vh;
}

#chat-window {
    flex: 1 1 75%;
    max-width: 75%;
}

#settings-panel {
    flex: 1 1 25%;
    max-width: 25%;
}

/*----------------------------------------------------------------------------------------*/

#notification {
    position: fixed;
    top: 20px;
    /* 居顶部的偏移量 */
    left: 50%;
    /* 横向居中，相对于屏幕的50% */
    transform: translateX(-50%);
    /* 横向移动自身宽度的50%，以达到居中的效果 */
    z-index: 9999;
    /* 确保通知位于其他元素之上 */
    padding: 10px;
    border-radius: 5px;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);*/
    transition: opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    /* 当透明度为0时，元素不会接收点击事件 */
}

.success {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.failure {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* The Modal (background) */
.error-popup {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.error-popup.show {
    opacity: 1;
    visibility: visible;
}

/* Popup Content */
.error-popup-content {
    background-color: #fefefe;
    color: #333;
    /* Text color */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    max-width: 400px;
    transform: scale(0.9);
    /* Slightly smaller */
    transition: transform 0.3s;
}

.error-popup.show .error-popup-content {
    transform: scale(1);
    /* Scale to normal size */
}

/* The Close Button */
.error-popup-close-btn {
    color: #aaa;
    /* Button color */
    float: right;
    font-size: 28px;
    margin-left: 50px;
    cursor: pointer;
}

.error-popup-close-btn:hover,
.error-popup-close-btn:focus {
    color: #000;
    /* Button color on hover/focus */
    text-decoration: none;
    cursor: pointer;
}

/* Error message styling */
#errorPopup h2 {
    color: #d9534f;
    /* Header color for error */
}

/* Add some padding to the top and bottom of the popup */
.error-popup-content {
    padding-top: 30px;
    padding-bottom: 30px;
}

/*---------------------------------------------------------*/
/*聊天历史窗口*/
#chat-history-container {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 5px 10px;
    background-color: #f6f6f6;
    height: 100%;
    overflow-y: scroll;
}

#chat-history-container::-webkit-scrollbar {
    display: none;
}

/*---------------------------------------------------------*/
/*聊天窗口*/
#chat-container {
    height: 100%;
    width: 100%;
    background-color: #f6f6f6;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.title-box {
    /* height: 60px; */
    padding: 15px;
    text-align: center;
    position: absolute;
    /* 使得标题框悬浮在对话框顶部 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* 确保标题框在最顶层 */
    background-image: linear-gradient(to bottom,
        rgba(255, 255, 255, 1) 5%,
        rgba(255, 255, 255, 0.9) 15%,
        rgba(255, 255, 255, 0.8) 30%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 0.6) 80%);
    /* 垂直渐变磨砂半透明效果，这里的透明度可以根据需要调整 */
    backdrop-filter: blur(10px);
    /* 添加模糊效果 */
    -webkit-backdrop-filter: blur(10px);
    /* 添加模糊效果，兼容旧版 Safari */
    /* border-bottom: 1px solid #e9e9e999; */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 10px;
    border-radius: 15px;
}

#title {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 3px;
}


.title-link-header {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
}

.title-tag {
    display: block;
    background-color: #e7eefc;
    color: #3277e5;
    padding: 5px 10px;
    margin: 2px 2px;
    border-radius: 10px;
    border: 1px solid #508be8;
    font-size: 0.85rem;
    font-weight: 100;
    width: 160px;
}

.title-tag-neg {
    display: block;
    background-color: #e7e7e7;
    color: #9b9b9b;
    padding: 5px 10px;
    margin: 2px 2px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    font-size: 0.85rem;
    font-weight: 100;
    width: 130px;
}

.title-ai-logo{
    font-size: 13px;
    background-color: #f1e6d2;
    color: #5C4033;
    border-radius: 5px;
    width: 21px;
    height: 21px;
    text-align: center;
    margin: 0px 0px 0px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/*-----------------------------------------------------------------*/


.translation-button {
    position: absolute;
    /* 绝对定位相对于 title-box */
    top: 110%;
    transform: translateY(-50%);
    /* 垂直居中箭头 */
    padding: 5px 10px;
    cursor: pointer;
    transition-duration: 0.3s;
}

.translation-button:hover {
    top: 140%;
    transition-duration: 0.3s;
}

.translation-button:hover .translate-text {
    display: block;
    /* 鼠标悬浮时展示翻译文字 */
    transition-duration: 0.3s;
}

.translate-icon {
    color: #7e7e7e !important;
    display: inline-block;
    transition: transform 0.3s ease;
    /* 平滑转换动画 */
}

.translation-button:hover .translate-icon {
    opacity: 0;
    transform: rotate(-180deg);
    /* 点击时旋转 '箭头' icon */
}

.translate-text {
    display: none;
    /* 默认不展示 '翻译' 文字 */
    white-space: nowrap;
    background-color: #e9e9e9;
    border-radius: 10px;
    border: 2px solid #fff;
    color: #545454;
    font-size: 0.8rem;
    padding: 5px 10px;
    margin: 5px 0px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#arg-container-right {
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
/*    padding: 5px 10px;*/
    background-color: #f6f6f6;
    height: 100%;
    overflow-y: scroll;
}

#arg-container-right #link-box {
    padding: 10px;
    text-align: center;
}

.arg-title-box {
    height: 60px;
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e9e9e999;
    background-color: #fff;
    display: flex;
    /* 使用flex布局用来居中子元素 */
    flex-direction: row;
    align-items: center;
    /* 垂直居中对齐子元素 */
    justify-content: space-between;
}

.arg-title {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
}

h4 {
    margin-top: 10px;
    margin-bottom: 5px;
    color: #555;
}

#feedback {
    margin-right: 5px;
    /*color: #999;
    font-style: italic;
    font-size: 0.8em;
    min-height: 17px;
    max-height: 17px;
    height: 17px;
    margin-left: 5px;
    overflow: hidden;*/
}


#chat-window-box {
    height: 400px;
    width: 100%;
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    padding-top: 50px;
    margin-top: 20px;
    padding-bottom: 100px;
    margin-bottom: 20px;
}

#chat-window-box::-webkit-scrollbar {
    width: 0px; /* 滚动条的宽度 */
    height: 0px; /* 滚动条的高度 */
}


#output {
/*    white-space: pre-wrap;*/
    white-space: normal;
}

.input-module {
    width: 100%;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    position: absolute;
}

.msg-input-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0px 10px 10px 10px;
    border-radius: 15px;
/*    background-color: #fff;*/
    padding: 5px;
    /* 确保标题框在最顶层 */
    background-image: linear-gradient(to top,
        rgba(255, 255, 255, 1) 5%,
        rgba(255, 255, 255, 0.9) 15%,
        rgba(255, 255, 255, 0.8) 30%,
        rgba(255, 255, 255, 0.7) 60%,
        rgba(255, 255, 255, 0.6) 80%);
    /* 垂直渐变磨砂半透明效果，这里的透明度可以根据需要调整 */
    backdrop-filter: blur(10px);
    /* 添加模糊效果 */
    -webkit-backdrop-filter: blur(10px);
    /* 添加模糊效果，兼容旧版 Safari */
}

.msg-fn-btn-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.msg-fn-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.msg-fn-btn-right {
    margin-left: auto;
    justify-content: flex-end;
}

.msg-input-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

#message-input {
    width: 100%;
    border: 0;
    padding: 15px;
    font-size: 1em;
    border-radius: 10px;
    resize: vertical;
    overflow-y: scroll;
    min-height: 45px;
    max-height: 160px;
    background-color: #f7f7f700;
}

#message-input::-webkit-scrollbar {
    display: none;
}

#message-input {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */

}

textarea::placeholder {
    color: #a7a7a7; /* 将 #999 替换为你想要的颜色值 */
}



.btn-box {
    position: relative;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    padding: 5px;
    margin: 5px 0;
    align-items: center;
}

.uni-box {
/*    border: 1px solid #ddd;*/
    border-radius: 18px;
    margin: 5px 10px 15px 10px !important;
    padding: 3px !important;
    justify-content: space-evenly;
    align-items: end;
}

.fun-btn-box {
    flex-wrap: wrap;
}

.button {
    padding: 10px 20px;
    border: none;
    font-size: 1em;
    cursor: pointer;
    border-radius: 15px;
    transition: background-color 0.2s;
}

.button:hover {
    filter: brightness(1.1);
    transition-duration: 300ms;
}

.send-btn {
    font-size: 13px;
    color: #5C4033;
    border: none;
    background-color: #f1e6d2;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 13px;
    margin: 5px;
    transition-duration: 300ms;
}

.send-btn:hover {
    color: #fff;
    background-color: #333;
    transition-duration: 300ms;
}

.new-conv-btn {
    font-size: 21px;
    color: #878787;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 15px;
    transition-duration: 0.2s;
    text-align: center;
}

.new-conv-btn:hover {
    color: #333;
}

.new-conv-btn.active {
    color: #468e69;
    background-color: #ecfcf4;
}

.new-conv-btn.active:hover {
    color: #468e69;
    background-color: #d8f5e6;
}

.thinking-toggle-btn {
    font-size: 12px;
    letter-spacing: 0.5px;
    /* font-weight: 500; */
    padding: 8px 12px;
    /* border: 1px solid #e0e0e0; */
    border-radius: 8px;
    background-color: #f0f0f0b5;
    user-select: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    margin-right: 5px;
}

.thinking-toggle-btn.active {
    /* border-color: #b9f0cf; */
    background-color: #d8f5e6;
}

.save-btn,
.regenerate-btn,
.remove-last-btn {
    background: #efefef;
    color: #292929;
    margin: 2px;
    width: 32%;
    height: 100%;
    display: none;
}

/* 隐藏和显示更多按钮的小框 */
.hidden {
    display: none;
}

.more-options-box {
    position: absolute;
    left: 0; /* 根据按钮的实际位置调整 */
    bottom: 100%; /* 将小框放置在按钮的上方 */
    margin-bottom: 5px; /* 添加一点间隔 */
    width: auto; /* 自动根据内容调整宽度 */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 5px; /* 根据需要调整内边距 */
/*    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);*/
    z-index: 1000; /* 确保小框在其他元素之上 */
}

/* Additional styling for message boxes */
.user-message,
.ai-message,
.ai-status,
.user-status {
    font-family: "Inter";
    padding: 2px 12px;
    border-radius: 15px;
    margin: 0px 0 5px 0;
    clear: both;
    max-width: 90%;
    word-wrap: break-word;
    overflow-x: hidden;
/*    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);*/
}

.user-message {
/*    background-color: #0b93f6;*/
    background-color: #4d4d4d;
    color: white;
    float: right;
    border-radius: 15px 15px 4px 15px;
}

.ai-message {
    background-color: #e8e8e8;
    float: left;
    border-radius: 15px 15px 15px 4px;
}

.user-message img,
.ai-message img{
    width: 100%;
    border-radius: 15px;
    margin: 10px 0px;
}

.user-message audio,
.ai-message audio{
    margin: 5px 5px 10px 5px;
}

.user-message iframe,
.ai-message iframe{
    max-width: 100%;
    border-radius: 15px;
}

/*time*/
.user-time-message,
.ai-time-message {
    padding: 5px;
    margin: 5px 0 0 0;
    clear: both;
    max-width: 80%;
    word-wrap: break-word;
    color: #8f8f8f;
    float: right;
    font-size: 13px;
}

.user-time-message {
    float: right;
}

.ai-time-message {
    float: left;
}

/* Clear floats  */
#output:after {
    content: "";
    display: table;
    clear: both;
}

/*Table Style*/
#msg-content table,
#stream-output table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
}

#msg-content th,
#msg-content td,
#stream-output th,
#stream-output td {
    border: 1px solid #ddd;
    padding: 8px;
}

#msg-content th,
#stream-output th {
    background-color: #f2f2f2;
    text-align: left;
}

#msg-content tr:nth-child(even),
#stream-output tr:nth-child(even) {
    background-color: #fafafa;
}

#msg-content tr:hover,
#stream-output tr:hover {
    background-color: #e6f7ff;
}

/* Adjust textarea to grow with content */
textarea {
    overflow-y: hidden;
    /* Prevent scrollbar */
    height: auto;
    /* Initial height */
    resize: none;
    /* Prevent resizing */
}

/*textarea:focus {
    box-shadow: 0 0 5px #5cb85c;
    border: 1px solid #5cb85c;
    outline: none;
}*/

.arg-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px 0px;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 10px;
    /*    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);*/
}

.header h4 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 15px;
}


#arg-container-right button {
    color: white;
    font-size: 12px;
    padding: 10px 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    margin: 5px;
    /*    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);*/
    transition: background-color 0.2s;
    /* Smooth transition for the hover effect */
}

/* #arg-container-right button:hover { */
/*    background-color: #0056b3;*/
/* } */


/* Hide scrollbar for Chrome, Safari and Opera */
#arg-container-right::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
#arg-container-right {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

#login-box {
    width: 100%;
}

.google-logo-icon{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.g_id_signin {
    display: none;
}

/* Custom styles for the custom sign-in button */
.custom-signin-btn {
    border: 1px solid #333;
    color: #333;
    border-radius: 15px;
    padding: 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    transition-duration: 0.3s;
}

.custom-signin-btn p{
    margin: 5px;
}

.custom-signin-btn i{
    margin: 5px;
}

.custom-signin-btn:hover {
    background-color: #f2f2f2;
}

.signin-btn {
    width: 100%;
}

#login-box .g_id_signin {
    border-radius: 20px !important;
}

/* 用户信息框样式 */
#user-info-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.user-info-box {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.user-info-box__avatar {
    height: 40px;
    width: 40px;
    border-radius: 15px;
    object-fit: cover;
}

.user-info-box__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-left: 10px;
}

.user-info-box__name {
    color: #5C4033;
    font-size: 15px;
    margin: 0;
    font-weight: bold;
}

.user-info-box__balance {
    color: #878787;
    font-size: 12px;
    margin: 0;
}

.details {
    height: 0;
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: height 0.5s cubic-bezier(.4,0,.2,1), opacity 0.3s;
}

.details:not(.show) {
    overflow: hidden;
}

.details.show {
    opacity: 1;
}

#log-out{
    display: none;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    background-color: #e46962;
    transition-duration: 0.3s;
    cursor: pointer;
}

.logout-button {
    color: #ffffff;
    width: 100%;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

#log-out:hover {
    background-color: #ff5e55;
    transition-duration: 0.3s;
}


.disabled-button {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-status-success {
    background-color: #5cb85c !important;
}

.btn-status--fail {
    background-color: #df4b45 !important;
}

#link {
    font-weight: bold;
    color: #333333;
    width: 95%;
    margin: 10px 0px 15px 0px;
    height: 25px;
}

.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#model-title {
    font-weight: bold;
    color: #636363;
}

/* 容器样式 */
.model-selector {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    background-color: #f7f7f7;
    color: #5C4033;
    border-radius: 8px;
    /* 凹陷效果 */
    box-shadow: inset 0 0 5px rgb(242 242 242 / 20%);
    /* 阴影模拟凹陷 */
}

.arg-box {
    margin: 10px;
}

#model-title {
    font-size: 16px;
    margin-bottom: 5px;
}

#model-dropdown {
    width: 100%;
    padding: 8px;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 4px;
    background-color: #ffffff00;
    color: #757575;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 30px; /* Add space for the icon */
}

#model-dropdown:focus {
    outline: none;
    border-color: #999;
}

.dropdown-icon {
    font-size: 12px;
    color: #757575;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* Ensure icon doesn't block dropdown interaction */
}

/*---------------------------------*/

.switch-buttons {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 10px;
}

/* 开关按钮通用样式 */
.switch-buttons div {
    background-color: #e9e9e9;
    border: 1px solid #e9e9e9;
    color: #7d7d7d;
    padding: 8px 13px;
    margin: 2px;
    cursor: pointer;
    border-radius: 10px;
    transition: background-color 0.3s, color 0.3s;
}

/* 鼠标悬停和选中状态的样式 */
.switch-buttons div.active {
/*    background-color: #4CAF50;*/
/*    color: white;*/

    background-color: #ecfcf4;
    color: #468e69;
    border: 1px solid #b9f0cf;
}

/*---------------Tempertaure------------------*/
/*Temperature Slider*/

#set-temperature {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
}

.setting-parameters-title {
    font-size: 13px;
    font-weight: bold;
    color: #636363;
    margin: 5px;
    margin-bottom: 10px;
}

.temperature-slidecontainer {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/* 自定义整个滑块的样式 */
.temp-slider-box {
    -webkit-appearance: none; /* 重置默认样式 */
    width: 100%; /* 设置滑块的宽度 */
    height: 8px; /* 设置滑块的高度 */
    outline: none; /* 去掉轮廓 */
    opacity: 0.7; /* 设置透明度 */
    border-radius: 50px;
    -webkit-transition: .2s; /* 过渡效果 */
    transition: opacity .2s;
    background: linear-gradient(to right, #f1e6d2 0%, #f1e6d2 0%, #ddd 0%, #ddd 100%);
}

/* 滑块的样式 */
.temp-slider-box::-webkit-slider-thumb {
    -webkit-appearance: none; /* 重置默认样式 */
    appearance: none;
    border: none; /* 移除默认边框 */
    height: 16px; /* 滑块高度 */
    width: 16px; /* 滑块宽度 */
    border-radius: 50%; /* 圆形滑块 */
    background: #5C4033;
    margin-top: -4px; /* 确保滑块居中 */
    cursor: pointer;
}

/* 滑块的滑动背景 */
.temp-slider-box::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px; /* 滑动背景高度 */
    border-radius: 50px;
    border: none;
}

.temp-input-box {
    width: 35px;
    text-align: center;
    border: none;
    background-color: #f7f7f7;
    padding: 5px 7px;
    border-radius: 10px;
    color: #6b6b6b;
    font-size: 13px;
}

.temp-input-box::-webkit-outer-spin-button,
.temp-input-box::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/*---------------System Prompt------------------*/

#prompt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
    width: 100%;
}

#prompt-input {
    width: 100%;
    height: auto;
    /* Adjust height based on the content */
    min-height: 80px;
    /* Minimum height */
    max-height: 80px;
    /* Max height */
    overflow-y: auto;
    border: 1px solid #f7f7f7;
    background-color: #f7f7f7;
    border-radius: 15px;
    padding: 10px;
    resize: vertical;
    /* Allow vertical resizing */
}

.prompt-btn-box {
    width: 100%;
}

.set-prompt-btn {
    width: 40%;
    background-color: #878787 !important;
    color: #fff !important;
    border: 1px solid #878787 !important;
    transition-duration: 0.2s;
}

.reset-prompt-btn {
    width: 40%;
    background-color: #ffffff !important;
    color: #878787 !important;
    border: 1px solid #878787 !important;
    transition-duration: 0.2s;
}


.set-prompt-btn:hover {
    background-color: #4a4a4a !important;
    border: 1px solid #4a4a4a !important;
    color: #fff !important;
    transition-duration: 0.2s !important;
}

.reset-prompt-btn:hover {
    background-color: #4a4a4a !important;
    border: 1px solid #4a4a4a !important;
    color: #fff !important;
    transition-duration: 0.2s !important;
}

/*---------------------------------*/

.tone-tag {
    background-color: #e7eefc;
    color: #3277e5;
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 10px;
    border: 1px solid #508be8;
    font-size: 0.85rem;
}

#output-status {
    margin: 10px;
    font-size: 0.9rem;
}

.status-bar {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 5px;
    margin-bottom: 5px;
}

.plan-element {
    background-color: #ecfcf4;
    color: #468e69;
    border: 1px solid #b9f0cf;
    border-radius: 10px;
    margin-top: 10px;
}

.memory-element {
    background-color: #e7effc;
    color: #1b479d;
    border: 1px solid #bcd4fc;
    border-radius: 10px;
    margin-top: 10px;
}

.memory-value {
    margin: 0px;
}

.rewrite-query {
    background-color: #fef1ef;
    color: #ce664f;
    border: 1px solid #fbd2c6;
    border-radius: 10px;
    margin-top: 10px;
}

.memory-key {
    width: 6px;
    height: 6px;
    margin: 3px;
    border: 1px solid #bcd4fc;
    border-radius: 50px;
}

.profile-element {
    display: flex;
    justify-content: left;
    flex-wrap: wrap;
    margin-top: 10px
}

.plan-info {
    display: flex;
    align-items: center;
    padding: 5px 5px;
    font-size: 0.85rem;
}

.plan-key {
    width: 100px;
    margin: 0px;
}

.plan-value {
    /*    width: 90%;*/
    margin: 0px;
}

.profile-tag {
    /*padding: 5px 10px;
    margin-right: 5px;
    background-color: #ecfcf4;
    border-radius: 10px;
    font-size: 0.9em;
    color: #468e69;
    border: 1px solid #b9f0cf;*/

    font-size: 0.85rem;
    padding: 5px 10px;
    margin: 2px;
    background-color: #fdf8ea;
    border-radius: 10px;
    color: #a27c40;
    border: 1px solid #fbd778;
}

.trans-text {
    margin-top: 10px;
    padding: 5px 10px;
    font-size: 0.85rem;
    background-color: #f7f7f7;
    color: #444152;
    border: 1px solid #d2d3db;
    border-radius: 10px;
}

.trans-tag {
    font-weight: 500;
}


/* loading */
#loading {
    margin: 10px 5px;
    padding: 5px;
}

.loader {
  display: flex;
  justify-content: space-evenly;
  width: 60px;
}

.loader span {
  width: 7px;
  height: 7px;
  background-color: #555;
  border-radius: 50%;
  display: inline-block;
  animation: flash 1.4s infinite ease-in-out both;
}

.loader span:nth-child(1) {
  animation-delay: -0.32s;
}

.loader span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes flash {
  0%, 80%, 100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}



/* 编辑功能CSS */
.content-bubble {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ai-bubble {
    float: left;
    align-items: flex-start;
}

.user-bubble {
    float: right;
    align-items: flex-end;
}

.edit-btn-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 5px;
    margin: 5px 0px 10px 0px;
    text-align: center;
    background-color: #ffffff;
    border-radius: 8px;
}

.edit-btn,
.full-copy-btn,
.save-edit,
.cancel-edit{
    display: inline;
    cursor: pointer;
    border: 0px;
    border-radius: 8px;
    margin: 3px;
    background-color: #ffffff00;
    font-size: 0.75rem;
    transition-duration: 0.3s;
}

.edit-btn,
.full-copy-btn{
    color: #878787;
    font-size: 13px;
    padding: 0px 8px;
    text-align: center;
}

.edit-btn:hover,
.full-copy-btn:hover{
    color: #333;
    transition-duration: 0.3s;
}

/* 隐藏按钮的初始样式 */
.save-edit,
.cancel-edit {
    display: none;
}

.save-edit {
    background-color: #4d4d4d;
    border: 1px solid #fff;
    color: #fff;
    padding: 5px 10px;
    border: 1px solid #4d4d4d;
    width: 70px;
}

.cancel-edit {
    padding: 5px 10px;
    background-color: #fff;
    color: #333;
    border: 1px solid #333;
    width: 70px;
}

/* 当鼠标悬浮在p标签上，显示编辑按钮 */
.content-bubble:hover .edit-btn,
.content-bubble:hover .full-copy-btn {
    display: inline;
}

/* 编辑模式下，显示保存和取消按钮 */
.editing .save-edit,
.editing .cancel-edit {
    display: inline;
}

/* 可编辑内容的样式 */
.editable {
    border: 1px solid #ccc;
    padding: 5px;
    margin: 10px 0;
    border-radius: 10px;
    min-width: 100px;
    max-width: 100%;
    display: inline-block;
    background-color: #ffffff00;
}

.chat-icon-box {
    height: 35px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #b2b2b2;
    font-size: 17px;
    /*    margin-left: 10px;*/
}

.link-tag {
    font-size: 13px;
    border-radius: 6px;
    padding: 4px 8px;
    width: 49px;
    background-color: #fff;
    margin: 6px;
    color: #727272;
    box-shadow: 0 0px 4px rgb(164 164 164 / 16%);
}



.history-convo-box {
    height: 100%;
    overflow-y: hidden;
}

#history-title {
    font-size: 15px;
    font-weight: bold;
    color: #636363;
}

#session-list {
    width: 100%;
    overflow-y: scroll;
    transition-duration: 0.2s;
}

/* 针对WebKit浏览器的滚动条样式 */
#session-list::-webkit-scrollbar {
    width: 0px; /* 设置滚动条宽度 */
    height: 0px;
}

.session-bubble {
    width: 100%;
    text-align: center;
    margin: 5px 0px;
    padding: 15px 10px;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition-duration: 0.1s;
}

.session-bubble:hover {
    background-color: #f0f0f0;
    transition-duration: 0.1s;
}

.session-bubble-selected {
    background-color: #f0f0f0;
}

.no-more-records {
    width: 100%;
    text-align: center;
    margin: 5px 0px;
    padding: 15px 15px;
    height: auto;
    color: #c6c6c6;
}

.down-arrow {
    display: none;
    position: absolute;
    margin-top: 465px;
    font-size: 13px;
    color: #b5b5b5;
    padding: 3px 8px;
    transition-duration: 0.2s;
    text-align: center;
}

.down-arrow:hover {
    cursor: pointer;
    background-color: #f3f3f3;
    border-radius: 5px;
    margin-top: 470px;
    transition-duration: 0.2s;
}

.convo-title-bar {
    width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-size: 0.85rem;
}

.delete-button {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25px;
}

.trash-icon {
    color: #b5b5b5;
    transition-duration: 0.2s;
}

.trash-icon:hover {
    color: #eb4b40;
    transition-duration: 0.2s;
}

.confirm-button {
    width: 45px !important;
    font-size: 10px !important;
    padding: 5px 2px !important;
    margin: 2px !important;
    background-color: #fde7e5;
    color: #eb4b40;
    border-radius: 5px;
/*    border: 1px solid #eb4b40;*/
}


.cancel-button {
    width: 45px !important;
    font-size: 10px !important;
    padding: 5px 2px !important;
    margin: 2px !important;
    color: #6a6a6a;
/*    border: 1px solid #6a6a6a;*/
/*    border-radius: 5px;*/
}


/* ---------------------- File Preview ---------------------- */

.file-preview-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    margin: 0px 10px 5px 10px;
}

#file-preview-container {
    width: auto;
    border-radius: 18px;
    background-color: #fff;
    padding: 8px;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-close-btn {
    margin: 10px;
    cursor: pointer;
    color: #9d9d9d;
}

.file-preview img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 12px;
}

.file-preview audio {
    margin-right: 10px;
}

.file-name {
    font-size: 14px;
    color: #333;
}



/*------------------------------Audio Record------------------------------*/

/*#recording-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 1000;
}*/

.audio-modal-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.audio-control-btn-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 5px;
    width: 350px;
}

#waves-canvas canvas {
    width: 350px;
    height: 50px;
}

#close-modal, #start-stop-record {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 5px;
    border-radius: 15px;
    background-color: #fff;
    border: 1px solid #9ca3af; /*#ea580c*/
    padding: 5px 10px;
    cursor: pointer;
    color: #333;
    transition-duration: 0.2s;
    width: 100px;
    height: 35px;
}


#close-modal:hover{
    color: #fff;
    background-color: #6e6e6e;
    border: 1px solid #6e6e6e;
    transition-duration: 0.2s;
}

#start-stop-record:hover{
    width: 100px;
    background-color: #ffd4d4;
    color: #ea580d;
    border: 1px solid #ea580d;
    transition-duration: 0.2s;
}

.record-word {
    text-align: center;
    width: 60px;
}

#record-time {
    font-weight: bold;
    font-size: 20px;
}

.record-dot {
    display: block;
    height: 10px;
    width: 10px;
    border-radius: 50%;
    background-color: #ea580c;
    margin: 3px;
    margin-right: 8px;
}

#start-stop-record {
    border-radius: 15px;
    background-color: #fff;
    border: 1px solid #9ca3af; /*#ea580c*/
    padding: 5px 10px;
}

#recording-modal #waveform {
    margin-bottom: 20px;
}

/*------------High light block custom----------------*/

#msg-content p {
    margin: 10px 0;
    line-height: 1.5rem;
    font-size: 0.9rem;
}

#msg-content,pre code {
    border-radius: 10px;
}

pre {
    position: relative;
}

code:not(pre code) {
    background-color: #f7f7f7; /* 浅灰色背景 */
    color: #333; /* 字体颜色 */
    padding: 2px 2px; /* 内边距 */
    border-radius: 4px; /* 圆角边框 */
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; /* 字体 */
    font-size: 0.8rem;
    margin: 0 3px;
    border: 1px solid #cfcfcf;
}

#msg-content .copy-btn {
    position: absolute;
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    color: #5c8cff;
    margin: 5px;
    font-size: 10px;
    top: 0;
    right: 0;
    opacity: 0;
    background-color: #ffffff;
    transition-duration: 0.2s;
    z-index: 10; /* 确保按钮位于其他内容之上 */
}

#msg-content pre:hover .copy-btn {
    opacity: 1;
}

#stream-output-message p{
    margin: 10px 0;
    line-height: 1.5rem;
    font-size: 0.9rem;
}

.think-content {
    font-size: 12px;
    color: #888888;
    border-left: 2px solid #888;
    padding: 0 5px;
}

/*------------------------------------------------------------*/
/* 定义滚动条轨道 */
::-webkit-scrollbar {
    width: 5px; /* 滚动条宽度 */
    height: 5px;
}

/* 定义滚动条滑块 */
::-webkit-scrollbar-thumb {
    background-color: #cbcbcb; /* 滑块背景颜色 */
    border-radius: 5px; /* 滑块圆角 */
}

/* 定义滚动条轨道背景 */
::-webkit-scrollbar-track {
    background-color: #ffffff00; /* 轨道背景颜色 */
}

/* 定义滚动条滑块悬停时样式 */
::-webkit-scrollbar-thumb:hover {
    background-color: #555; /* 滑块悬停时背景颜色 */
}


/*------------------------------------------------------------------------------------------------------*/

/* 媒体查询，当屏幕宽度小于1200像素时 */
@media (max-width: 1200px) {

    /* Adjust the size to vertical alignment if the width is too narrow */
    #main-container {
        width: 100%;
    }

    #chat-window {
        flex: 1 1 100%;
        height: 100vh;
        max-width: 100%;
    }

    #settings-panel {
        flex: 1 1 100%;
        height: 100%;
        max-width: 100%;
    }

    #chat-window,
    #settings-panel {
        padding: 10px;
    }

    #chat-container,
    #arg-container-right {
        border-radius: 18px;
    }

    .details.show{
        height: 32vh;
        opacity: 1;
    }
}


/* 媒体查询，当屏幕宽度小于768像素时 */
@media (max-width: 770px) {

    /* Adjust the size to vertical alignment if the width is too narrow */
    #main-container {
        width: 100%;
    }

    #chat-window {
        flex: 1 1 100%;
        height: 100vh;
        max-width: 100%;
    }

    #settings-panel {
        flex: 1 1 100%;
        height: 100%;
        max-width: 100%;
    }

    #chat-window,
    #settings-panel {
        padding: 10px;
    }

    #chat-container,
    #arg-container-right {
        border-radius: 18px;
    }


    .save-btn,
    .regenerate-btn,
    .remove-last-btn {
        width: 32%;
        height: 100%;
        font-size: 13px;
    }

    .user-message,
    .ai-message,
    .ai-status,
    .user-status {
        max-width: 100%;
    }
}


/* 媒体查询，当屏幕宽度小于768像素时 */
@media (max-width: 450px) {
    #chat-window,
    #settings-panel {
        padding: 10px;
    }

    #chat-container,
    #arg-container-right {
        border-radius: 18px;
    }

    #message-input {
        width: 80%;
    }

    .send-btn {
        width: 20%;
    }

    /* Adjust the size to vertical alignment if the width is too narrow */
    .save-btn,
    .regenerate-btn,
    .remove-last-btn {
        width: 100%;
        height: auto;
        font-size: 13px;
    }
}

/* 当用户的系统或浏览器设置为暗色模式时，应用以下样式 */
@media (prefers-color-scheme: dark) {
    html {
        filter: invert(1) hue-rotate(180deg) contrast(0.8);
    }

    /**
     * 反转媒体元素及彩色 emoji 的滤镜
     * emoji 是由系统彩色字体渲染的字符（非 DOM 元素），无法被选择器直接选中，
     * 因此在 JS 渲染消息时通过 wrapEmojis() 把每个 emoji 包进 <span class="emoji">，
     * 再在此处对其做"反反色"补偿，避免在暗色模式下出现颜色异常。
     */
    img, video, picture, canvas, iframe, embed,
    .emoji {
        filter: invert(1) hue-rotate(180deg);
    }

    /* 让内联 emoji span 维持文本基线、不影响布局 */
    .emoji {
        display: inline-block;
        line-height: inherit;
        vertical-align: baseline;
    }
}