@keyframes fa-spin {
    0% {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

body,html {
    height: 100%;
    margin: 0;
    font-family: "Segoe UI","San Francisco","Helvetica",Arial,sans-serif;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility
}

.container {
    display: flex;
    justify-content: center;
    height: 100%
}

.left-side {
    flex: 13;
    display: flex;
    flex-direction: column;
    background-color: #111
}

#close-sidebar,#new-chat,#top-part {
    border: 0;
    display: flex;
    align-items: center
}

#top-part {
    flex: .7;
    justify-content: space-between
}

#close-sidebar,#new-chat {
    background-color: #121212;
    padding: 7px;
    cursor: pointer;
    justify-content: center
}

#new-chat {
    margin-right: 13px
}

#close-sidebar .icon-svg,#new-chat .icon-svg {
    width: 22px;
    height: 22px;
    transition: opacity .2s,transform .1s;
    margin-top: .3px;
    filter: invert(100%);
    -webkit-font-smoothing: antialiased;
    font-weight: 700;
    stroke-width: 2px
}

#new-chat .icon-svg {
    opacity: .7
}

#new-chat:active .icon-svg,#new-chat:hover .icon-svg {
    opacity: 1
}

#new-chat:active .icon-svg {
    transform: scale(.95)
}

#close-sidebar {
    margin-left: 9.75px
}

#close-sidebar .icon-svg {
    opacity: 0.
}

#close-sidebar:active .icon-svg,#close-sidebar:hover .icon-svg {
    opacity: 1
}

#close-sidebar:active .icon-svg {
    transform: scale(.95)
}

#middle-part,.right-side {
    display: flex;
    flex-direction: column
}

#middle-part {
    flex: 9;
    border: 0;
    scroll-behavior: smooth;
    overflow-y: overlay;
    width: 257px
}

#private-chat {
    margin-bottom: 5px
}

#deep-query,#private-chat {
    font-size: 15px;
    background: 0 0;
    border: 0;
    color: #ececec;
    border-radius: 5px;
    padding: 9px;
    margin-left: 9px;
    text-align: left;
    display: inline-block;
    opacity: .9;
    width: 230px
}

#deep-query:hover,#private-chat:hover {
    background-color: #232323
}

#deep-query.active {
    background-color: #2f2f2f
}

#bottom-part {
    flex: 1;
    border: 0;
    position: relative
}

.right-side {
    flex: 87;
    justify-content: center;
    background-color: #1f1f1f;
    position: relative
}

.right-side.sidebar-hidden {
    padding-left: 100px
}

.right-side.sidebar-hidden .scroll-bottom-button {
    left: 51.9%
}

.top-panel {
    flex: 1;
    display: flex;
    border: 0;
    justify-content: space-between
}

.custom-select {
    position: relative;
    font-family: "Roboto",sans-serif;
    margin-right: auto
}

.select-selected {
    background-color: #1f1f1f;
    border: 0;
    margin-top: 9px;
    margin-right: auto;
    margin-left: 7.5px;
    font: 17px"Segoe UI";
    font-weight: 599;
    line-height: 1.5;
    height: 30px;
    color: #b4b4b4;
    padding: 7px 15px 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    max-width: calc(100% - 50px)
}

.select-items {
    position: absolute;
    background-color: #2a2a2a;
    border: 1px solid #383838;
    border-radius: 5px;
    left: 0;
    right: 0;
    z-index: 99;
    margin-left: 15px;
    max-height: 57vh;
    display: none;
    width: 500px;
    overflow-x: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,.2)
}

#model-search {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 10px 10px 10px 13px!important;
    margin: 0;
    background-color: #2a2a2a;
    color: #ececec;
    border: 0;
    border-bottom: 1px solid #383838;
    font-size: 15.3px;
    outline: 0;
    font-family: "Segoe UI";
    transition: background-color .2s,border-color .2s;
    letter-spacing: .2px
}

#model-search:focus {
    background-color: #2d2d2d;
    border-bottom-color: #484848
}

#model-search::placeholder,.popup-content input[type=number]::placeholder,.popup-content input[type=text]#model-parameters::placeholder {
    color: #888;
    opacity: .7
}

.model-option {
    padding: 13px 17px;
    cursor: pointer;
    color: #d6d6d6;
    font-size: 15.9px;
    border-radius: 0;
    margin: 0;
    border-bottom: 1px solid #383838;
    letter-spacing: .2px;
    line-height: 1.4;
    font-weight: 400
}

.model-option:last-child {
    border-bottom: none
}

.model-option.highlighted,.model-option:hover {
    background-color: #333;
    font-weight: 500
}

.select-items div {
    padding: 7.5px 13px;
    font: 15.9"Segou UI"!important;
    color: #d5d5d5;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box
}

.select-items div:hover {
    background-color: #444
}

#user-setting {
    background-color: #1f1f1f;
    border: 0;
    height: 35px;
    margin-top: 15px;
    margin-right: 30px;
    font-size: 25px;
    cursor: pointer
}

.middle-panel {
    display: flex;
    justify-content: center;
    flex: 9
}

.chat-wrapper {
    min-height: calc(100% + 7px);
    min-width: 100%
}

.message-container {
    max-width: 750px;
    width: 100%;
    padding-top: 9px;
    margin: 0 auto 50px;
    display: flex;
    flex-direction: column
}

#scroller * {
    overflow-anchor: none
}

#anchor {
    overflow-anchor: auto;
    height: 1px
}

#assistant-message,#user-message {
    display: inline-block;
    margin: 0;
    line-height: 1.7
}

#user-message {
    background-color: #2e2e2e;
    color: #e7e7e7;
    border-radius: 1.5rem;
    font-size: 15.973px;
    padding: 9.7px 19.7px;
    max-width: 530px;
    word-wrap: break-word
}

#user-message p {
    margin: 0
}

#assistant-message {
    color: #ececec;
    border-radius: 30px;
    font-size: 15.97px;
    padding: 5px 0 3px 7px;
    width: 730px
}

#assistant-message p {
    margin-bottom: 0
}

#assistant-message li {
    margin-top: .5em;
    margin-bottom: .5em;
    position: relative;
    padding-left: .37em
}

#assistant-message li::before {
    content: "";
    position: absolute;
    left: 0
}

strong {
    color: #e9e9e9;
    font-weight: 597
}

.bottom-panel {
    flex: 1;
    display: flex;
    justify-content: center
}

.bottom-panel form {
    display: flex;
    align-items: flex-end;
    height: 50px
}

#submit-button,#upload-files,#user-input {
    height: 50px;
    max-height: 200px;
    background-color: #2c2c2c;
    border: 0;
    z-index: 1000
}

#user-input {
    box-sizing: border-box;
    width: 700px;
    padding: 13px 0 13px 9px;
    outline: 0;
    font: 16px"Segoe UI";
    color: #e5e5e5;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    resize: none;
    flex-grow: 1;
    -ms-overflow-style: none
}

#submit-button,#upload-files {
    width: 70px;
    padding-left: 19px;
    padding-bottom: 5px;
    border-radius: 0 30px 30px 0;
    font-size: 35px
}

#upload-files {
    width: 50px;
    padding-left: 13px;
    padding-bottom: 3px;
    border-radius: 30px 0 0 30px;
    font-size: 23px
}

.fa-angle-down {
    margin-left: 5.3px;
    font-size: 13.7px!important
}

.fa-pencil-square-o {
    opacity: .7;
    font-size: 21px!important
}

.fa-pencil-square-o:hover {
    opacity: .97
}

.sidebar-button .fa-pencil-square-o {
    padding-top: 5px;
    font-size: 21px!important
}

.fa-columns {
    opacity: .57;
    font-size: 20px!important
}

.fa-columns:hover {
    opacity: .97
}

.sidebar-button .fa-columns {
    margin-bottom: 10px;
    font-size: 20px!important
}

.fa-cog {
    opacity: .7
}

.fa-cog:hover {
    opacity: .97
}

.fa-arrow-circle-up,.fa-paperclip {
    opacity: .5
}

.fa-arrow-circle-up:hover,.fa-paperclip:hover {
    opacity: .95
}

.fa-clone {
    opacity: .7;
    margin-right: 1.5px
}

.fa-qrcode,.fa-toggle-off {
    opacity: .79;
    margin-right: 15px;
    font-size: 17.9px!important
}

.fa-qrcode {
    margin-right: 17.7px;
    padding-left: 1.9px
}

.fa-times {
    font-size: 16px
}

.popup {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    top: 0;
    left: 0;
    z-index: 1001
}

.popup-content {
    background-color: #262626;
    padding: 25px;
    border: 1px solid #333;
    width: 500px;
    border-radius: 10px;
    color: #ececec;
    box-shadow: 0 4px 15px rgba(0,0,0,.3)
}

.popup-content h2 {
    color: #ececec;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 500
}

.popup-content .input-group,.popup-content form {
    display: flex;
    flex-direction: column;
    gap: 15px
}

.popup-content .input-group {
    gap: 5px
}

.popup-content button {
    background-color: #2f2f2f;
    color: #ececec;
    border: 0;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px
}

.popup-content button[onclick="saveSettings()"] {
    margin-top: 15px;
    transition: background-color .2s
}

.popup-content button[onclick="saveSettings()"]:hover {
    background-color: #404040
}

.close-btn {
    color: #888;
    float: right;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    margin-top: -15px;
    margin-right: -15px
}

.close-btn:hover {
    color: #ececec
}

#warning-message {
    color: red;
    margin: 10px 0;
    display: none
}

div p code {
    background-color: #1a1a1a;
    padding: 1px 5px;
    border-radius: 3px;
}

div ol li code {
    background-color: #1a1a1a;
    padding: 1px 5px;
    border-radius: 3px;
}

div ul li code {
    background-color: #1a1a1a;
    padding: 1px 5px;
    border-radius: 3px;
}

.hljs {
    background: #282c34;
    color: #f1f1f1!important;
    font: 15.3px"Consolas";
    line-height: 1.5
}

.hljs-line {
    display: inline-block;
    width: 100%;
    margin: 0 !important;
}

.code-block {
    margin: 10px 0;
    background-color: #1a1a1a;
    border: 0.3px solid #3e3e3e;
    border-radius: 3px;
}

.code-block pre {
    margin: 0;
    padding: 0 !important;
    border-radius: 3px 3px 0 0 !important;
    background-color: #1a1a1a !important;
}

.code-block pre code {
    font: 15px "Consolas";
    padding: 19px !important;
    line-height: 1.9 !important;
    background-color: #1a1a1a !important;
}

.code-block .code-title {
    background-color: #333;
    color: #b3b3b3;
    padding: 3px 7px 3px 19px;
    display: flex;
    font: 13.97px"Arial";
    justify-content: space-between;
    align-items: center
}

.code-block .code-title .copy-button {
    background: 0 0;
    border: 0;
    color: #888;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 13px;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center
}

.code-block .code-title .copy-button:hover {
    background-color: #3a3a3a;
    color: #ececec
}

.code-block .code-title .copy-button i {
    font-size: 14px
}

.code-block .code-title .copy-button .fa-check {
    color: #ececec
}

#chat-history {
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    margin-top: 23px;
    max-height: calc(100vh - 150px);
    padding-bottom: 15px;
    padding-right: 0
}

#chat-history::-webkit-scrollbar {
    display: none;
    width: 7px
}

#chat-history:hover::-webkit-scrollbar {
    display: block
}

#chat-history:hover::-webkit-scrollbar-track {
    background: 0 0
}

#chat-history:hover::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px
}

#chat-history:hover::-webkit-scrollbar-thumb:hover,.edit-container textarea::-webkit-scrollbar-thumb:hover,::-webkit-scrollbar-thumb:hover {
    background: #666
}

.conversation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    margin: 1.997px 7px;
    background: 0 0;
    color: #fefefe;
    border-radius: 7px;
    cursor: pointer;
    opacity: .9;
    min-height: 35px;
    font-size: 14.49px;
    box-sizing: border-box;
    width: calc(100% - 14px);
    position: relative
}

.conversation-item:hover {
    background: #232323
}

.conversation-item.active {
    background: #252525;
    border-left: 2px solid #666
}

.conversation-item span {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding-right: 20px;
}

.conversation-item:hover span {
    position: static;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
}

.conversation-item:hover {
    position: relative;
}

.conversation-item:hover span {
    position: absolute;
    z-index: 1000;
    background-color: #232323;
    padding: 7px 12px;
    border-radius: 7px;
    white-space: normal;
    word-wrap: break-word;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    left: 0;
    right: 0;
}

.conversation-item:hover .delete-button {
    z-index: 1001;
}

.delete-button {
    background: 0 0;
    border: 0;
    color: #666;
    cursor: pointer;
    padding: 3px;
    margin-left: 3px;
    opacity: 0;
    position: absolute;
    right: 5px;
    z-index: 1;
    transition: opacity .2s ease
}

.conversation-item:hover .delete-button {
    opacity: 1
}

.delete-button:hover {
    color: #f44
}

#show-sidebar {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #212121;
    font-size: 25px;
    z-index: 10
}

.sidebar-buttons {
    position: absolute;
    top: 11.5px;
    left: 9.5px;
    display: flex;
    gap: 10px;
    z-index: 10
}

#show-sidebar,.sidebar-button {
    border: 0;
    height: 35px;
    width: 35px;
    cursor: pointer
}

.sidebar-button {
    background-color: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center
}

.sidebar-button .icon-svg {
    width: 22px;
    height: 22px;
    opacity: .7;
    transition: opacity .2s;
    margin-top: 2.79px;
    margin-left: 2.7px;
    font-weight: bolder
}

.sidebar-button:hover .icon-svg {
    opacity: .97
}

.fa-stop-circle-o {
    opacity: .5
}

.fa-stop-circle-o:hover {
    opacity: .95
}

.scroll-bottom-button {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    border: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    opacity: .3;
    transition: opacity .2s
}

.scroll-bottom-button:hover {
    opacity: .93
}

.scroll-bottom-button i {
    font-size: 25px;
    color: #ececec
}

#assistant-message pre {
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto
}

#assistant-message blockquote {
    border-left: 4px solid #555;
    margin: 1em 0;
    padding-left: 1em;
    color: #b4b4b4
}

#assistant-message ol,#assistant-message ul {
    padding-left: 2em;
    margin: 1em 0
}

#assistant-message table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%
}

#assistant-message td,#assistant-message th {
    border: 1px solid #444;
    padding: 8px;
    text-align: left
}

#assistant-message pre,#assistant-message th,#private-chat.active,.copy-button:hover,.scroll-bottom-button {
    background-color: #2f2f2f
}

#assistant-message img {
    max-width: 100%;
    height: auto
}

#assistant-message h1,#assistant-message h2,#assistant-message h3,#assistant-message h4,#assistant-message h5,#assistant-message h6 {
    color: #e7e7e7;
    opacity: .975
}

.fa-user-circle,.fa-user-circle-o {
    opacity: .79;
    margin-right: 15px;
    font-size: 17.9px!important
}

* {
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
    transition: scrollbar-color .3s ease
}

:hover {
    scrollbar-color: #666 transparent
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    display: none
}

::-webkit-scrollbar-track {
    background: 0 0
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
    transition: background .3s ease,width .3s ease
}

#chat-history,#user-input,.middle-panel,.select-items {
    scroll-behavior: smooth;
    overflow-y: overlay
}

.copy-button {
    background: 0 0;
    border: 0;
    color: #ececec;
    padding: 7px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s ease;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center
}

.icon-svg {
    width: 14px;
    height: 14px;
    opacity: .7;
    transition: opacity .2s ease;
    filter: invert(100%)
}

.select-selected:focus,.toggle-password:focus,button:focus,div:focus,input:focus,select:focus,textarea:focus {
    outline: 0!important;
    box-shadow: none!important
}

.edit-cancel-button,.edit-save-button,.edit-send-button {
    padding: 8px 16px;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s,transform .1s
}

.assistant-message-container,.user-message-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 0
}

.user-message-container {
    align-items: flex-end;
    align-self: flex-end
}

.assistant-message-container {
    align-items: flex-start;
    align-self: flex-start
}

.password-input-wrapper,.toggle-password {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%
}

#base-url,.password-input-wrapper input {
    width: 100%;
    padding: 10px 35px 10px 10px;
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px;
    color: #ececec;
    font-size: 14px;
    height: 38px;
    line-height: 18px;
    box-sizing: border-box
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 49.95%;
    transform: translateY(-50%);
    background: 0 0!important;
    border: 0;
    color: #888;
    cursor: pointer;
    padding: 5px!important;
    margin: 0!important;
    font-size: 14px;
    justify-content: center;
    width: 25px;
    height: 25px
}

.toggle-password:hover {
    color: #ececec;
    background: 0 0!important
}

#base-url {
    padding: 10px
}

.conversation-group-header {
    color: #888;
    font-size: .8em;
    padding: 5px 15px 7px 17.93px;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500
}

.conversation-group-header:not(:first-child) {
    border-top: 1px solid #333;
    margin-top: 10px;
    padding-top: 8px
}

#bottom-part:hover .export-buttons,.file-indicator-container:hover .message-buttons,.user-message-container:hover .message-buttons {
    opacity: 1
}

.message-edit-button,
.message-copy-button,
.message-continue-button,
.message-delete-button,
.message-view-button {
    background: 0 0;
    border: 0;
    color: #ececec;
    padding: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s ease;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-edit-button:hover,
.message-copy-button:hover,
.message-continue-button:hover,
.message-delete-button:hover,
.message-view-button:hover {
    background-color: #2f2f2f;
}

.message-edit-button .icon-svg,
.message-copy-button .icon-svg,
.message-continue-button .icon-svg,
.message-delete-button .icon-svg,
.message-view-button .icon-svg {
    width: 14px;
    height: 14px;
    opacity: .7;
    transition: opacity .2s ease;
    filter: invert(75%);
}

.message-edit-button:hover .icon-svg,
.message-copy-button:hover .icon-svg,
.message-continue-button:hover .icon-svg,
.message-delete-button:hover .icon-svg,
.message-view-button:hover .icon-svg {
    opacity: 1;
}

.message-delete-button:hover .icon-svg {
    filter: invert(37%) sepia(93%) saturate(7471%) hue-rotate(353deg) brightness(90%) contrast(113%)
}

.edit-container {
    width: 100%;
    max-width: 730px;
    margin: 10px 0;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;
    background-color: #2f2f2f;
}

.edit-container textarea {
    width: 100%;
    min-height: 120px;
    background-color: #262626;
    border: 1px solid #383838;
    border-radius: 5px;
    color: #ececec;
    font-family: "Segoe UI", sans-serif;
    font-size: 15.579px;
    line-height: 1.7;
    padding: 10px;
    margin-bottom: 10px;
    resize: vertical;
    outline: 0;
    transition: border-color .2s ease;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
    overflow: hidden;
}

.edit-container textarea:focus {
    border-color: #484848;
}

.edit-container textarea:hover {
    scrollbar-color: #666 transparent;
}

.edit-container textarea::-webkit-scrollbar {
    width: 7px;
    display: block;
}

.edit-container textarea::-webkit-scrollbar-track {
    background: 0 0;
}

.edit-container textarea::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}

.edit-buttons,
.edit-buttons-right {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.edit-button {
    padding: 8px 16px;
    border: 0;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color .2s, transform .1s;
    color: #ececec;
    font-family: "Segoe UI", sans-serif;
}

.edit-button:active {
    transform: scale(.98);
}

.edit-save-button {
    background-color: #2d2d2d;
}

.edit-save-button:hover {
    background-color: #383838;
}

.edit-send-button {
    background-color: #404040;
}

.edit-send-button:hover {
    background-color: #4a4a4a;
}

.edit-cancel-button {
    background-color: #333;
}

.edit-cancel-button:hover {
    background-color: #3d3d3d;
}

#additional-setting {
    background-color: #1f1f1f;
    border: 0;
    height: 35px;
    margin-top: 15px;
    margin-right: 15px;
    font-size: 25px;
    cursor: pointer
}

.fa-sliders {
    opacity: .7
}

.fa-sliders:hover {
    opacity: .97
}

#system-content,.popup-content textarea#model-parameters {
    width: 100%;
    min-height: 70px;
    max-height: 150px;
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px;
    color: #ddd;
    font-size: 15px;
    padding: 12px;
    margin-top: 5px;
    resize: vertical;
    font-family: "Segoe UI",sans-serif;
    line-height: 1.6;
    box-sizing: border-box;
    letter-spacing: .2px
}

#system-content:focus,.popup-content textarea#model-parameters:focus {
    border-color: #505050;
    outline: 0;
    background-color: #333
}

#system-content::placeholder,.popup-content textarea#model-parameters::placeholder {
    color: #888;
    opacity: .7;
    font-size: 14.5px
}

.popup-content .input-group {
    margin-bottom: 20px;
}

.popup-content .input-group:last-of-type {
    margin-bottom: 15px;
}

.popup-content .input-group > label {
    display: block;
    margin-bottom: 5px;
    color: #ececec;
    font-size: 14px;
}

.popup-content .input-group > label i {
    opacity: 0.7;
    margin-right: 5px;
}

.popup-content input[type=number] {
    width: 100%;
    height: 38px;
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px;
    color: #ececec;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    -moz-appearance: textfield;
    appearance: textfield
}

.popup-content input[type=number]:focus,.popup-content input[type=text]#model-parameters:focus {
    border-color: #505050;
    outline: 0
}

.popup-content input[type=number]::-webkit-inner-spin-button,.popup-content input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.popup-content input[type=text]#model-parameters {
    width: 100%;
    height: 38px;
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px;
    color: #ececec;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box
}

#export-chat {
    padding: 9px;
    margin: 5px 9px;
    display: inline-block
}

#export-chat:hover,.export-button:hover {
    background-color: #232323
}

.fa-download {
    opacity: .79;
    margin-right: 15px;
    font-size: 17.9px!important
}

#export-chat,.export-button {
    font-size: 15px;
    background: 0 0;
    border: 0;
    color: #ececec;
    border-radius: 5px;
    font-weight: lighter;
    text-align: left;
    opacity: .9;
    width: 230px;
    cursor: pointer
}

.export-button {
    padding: 13px 9px;
    margin-bottom: 2px;
    margin-left: 9px;
    display: inline-flex;
    align-items: center;
    transition: background-color .2s ease
}

.fa-file-code-o,.fa-file-text-o {
    opacity: .79;
    margin-right: 15px;
    font-size: 15px!important;
    width: 16px;
    text-align: center;
    line-height: 1
}

.export-button span {
    line-height: 1
}

.export-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transition: opacity .2s ease;
    position: absolute;
    bottom: 10px;
    width: 100%
}

.parameter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px
}

#model-parameters,.parameter-button {
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px
}

.parameter-button {
    flex: 1;
    padding: 8px 12px;
    color: #ececec;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s ease
}

.parameter-button:hover {
    background-color: #383838
}

.parameter-button.active {
    background-color: #404040;
    border-color: #505050
}

#model-parameters {
    width: 100%;
    min-height: 70px;
    color: #ddd;
    font-size: 15px;
    padding: 12px;
    margin-top: 5px;
    resize: vertical;
    font-family: "Segoe UI",sans-serif;
    line-height: 1.6;
    box-sizing: border-box;
    letter-spacing: .2px
}

.fa-spin {
    animation: fa-spin 1s infinite linear
}

.popup-content button[disabled] {
    opacity: .7;
    cursor: not-allowed
}

.popup-content button[onclick="saveAdditionalSettings()"] {
    margin-top: 15px;
    transition: background-color .2s
}

.popup-content button[onclick="saveAdditionalSettings()"]:hover {
background-color: #404040;
}

.middle-panel.drag-over {
    background-color: rgba(45,45,45,.5);
    border: 2px dashed #555
}

.file-header,.file-icon {
    display: flex;
    align-items: center;
    width: 100%
}

.file-icon {
    margin-right: 10px;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #404040;
    border-radius: 8px
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.file-name {
    color: #e7e7e7;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px
}

.file-size {
    color: #999;
    font-size: 12px
}

.file-indicator-container .message-buttons {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity .2s ease;
    margin-top: 3px;
    padding: 0 5px
}


.file-indicator-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: fit-content;
    align-self: flex-end;
    margin: 10px 0 10px auto
}

.file-content,.file-indicator {
    padding: 12px;
    background-color: #2e2e2e;
    border-radius: 1.5rem
}

.file-indicator {
    display: flex;
    flex-direction: column;
    width: fit-content
}

.file-content {
    margin-top: 10px;
    font-size: 14px;
    color: #e7e7e7;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.5;
    font-family: "Segoe UI",sans-serif;
    width: 100%;
    box-sizing: border-box;
    position: relative
}

.file-content::-webkit-scrollbar {
    width: 8px;
    position: absolute;
    right: 0;
    height: 100%
}

.file-content::-webkit-scrollbar-track {
    background: 0 0;
    margin: 12px 0;
    border-radius: 0 1.5rem 1.5rem 0
}

.file-content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
    min-height: 40px
}

.file-content::-webkit-scrollbar-thumb:hover {
    background: #555
}

.message-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    transition: opacity .2s ease;
    margin-top: 5px
}

.user-message-container .message-buttons {
    opacity: 0
}

.assistant-message-container .message-buttons {
    opacity: 1
}

.image-preview,.toast {
    border-radius: 5px;
    display: flex;
    align-items: center
}

.image-preview {
    margin-top: 10px;
    justify-content: center;
    overflow: hidden
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 5px
}

.file-indicator.has-image {
    max-width: 250px
}

.file-indicator .file-icon img[alt=Image] {
    width: 20px;
    height: 20px
}

.toast {
    position: absolute;
    bottom: 97px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    padding: 12px 20px;
    background-color: #333;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 1000;
    gap: 10px;
    transition: transform .3s ease;
    white-space: nowrap
}

.toast.show {
    transform: translateX(-50%) translateY(0)
}

.toast.error {
    background-color: #dc3545;
    border-left: 4px solid #bd2130
}

.toast .toast-icon {
    font-size: 16px
}

.toast .toast-message {
    font-size: 14px;
    font-weight: 500
}

.hljs-template-tag {
    color: #7c9cff;  /* Light blue for control flow tags */
}

.hljs-template-variable {
    color: #e06c75;  /* Pink/red for variables */
}

/* Thought process styling */
.think-block {
    margin: 12px 0;
    border-radius: 5px;
    background: #2e2e2e;
    overflow: hidden;
    border: 0.3px solid #3e3e3e;
}

.think-toggle {
    width: 100%;
    padding: 10px 19px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #333;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 13.97px;
    font-family: "Arial";
    text-align: left;
    transition: background-color 0.2s ease;
}

.think-toggle:hover {
    background: #3a3a3a;
    color: #ececec;
}

.think-toggle span {
    margin-right: 3px;  /* Small gap between text and icon */
}

.think-toggle i {
    font-size: 12px;
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.think-toggle:hover i {
    opacity: 1;
}

.think-content {
    padding: 9.7px 19.7px;
    font-size: 14px;
    line-height: 1.4;
    color: #888;
    background: #2e2e2e;
    font-family: "Segoe UI", "San Francisco", "Helvetica", Arial, sans-serif;
    letter-spacing: 0.2px;
}

.think-content p {
    margin: 0 0 0.5em 0;
}

.think-content p:last-child {
    margin-bottom: 0;
}

/* Bullet points and numbered lists */
.think-content ul, 
.think-content ol {
    margin: 0.3em 0;
    padding-left: 1.2em;
}

.think-content li {
    margin: 0.2em 0;
}

/* Emphasis */
.think-content strong,
.think-content em {
    color: #b3b3b3;
    font-weight: 500;
}

/* Section breaks */
.think-content hr {
    border: none;
    border-top: 1px solid #333;
    margin: 0.7em 0;
}

/* Indentation for logical flow */
.think-content blockquote {
    margin: 0.5em 0;
    padding-left: 0.7em;
    border-left: 1px solid #333;
    color: #777;
}

/* Add these styles for the tag inputs section */
.tag-inputs {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.tag-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tag-input label {
    color: #888;
    font-size: 13px;
    font-weight: normal;
}

.tag-input input {
    width: 100%;
    height: 38px;
    background-color: #2f2f2f;
    border: 1px solid #404040;
    border-radius: 5px;
    color: #ececec;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    font-family: "Consolas", monospace;
    transition: all 0.2s ease;
}

.tag-input input:focus {
    border-color: #505050;
    outline: none;
    background-color: #333;
}

.tag-input input::placeholder {
    color: #888;
    opacity: 0.7;
    font-size: 13px;
}

.katex {
    overflow-x: auto;
    white-space: normal;
}