:host {
  display: block;
  width: 100%;
}

.message-round {
  margin-bottom: 16px;
  width: 100%;
}

.user-message-container {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  margin-bottom: 15px;
  position: relative;
}

.assistant-message-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 15px;
  position: relative;
}

/* 添加消息气泡样式 */
.message-bubble {
  max-width: 85%;
  position: relative;
}

/* 用户消息气泡样式 */
.user-message {
  padding: 5px 10px;
  background: #f5f7ff;
  font-size: 14px;
  color: #1F2328;
  border-radius: 6px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

/* 助手消息气泡样式 */
.assistant-message {
  padding: 15px 10px;
  background-color: #fff;
  border-radius: 6px;
  font-size: 14px;
  color: #1F2328;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.message-time {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* 用户消息时间样式 */
.user-message-container .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.loading-dots {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #f0f0f0;
  border-radius: 18px;
  border-top-left-radius: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  margin: 0 3px;
  background-color: #999;
  border-radius: 50%;
  display: inline-block;
  animation: dot-pulse 1.5s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.file-view {
  margin-top: 8px;
  padding: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  word-break: break-all;
  color: #2c3e50;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.input-view {
  margin-top: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}


.input-label-container {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 8px 12px;
}

.copy-input-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8c8c8c;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  margin-left: 5px;
}

.copy-input-button:hover {
  opacity: 1;
  color: #1677ff;
}

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: #495057;
}

.input-value {
  padding: 12px 12px 0px;
  font-size: 14px;
  line-height: 1.5;
  color: #2c3e50;
  background-color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-metadata {
  font-size: 13px;
  margin-top: 8px;
}

/* 基本的消息操作按钮位置 */
.message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s ease;
  margin-top: 15px;
}


.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 4px 15px;
  font-size: 14px;
  height: 32px;
  background-color: white;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.88);
  transition: all 0.2s;
}

.action-button:hover {
  color: #1677ff;
  border-color: #1677ff;
}

.action-button.primary {
  color: #1677ff;
  border-color: #1677ff;
}

.action-button.primary:hover {
  color: #4096ff;
  border-color: #4096ff;
}

.action-button.icon-only {
  padding: 4px 8px;
  margin-right: 9px;
}

.button-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-only .button-icon {
  margin-right: 0;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.file-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.3s;
  margin: 5px 10px;
}

.file-item:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.file-icon {
  margin-bottom: 4px;
}

.file-name {
  font-size: 12px;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8B4513;
}

.action-button.active {
  color: #1677ff;
  background-color: rgba(22, 119, 255, 0.1);
}

.action-button.active .button-icon svg {
  stroke: #1677ff;
}

.inputs-container {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}


.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.file-item:hover {
  background-color: #e8e8e8;
}

.file-icon {
  margin-right: 8px;
}

.file-name {
  font-size: 14px;
  color: #333;
  word-break: break-word;
}

.input-view {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #e8e8e8;
}

.input-label-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.input-label {
  font-weight: 500;
  color: #333;
}

.input-value {
  color: #666;
  line-height: 1.5;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.copy-input-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #1677ff;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-input-button:hover {
  background-color: rgba(22, 119, 255, 0.1);
}

.input-metadata {
  font-size: 14px;
  color: #666;
  padding: 4px 0;
}

/* 文件卡片样式 */
.file-card {
  display: flex;
  align-items: center;
  padding: 12px;
  background: linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 200px 100px no-repeat, #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #e8e8e8;
  margin-top: 8px;
}

.file-card:hover {
  background-color: #f0f0f0;
}

.file-card-icon {
  margin-right: 12px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #0d75fb;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-card-icon img {
  width: 40px;
  height: 40px;
}

.file-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.file-card-type {
  font-size: 14px;
  color: #8c8c8c;
  margin-bottom: 4px;
}

.file-card-name {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

/* 复制按钮样式 */
.copy-card-button {
  background: none;
  border: none;
  cursor: pointer;
  color: #8c8c8c;
  padding: 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  transition: color 0.2s;
}

.copy-card-button:hover {
  color: #1677ff;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.user-avatar {
  margin-left: 8px;
}

.assistant-avatar {
  margin-right: 8px;
}

.retry-button {
  background-color: #ff6b35 !important;
  color: white !important;
  border: none !important;
}

.retry-button:hover {
  background-color: #e55a2b !important;
}

.retry-button .button-icon {
  margin-right: 4px;
}

/* 视频容器样式 */
.video-inputs-container {
  display: flex;
  flex-direction: column;
  align-items: end;
}

.video-container {
  margin-top: 0px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: #000;
  width: 250px;
  height: auto;
  max-height: 250px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.video-container video {
  display: block;
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 8px;
}

.video-container video:focus {
  outline: none;
}

/* 视频加载状态样式 */
.video-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  color: #666;
  font-size: 14px;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid #e9ecef;
  border-top: 2px solid #1677ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .video-container {
    width: 100%;
    max-width: 300px;
  }
}