/* AI摘要打字机效果样式 */
.ai-summary-content .typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: rgb(255, 239, 92);
  animation: blink 1s infinite;
  margin-left: 2px;
  vertical-align: baseline;
}

/* 光标闪烁动画 */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 暗色主题适配 */
[data-theme='dark'] .ai-summary-content .typing-cursor {
  background-color: rgb(255, 239, 92);
}

/* AI摘要容器样式优化 */
.ai-summary-container {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ai-summary-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* AI总结标签样式 - 文字渐变 */
.ai-summary-header h4 {
  background: transparent;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  transition: all 0.3s ease;
  user-select: none;
}

.ai-summary-header h4:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* AI图标样式 */
.ai-summary-header h4 svg {
  width: 18px;
  height: 18px;
  fill: url(#ai-gradient);
  margin-right: 0;
}

/* SVG渐变定义 */
.ai-summary-header h4::before {
  content: '';
  position: absolute;
  top: -1000px;
}

.ai-summary-header {
  position: relative;
}

.ai-summary-header::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 为SVG图标添加渐变 */
.ai-summary-header h4 svg {
  fill: #667eea;
}

/* DeepSeek V3.1 标识样式 */
.ai-model-badge {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.ai-model-badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
}

/* 暗色主题适配 */
[data-theme='dark'] .ai-summary-header h4 {
  background: linear-gradient(135deg, #4c63d2 0%, #5a4fcf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme='dark'] .ai-summary-header h4:hover {
  filter: brightness(1.2);
}

[data-theme='dark'] .ai-summary-header h4 svg {
  fill: #4c63d2;
}

[data-theme='dark'] .ai-model-badge {
  background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
  box-shadow: 0 2px 6px rgba(225, 112, 85, 0.4);
}

[data-theme='dark'] .ai-model-badge:hover {
  box-shadow: 0 4px 10px rgba(225, 112, 85, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .ai-summary-container {
    margin: 1rem 0;
    padding: 0.75rem;
  }
  
  .ai-summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .ai-summary-header h4 {
    font-size: 0.9rem;
  }
  
  .ai-model-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    align-self: flex-end;
  }
  
  .ai-summary-content {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .ai-summary-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .ai-model-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.35rem;
  }
}