/* 超细滚动条 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
  /* 透明轨道 */
}

::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

.flex {
  display: flex;
}

.flex-direction-column {
  flex-direction: column;
}

.flex-1 {
  flex: 1;
}

.mt-40px {
  margin-top: 40px;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

.header {
  display: flex;
  box-sizing: border-box;
  align-items: center;
  padding: 24px 36px;
  background-image: url("../images/ai/bg_title.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  height: 88px;
  width: 100%;
}

.header .logo {
  width: 40px;
  height: 40px;
}

.header .title {
  font-weight: 600;
  font-size: 24px;
  color: #000000;
  text-align: left;
  margin-left: 12px;
}

.container {
  width: 100%;
  min-width: 1440px;
  height: calc(100vh - 88px);
  min-height: 812px;
  display: flex;
  box-sizing: border-box;
  background: #f9fcff;
  padding: 16px 36px 40px 36px;
}

.container .left {
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.container .left .no-messages .input-area {
  margin: auto 140px !important;
}

.container .left .chat-box {
  height: 100%;
}

.container .left .messages {
  display: flex;
  flex-direction: column;
  margin: auto 140px 0;
  height: calc(100% - 198px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 calc((100% - 1136px) / 2) 40px;
}

.container .left .messages .message-item {
  margin-bottom: 16px;
}

.message-item .user-message {
  display: flex;
  justify-content: flex-end;
}

.message-item .user-message .bubble {
  position: relative;
  background: #1c50cd;
  color: white;
  padding: 16px 25px 16px 20px;
  border-radius: 18px 18px 0 18px;
  max-width: 70%;
  word-break: break-word;
}

.message-item .ai-message-wrap{
  position: relative;
}

.message-item .ai-message-wrap .ai-name {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.message-item .ai-message-wrap .ai-name .icon {
  width: 24px;
  height: 24px;
}

.message-item .ai-message-wrap .ai-name .text {
  font-weight: 400;
  font-size: 14px;
  color: #333333;
  line-height: 22px;
  margin-left: 8px;
}

.message-item .ai-message-wrap .ai-message {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  line-height: 1.6;
  overflow: hidden;
}

.message-item .ai-message-wrap .ai-message img {
  max-width: 100%;
  height: auto;
}

.container .left .chat-box {
  display: flex;
  flex-direction: column;
}

.container .left .chat-box .input-area {
  padding: 0 calc((100% - 1136px) / 2);
  z-index: 10;
  flex-direction: column;
  margin: auto 140px 0;
  display: flex;
  position: sticky;
  bottom: 0;
}

.container .left .chat-box .input-area .ai-name {
  display: flex;
  align-items: center;
  padding-top: 12px;
}

.container .left .chat-box .input-area .ai-name .icon {
  width: 24px;
  height: 24px;
}

.container .left .chat-box .input-area .ai-name .text {
  font-weight: 400;
  font-size: 14px;
  color: #333333;
  line-height: 22px;
  margin-left: 8px;
}

.ai-name-empty {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.ai-name-empty .icon {
  width: 80px;
  height: 80px;
}

.ai-name-empty .text {
  margin-top: 32px;
  font-weight: 500;
  font-size: 24px;
  color: #333333;
}

.container .left .chat-box .input-area .input-box {
  width: 100%;
  position: relative;
}

.container .left .chat-box .input-area .input-box .send-icon {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.send-icon.disabled {
  cursor: not-allowed !important;
  opacity: 0.5;
}

.container .left .chat-box .input-area .input {
  box-sizing: border-box;
  flex-grow: 1;
  width: 100%;
  height: 128px;
  background: #ffffff;
  border-radius: 8px 8px 8px 8px;
  border: 1px solid #e5e5e5;
  margin-top: 42px;
  padding: 16px 24px;
  resize: none;
}

.container .left .chat-box .input-area .input:focus {
  outline: none;
}

.container .right {
  display: flex;
  flex-direction: column;
  width: 524px;
  height: 100%;
  overflow: hidden;
}

.container .right .main-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 0;
  padding: 24px 32px 12px 32px;
  overflow: hidden;
}

.container .right .main-wrap .title {
  font-weight: 600;
  font-size: 20px;
  color: #333333;
  text-align: left;
  margin-bottom: 16px;
}

.container .right .main-wrap .shortcuts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.container .right .main-wrap .shortcuts .shortcut-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 64px;
  background: linear-gradient(0deg, #EDF0F9 0%, #F9FBFF 100%);
  border-radius: 8px 8px 8px 8px;
  cursor: pointer;
}

.container .right .main-wrap .shortcuts .shortcut-item .icon {
  width: 40px;
  height: 40px;
  margin-left: 24px;
}

.container .right .main-wrap .shortcuts .shortcut-item .text {
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  text-align: left;
  margin-left: 16px;
}

.container .right .main-wrap .questions-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.container .right .main-wrap .question-list {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 20px;
  padding-bottom: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.container .right .main-wrap .question-item {
  display: flex;
  align-items: center;
  width: calc((100% - 20px) / 2);
  height: 22px;
  box-sizing: border-box;
  cursor: pointer;
}

.container .right .main-wrap .question-item .icon-arrow {
  width: 16px;
  height: 16px;
}

.container .right .main-wrap .question-item .question-text {
  flex: 1;
  font-weight: 400;
  font-size: 16px;
  color: #333333;
  text-align: left;
  margin: 0 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-section {
  display: flex;
  align-items: center;
  margin-top: 24px;
  flex: 1;
}

.contact-section .icon {
  width: 40px;
  height: 40px;
}

.contact-section .contact-info {
  display: flex;
  flex-direction: column;
  margin-left: 16px;
}

.contact-section .contact-info .text-1 {
  font-weight: 400;
  font-size: 14px;
  color: #666666;
  font-style: normal;
}

.contact-section .contact-info .text-2 {
  font-weight: 500;
  font-size: 16px;
  color: #333333;
  line-height: 22px;
  font-style: normal;
  margin-top: 4px;
}

.container .right .app {
  position: relative;
  margin-top: 30px;
}

.container .right .app .app-img {
  width: 524px;
  height: 220px;
}

#qrcode-box {
  position: absolute;
  top: 58px;
  left: 58px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px;
  background: #ffffff;
  min-width: 106px;
  min-height: 106px;
}

/* 二维码容器内部canvas/img样式自适应 */
#qrcode-box img,
#qrcode-box canvas {
  width: 106px !important;
  height: 106px !important;
  display: block;
}

/* 加载指示器样式 */
.loading-indicator {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.typing-animation {
  display: flex;
  gap: 6px;
  align-items: center;
}

.typing-animation span {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out both;
}

.typing-animation span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-animation span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.5;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}


/* 全局样式用于AI内容 */
.ai-content p {
  margin: 8px 0;
}

pre {
  background: #f6f8fa;
  padding: 16px;
  border-radius: 6px;
  overflow: auto;
  margin: 12px 0;
}

code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
}

/* 点赞/点踩模块 */
.like-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 28px;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 0 12px;
  box-sizing: border-box;
  position: relative;
  gap: 24px;
  margin-top: 8px;
  margin-left: auto;
}

.like-box .like-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

/* 中间竖线分隔 */
.like-box::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 12px;
  border-left: 1px solid #E5E5E5;
}