/* ============================================
   小P 的自定义样式 - 简约赛博朋克风格（不换颜色）
   ============================================ */

/* 1. 消息出现动画 */
@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[class*="message"], .chat-bubble, .chat-line .chat-msg {
  animation: messageSlideIn 0.2s ease-out !important;
}

/* 2. 对话气泡 - 赛博朋克风格 */
.chat-bubble {
  /* 保持原背景色，只加边框和阴影 */
  border-width: 1px !important;
  border-style: solid !important;
  border-radius: 4px !important; /* 更直角 */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.2s ease !important;
}

.chat-bubble:hover {
  /* 悬停时轻微上浮 + 边框发光效果（用半透明） */
  transform: translateY(-2px) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* 用户消息气泡 - 保持原色，加赛博边框 */
.chat-line.user .chat-bubble {
  border-radius: 4px 4px 4px 12px !important; /* 尖角风格 */
}

/* AI消息气泡 - 保持原色，加赛博边框 */
.chat-line.assistant .chat-bubble {
  border-radius: 4px 4px 12px 4px !important; /* 尖角风格 */
}

/* 3. 输入框聚焦效果 */
input:focus, textarea:focus, [contenteditable="true"]:focus {
  outline: 2px solid rgba(0, 123, 255, 0.3) !important;
  outline-offset: 2px !important;
}

/* 4. 按钮悬停效果 */
button:hover {
  transform: translateY(-1px) !important;
  transition: transform 0.1s ease !important;
}

/* 5. 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* 6. 头像动画 */
.chat-avatar {
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.chat-avatar:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* 7. 发送按钮效果 */
button[type="submit"], button[class*="send"], [class*="Send"] {
  transition: all 0.2s ease !important;
}

button[type="submit"]:hover, button[class*="send"]:hover, [class*="Send"]:hover {
  transform: scale(1.02) !important;
}

/* 8. 加载动画 */
[class*="loading"], [class*="Loading"], [class*="spinner"] {
  animation: spin 1s linear infinite !important;
}

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

/* 9. 链接悬停效果 */
a:hover {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}

/* 10. 分割线美化 */
hr, [class*="divider"] {
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent) !important;
  border: none !important;
}

/* 11. 消息分组间距 */
.chat-group {
  margin-bottom: 20px !important;
}

/* 12. 消息时间戳样式 */
.chat-stamp {
  font-size: 10px !important;
  opacity: 0.6 !important;
}

/* 13. 发送者名称样式 */
.chat-sender-name {
  font-size: 11px !important;
  font-weight: 600 !important;
}

/* 14. 打字中动画 */
.chat-reading-indicator__dots span {
  animation: chatReadingDot 1.2s ease-in-out infinite !important;
}

@keyframes chatReadingDot {
  0%, 80%, to { opacity: 0.4; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* 15. 工具卡片样式 */
.chat-tool-card {
  border-radius: 4px !important;
  border-width: 1px !important;
  border-style: solid !important;
}

/* 16. 消息输入框 */
.chat-compose__field textarea {
  border-radius: 4px !important;
}

/* 注意：所有颜色都保持原样，只添加动画和布局效果 */
