 /* ============================================================
   毒舌白毛傲娇妹妹 — 清新果冻风 UI 美化包
   合体版：AI输出样式 + 平台UI样式
   ============================================================ */

/* ========== 根变量 ========== */
:root {
  --pink: #FFB6C1;
  --pink-dark: #f4a0b0;
  --pink-light: #FFF0F5;
  --mint: #A8EDEA;
  --mint-light: #E0FFFF;
  --lavender: #c0a0ff;
  --lavender-light: #f5f0ff;
  --white: #ffffff;
  --text: #2D3748;
  --text-light: #5a4a5a;
  --shadow-sm: 0 2px 8px rgba(255, 182, 193, 0.15);
  --shadow: 0 4px 20px rgba(255, 182, 193, 0.25);
  --shadow-lg: 0 12px 40px rgba(255, 182, 193, 0.35);
  --radius: 20px;
  --radius-sm: 14px;
  --transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --font-sans: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
}

/* ============================================================
   一、AI 输出内容样式（details / pre / summary）
   粉嫩果冻风，对应妹妹卡 #c0a0ff → 粉紫系
   ============================================================ */

pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Microsoft YaHei', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #3a2a3a;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 100%);
  padding: 12px 14px;
  border-radius: 16px;
  border-left: 4px solid #FFB6C1;
  box-shadow: 0 4px 14px rgba(255, 182, 193, 0.25), inset 0 1px 4px rgba(255, 255, 255, 0.8);
}

details {
  margin: 14px 0;
  background: linear-gradient(180deg, #FFF5F7 0%, #FFE8EC 100%);
  border-radius: 18px;
  padding: 6px 14px;
  border: 2px solid rgba(255, 182, 193, 0.45);
  box-shadow: 0 6px 18px rgba(255, 182, 193, 0.2), inset 0 1px 6px rgba(255, 255, 255, 0.6);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

details[open] {
  box-shadow: 0 10px 28px rgba(255, 182, 193, 0.35), inset 0 1px 6px rgba(255, 255, 255, 0.6);
  border-color: #FF69B4;
}

details summary {
  color: #FF69B4;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary:hover {
  color: #ff4088;
  transform: translateX(3px);
}

details summary::before {
  content: '❄️';
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

details[open] summary::before {
  content: '💖';
  animation: heartBeat 1.2s ease infinite;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

details summary::after {
  content: ' 展开 ▼';
  font-size: 0.7rem;
  font-weight: 500;
  color: #d490a0;
  margin-left: auto;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
}

details[open] summary::after {
  content: ' 收起 ▲';
  color: #FF69B4;
}

/* 对话颜色标签 */
span[style*="color:#c0a0ff"] {
  text-shadow: 0 0 6px rgba(192, 160, 255, 0.4);
  font-weight: 600;
  font-style: italic;
  color: #FF69B4 !important;
}

/* 风险等级颜色 */
pre:contains("风险    ：低") {
  border-left-color: #A8EDEA;
}
pre:contains("风险    ：中") {
  border-left-color: #FFD966;
}
pre:contains("风险    ：高") {
  border-left-color: #FF9966;
}
pre:contains("风险    ：危急") {
  border-left-color: #FF6666;
  animation: pulseDanger 1.2s infinite;
}

@keyframes pulseDanger {
  0% { border-left-color: #FF6666; box-shadow: 0 0 8px rgba(255, 102, 102, 0.3); }
  50% { border-left-color: #FF3333; box-shadow: 0 0 18px rgba(255, 51, 51, 0.6); }
  100% { border-left-color: #FF6666; box-shadow: 0 0 8px rgba(255, 102, 102, 0.3); }
}

/* ============================================================
   二、消息气泡：草莓与薄荷的交响
   ============================================================ */
/* 用户气泡（草莓慕斯渐变） */
#customized-question-content {
    background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 100%) !important;
    border-radius: 24px 24px 4px 24px !important;
    box-shadow: 
        0 8px 20px rgba(255, 182, 193, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 182, 193, 0.5) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#customized-question-content:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(255, 182, 193, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.9) !important;
}

/* AI 气泡（薄荷海岛渐变） */
#customized-answer-content {
    background: linear-gradient(135deg, #E0FFFF 0%, #F0FFFF 100%) !important;
    border-radius: 24px 24px 24px 4px !important;
    box-shadow: 
        0 8px 20px rgba(175, 238, 238, 0.3), 
        inset 0 2px 5px rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(175, 238, 238, 0.5) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#customized-answer-content:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px rgba(175, 238, 238, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.9) !important;
}

/* 统一高级灰蓝文本，确保在浅色背景上清晰可读 */
#customized-question-content .markdown-body,
#customized-answer-content .markdown-body {
    color: #2D3748 !important;
    font-weight: 500 !important;
}

/* 顶部可爱小装饰条覆盖 */
#customized-question-content .bg-\[\#c9e1e9\] {
    background: #FFC0CB !important;
    border-radius: 10px !important;
}
#customized-answer-content .bg-\[\#F1CBCB\] {
    background: #AFEEEE !important;
    border-radius: 10px !important;
}

/* ============================================================
   三、底部输入区：水晶糖果盒
   ============================================================ */
.bg-white.border-\[1\.5px\] {
    border-radius: 30px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(12px) !important;
    border: 2px solid #FED6E3 !important;
    box-shadow: 
        0 10px 30px rgba(254, 214, 227, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.8) !important;
    padding: 2px 10px !important;
}

/* 文本选中高亮 */
#ai-chat-input::selection {
    background: #FFB6C1 !important;
    color: #fff !important;
}

/* ============================================================
   四、操作按钮：流光溢彩
   ============================================================ */
#ai-send-button {
    background: linear-gradient(135deg, #A8EDEA 0%, #FED6E3 100%) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(254, 214, 227, 0.6) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
}

#ai-send-button:hover {
    transform: scale(1.1) rotate(5deg) !important;
    box-shadow: 0 6px 20px rgba(254, 214, 227, 0.8), 0 0 10px #A8EDEA !important;
}

/* 快捷操作小按钮 */
#ai-mod-button2 .MuiButton-outlinedPrimary {
    border-radius: 20px !important;
    border: 1.5px solid #FFC0CB !important;
    color: #FF69B4 !important;
    background: rgba(255, 255, 255, 0.6) !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary:hover {
    background: #FFF0F5 !important;
    border-color: #FF69B4 !important;
}

/* ============================================================
   五、消息气泡通用美化（无ID兜底）
   ============================================================ */
.message-bubble,
.chat-bubble,
[class*="message"],
[class*="bubble"] {
  background: linear-gradient(180deg, #FFFBFD 0%, #FFF0F5 50%, #FFE8EC 100%) !important;
  border-radius: 22px !important;
  padding: 18px 22px !important;
  box-shadow: 0 6px 18px rgba(255, 182, 193, 0.22), inset 0 1px 5px rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 182, 193, 0.3) !important;
  line-height: 1.85 !important;
  font-size: 0.9rem !important;
  color: #2D3748 !important;
  letter-spacing: 0.03em !important;
  position: relative;
}

.message-bubble::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  background: linear-gradient(180deg, transparent, #FFB6C1 30%, #FF69B4 50%, #FFB6C1 70%, transparent);
  border-radius: 3px;
  opacity: 0.5;
}

/* ============================================================
   六、选项按钮（果冻风）
   ============================================================ */
.option-btn,
.choice-btn,
[class*="option"],
[class*="choice"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4E1 100%);
  border: 2px solid rgba(255, 182, 193, 0.45);
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: #5a3a4a;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 12px rgba(255, 182, 193, 0.2);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.option-btn:hover,
.choice-btn:hover {
  border-color: #FF69B4;
  color: #FF4088;
  background: linear-gradient(135deg, #FFF5F7 0%, #FFE8EC 100%);
  box-shadow: 0 8px 22px rgba(255, 105, 180, 0.3);
  transform: translateY(-2px);
}

.option-btn:active,
.choice-btn:active {
  transform: scale(0.95);
  border-color: #FF1493;
  transition: all 0.1s ease;
}

.option-btn::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FFB6C1;
  flex-shrink: 0;
  opacity: 0.8;
}

.option-btn:hover::before {
  background: #FF69B4;
  box-shadow: 0 0 8px rgba(255, 105, 180, 0.5);
}

/* ============================================================
   七、全局滚动条
   ============================================================ */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: #FFF0F5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FFC0CB, #FFB6C1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FFB6C1, #FF69B4);
}

/* ============================================================
   八、响应式
   ============================================================ */
@media (max-width: 600px) {
  details summary {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
  }
  details {
    padding: 4px 10px;
  }
  pre {
    padding: 10px 12px;
    font-size: 12px;
  }
  .option-btn,
  .choice-btn {
    padding: 9px 14px;
    font-size: 0.8rem;
    border-radius: 20px;
  }
  .message-bubble,
  .chat-bubble {
    padding: 14px 16px;
    font-size: 0.85rem;
  }
}
