::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.4rem;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

:root {
    --color: #5650F4;
}

#chat {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 99999;
}
#chat.on .chat_icon {
    opacity: 0;
    transform: scale(0.8);
    transition-delay: unset;
}
#chat.on .chat_content {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    transition-delay: .2s;
}
#chat .chat_icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .3s ease;
    cursor: pointer;
    transition-delay: .2s;
}
#chat .chat_icon:hover {
    transform: scale(1.1);
}
#chat .chat_icon:hover svg {
    transform: scale(0.9);
}
#chat .chat_icon svg {
    width: 22px;
    height: 22px;
    transition: .3s ease;
}
#chat .chat_content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 400px;
    height: 580px;
    background: #F3F0E8;
    border: 1px solid #D4CFC3;
    box-shadow: 0 20px 60px rgba(42, 33, 24, 0.14), 0 2px 8px rgba(42, 33, 24, 0.06);
    border-radius: 14px;
    transform-origin: bottom right;
    transition: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    transform: scale(0.88);
    opacity: 0;
    pointer-events: none;
}
#chat .chat_content.on {
    width: 660px;
    height: 100vh;
    bottom: -40px;
    right: -40px;
    border-radius: 0;
}
#chat .chat_content .chat_u {
    padding: 14px 15px;
    border-bottom: 1px solid #e1ddd2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#chat .chat_content .chat_u .u_l {
    width: 90px;
}
#chat .chat_content .chat_u .u_l img {
    width: 100%;
}
#chat .chat_content .chat_u .u_r {
    display: flex;
    align-items: center;
    gap: 10px;
}
#chat .chat_content .chat_u .u_r .close, #chat .chat_content .chat_u .u_r .all {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: .3s;
    cursor: pointer;
}
#chat .chat_content .chat_u .u_r .close svg, #chat .chat_content .chat_u .u_r .all svg {
    width: 14px;
    height: 14px;
    display: block;
}
#chat .chat_content .chat_u .u_r .close svg path, #chat .chat_content .chat_u .u_r .all svg path {
    fill: #9A9184;
    transition: .3s;
}
#chat .chat_content .chat_u .u_r .close:hover, #chat .chat_content .chat_u .u_r .all:hover {
    background: #DCD7C9;
}
#chat .chat_content .chat_u .u_r .close:hover svg path, #chat .chat_content .chat_u .u_r .all:hover svg path {
    fill: #111;
}
#chat .chat_content .chat_u .u_r .all svg path {
    fill: #111;
}
#chat .chat_content .chat_u .u_r .all svg:nth-child(2) {
    display: none;
}
#chat .chat_content.on .chat_u .u_r .all svg:nth-child(1) {
    display: none;
}
#chat .chat_content.on .chat_u .u_r .all svg:nth-child(2) {
    display: block;
}
#chat .chat_content .msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 40px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #D4CFC3 transparent;
}
#chat .chat_content .msgs::-webkit-scrollbar {
    width: 4px;
}
#chat .chat_content .msgs::-webkit-scrollbar-thumb {
    background: #D4CFC3;
    border-radius: 99px;
}
#chat .chat_content .msgs .m_list {
    display: flex;
    gap: 10px;
}
#chat .chat_content .msgs .m_list.user {
    flex-direction: row-reverse;
}
#chat .chat_content .msgs .m_list.user .m_r .bub {
    background: #9DF29F;
    border-color: #9DF29F;
}
#chat .chat_content .msgs .m_list.user .m_r .time {
    text-align: right;
}
#chat .chat_content .msgs .m_list .av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
}
#chat .chat_content .msgs .m_list .av img {
    width: 100%;
    height: 100%;
}
#chat .chat_content .msgs .m_list .m_r {
    max-width: 86%;
}
#chat .chat_content .msgs .m_list .m_r .bub {
    font-size: 14px;
    line-height: 24px;
    color: #2A2118;
    width: fit-content;
    padding: 10px;
    border: 1px solid #D4CFC3;
    background: #E8E4D8;
    border-radius: 7px;
    min-width: 120px;
    min-height: 46px;
}
#chat .chat_content .msgs .m_list .m_r .bub .typing {
    display: flex;
    gap: 5px;
    align-items: center;
    height: 24px;
    margin: 0 0 0 5px;
}
#chat .chat_content .msgs .m_list .m_r .bub .typing i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #9A9184;
    display: block;
    animation: bounce .7s ease-in-out infinite;
}
#chat .chat_content .msgs .m_list .m_r .bub .typing i:nth-child(2) {
    animation-delay: .1s;
}
#chat .chat_content .msgs .m_list .m_r .bub .typing i:nth-child(3) {
    animation-delay: .2s;
}
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        opacity: .35;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
}
#chat .chat_content .msgs .m_list .m_r .time {
    font-size: 12px;
    color: #2A2118;
    margin: 5px 0 0 0;
    opacity: .5;
}
#chat .chat_content .p-input {
    padding: .75rem 15px;
    border-top: 1px solid #D4CFC3;
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    flex-shrink: 0;
    overflow: hidden;
    transition: .3s ease;
}
#chat .chat_content .p-input .iw {
    flex: 1;
    display: flex;
    align-items: flex-end;
    background: #E8E4D8;
    border: 1px solid #D4CFC3;
    border-radius: 7px;
    min-height: 42px;
    height: auto;
    transition: .3s ease;
    padding: 0 7px 0 0;
}
#chat .chat_content .p-input .iw:focus-within {
    border-color: var(--color);
}
#chat .chat_content .p-input .iw textarea {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #2A2118;
    font-size: 14px;
    resize: none;
    padding: 10px 15px;
    line-height: 1.45;
    height: auto;
    min-height: 20px;
    max-height: 120px;
    overflow-y: auto;
}
#chat .chat_content .p-input .iw textarea::-webkit-scrollbar {
    width: 4px;
}
#chat .chat_content .p-input .iw textarea::-webkit-scrollbar-thumb {
    background: #D4CFC3;
    border-radius: 99px;
}
#chat .chat_content .p-input .send {
    width: fit-content;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    gap: 8px;
    background: #2A2118;
    border-radius: 7px;
    border: none;
    transition: .2s ease;
    cursor: pointer;
    opacity: 1;
}
#chat .chat_content .p-input .send:disabled {
    opacity: .3;
    cursor: not-allowed;
}
#chat .chat_content .p-input .send:not(:disabled):hover {
    background: var(--color);
}
#chat .chat_content .p-input .send:not(:disabled):active {
    transform: scale(0.96);
}
#chat .chat_content .p-input .send svg {
    width: 14px;
    height: 14px;
    display: block;
}
#chat .chat_content .p-input .send svg path {
    stroke: #fff;
    transition: .3s ease;
}
#chat .chat_content .p-input .send p {
    color: #fff;
    font-size: 13px;
    transition: .3s ease;
}

#chat .bub pre {
    overflow-x: auto;
    padding: 14px;
    margin: 10px 0;
    border-radius: 8px;
    background: #1e1e1e;
    color: #fff;
    white-space: pre;
}

#chat .bub pre code {
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}

#chat .bub code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eee;
    font-size: 13px;
}

#chat .bub pre code {
    background: transparent;
}

#chat .bub ul,
#chat .bub ol {
    padding-left: 22px;
    margin: 8px 0;
}

#chat .bub a {
    color: #356de0;
    text-decoration: underline;
    word-break: break-all;
}

#chat .bub blockquote {
    margin: 10px 0;
    padding: 8px 12px;
    border-left: 3px solid var(--color);
    background: #f5f5f5;
}

#chat .bub p {
    margin: 8px 0;
}

#chat .bub p:first-child {
    margin-top: 0;
}

#chat .bub p:last-child {
    margin-bottom: 0;
}

@keyframes lbpulse2 {
    0% {
        box-shadow: 0 0 var(--color);
    }
    70% {
        box-shadow: 0 0 0 9px #f8450300;
    }
    100% {
        box-shadow: 0 0 #0000;
    }
}
#chat pre * {
    font-family: consolas, microsoft yahei !important;
}
#chat hr {
    margin: 15px 0;
}
#chat table {
    width: max-content;
    border-collapse: collapse;
    margin: 20px 0;
    min-width: 423px;
}
#chat table thead tr th {
    background: #595959;
    font-size: 12px;
    color: #fff;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}
#chat table tr td {
    font-size: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #111;
    padding: 7px 10px;
}
#chat .code_header {
    display: flex;
    align-items: center;
    gap: 10px;
}
#chat .code_header .code_lang {
    color: var(--color);
    text-transform: uppercase;
    position: relative;
    padding: 0 0 0 15px;
    font-size: 12px;
}
#chat .code_header .code_lang:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color);
    animation: 1.8s ease 0s infinite normal none running lbpulse2;
}
#chat .code_header button {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #111;
    background: transparent;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 7px 10px;
}
#chat .code_header button svg {
    width: 12px;
    height: 12px;
}
