
:root {
    --main-bg: #0f1620;
    --second-bg: #1c1c2d;
/*    --accent: #802fff;*/
    --accent: rgba(99, 102, 241, 0.9);
/*    --accent-darker: #6c26d9;*/
    --accent-darker: rgba(99, 102, 241, 0.7);;
}

body {
    font-family: Arial, sans-serif;
    color: white !important;
/*    background-color: #262630 !important;*/
    background-color: var(--main-bg) !important;
    margin: 0;
    padding: 0;
}

.chat-main {
    display: flex;
}

.chat-navigation {
    background-color: var(--second-bg);
    position: fixed;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    width: 350px;
    left: -250px;
    padding: 10px;
    transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out;
    z-index: 1000;
    opacity: 0;
}

.chat-settings {
    display: none;
}

.chat-navigation-show {
    left: 0;
    opacity: 1;
}

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

.chat-container {
    position: relative;
}

.cache-field {
    position: absolute;
    bottom: 60px;
    display: none;
}

h3{
    margin: 8px 0;
}

.chat-container {
    width: 900px;
    height: 100vh;
    overflow: hidden;
    background-color: #26229;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
}

.block{
    display: block;
}

.chat-header {
/*    background-color: rgba(55, 65, 81, 0.95);*/
/*    color: #e0e7ff;*/
    padding: 15px;
    text-align: center;
}

.chat-history{
    height: 100%;
    display: none;
}

.text-shadow-md {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.text-shadow-lg {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
}

.chat-messages {
    padding: 10px 0;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column-reverse;
    scrollbar-width: none;
    -ms-overflow-style: none;
}


.chat-messages::-webkit-scrollbar {
    display: none;
}

.message {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 22px;
    font-size: 16px;
}

.message li{
    margin: 0;
}

#history button {
    display: block;
    width: 100%;
    border: none;
    background-color: transparent;
    padding: 10px;
    cursor: pointer;
}

button {
    padding: 10px 15px;
    border: none;
/*    background-color: rgba(99, 102, 241, 0.9);*/
    background-color: var(--accent);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover{
    background: var(--accent-darker);
/*    background-color: rgba(99, 102, 241, 0.7);*/
}

input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin: 0px;
    margin-right: 10px;
    outline: none;
    resize: none !important;
    height: 70px;
    box-sizing: border-box;
}


.transparent-textarea{
    background-color: transparent;
    border: none;
    height: 60px;
}

.pages{
    height: 96%;
}

select {
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
    width: 100%;
}

input {
    box-sizing: border-box;
 width: 100%;
}

#history button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.image{
    max-width: 100%;
    height: auto;
}

.document-icon {
    filter: invert(89%) sepia(15%) saturate(965%) hue-rotate(195deg) brightness(105%) contrast(105%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
    background-image: url("/static/svg/document.svg");
}

.background{
    backdrop-filter: blur(1px);
    background-image: url("/static/images/background.jpg");
    background-size: cover;
    background-repeat: no-repeat;

}

#documents{
    /* display: none; */
}

.account-panel {
    display: none;
}

.projects{
    display: none;
}
.panel{
    display: flex;
}

.panel button{
    margin-right: 5px;
    width: 20%;
}

.pages .active{
    display: block !important;
}

.send-button{
    border-radius: 5px !important;
    width: 40px;
    height: 40px;
    margin: 10px;

}

.user {
    background-color: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 1);
    color: white;
    align-self: flex-end;
}

.assistant {
    /* background-color: #374151; */
    
/*    border: 1px solid rgba(79, 70, 229, 0.2);  */
}

.chat-input {
    display: flex;
    padding: 0.25rem;
    padding-bottom: 1rem;

/*    background-color: #333340;*/
    background-color: #3E4153;
/*    background-color: #374151;*/
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
}

.chat-input textarea:focus, textarea:active{
    outline: none;
    border: none;
}

.instruction-field{
    padding: 0.5rem 0;

}

.code-wrap {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.code-block{
    background-color: black;
/*    padding: 12px;*/
    border-radius: 12px;
    border: 1px solid #555866;
/*    border: 1px solid rgba(79, 70, 229, 0.4);*/
}

.code-block code{
    text-wrap: wrap;
    border-radius: 12px;
}

.thinking{
    border-left: 2px solid rgba(79, 70, 229, 0.2);
    padding: 12px;
    font-size: 12px;
    color: gray;
}
.thinking h4{
    font-size: 16px;
    margin: 4px 0;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    margin-right: 10px;
}

.bg-transparent{
    background-color: transparent !important;
}

input, textarea, select {
    color: #ffffff;
    font-size: 16px;
    /* border: 1px solid rgba(79, 70, 229, 0.3);  */
/*    background-color: #333340;*/
    background-color: #2A2D3F;
    border-radius: 1.5rem;
    padding: 8px 16px;
    border: 1px solid #555866;
/*    background-color: #374151;*/
}

input:active, textarea:active, select:active,
input:focus, textarea:focus, select:focus {
    outline: none;
    border: 1px solid #6e7287;
}

input[type="number"]{
    width: 100%;
    box-sizing: border-box;
}

p {
    margin: 0;
}

.chat-input button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}


.history{
    height: 100%;
    overflow-y: auto;
}

.edit-menu {
    position: absolute;
    background-color: #333340;
/*    background-color: #374151;*/
    padding: 5px 0;
/*    border-radius: 3px;*/
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2000;
}

#edit-menu{
    display: none;
}

.edit-menu button {
    width: 90px;
}

.d-flex {
    display: flex;
}

.mb-1 {
    margin-bottom: 1rem;
}
.mb-05 {
    margin-bottom: 0.5rem;
}

.mt-1{
    margin-top: 1rem;
}

.mt-05{
    margin-top: 0.5rem;
}

.mt-025{
    margin-top: 0.25rem;
}

.assistant-data{
    display: flex;
}


/* input range */
input[type="range"] {
    -webkit-appearance: none;
    margin: 5px 0;
    margin-right: 5px;
    width: 100%; 
    height: 10px; 
/*    background-color: rgba(55, 65, 81, 0.95);*/
/*    background-color: rgb(51, 51, 64);*/
    border-radius: 50px;
    box-sizing: border-box;
    padding: 1rem 0.25rem;
    outline: none; 
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    appearance: none; 
    width: 20px; 
    height: 20px; 
    background-color: rgba(99, 102, 241, 1);
    border-radius: 50%; 
    cursor: pointer; 
}

input[type="range"]::-moz-range-thumb {
    width: 20px; 
    height: 20px; 
    background-color: rgba(99, 102, 241, 1);
    border-radius: 50%; 
    cursor: pointer; 
}

input[type="range"]::-moz-range-track {
    background: #000;
    border-radius: 5px; 
}
input[type="range"]::-webkit-slider-runnable-track {
    background-color: rgba(55, 65, 81, 0.95);
}

input[type="range"]::-moz-range-progress {
    background-color: rgba(99, 102, 241, 1);
}
/*  */


/* chebox */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-container input{
    display: none;
}
.custom-checkbox {
    position: relative;
    width: 16px;
    height: 16px;
    background-color: #333340;
/*    background-color: #374151;*/
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 4px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.custom-checkbox:hover {
    background-color: rgba(99, 102, 241, 0.1);
}

.checkbox-container input:checked + .custom-checkbox {
    background-color: rgba(99, 102, 241, 0.9);
}

.custom-checkbox::before {
    content: "";
    position: absolute;
    display: none;
    left: 50%;
    top: 60%;
    width: 10px;
    height: 10px;
    clip-path: polygon(
      0% 50%, 
      35% 85%, 
      100% 15%, 
      85% 0%, 
      35% 50%, 
      15% 30%
    );
    background-color: white;
    transform: translate(-50%, -50%);
  }

.checkbox-container input:checked + .custom-checkbox::before {
    display: block;
}

.checkbox-label {
    color: white;
    font-size: 14px;
}
/*  */


/* projects */


.project-details {
    margin-top: 30px;
    border-top: 2px solid rgba(79, 70, 229, 0.3);
    padding-top: 20px;
}

.alert-error {
    background: #ffdddd;
    color: #cc0000;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
}


.file-browser {
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid rgba(79, 70, 229, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
}

.file-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(40px, 1fr));
    gap: 5px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
}

.icon-file {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.file-name {
    font-size: 11px;
    word-wrap: break-word;
    width: 100%;
}

.icon-plus {
    font-size: 1.2em;
    margin-right: 5px;
}
/*  */

.open_chat {
    padding: 15px 30px;
    background-color: #6366f1;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
}

.navbar{
    background-color: rgba(0, 0, 0, 0.05);
}

.open_chat:hover {
    background-color: #4f46e5; 
}

.navbar-toggler-icon {
    filter: invert(100%);
}

.open_chat i {
    margin-right: 10px; 
    font-size: 1.2rem;
}

.alert-warning { 
    background: rgba(255, 235, 205, 0.3); 
    border: 1px solid rgba(255, 204, 0, 0.4); 
    border-radius: 8px; 
    padding: 15px;
    margin-top: 15px;
}

.alert-warning h3 {
    margin: 0 0 10px 0;
    color: #ffc107;
    font-weight: bold;
    display: flex; 
    align-items: center; 
}

.alert-warning h3 i {
    margin-right: 10px;
    font-size: 1.5rem;
}


.alert-warning p {
    margin: 0;
    color: #ffb347; 
}


.model-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    padding: 20px;
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    background-color: #2A2F42
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.ml-1{
    margin-left: 1rem !important;
}

.ml-2{
    margin-left: 2rem !important;
}

.line{
    width: 100%;
    height: 1px;
    margin: 12px 0;
    background-color: rgba(79, 70, 229, 0.3);
}

.message p{
    margin: 8px 0;
}

.code-block pre{
    margin: 0;
    border-radius: 12px;
}

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

input[type="number"]::-moz-spin-button {
    display: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-ms-spin-button {
    display: none;
}

.edit-menu-button{
    border-radius: 0;
    display: block;
    background-color: #333340;
}

.edit-menu-button:hover{
    background-color: rgba(99, 102, 241, 0.7);
}

.thinking-content{
    position: relative;
    max-height: 70px;
    overflow: hidden;
    font-size: 14px;
}

.border-blue{
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.thinking-content.show{
    max-height: 9999px;
}

.thinking-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 12px;
    background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    var(--main-bg)
    );
    pointer-events: none;
}

.thinking-content.show::after {
    display: none;
}


.content-box {
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hidden {
    opacity: 0;
    transform: translateY(50px);
}