:root {
    --main-gradient: linear-gradient(to top, #D0ABFF, #3479FF);
    --secondary-gradient: linear-gradient(to right bottom, #f9fbff, #d6e3f5);
    --customer-gradient: linear-gradient(to top, #ffffff, rgb(227, 224, 255));
    --law-gradient: linear-gradient(to top, rgb(255, 255, 255), rgb(253, 242, 218));
    --button-gradient: linear-gradient(to right, #3479FF, #D0ABFF);
    --customer-color: #7465FF;
    --law-color: rgb(255, 175, 0);
    --primary-color: #5d3dff;
    --secondary-color: #666666;
    --text-color: #333333;
    --hover-shadow: 0 12px 24px rgba(149, 117, 205, 0.2);
    --active-shadow: 0 4px 16px rgba(149, 117, 205, 0.2);
    --scrollbar-color: rgba(136, 136, 136, 0.6);
    --scrollbar-hover-color: rgba(85, 85, 85, 0.8);
}

.no-user-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.el-drawer {
    height: 96%;
    top: 2%;
    position: fixed;
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
    background: var(--secondary-gradient);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 10px -5px rgba(0, 0, 0, .2), 0 16px 24px 2px rgba(0, 0, 0, .14), 0 6px 30px 5px rgba(0, 0, 0, .12);
    overflow: hidden;
    outline: 0;
    z-index: 98;
    border-radius: 15px;
}

.el-drawer.open {
    visibility: visible;
    transform: translateX(0);
}

.el-drawer.right {
    width: 81%;
    right: 1%;
}

.el-drawer.left {
    width: 16%;
    left: 1%;
}

.el-drawer.left .his-title {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    border-bottom: 1px solid #dcdce0;
}

.el-drawer.left .xe-content-icon {
    margin: 10px;
}

.el-drawer.left .his-title .xe-content-btn {
    font-size: 20px;
}

.el-drawer.left .his-footer .xe-content-btn {
    font-size: 15px;
}

.el-drawer.left .xe-content-btn a {
    padding-right: 15px;
    right: 0px;
    position: absolute;
    right: 0px;
}

.el-drawer.left .his-chat-block {
    overflow-y: auto;
    height: calc(100%);
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-color) transparent;
}

.el-drawer.left .his-block {
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.el-drawer.left .his-chat-block p {
    padding: 10px;
    border-bottom: 1px dashed #dcdce0;
    font-size: 16px;
    font-weight: bold;
}

.el-drawer.left .his-chat-block ul li {
    margin: 10px;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
}

.el-drawer.left .his-chat-block ul li i {
    float: right;
}

.el-drawer.left .his-chat-block ul li:hover {
    cursor: pointer;
    color: rgba(1, 58, 246, 0.89);
}

.el-drawer.left .his-chat-block ul li.active {
    background: linear-gradient(to right, rgb(204 211 252), rgb(204 220 252 / 96%))
}

.el-drawer.left .his-footer > div {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    border-top: 1px solid #dcdce0;
}

.hide {
    display: none !important;
}

.show {
    display: flex !important;
}

.el-drawer.left .his-footer .login-no {
    padding: 10px;
    text-align: center;
}

/* AI 内容样式 */
.ai-xe {
    z-index: 66;
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

/* 初始化界面样式 */
.initialization-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.xe-content-icon {
    text-align: center;
    margin-top: 10px;
    user-select: none;
}

.xe-content-icon .img-box {
    background: var(--main-gradient);
    border: 3px solid #ffffff;
    width: 50px;
    height: 50px;
    margin: 0 auto;
    padding: 3px;
    border-radius: 16px;
}

.xe-content-icon .img-box img {
    height: 40px;
    padding: 6px 0;
    vertical-align: middle;
}

.xe-content-icon .xe-content-icon-title {
    font-weight: bolder;
    font-size: 16px;
    margin: 10px 0;
}

.xe-content-icon .xe-content-icon-desc {
    color: var(--text-color);
    font-size: 14px;
}

.content-scenes-box {
    margin-top: 50px;
    display: flex;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.content-scenes-box .content-scenes {
    flex-shrink: 0;
    margin: 10px;
    width: 180px;
    height: 260px;
    border-radius: 16px;
    border: 3px solid #ffffff;
    text-align: center;
    box-sizing: border-box;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    user-select: none;
}

.content-scenes-box .content-scenes:hover {
    transform: translateY(-6px) scale(1.02);
}

.content-scenes-box .content-scenes:active {
    transform: translateY(-2px) scale(0.99);
    transition: all 0.1s;
}

.content-scenes-box .content-scenes .scenes-icon {
    width: 50px;
    height: 50px;
    border: 3px solid #fffefe;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 30px auto 0 auto;
}

.content-scenes-box .content-scenes .scenes-icon img {
    height: 30px;
    width: 30px;
}

.content-scenes-box .content-scenes .scenes-title {
    margin: 20px 0;
    font-size: 16px;
    font-weight: bolder;
    color: var(--text-color);
}

.content-scenes-box .content-scenes .scenes-desc {
    color: var(--secondary-color);
    font-size: 14px;
}

.content-scenes-box .content-scenes[data-scene="customer"] {
    background: var(--customer-gradient);
}

.content-scenes-box .content-scenes[data-scene="customer"]:hover {
    background: linear-gradient(to top, #ffffff, #d4cffc);
    border-color: var(--customer-color);
    box-shadow: var(--hover-shadow);
}

.content-scenes-box .content-scenes[data-scene="customer"].active {
    border-color: var(--customer-color);
    box-shadow: var(--active-shadow);
    background: linear-gradient(to top, #ffffff, #d4cffc);
}

.content-scenes-box .content-scenes[data-scene="customer"] .scenes-icon {
    background: linear-gradient(to top, rgb(200, 194, 255), var(--customer-color));
}

.content-scenes-box .content-scenes[data-scene="law"] {
    background: var(--law-gradient);
}

.content-scenes-box .content-scenes[data-scene="law"]:hover {
    background: linear-gradient(to top, rgb(255, 255, 255), rgb(255, 230, 175));
    border-color: var(--law-color);
    box-shadow: var(--hover-shadow);
}

.content-scenes-box .content-scenes[data-scene="law"].active {
    border-color: var(--law-color);
    box-shadow: var(--active-shadow);
    background: linear-gradient(to top, rgb(255, 255, 255), rgb(255, 230, 175));
}

.content-scenes-box .content-scenes[data-scene="law"] .scenes-icon {
    background: linear-gradient(to top, rgb(255, 228, 168), var(--law-color));
}

.chat-container {
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    width: calc(100% - 10px);
}

/* 滚动条样式 */
.chat-content-wrapper::-webkit-scrollbar {
    width: 6px;
}

.chat-content-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.chat-content-wrapper::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
    transition: background 0.2s;
}

.chat-content-wrapper.scrolling::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
}

.chat-content-wrapper:hover::-webkit-scrollbar-thumb {
    background: var(--scrollbar-color);
}

.chat-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-hover-color);
}

.chat-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
    min-height: 100px;
}

.question-line {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 14px;
}

.head-ai {
    flex-shrink: 0;
    line-height: 32px;
    display: block;
    margin-right: 10px;
    border-right: 3px;
    text-align: center;
    font-weight: bold;
    background: var(--main-gradient);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.head-ai img {
    width: 32px;
    padding: 4px 0;
}

.me-line-box {
    width: 100%;
    display: flex;
    justify-content: end;
}

.head-me {
    float: right;
    flex-shrink: 0;
    display: block;
    margin-right: 10px;
    border-right: 3px;
    text-align: center;
    font-weight: bold;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.head-me img {
    width: 100%;
    height: 100%;
}

.meContent {
    display: inline-block;
    border-radius: 8px;
    padding: 10px;
    background-color: #E2ebff;
    margin-right: 16px;
}

.YIContent {
    display: inline-block;
    border-radius: 8px;
    background-color: #f0edff;
    padding: 10px;
    border: 1px dashed #dedede;
    line-height: 24px;
    color: var(--primary-color);
    font-size: 14px;
}

.YIContent-OK {
    font-weight: bold;
}

.YIContent-txt {
    display: block;
    flex-basis: 100%;
    margin: 10px 50px 0;
    background-color: #ffffff;
    border-radius: 6px;
    box-sizing: border-box;
    padding: 16px;
    width: 100%;
    font: 14px/2.0 "Microsoft YaHei", "微软雅黑", "Tahoma", "Arial", "宋体", "sans-serif";
}

.YIContent-txt span {
    font-weight: bold;
}

.YIContent-txt ol li {
    list-style: inherit;
}

.YIContent-txt img {
    width: 95%;
    display: block;
    margin: 4px;
}

.YIContent-txt think {
    color: #8b8b8b;
    font-size: 12px;
    display: inline-block;
    margin-bottom: 20px;
    position: relative;
    width: 95%;
}

.YIContent-txt think:before {
    content: "";
    border-left: 1px solid #e5e5e5;
    height: calc(100% - 20px);
    margin-top: 22px;
    position: absolute;
    top: 0;
    left: -8px;
}

.YIContent-txt a {
    color: blue;
}

.chat-md-content-vue-md-html p {
    line-height: 32px;
}

.chat-md-content-vue-md-html p a {
    color: #0A70FF;
}

.chat-md-content-vue-md-html .vue-markdown-table {
    border-collapse: collapse;
    border-spacing: 0;
}

.chat-md-content-vue-md-html .vue-markdown-table th,
.chat-md-content-vue-md-html .vue-markdown-table td {
    border: 1px solid #ddd;
    padding: 6px 13px;
    margin: 0;
}

.chat-md-content-vue-md-html ul,
.chat-md-content-vue-md-html li,
.chat-md-content-vue-md-html p {
    line-height: 25px;
}

.chat-md-content-vue-md-html img {
    display: block;
    margin: 4px;
}

.clear-btn {
    width: 130px;
    text-align: center;
    position: sticky;
    z-index: 10;
    padding: 5px 0;
    font-size: 15px;
    margin: 0 auto -20px;
}

.clear-btn :hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: scale(1.02);
}

.clear-btn div {
    padding: 5px 0;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 auto;
    text-align: center;
    background-color: #eef0ff;
    color: var(--primary-color);
    line-height: 20px;
    transition: transform 0.2s ease;
    transform-origin: center;
}

/* 输入框样式 */
.ai-xe-input-box {
    width: calc(100% - 30px);
    flex-shrink: 0;
}

.ai-xe-input-box .input-scene-box {
    display: flex;
    margin-bottom: 8px;
    margin-left: 6px;
}

.ai-xe-input-box .input-scene-box .input-scene {
    margin-right: 16px;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 6px;
    border: 2px solid transparent;
    padding: 3px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    font-size: 15px;
}

.ai-xe-input-box .input-scene-box .input-scene[data-scene="customer"]:hover {
    border: 2px solid var(--customer-color);
    color: var(--customer-color);
}

.ai-xe-input-box .input-scene-box .input-scene[data-scene="customer"].active {
    border-color: var(--customer-color);
    box-shadow: 0 2px 6px rgba(116, 101, 255, 0.2);
    color: var(--customer-color);
}

.ai-xe-input-box .input-scene-box .input-scene[data-scene="law"]:hover {
    border: 2px solid var(--law-color);
    color: var(--law-color);
}

.ai-xe-input-box .input-scene-box .input-scene[data-scene="law"].active {
    border-color: var(--law-color);
    box-shadow: 0 2px 6px rgba(220, 140, 0, 0.2);
    color: var(--law-color);
}

.ai-xe-input-box .input-scene-box .input-scene img {
    width: 20px;
    height: 20px;
    line-height: 17px;
    margin-right: 6px;
}

.ai-xe-input {
    width: 100%;
    background: #ffffff;
    border-radius: 7px;
    box-sizing: border-box;
    padding: 16px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.ai-xe-input .input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.ai-xe-input .ai-xe-textarea {
    width: 100%;
    border: none;
    border-radius: 6px;
    line-height: 18px;
    font-size: 14px;
    padding: 10px;
    resize: none;
    min-height: 80px;
    max-height: 150px;
    box-sizing: border-box;
}

.ai-xe-input .button-wrapper {
    display: flex;
    justify-content: end;
    align-items: center;
    margin-bottom: 10px;
}

.ai-xe-input .button-wrapper img {
    width: 15px;
    height: 10px;
}

.ai-button {
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    background: var(--primary-color);
    color: #ffffff;
    outline: 0;
    margin: 0;
    transition: all 0.15s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: 0 2px 4px rgba(93, 61, 255, 0.2);
}

.ai-xe-input .button-wrapper .send-button:hover {
    background-color: #4926fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(93, 61, 255, 0.3);
}

.ai-xe-input .button-wrapper .send-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(93, 61, 255, 0.2);
}

textarea:focus {
    border: 1px solid #D3DCE6;
    outline: none;
    box-shadow: none;
}


.permission-alert {
    margin: 20px 0;
}

/* AI 按钮样式 */
.ai-xe-button {
    position: fixed;
    right: 0;
    bottom: 100px;
    z-index: 99;
    cursor: pointer;
    color: #fcfcfc;
    width: 40px;
    height: 108px;
    padding-top: 10px;
    font-size: 12px;
    text-align: center;
    border-radius: 12px 0 0 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    background: var(--button-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    transform-origin: right center;
}

.ai-xe-button:hover {
    width: 48px;
    box-shadow: 0 4px 12px rgba(52, 121, 255, 0.3);
    background: linear-gradient(to right, #4a87ff, #d8b6ff);
}

.ai-xe-button:active {
    transform: translateX(-2px);
    box-shadow: 0 2px 6px rgba(52, 121, 255, 0.3);
    background: linear-gradient(to right, #3070f0, #c89eff);
}

.ai-xe-button img {
    display: block;
    width: 28px;
    height: 24px;
}

.ai-xe-button p {
    width: 50%;
    font-weight: bolder;
    font-size: 16px;
    line-height: 19px;
    margin-top: 0;
}

.ai-xe-button.open {
    right: 1000px;
    border-radius: 12px 0 0 12px;
    transform: scale(0.9);
}

.pause-box {
    background-color: #f0edff;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    width: 110px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 10px;
    margin-left: 50px;
    font-size: 14px;
}

.pause-box:hover {
    background-color: #eae5ff;
}

.pause-box .pause-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-right: 10px;
}

.pause-box .pause-icon .pause-icon-o {
    width: 7px;
    height: 7px;
    background-color: var(--primary-color);
}

.answer-oper-box {
    width: 100%;
    padding: 6px 10px;
    margin-left: 50px;
    font-size: 13px;
    display: flex;
    align-items: center;
    color: #999999;
    gap: 8px;
}

.answer-oper-box-me {
    justify-content: end;
    padding: 6px 50px;
}

.answer-oper-box > i {
    cursor: pointer;
}

.answer-oper-box > p {
    font-size: 12px;
    color: #959393;
}

.answer-oper-box .ri-thumb-up-line,
.answer-oper-box .ri-thumb-up-fill {
    margin: 0 10px;
}

.answer-oper-box .up-down-active {
    color: var(--primary-color);
}

.answer-oper-box .fa-refresh:hover,
.answer-oper-box .fa-thumbs-o-up:hover,
.answer-oper-box .fa-thumbs-o-down:hover,
.answer-oper-box .fa-copy:hover{
    color: var(--primary-color);
}

.answer-oper-box-selected {
    color: var(--primary-color);
}

.el-avatar {
    background: var(--main-gradient);
    vertical-align: top;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.el-avatar i {
    color: #dfe4f8;
    font-size: 22px;
    line-height: 35px;
}

.modal {
    z-index: 200 !important;
}

.login-modal .left {
    width: 400px;
    text-align: center;
    padding: 0px 30px 0px 30px;
    border-right: 1px solid #dcdfe6;
    margin-left: -500px;
    line-height: 1.75;
}

.form-modal .title {
    padding: 50px 0 30px 0;
    font-size: 2.5em;
}

.login-modal .left h2 {
    color: rgb(120 120 120);
    font-size: 1.3em;
}

.login-modal .left h3 {
    text-align: left;
    padding: 20px 0 0 40px;
    color: rgb(213 142 87);
}

.login-modal .left h3 i {
    padding-right: 10px;
}

.login-modal .right {
    margin-left: -100px;
}

.login-modal input {
    height: 50px !important;
    font-size: 16px !important;
}

.login-modal .error {
    left: 5px;
    font-size: 15px;
}

.login-modal .btn-default {
    line-height: 30px;
    background: rgb(231 243 255);
    color: rgb(78 162 247);
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
    padding: 10px;
}

.login-modal .btn-primary {
    width: 300px;
    line-height: 40px;
    background: #005EEC;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    display: block;
    font-size: 16px;
}

.protocol-modal .form-modal {
    width: 800px;
    height: 500px;
    padding: 30px;
    margin-left: -400px;
}

.protocol-modal .content {
    padding: 10px;
    overflow: scroll;
    height: 450px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.75;
}

/* 气泡菜单样式 */
.bubble-menu {
    position: absolute;
    right: 10px;
    bottom: 40px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    z-index: 1000;
    display: none;
}

/* 显示状态 */
.bubble-menu.show {
    display: block !important;
}

/* 菜单项样式 */
.bubble-btn {
    position: relative !important;
    display: block;
    align-items: center;
    padding: 10px 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s;
}

button i, a i {
    margin-right: 5px;
}

.form-item-title {
    display: flex;
    align-items: flex-start;
    align-content: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    width: 500px !important;
}

.eva-modal .form-modal {
    top: 40%;
    height: 600px;
}

.eva-modal .form-modal .modal-title,
.user-modal .form-modal .modal-title {
    padding: 0 0 0 20px;
    text-align: left;
    border-bottom: 1px solid #dcdce0;
}

.eva-modal .modal-title h4,
.user-modal .modal-title h4 {
    font-size: 17px;
    line-height: 13px;
}

.eva-modal .form-item {
    width: 480px;
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.eva-modal .form-item .title {
    color: rgb(114, 78, 255);
    font-size: 20px;
}

.eva-modal .form-item .title2 {
    color: rgb(114, 78, 255);
    font-size: 14px;
}

.eva-modal .form-item .form-item-label {
    text-align: right;
    font-weight: bold;
}

.eva-modal .form-item textarea {
    width: 480px;
    height: 200px;
    resize: none;
}

.eva-modal .form-item .char-counter {
    position: absolute;
    right: 10px;
    bottom: 10px;
    font-size: 12px;
    color: #999;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}

.stars {
    display: flex;
    align-items: center;
    direction: rtl;
}

.star {
    padding: 10px;
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star:hover, .star:hover ~ .star {
    color: #f0c04a;
}

.star.selected {
    color: #f0c04a;
}

.rating-text {
    font-size: 13px;
}

.expand-btn-container {
    position: absolute;
    left: 0;
    top: 30px;
    z-index: 100;
}

.expand-btn {
    width: 35px;
    height: 65px;
    background: #5d3dff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    transition: all 0.3s ease;
}

.expand-btn:hover {
    background: #270acf;
}