.chat-page {
  height: calc(100vh - var(--header-height) - 40px);
  min-height: 520px;
}

.chat-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-card .el-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #303133;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f5f7fa;
  min-height: 0;
}

.chat-empty {
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #909399;
}

.chat-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #c0c4cc;
}

.chat-empty p {
  margin: 4px 0;
  font-size: 15px;
}

.chat-empty-sub {
  font-size: 13px;
  color: #b0b8c4;
}

.chat-msg {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.chat-msg.user .chat-avatar {
  background: #409eff;
  color: #fff;
}

.chat-msg.assistant .chat-avatar {
  background: #67c23a;
  color: #fff;
}

.chat-bubble {
  max-width: 75%;
  min-width: 0;
}

.chat-msg.user .chat-bubble {
  text-align: right;
}

.chat-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.chat-msg.user .chat-bubble-head {
  flex-direction: row-reverse;
}

.chat-role {
  font-size: 12px;
  color: #909399;
  margin-bottom: 0;
}

.chat-copy-btn {
  padding: 0 4px !important;
  font-size: 12px !important;
  color: #909399 !important;
}

.chat-copy-btn:hover {
  color: #409eff !important;
}

.chat-content {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.chat-msg.user .chat-content {
  background: #409eff;
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-msg.assistant .chat-content {
  background: #fff;
  color: #303133;
  border: 1px solid #ebeef5;
  border-top-left-radius: 2px;
}

.chat-typing {
  color: #909399;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid #ebeef5;
  background: #fff;
}

.chat-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.chat-tip {
  font-size: 12px;
  color: #909399;
}
