/* ============================================
   AI 摘要样式 - 固定配色方案
   ============================================ */

/* ========== 白天模式 ========== */
.anzhiyu-ai-summary {
  position: relative;
  margin: 20px 0;
  padding: 0;
  border-radius: 12px;
  background: #f5f5f7;
  color: #1d1d1f;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8ed;
  transition: all 0.3s ease;
}

.anzhiyu-ai-summary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: #d2d2d7;
}

/* 内容区域 */
.ai-content {
  padding: 20px 24px;
}

/* 头部区域 */
.ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e8ed;
}

/* 机器人图标 */
.ai-robot {
  flex-shrink: 0;
  vertical-align: middle;
}

/* 左侧标签 - AI 摘要 */
.ai-titles {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 800;
  color: #1d1d1f;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: none;
  padding: 0;
}

/* 右侧标签 - Eucalyptus AGENT */
.ai-badge {
  margin-left: auto;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: #86868b;
  letter-spacing: 0.8px;
  white-space: nowrap;
  background: none;
  border-radius: 0;
  position: relative;
}

/* 小圆点装饰 */
.ai-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* 摘要文本框 */
.ai-text-box {
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e8e8ed;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.8;
  color: #3a3a3c;
  text-align: justify;
}

.ai-text-box p {
  margin: 0;
}

/* ============================================
   加载状态
   ============================================ */
.ai-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: #1d1d1f;
  font-size: 14px;
}

.ai-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   暗色模式
   ============================================ */
[data-theme="dark"] .anzhiyu-ai-summary {
  background: #1c1c1e;
  color: #ffffff;
  border-color: #2c2c2e;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .anzhiyu-ai-summary:hover {
  border-color: #3a3a3c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .ai-header {
  border-bottom-color: #2c2c2e;
}

[data-theme="dark"] .ai-titles {
  color: #ffffff;
  background: none;
}

[data-theme="dark"] .ai-badge {
  color: #8e8e93;
  background: none;
}

[data-theme="dark"] .ai-badge::before {
  background: #30d158;
}

[data-theme="dark"] .ai-text-box {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #ffffff;
}

[data-theme="dark"] .ai-loading {
  color: #ffffff;
}

.ai-loading-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #86868b;
  font-size: 14px;
}

.ai-loading-inline i {
  animation: spin 1s linear infinite;
}

[data-theme="dark"] .ai-loading-inline {
  color: #8e8e93;
}


/* AI 摘要加载动画 */
.ai-loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 14px;
}

.ai-loading-svg {
  animation: ai-loading-rotate 1s linear infinite;
  color: #999;
}

@keyframes ai-loading-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 文字后面的点动画 */
.ai-loading-dots::after {
  content: '';
  animation: ai-loading-dots 1.5s steps(4, end) infinite;
}

@keyframes ai-loading-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* ============================================
   移动端适配
   ============================================ */
@media (max-width: 768px) {
  .anzhiyu-ai-summary {
    margin: 16px -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .ai-content {
    padding: 16px 20px;
  }

  .ai-badge {
    display: none;
  }
  
  .ai-text-box {
    padding: 12px 14px;
  }
}

