:root {
  --body-bg: linear-gradient(135deg,#ffe4e1  0%,#c9e4ff  100%);
  --msger-bg: #fff;
  --border: 2px solid #ddd;
  --right-msg-bg: #5e86c1;
  --left-msg-bg: #F5F5F5;
  --right-msg-text: #fff;
  --code-bg: #faebd7;
} 
 
html {
  box-sizing: border-box;
}
@font-face {
  font-family: 'Fira Code';
  src: url('/static/styles/FiraCode-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
*,
*:before,
*:after {
  margin: 0;
  padding: 0;
  box-sizing: inherit;
}

body {
  transform: scale(0.985);
  height: 100vh;
  background-image: var(--body-bg);
  font-family: monospace;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  height: 100vh;
}

.chat-page{
  position: relative;
	overflow-x: hidden;
	overflow-y: auto;
  flex: 1;
  flex-flow: column wrap;
  justify-content: space-between;
  width: 100%;
  max-width: 80%;
  height: calc(99%);
  background: transparent;
  border: 0px;
  margin: 0px;
}
.msger {
  position: relative;
	overflow-x: hidden;
	overflow-y: auto;
  flex: 1;
  flex-flow: column wrap;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  border: var(--border);
  border-radius: 14px;
  background: var(--msger-bg);
  box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
  margin-bottom: 0px;
  margin-top: 0px;
}

.msger-header {
  /* display: flex; */
  font-size: medium;
  justify-content: space-·;
  text-align: center;
  border-bottom: var(--border);
  background: #eee;
  color: #000;
}

.msger-chat {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  margin-bottom: 70px;
}
.msger-chat::-webkit-scrollbar {
  width: 6px;
}
.msger-chat::-webkit-scrollbar-track {
  background: #ddd;
}
.msger-chat::-webkit-scrollbar-thumb {
  background: #bdbdbd;
}
.msg {
  display: flex;
  align-items: flex-end;
  margin-bottom: 15px;
}
.msg-text{
  font-size: 1.2em;
  white-space: pre-wrap;
}
.msg-img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
  background: #ddd;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 50%;
}
.msg-bubble {
  font-family: "Fira Code"!important;
  max-width: 75%;
  padding: 20px;
  border-radius: 15px;
  background: var(--left-msg-bg);
  animation: pulse 1s;
  animation: fade-in 0.5s ease-in-out forwards;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.msg-api{
  padding-bottom: 10px;
  padding-left: 63px;
  max-width: 80%;
  background: transparent;
  animation-name: fade-in;
  animation-duration: 1s;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.check-img{
  width: 20px;
  height: 20px;
  padding-top: 4px;
  margin-right: 10px;
}
.msg-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.msg-info-name {
  margin-right: 10px;
  font-weight: bold;
}
.msg-info-time {
  font-size: 0.85em;
}
.msg-info-mode {
  font-size: 0.85em;
  font-style: italic;
  padding: 10px;
}

.left-msg .msg-bubble {
  border-bottom-left-radius: 0;
}

.right-msg {
  flex-direction: row-reverse;
}
.right-msg .msg-bubble {
  background: var(--right-msg-bg);
  color: var(--right-msg-text);
  border-bottom-right-radius: 0;
}
.left-msg .msg-bubble{
  padding-left: 50px;
}
.right-msg .msg-img {
  margin: 0 0 0 10px;
}

.msger-inputarea {
  display: flex;
  background-color: transparent;
}
.msger-input :focus:hover{
  border-color: pink;
}
.msger-inputarea * {
  background-color: transparent;
  border: none;
  font-size: 1.4em;
  color: var(--right-msg-text);
  font-family: monospace;
}
.msger-input {
  flex: 1;
}
.msger-send-btn{ 
  padding: 10px;
  width: auto;
  border-radius: 5px;
  margin-left: 10px;
  margin-right: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.23s;
}
.msger-send-record{
  padding: 10px;
  width: 30px;
  border-radius: 5px;
  /* margin-left: 10px;
  margin-right: 10px; */
  background: transparent;
  outline: none!important;
  border: 0px!important;
  color: #fff;
  cursor: pointer;
  display: flex;
}
.msger-send-btn:hover  ,.msger-send-record:hover {
  background: #f5cae6;
}

.msger-chat {
  background-color: #fcfcfe;
}
select#mode {
  font-family: monospace;
  color: white;
  background-color: transparent;
  align-content: center;
  border: none;
  padding: 5px;
  width: 2em;
  font-optical-sizing: auto;
  font-size: 1em;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  height: 2.5em;
}

select#prompt:hover, select#prompt:focus {
  background-color: #f5cae6;
  outline: none;
}
select#prompt {
  font-family: monospace;
  color: white;
  background-color: transparent;
  align-content: center;
  border: none;
  padding: 5px;
  width: 2em;
  font-optical-sizing: auto;
  font-size: 1em;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  height: 2.5em;
}

select#prompt:hover, select#prompt:focus {
  background-color: #f5cae6;
  outline: none;
}
.row {
  opacity: 95%;
  border: none;
  border-radius: 16px;
  padding: 5px;
  background: var(--right-msg-bg);
  box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 70%;
  height: auto;
}
.col {
  flex: 1;
}
.col:first-child {
  flex: 0 0 5%;
  /* align-self: flex-start; */
}
.save-hisotry{
  border: none;
  background-color: #f2f2f2;
  padding: 5px;
  font-size: 1em;
  border-radius: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-repeat: no-repeat;
  height: 3.7em;
}
.save-hisotry:hover{
  background-color: #ddd;
  outline: none;
}
pre {
  font-family: monospace;
  font-size: 0.9em!important;
  line-height: 1em;
  margin: 0;
  overflow: auto;
  padding: 1em;
  border-radius: 10px;
}

/* Add line numbers to the highlighted code */
.line-numbers-mode .line-numbers-rows {
  border-right: 1px solid #ccc;
}

/* Style the line numbers */
.line-numbers-mode .line-numbers-rows span {
  display: inline-block;
  padding-right: 0.5em;
  text-align: right;
  user-select: none;
  opacity: 0.5;
}

/* Style for the left sidebar */
.sidebar {
  background: #fff5ff !important;
  padding: 20px;
  width: 330px;
  height: 100%;
	overflow-x: hidden;
	overflow-y: auto;
  margin: 10px 5px;
  height: calc(99%);
  border: var(--border);
  border-radius: 12px;
  background: var(--msger-bg);
  box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
}

.sidebar h2 {
  margin-top: 0;
  font-size: 24px;
  color: #333;
  text-transform: uppercase;
  font-weight: bold;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  font-size: 18px;
  color: #000;
  border-bottom: 1px solid #ccc;
}

.sidebar li:last-child {
  border-bottom: none;
}

.sidebar li:hover {
  background-color: #ddd;
}

.new-chat {
  font-family: monospace;
  text-align: center;
  width: 100%;
  display: flex;
  padding: 0.75rem;
  padding-left: 13%;
  align-items: center;
  border-radius: 0.375rem;
  background-color: #fff;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  border-width: 1px;
  border-color: rgba(255, 255, 255, 0.2);
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  background: linear-gradient( to top right,pink 0%, #8bb9dd 50%);
  box-shadow: 1px 1px 10px #87ceeb;
}

.new-chat:hover {
  background: linear-gradient(to top right, pink 0%, #8bb9dd 80%);
  animation: mask 0.3s forwards;
}

@keyframes mask {
  0% {
    background: linear-gradient(to top right, pink 0%, #8bb9dd 50%);
  }
  100% {
    background: linear-gradient(to top right, pink 0%, #8bb9dd 70%);
  }
}
.chat-list a {
  display: flex;
  padding: 1rem;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  border-radius: 0.375rem;
  cursor: pointer;
  word-break: break-all;
  padding-right: 3.5rem;
  background: linear-gradient(135deg,#ffe4e1  0%,#fff5ff  100%);
}

.chat-list a:hover {
  background-color: #d8bfd8;
}

.chat-list a svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  height: 1em;
  width: 1em;
}

.chat-list a .flex-1 {
  max-height: 5rem;
  overflow: hidden;
  position: relative;
}

.chat-list a .absolute {
  position: absolute;
  display: flex;
  right: 1rem;
  z-index: 10;
  visibility: visible;
}

.chat-list a .absolute button {
  padding: 0.2rem;
  cursor: pointer;
}

.chat-list a .absolute button:hover {
  color: #F9FAFB;
}

.chat-list a .absolute button:hover svg polyline,
.chat-list a .absolute button:hover svg path,
.chat-list a .absolute button:hover svg line {
  stroke: #F9FAFB;
}
.chat-list{
  padding-top: 5px;
  padding-bottom: 8px;
}
.edit-button{
  background: transparent;
  border: none;
}
.delete-button{
  background: transparent;
  border: none;
}
body > div.container > div > ul > li:nth-child(1) > a{
  background-color: #f0dff2;
}
span.token.operator{
  background: transparent!important;
}
span.token.space{
  visibility: hidden!important;
}
span.token.lf{
  visibility: hidden!important;
}
textarea{
  padding-left: 2px;
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align:middle;
  outline: none;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  color: inherit;
  font-weight: inherit;
  appearance: none;
  line-height: 1.5rem;
  margin: 0;
  width: 100%;
  resize: none;
  border-width: 0;
  background-color: transparent;
  overflow-y: scroll;
}
::-webkit-scrollbar {
  height: 1rem;
  width: .5rem
}

::-webkit-scrollbar:horizontal {
  height: .5rem;
  width: 1rem
}

::-webkit-scrollbar-track {
  background-color: transparent;
  border-radius: 9999px
}

::-webkit-scrollbar-thumb {
  --tw-border-opacity: 1;
  background-color: rgba(217,217,227,.8);
  border-color: rgba(255,255,255,var(--tw-border-opacity));
  border-radius: 9999px;
  border-width: 1px
}

::-webkit-scrollbar-thumb:hover {
  --tw-bg-opacity: 1;
  background-color: rgba(236,236,241,var(--tw-bg-opacity))
}

.dark ::-webkit-scrollbar-thumb {
  --tw-bg-opacity: 1;
  background-color: rgba(86,88,105,var(--tw-bg-opacity))
}

.dark ::-webkit-scrollbar-thumb:hover {
  --tw-bg-opacity: 1;
  background-color: rgba(172,172,190,var(--tw-bg-opacity))
}
select#prompt{
  display: none;
}

