* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 4px;
    height: 8px;
    /* display: block; */
    position: absolute;
}

::-webkit-scrollbar-track {
    background: none;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

button {
    user-select: none;
}

.h-auto {
    height: auto !important;
}


.w-auto {
    width: auto !important;
}

.w-50p {
    width: 50% !important;
}

.w-40p {
    width: 40% !important;
}

.w-35p {
    width: 35% !important;
}

/*---------------------------------*/

#starfield {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

/*---------------------------------*/

.loader-container {
    display: none;
    min-height: 20%;
}

.loader-overlay {
    z-index: 6;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #00000070;
}

.spinner {
    font-size: 28px;
    position: relative;
    width: 1em;
    height: 1em;
}

.spinner .spinner-blade {
    position: absolute;
    left: 0.4629em;
    bottom: 0;
    width: 0.074em;
    height: 0.2777em;
    border-radius: 0.0555em;
    background-color: transparent;
    -webkit-transform-origin: center -0.2222em;
    -ms-transform-origin: center -0.2222em;
    transform-origin: center -0.2222em;
    animation: spinner-fade9234 1s infinite linear;
}

.spinner .spinner-blade:nth-child(1) {
    -webkit-animation-delay: 0s;
    animation-delay: 0s;
    -webkit-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
}

.spinner .spinner-blade:nth-child(2) {
    -webkit-animation-delay: 0.083s;
    animation-delay: 0.083s;
    -webkit-transform: rotate(30deg);
    -ms-transform: rotate(30deg);
    transform: rotate(30deg);
}

.spinner .spinner-blade:nth-child(3) {
    -webkit-animation-delay: 0.166s;
    animation-delay: 0.166s;
    -webkit-transform: rotate(60deg);
    -ms-transform: rotate(60deg);
    transform: rotate(60deg);
}

.spinner .spinner-blade:nth-child(4) {
    -webkit-animation-delay: 0.249s;
    animation-delay: 0.249s;
    -webkit-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
}

.spinner .spinner-blade:nth-child(5) {
    -webkit-animation-delay: 0.332s;
    animation-delay: 0.332s;
    -webkit-transform: rotate(120deg);
    -ms-transform: rotate(120deg);
    transform: rotate(120deg);
}

.spinner .spinner-blade:nth-child(6) {
    -webkit-animation-delay: 0.415s;
    animation-delay: 0.415s;
    -webkit-transform: rotate(150deg);
    -ms-transform: rotate(150deg);
    transform: rotate(150deg);
}

.spinner .spinner-blade:nth-child(7) {
    -webkit-animation-delay: 0.498s;
    animation-delay: 0.498s;
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.spinner .spinner-blade:nth-child(8) {
    -webkit-animation-delay: 0.581s;
    animation-delay: 0.581s;
    -webkit-transform: rotate(210deg);
    -ms-transform: rotate(210deg);
    transform: rotate(210deg);
}

.spinner .spinner-blade:nth-child(9) {
    -webkit-animation-delay: 0.664s;
    animation-delay: 0.664s;
    -webkit-transform: rotate(240deg);
    -ms-transform: rotate(240deg);
    transform: rotate(240deg);
}

.spinner .spinner-blade:nth-child(10) {
    -webkit-animation-delay: 0.747s;
    animation-delay: 0.747s;
    -webkit-transform: rotate(270deg);
    -ms-transform: rotate(270deg);
    transform: rotate(270deg);
}

.spinner .spinner-blade:nth-child(11) {
    -webkit-animation-delay: 0.83s;
    animation-delay: 0.83s;
    -webkit-transform: rotate(300deg);
    -ms-transform: rotate(300deg);
    transform: rotate(300deg);
}

.spinner .spinner-blade:nth-child(12) {
    -webkit-animation-delay: 0.913s;
    animation-delay: 0.913s;
    -webkit-transform: rotate(330deg);
    -ms-transform: rotate(330deg);
    transform: rotate(330deg);
}

@keyframes spinner-fade9234 {
    0% {
        background-color: #69717d;
    }

    100% {
        background-color: transparent;
    }
}

/*---------------------------------*/

.dashboard-container {
    display: flex;
    overflow: hidden;
}

.dashboard-navbar {
    width: max-content;
    background: #202020;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    border-radius: 15px;
}

.dashboard-navbar .nav-item {
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95em;
    transition: background 0.2s;
}

.dashboard-navbar .nav-item:hover {
    background: #303030;
}

.dashboard-navbar .nav-item.active {
    background: #373737;
    /*background: rgb(174, 0, 255);
            box-shadow: 0 0 8px rgba(174, 0, 255, 0.6);*/
}

.dashboard-content {
    flex: 1;
    padding: 0 15px;
    height: 60vh;
    overflow-y: auto;
}

.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
}

.dashboard-section h4 {
    margin-top: 1em;
}

.dashboard-section form {
    margin: 1em 0;
}

.form-btn {
    color: #000;
    border-radius: 8px;
    background: #fff;
    padding: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-btn {
    /*color: #000;*/
    cursor: pointer;
    border-radius: 8px;
    padding: 5px;
    text-decoration: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.link-btn:hover {
    background: #212121
}

.link-btn.delete {
    color: red;
}

.link-btn.edit {
    color: dodgerblue;
}

.link-btn.success {
    color: chartreuse;
    /* color: lawngreen; */
}

.link-btn.back {
    width: fit-content;
    margin: 0 15px;
    font-size: .85em;
    background: none;
    text-decoration: underline;
}

.dashboard-section .form-group {
    margin-bottom: 1rem;
}

.dashboard-section .form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.dashboard-section .form-group textarea {
    max-width: 100%;
    min-width: 100%;
    max-height: 300px;
    min-height: 200px;
    font-family: inherit;
}

#add-function .form-group textarea,
#edit-function .form-group textarea {
    min-height: 100px;
}

.dashboard-section .form-group .form-check {
    display: ruby;
    gap: 10px;
}

.dashboard-section .form-group .form-check .checkbox-label {
    border: 1px solid #40444b;
}

.dashboard-section .submit-group {
    display: flex;
}

.dashboard-section .form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #40444b;
    border-radius: 6px;
    background: #252525;
    color: #f0f0f0;
    outline: none;
}

.param-list {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.param-item {
    margin-bottom: 10px;
}

.param-item .row-1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}


.param-item .form-control {
    /* min-width: 45px; */
}

.param-btn {
    background: none;
    border: none;
    font-size: 1.3em;
}

/*--------------------------------------------------------*/

/* .context-menu {
    position: fixed;
    z-index: 9999;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}

.context-menu li {
    padding: 8px 14px;
    cursor: pointer;
    color: #eee;
    font-size: 14px;
}

.context-menu li:hover {
    background: #2a2a2a;
}

.context-menu.hidden {
    display: none;
} */

.context-menu {
    position: fixed;
    z-index: 9999;
    background: #151515;
    border: 1px solid #333333;
    border-radius: 10px;
    min-width: 150px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    font-family: system-ui;

    opacity: 0;
    transform: scale(0.95) translateY(-4px);
    pointer-events: none;

    transition:
        opacity 120ms ease-out,
        transform 120ms cubic-bezier(.2, .8, .2, 1);
}

.context-menu ul {
    list-style: none;
    margin: 0;
    padding: 5px;
}

.context-menu li {
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
    color: #eee;
    font-size: 14px;
    display: flex;
    gap: 8px;
}

.context-menu li[data-action="delete"]:hover {
    background: rgba(250, 75, 75, 0.15);
}

.context-menu li[data-action="delete"] {
    color: rgb(250, 75, 75);
}

.context-menu li label {
    cursor: pointer;
}

.context-menu li:hover {
    background: #222222;
}

.context-menu.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}




.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.modal .modal-content {
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
    transform: translateY(0);
}


.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: #151515;
    border-radius: 15px;
    width: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 5;
}

.modal-header {
    background: #212121;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 1.1em;
    border-bottom: 1px solid #40444b;
}

.modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    color: #fff;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    color: #f0f0f0;
    max-height: 85vh;
    transition: height 0.2s ease;
}


/*---------------------------------*/

.code-block {
    max-width: 100vw;
    margin: 1em 0;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid dimgray;
    direction: ltr !important;
}

/*.code-block pre code {
    border-radius: 0;
    direction: ltr !important;
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}*/

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5em 1em;
    background: #2d2d2d;
    color: #fff;
    font-size: .85em;
    border-bottom: 1px solid dimgray;
}

.code-lang {
    text-transform: capitalize
}

.copy-btn {
    background: none;
    padding: 5px;
    border: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 5px
}

.copy-btn:hover {
    background: #484848;
}

.hljs {
    padding: 1em;
    overflow: auto
}


/*---------------------------------*/

@font-face {
    font-family: 'Yekan';
    src: url('../fonts/yekan/Yekan.eot');
    src: url('../fonts/yekan/Yekand41d.eot?#iefix') format("embedded-opentype"), url('../fonts/yekan/Yekan.woff') format("woff"), url('../fonts/yekan/Yekan.ttf') format("truetype"), url('../fonts/yekan/Yekan.svg#BYekan') format("svg");
    font-weight: normal;
    font-style: normal
}

@font-face {
    font-family: 'IRANYekan';
    font-style: normal;
    font-weight: normal;
    src: url('../fonts/iranyekan/eot/iranyekanwebregular.eot');
    src: url('../fonts/iranyekan/eot/iranyekanwebregular.eot?#iefix') format('embedded-opentype'), url('../fonts/iranyekan/woff2/iranyekanwebregular.woff2') format('woff2'), url('../fonts/iranyekan/woff/iranyekanwebregular.woff') format('woff'), url('../fonts/iranyekan/ttf/iranyekanwebregular.ttf') format('truetype');
}

.green {
    --bg-primary: #2c2f33;
    --header-bg-primary: #23272a;
    --chat-input-bg-primary: #23272a;
    --chat-button-bg-primary: #2c2f33;
    --sidebar-bg-primary: #23272a;
    --message-bot-bg-primary: #40444b;
    --message-user-bg-primary: #99f2c8;
    --message-bot-color-primary: #1f4037;
    --message-send-btn-bg-primary: #99f2c8;
    --message-send-btn-hover-bg-primary: #77e2a4;
    --message-send-btn-svg-color-primary: #1f4037;
}

body {
    /*font-family: seg;*/
    font-family: IRANYekan, sans-serif;
    display: flex;
    background: #000;
    color: #fff;
}


.alert-minimal {
    /* background-color: #2d2d2d; */
    z-index: 3;
    display: none;
    top: 40px;
    padding: 5px 30px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(90, 90, 90, 0.7);
    position: absolute;
    font-size: 0.8rem;
    transition: display 0.2s ease;
}

/* #alert-minimal.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#alert-minimal.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#alert-minimal.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

#alert-minimal.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
} */

.alert-minimal.warning {
    color: #3b3b1f;
    background-color: #ffeb3b;
}

.alert-minimal.success {
    color: #1f3c1f;
    background-color: #04AA6D;
}

.alert-minimal.info {
    color: #223344;
    background-color: #2196F3
}

.alert-minimal.error {
    color: #442222;
    background-color: #f44336;
}



.alert {
    /*background-color: #2d2d2d;*/
    /*z-index: 3;*/
    display: none;
    color: #fff;
    right: 20px;
    bottom: 20px;
    padding: 10px;
    font-weight: bold;
    border-bottom: 5px solid;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: absolute;
    font-size: 1rem;
}

.alert.warning {
    background-color: #444422;
    border-color: #ffeb3b;
}

.alert.success {
    background-color: #224422;
    border-color: #04AA6D;
}

.alert.info {
    background-color: #223344;
    border-color: #2196F3;
}

.alert.error {
    background-color: #442222;
    border-color: #f44336;
}

.minimal-btn {
    background: none;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minimal-btn:hover {
    background: #303030
}

.minimal-btn svg {
    color: #fff;
}

.minimal-btn.menu {
    cursor: e-resize;
}

.checkbox {
    display: none;
}

.checkbox-label {
    position: relative;
    width: fit-content;
    padding: 8px;
    transition: background 0.2s ease, box-shadow 0.3s ease;
    border-radius: 30px;
    cursor: pointer;
    /* z-index: 0; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: white;
    font-size: 0.9em;
    font-weight: 600;
}

.checkbox-label:hover {
    background: #303030;
}

.checkbox-label svg path {
    fill: white;
}

.checkbox:checked+.checkbox-label {
    background-color: rgb(174, 0, 255);
    box-shadow: 0px 0px 40px rgba(174, 0, 255, 0.438);
}

.sidebar {
    width: 270px;
    background: #080808;
    position: absolute;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px;
    z-index: 2;
    gap: 10px;
    border-right: 1px solid #40444b;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
}

.sidebar-menu {
    /* padding: ; */
}

.menu-btn {
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    color: #eee;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: system-ui;
    font-size: 1em;
}

.menu-btn label {
    cursor: pointer;
}

.menu-btn:hover {
    background: #2a2a2a;
}

.sidebar-footer {
    display: flex;
    justify-content: space-between;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    /* gap: 5px; */
}

.chat-item {
    padding: 4px;
    /* background: #2c2f33; */
    scroll-behavior: smooth;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.1s ease;
}

.chat-item span {
    padding: 5px;
}

.chat-item .item-menu {
    visibility: hidden;
}

.chat-item:hover .item-menu {
    visibility: visible;
}

.chat-item:hover {
    background: #252525;
}

.chat-item.active {
    background: #202020;
}

.item-menu {
    padding: 2px;
    background: none;
    border: none;
    border-radius: 8px;
    height: fit-content;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.item-menu:hover {
    background: #151515;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.chat-header {
    background: linear-gradient(to bottom, #000000, rgba(0, 0, 0, 0));
    ;
    /* border-bottom: 1px solid #252525; */
    padding: 12px;
    display: grid;
    /* grid-template-columns: 1fr auto 1fr; */
    grid-template-columns: 1fr 1fr;
    align-items: center;
    z-index: 1;
    position: absolute;
    width: 100%;
}

.header-left {
    border-radius: 30px;
    border: 1px solid #404040;
    background: rgba(20, 20, 20, 0.45);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    justify-self: start;
    display: flex;
}

.header-title {
    font-size: 1.5em;
    /* text-align: center; */
    justify-self: end;
    display: flex;
}

.header-right {

    border-radius: 30px;
    border: 1px solid #404040;
    background: rgba(20, 20, 20, 0.45);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);

    justify-self: end;
    display: flex;
}


.header-title b {
    line-height: 1.5;
}

.header-title .brand {
    padding: 0 6px;
    border-radius: 10px;
    color: #191919;
    background: radial-gradient(circle at 0 0, #c23af8, transparent), radial-gradient(circle at 100% 0, #006eff, transparent), radial-gradient(circle at 0 100%, #ff0056, transparent), radial-gradient(circle at 100% 100%, #ffae00, transparent);
    /* background: radial-gradient(circle at 0 0, #f8903a, transparent), radial-gradient(circle at 100% 0, #00a6ff, transparent), radial-gradient(circle at 0 100%, #ff0056, transparent), radial-gradient(circle at 100% 100%, #6500ff, transparent);; */
    box-shadow: 0px 1px 5px #2B3044;
}


.chat-messages-area {
    overflow-y: auto;
    display: grid;
}

.chat-messages {
    padding: 5em 0 15em 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 40%;
    justify-self: center;
}

.anchor-rec {
    background: #fff;
    margin: 12px;
    animation: blink 1s step-end infinite;
    padding: 8px 4px;
    width: fit-content;
}

.anchor-rec.typing {
    display: inline-block;
    vertical-align: text-bottom;
    margin: 0 0 5px 0;
    animation: none;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.anchor-cir {
    margin: 12px;
    border-radius: 50%;
    padding: 7px;
    width: fit-content;
    background: #fff;
    animation: bounce 1.5s ease-in-out infinite, opacity 0.5s ease-in-out;
}

.anchor-cir.typing {
    display: inline-block;
    vertical-align: text-bottom;
    margin: 0 0 5px 0;
    animation: none;
}

@keyframes bounce {
    /* 0% {
        transform: scale(1);
        opacity: 1;
    } */

    50% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

.processing-message {
    padding: 10px 12px;
    width: 100%;
    color: #fff;
    background: linear-gradient(to right, #9f9f9f 0%, #fff 3%, #868686 6%);
    background-position: 0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: message-shine 2.5s infinite linear, opacity 0.3s ease;
    animation-fill-mode: forwards;
    -webkit-text-size-adjust: none;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
    font-family: "Poppins", sans-serif;
}

@keyframes message-shine {
    0% {
        background-position: -45px;
    }

    100% {
        background-position: 350px;
    }
}

.fade-out {
    transform: translateY(-50px);
    opacity: 0;
}

/*@-moz-keyframes shine {
    0% {
        background-position: 0px;
    }

    100% {
        background-position: 120px;
    }
}

@-webkit-keyframes shine {
    0% {
        background-position: 0px;
    }

    100% {
        background-position: 120px;
    }
}

@-o-keyframes shine {
    0% {
        background-position: 0px;
    }

    100% {
        background-position: 120px;
    }
}*/

.message {
    padding: 12px;
    border-radius: 1.25rem;
    line-height: 1.8;
    max-width: 100%;
    user-select: none;
    /*///*/
    /*white-space: pre-line;*/
}

.message.user {
    border-bottom-right-radius: 0.25rem;
    background: #333333;
    color: #fff;
    align-self: flex-end;
}

.message.bot {
    padding: 12px 0;
    width: 100%;
    color: #fff;
    align-self: flex-start;
    /* border: 1px solid transparent; */
    /* transition: border-color 0.2s ease; */
}

.message.other {
    border-bottom-left-radius: 0.25rem;
    background: #222222;
    /* padding: 12px 0; */
    width: 100%;
    color: #fff;
    align-self: flex-start;
}

/* .message.bot:hover {
    border-color: #fff;
} */

.katex {
    direction: ltr;
    display: inline-block;
}

.katex-html {
    padding: 1em 0;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: hidden;
}

.katex-mathml {
    display: none;
}

.message hr {
    margin: 15px 0;
}

.message table {
    padding-inline-end: 10px;
    display: block;
    max-width: 100vw;
    overflow-x: auto;
    white-space: nowrap;
}

.message a {
    color: #fff;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.message a:hover {
    background: #212121;
}

ul {
    margin-inline-start: 1.5em;
    margin-inline-end: 0;
}

ol {
    margin-inline-start: 2em;
    margin-inline-end: 0;
}

/*---*/

code {
    color: #fff;
    background-color: #2d2d2d;
    padding: 0.2em 0.4em;
    border-radius: 5px;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    text-align: center;
}

table th,
table td {
    /*padding: 0.75em;*/
    /* text-align: left; */
    padding: 8px;
    border: 1px solid #40444b;
    color: #e0e0e0;
}

table th {
    background-color: #272727;
    font-weight: bold;
}

.active-row {
    border: 3px solid green;
    font-weight: bold;
}

.chat-input-area {
    background: linear-gradient(to top, #000000, rgba(0, 0, 0, 0));
    display: grid;
    position: absolute;
    padding-bottom: 15px;
    bottom: 0;
    z-index: 1;
    width: 100%;
}

#scrollArrow {
    margin-bottom: 10px;
    opacity: 0.8;
    width: 35px;
    height: 35px;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    justify-self: center;
    background: #333;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: display 0.3s ease-in-out;
}

.preview-scroll {
    position: absolute;
    bottom: 30px;
}

.chat-input {
    border-radius: 20px;
    border: 1px solid #404040;
    width: 40%;
    padding: 10px;
    justify-self: center;
    /* background: #202020; */

    background: rgba(20, 20, 20, 0.45);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.chat-input textarea {
    flex: 1;
    resize: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.5;
    background: none;
    color: #f9fafb;
    outline: none;
    border: none;
    max-height: 50px;
    height: auto;
    width: 100%;
    overflow-y: hidden;
    transition: height 0.1s;
    font-family: inherit;
}

.chat-input .chat-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-input .chat-options div {
    display: flex;
}

.chat-input .chat-options .right button {
    margin-left: 8px;
}

.chat-input .chat-options .left button {
    margin-right: 8px;
}

.chat-input .chat-options div button {
    width: 40px;
    height: 40px;
    border: none;
    background-color: #252525;
    border: 1px solid #35353580;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.chat-input .chat-options div button:hover {
    background-color: #414141
        /*#0e7969*/
    ;
}

.chat-input .chat-options div button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-input .chat-options div button svg {
    color: #fff;
    width: 20px;
    height: 20px;
}

.chat-input .chat-options .right .send {
    background-color: #fff;
}

.chat-input .chat-options .right .send:hover {
    background-color: #fff
        /*#0e7969*/
    ;
}

.chat-input .chat-options .right .send svg {
    color: #232323;
    width: 30px;
    height: 30px;
}

/*///*/

@media (max-width: 768px) {

    .header-title {
        font-size: 1.4em;
    }

    .chat-input {
        width: 90%;
    }

    .chat-messages {
        /* padding-top: 15px; */
        gap: 10px;
        width: 90%;
    }

    .modal-content {
        width: 80% !important;
    }

    .modal-body {
        padding: 15px;
    }

    /* --- */

    .dashboard-container {
        display: block;
    }

    .dashboard-navbar {
        width: 100%;
        background: none;
        border: 3px solid #303030
            /* #202020 */
        ;
        border-radius: 15px;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 5px;
        gap: 8px;
        overflow-x: auto;
        /*-webkit-overflow-scrolling: touch;*/
        scrollbar-width: none;
    }

    .dashboard-navbar::-webkit-scrollbar {
        display: none;
    }

    .dashboard-navbar .nav-item {
        color: #fff;
        cursor: pointer;
        text-decoration: none;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.95em;
        transition: background 0.2s ease;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .dashboard-navbar .nav-item:hover {
        background: #303030;
    }

    .dashboard-navbar .nav-item.active {
        background: #303030;
    }

    .dashboard-content {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    /*.header-title {
        font-size: 1.3em;
    }*/

    /*.chat-input {
        width: 90%;
    }*/

    /*.chat-messages {
        padding-top: 15px;
        gap: 10px;
        width: 90%;
    }*/

    .modal-content {
        width: 90% !important;
    }

    .modal-body {
        padding: 10px;
    }

    /* --- */

    .message,
    .chat-input textarea {
        font-size: .90em;
    }

    .sidebar {
        gap: 15px;
        width: 85%;
    }

    .chat-container {
        max-height: 90vh;
    }

    .processing-message {
        background: linear-gradient(to right, #9f9f9f 0%, #fff 5%, #868686 10%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        font-size: 14px;
    }

    @keyframes message-shine {
        0% {
            background-position: -15px;
        }

        100% {
            background-position: 300px;
        }
    }
}

/*__________________________________________________________*/


/*
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

    .theme-toggle button {
        background-color: var(--primary-color);
        color: #fff;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        cursor: pointer;
        transition: opacity 0.3s ease;
    }

        .theme-toggle button:hover {
            opacity: 0.8;
        }
*/

:root {
    --background-color: #121212;
    --text-color: #eee;
    --primary-color: #d83fd0;
    --input-background: #1e1e1e;
    --border-color: #444;
    --error-color: #ff6b81;
    --secondary-color: #a730a1;
}

.reg-log {
    /*background: linear-gradient(135deg, #1f4037, #99f2c8);*/
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    min-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    background-color: var(--input-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.container h2 {
    text-align: center;
    padding: 15px 0;
    background: radial-gradient(circle at 0 50%, #573af8, transparent), radial-gradient(circle at 50% 0, #e83af8, transparent), radial-gradient(circle at 100% 100%, #f83a5a, transparent);
    border-radius: 15px;
    color: #e6e6e6;
    margin: 0 0 25px 0;
}

.tabs {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.tab {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-color);
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.tab.active {
    border-color: var(--primary-color);
    font-weight: bold;
}

.form {
    display: none;
    flex-direction: column;
    animation: fadeIn 0.5s ease forwards;
}

.form.active {
    display: flex;
}

.input-group {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.input-group input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-background);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 5px;
    min-height: 5px;
}

.submit-btn {
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}