.ai-dh-box {
        padding: 20px;
        /* 移除固定高度设置，改为自适应内容 */
        min-height: 100px; /* 保留最小高度，确保初始显示 */
        /* 移除滚动条 */
        overflow-y: hidden;
        overflow-x: hidden; /* 禁止横向滚动 */
        /* background-color: #fff; */
        scrollbar-width: none;
    }

    .dh-list {
        display: flex;
        flex-direction: column;
        gap: 20px;
        /* 确保内容可以完全展开 */
        overflow: visible;
    }

    .dh-item {
        max-width: 100%;
        display: flex;
    }

    .dh-item.ai {
        align-self: flex-start;
    }

    .dh-item.user {
        align-self: flex-end;
    }

    .dh-item-msg {
        padding: 12px 16px;
        border-radius: 12px;
        position: relative;
        max-width: 100%; /* 添加最大宽度限制 */
        word-break: break-word; /* 允许长单词换行 */
        word-wrap: break-word; /* 兼容旧浏览器 */
    }

    .ai .dh-item-msg {
        background: #F5F7FA;
        border: 1px solid #EBEEF5;
    }

    .user .dh-item-msg {
        background: #409EFF;
        color: white;
    }

    .msg-time {
        font-size: 12px;
        color: #909399;
        margin-top: 6px;
        text-align: right;
    }

    .user .msg-time {
        color: rgba(255, 255, 255, 0.8);
    }

    .ai .dh-item-msg .loading-cursor {
        /* 增加选择器层级 */
        animation: blink 1s infinite;
        font-weight: 700;
        color: #909399;
        /* 添加颜色定义 */
    }


    @keyframes blink {
        0% {
            opacity: 0;
        }

        50% {
            opacity: 1;
        }

        100% {
            opacity: 0;
        }
    }
.btn-text {
  font-size: 16px !important; 
}
    /* 换一换按钮旋转动画 */
    @keyframes rotate {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(180deg);
        }
    }

    .rotate-animation {
        animation: rotate 0.5s ease-in-out;
    }

    .end-img {
        display: none;
        cursor: pointer;
        transition: opacity 0.3s;
    }

    .end-img:hover {
        opacity: 0.8;
    }

    .history-box {
        max-height: 100vh;
        overflow-y: auto;
    }

    .reset-btn {
        color: #409EFF;
        cursor: pointer;
        width: 80px;
        text-align: center;
        border-radius: 8px;
        border: 1px solid #409EFF;
    }

    .box2 {
        display: flex;
        justify-content: end;
    }

    /* 保留头像固定高度，因为头像通常需要固定尺寸 */
    .dh-item-avatar {
        width: 40px;
        height: 40px;
        margin-right: 12px;
        flex-shrink: 0;
        border-radius: 4px;
    }

    .dh-item.ai .dh-item-msg {
        display: flex;
        align-items: flex-start;
        /* 新增对齐方式 */
    }
    .ai-input::placeholder {
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 16px;
        color: #999999;
        text-align: left;
        font-style: normal;
        text-transform: none;
    }
    .ai-input {font-family: Source Han Sans CN, Source Han Sans CN;font-weight: 400;font-size: 16px;color: #000000;text-align: left;font-style: normal;text-transform: none; border-radius: 12px;}
    .question-error {
        color: #F56C6C;
        font-size: 12px;
        margin-top: 4px;
        line-height: 1.5;
    }
    .toast-mask{
        width: 100%;
        height: 100%;
        position: fixed;
        left: 0;
        top: 0;
        background-color: rgba(0, 0, 0, 0.3);
        opacity: 0;
        display: none;
        transition: all .3s;
    }
    .toast-modal{
        width: 500px;
        min-height: 200px; /* 改为最小高度 */
        position: absolute;
        left: 13.4vw;
        right: 0;
        top: 0;
        bottom: 0;
        margin: auto;
        background-color: #fff;
        box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.10);
        border-radius: 4px;
        padding: 10px;
        opacity: 0;
        display: none;
        transition: all .5s;
    }
    .toast-title{
        font-size: 18px;
        font-weight: bold;
    }
    .toast-content{
        margin-top: 20px;
    }
    .toast-button{
        position: absolute;
        bottom: 0;
        padding: 4px 18px;
        border-radius: 4px;
        background-color: #3466db;
        color: #fff;
        right: 10px;
        bottom: 10px;
        cursor: pointer;
        transition: all .3s;
    }
    .toast-button:hover{
        background-color: #245bdb;
    }

    /* 自定义SweetAlert2样式 */
    .my-swal-popup {
        font-family: 'Source Han Sans CN', sans-serif;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .my-swal-title {
        font-size: 18px;
        font-weight: bold;
        color: #333;
        margin-bottom: 10px;
    }

    .my-swal-content {
        font-size: 16px;
        color: #666;
        line-height: 1.5;
    }

    .my-swal-confirm {
        background-color: #409EFF;
        color: white;
        border: none;
        border-radius: 4px;
        padding: 6px 16px;
        font-size: 14px;
        cursor: pointer;
        transition: background-color 0.3s;
    }

    .my-swal-confirm:hover {
        background-color: #2E8AE6;
    }
 .avatar-container {
   position: relative;
    display: flex;
    margin:0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 100%;
    width: fit-content;
    }

    .white-dot {
      position: absolute;
      right: 5px; 
      width: 13px;
      height: 13px;
      background-color: #fff;
      border-radius: 50%;
      opacity: 0;
      transform: scale(0);
    }

    .dot-top {
      top: 60%; 
      animation: dotGrow 0.5s forwards;
      animation-delay: 1.5s; 
    }

    .dot-bottom {
      bottom: 45%;
      animation-delay: 1.5s;
    }

    @keyframes dotGrow {
      0% {
        transform: scale(0);
        opacity: 0;
      }
      100% {
        transform: scale(1); 
        opacity: 1;
      }
    }

    .tooltip-text {
      position: absolute;
      width: 120px;
      font-weight: 700;
      line-height: 24px;
      top: 45%; 
      left: calc(100% + 10px); 
      background-color: #fff;
      border-radius: 8px; 
      padding: 10px 16px;
      font-size: 14px;
      color: #333;
      word-wrap: break-word;
      opacity: 0; 
      transform: translateX(-10px); 
      transition: all 0.5s ease; 
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
.tooltip-text b {background: rgba(0,87,255,.06);color: #F44336;}
    .tooltip-text.show {
      opacity: 1;
      transform: translateX(0);
    }
    .bgys{background-color:#F44336;}
    button {border: none;}
    button:focus {outline: none;}
    



body.swal2-height-auto {
	height: auto !important
}

body.swal2-no-backdrop .swal2-container {
	background-color: rgba(0,0,0,0) !important;
	pointer-events: none
}

body.swal2-no-backdrop .swal2-container .swal2-popup {
	pointer-events: all
}

body.swal2-no-backdrop .swal2-container .swal2-modal {
	box-shadow: 0 0 10px var(--swal2-backdrop)
}

body.swal2-toast-shown .swal2-container {
	box-sizing: border-box;
	grid-column: 1/4 !important;
	grid-row: 1/4 !important;
	grid-template-columns: min-content auto min-content;
	padding: 1em;
	overflow-y: hidden;
	background: var(--swal2-background);
	box-shadow: 0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);
	pointer-events: all
}

body.swal2-toast-shown .swal2-container.swal2-top {
	inset: 0 auto auto 50%;
	transform: translateX(-50%)
}

body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right {
	inset: 0 0 auto auto
}

body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left {
	inset: 0 auto auto 0
}

body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left {
	inset: 50% auto auto 0;
	transform: translateY(-50%)
}

body.swal2-toast-shown .swal2-container.swal2-center {
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%)
}

body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right {
	inset: 50% 0 auto auto;
	transform: translateY(-50%)
}

body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left {
	inset: auto auto 0 0
}

body.swal2-toast-shown .swal2-container.swal2-bottom {
	inset: auto auto 0 50%;
	transform: translateX(-50%)
}

body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right {
	inset: auto 0 0 auto
}

.typewriter-text br{margin-bottom:10px;}




/* 聊天容器样式 */
.ai-chat-container {
     width: 90%;
    max-width: 900px;
    margin: 0 auto;
    margin-top: 10px;
    height: 490px;
    overflow: auto;
    max-height: none;
    padding: 15px;
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: none;
}
.ai-chat-containerxws {
     width: 96%;
    max-width: 900px;
    margin: 0 auto;
    margin-top: 10px;
    height: 100%;
    overflow: auto;
    max-height: none;
    padding: 15px;
    background-color: #fff;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: none;
}
/* 显示聊天容器的类 */
.ai-chat-container.show {
    display: block;
}


.avatar-container, .ai-content {
    transition: display 0.3s ease;
}

/* 聊天消息样式 */
#chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 让消息容器自适应内容 */
    height: auto;
    min-height: 50px; /* 保留最小高度 */
}

/* 用户消息样式 */
.user-message {
    max-width: 100%;
    display: flex;
    align-items: flex-start;
}

/* AI消息样式 */
.ai-message {
    align-self: flex-start;
    max-width: 100%;
    display: flex;
    align-items: flex-start;
}

/* 加载中消息样式 */
.loading-message {
    align-self: flex-start;
    max-width: 100%;
    display: flex;
}

/* 错误消息样式 */
.error-message {
    align-self: flex-start;
    max-width: 80%;
    display: flex;
}

/* 消息内容样式 */
.message-content {
    padding: 3px 4px;
    border-radius: 12px;
    word-break: break-word;
    line-height: 1.5;
    flex: 1;
}

.user-message .message-content {
    color: #000;
    font-weight: 700;
    border-top-right-radius: 4px;
}

.ai-message .message-content {
    padding-top: 10px;
    padding-left: 10px;
    border-top-left-radius: 4px;
}

.error-message .message-content {
    background: #FEE;
    border: 1px solid #FCC;
    color: #F44336;
    border-top-left-radius: 4px;
}


/* 头像样式 */
.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-top: 4px;
}

/* 加载动画样式 */
.loading-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* 自定义提示弹窗样式 */
.custom-alert {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 400px;
	background-color: white;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 24px;
	z-index: 1000;
	display: none;
}

.custom-alert.show {
	display: block;
	animation: fadeIn 0.3s;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translate(-50%, -60%); }
	to { opacity: 1; transform: translate(-50%, -50%); }
}

.custom-alert-header {
	display: flex;
	align-items: center;
	margin-bottom: 16px;
}

.custom-alert-icon {
	width: 40px;
	height: 40px;
	margin-right: 12px;
}

.custom-alert-title {
	font-family: 'Source Han Sans CN', sans-serif;
	font-size: 18px;
	font-weight: bold;
	color: #333;
}

.custom-alert-content {
	font-family: 'Source Han Sans CN', sans-serif;
	font-size: 16px;
	color: #666;
	margin-bottom: 24px;
	line-height: 1.5;
}

.custom-alert-footer {
	display: flex;
	justify-content: flex-end;
}

.custom-alert-button {
	background-color: #409EFF;
	color: white;
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.3s;
}

.custom-alert-button:hover {
	background-color: #2E8AE6;
}

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

.custom-alert-overlay.show {
	display: block;
}

    /* 复制按钮样式 */
    .copy-btn {
    margin:0 auto;
    text-align: center;
    margin-top: 10px;
    padding: 6px 12px;
    background: #2196F3;
    border: 1px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    transition: all 0.3s ease;
}   .restart-btn{
    margin: 0 auto;
    text-align: center;
    margin-top: 10px;
    padding: 6px 12px;
    background: #F44336;
    border: 1px solid #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #fff;
    transition: all 0.3s ease;
}

    .copy-btn:hover {
        background: #2196F3;
        color: #ffffff;
    }

/* 网站版权信息样式 */
.site-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
   text-align: center;
    color: #c5c8cc;
    font-size: 12px;
    line-height: 1.6;
}

.footer-content a {
    color:#c5c8cc;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: none;
}
.tip-text{display:none;}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  background-color: #f9fafb;
}

/* 容器样式，实现网格布局 */
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* 卡片基础样式 */
.card {
  border-radius: 8px;
  padding:15px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: white;
  border: 1px solid rgba(0,0,0,.1);
}

/* 激活状态卡片样式 */
.card.active {
  border-color: #F44336;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

/* 图标和标题容器，实现同行显示 */
.icon-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 图标样式 */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: #4b5563;
  font-size: 16px;
  line-height: 1;
  font-weight: bold;
}

.card h3 {
  font-size: 16px;
  color: #2196F3;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  text-align: center;
}

/* 悬停效果 */
.card:hover {
  border-color: #F44336;
  transform: translateY(-2px);
}
.ai-chat-containerxws {display: none;}
.ai-chat-containerxws.show {display: block;}
.hidden {display: none !important;}


/* 添加到ai.css文件末尾 */
#toptips {
    display: none; /* 默认隐藏 */
    position: relative; /* 确保定位正常 */
    z-index: 10; /* 确保在其他元素上方 */
}
#toptips.show {
    display: block; 
}
#toptipsxws {
    display: none; /* 默认隐藏 */
    position: relative; /* 确保定位正常 */
    z-index: 10; /* 确保在其他元素上方 */
}
#toptipsxws.showxws {
    display: block; 
}