/* ============================================
   聊天框主体 - 深蓝暗色基调，增强光影和质感
   ============================================ */
.bg-gray-100\/90.relative.inline-block {
  position: relative !important;
  background: linear-gradient(135deg, #081433, #0c1a57) !important;
  border-radius: 14px !important;
  box-shadow:
    0 0 15px rgba(40, 90, 230, 0.7),
    inset 0 0 40px rgba(10, 20, 60, 0.9) !important;
  overflow: hidden !important;
  isolation: isolate !important;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue",
    sans-serif !important;
  transition: box-shadow 0.3s ease !important;
  border: 1.5px solid rgba(45, 75, 140, 0.8) !important;
}

/* 星空背景伪元素 - 细腻星点和动态变化 */
.bg-gray-100\/90.relative.inline-block::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background:
    radial-gradient(1.5px 1.5px at 15% 25%, rgba(255, 255, 255, 0.2) 0, transparent 90%) repeat,
    radial-gradient(2px 2px at 40% 60%, rgba(255, 255, 255, 0.15) 0, transparent 90%) repeat,
    radial-gradient(1px 1px at 60% 40%, rgba(255, 255, 255, 0.12) 0, transparent 90%) repeat,
    #0c1a57 !important;
  background-size: 40px 40px, 70px 70px, 50px 50px !important;
  z-index: 0 !important;
  pointer-events: none !important;
  filter: drop-shadow(0 0 6px rgba(160, 210, 255, 0.3)) !important;
  animation: starTwinkle 5.5s ease-in-out infinite alternate !important;
  opacity: 0.9 !important;
  mix-blend-mode: screen !important;
}

/* 流星伪元素 - 增强拖尾光晕和动态 */
.bg-gray-100\/90.relative.inline-block::after {
  content: "" !important;
  position: absolute !important;
  top: -25% !important;
  left: -20% !important;
  width: 100px !important;
  height: 3px !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 80%) !important;
  filter: drop-shadow(0 0 8px #7eaaff) !important;
  border-radius: 25px !important;
  animation: shootingStar 5.8s linear infinite !important;
  z-index: 0 !important;
  pointer-events: none !important;
}

/* 主要文本 */
.markdown-body {
  position: relative !important;
  z-index: 1 !important;
  color: #e8ebf5 !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  background: transparent !important;
  text-shadow: none !important;
  line-height: 1.6 !important;
}

/* 底部辅助元素 - 统一浅灰蓝，带渐变渐隐效果 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
  color: #cfd8ff !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  filter: drop-shadow(0 0 1px rgba(0, 20, 50, 0.6)) !important;
  transition: color 0.3s ease !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  color: #a5c6ff !important;
  text-shadow: 0 0 6px #9dbcff !important;
}

/* 隐藏默认加载动画 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
  display: none !important;
}

/* 自定义加载动画容器，宽高优化 */
.flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
  width: 28px !important;
  height: 22px !important;
}

/* 自定义加载动画-smil圆点，色调更柔和 */
.flex.items-center.justify-center.w-6.h-5::before {
  content: url('data:image/svg+xml;utf8,<svg width="28" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 22" fill="none"><circle cx="5" cy="11" r="3" fill="white"><animate attributeName="cx" values="5;14;23;5" dur="1.6s" repeatCount="indefinite"/></circle><circle cx="14" cy="11" r="3" fill="white" opacity="0.65"><animate attributeName="cx" values="5;14;23;5" dur="1.6s" begin="0.53s" repeatCount="indefinite"/></circle><circle cx="23" cy="11" r="3" fill="white" opacity="0.35"><animate attributeName="cx" values="5;14;23;5" dur="1.6s" begin="1.06s" repeatCount="indefinite"/></circle></svg>') !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 28px !important;
  height: 22px !important;
}

/* ============================================
   状态栏 details - 深蓝融合，增强发光渐变与层次
   ============================================ */
.markdown-body details {
  background: linear-gradient(145deg, rgba(12, 26, 87, 0.96) 0%, rgba(18, 40, 110, 0.75) 100%) !important;
  border: 1.3px solid rgba(110, 180, 255, 0.35) !important;
  border-radius: 14px !important;
  padding: 14px 18px !important;
  margin: 10px 0 !important;
  color: #dae5ff !important;
  font-family: inherit !important;
  box-shadow:
    0 0 15px rgba(75, 130, 255, 0.5),
    inset 0 0 25px rgba(20, 35, 100, 0.7) !important;
  transition: box-shadow 0.4s ease, border-color 0.4s ease !important;
  position: relative !important;
  z-index: 1 !important;
  backdrop-filter: saturate(180%) blur(12px) !important;
}

/* 状态栏打开时 - 边框加亮左侧发光线 */
.markdown-body details[open] {
  border-left: 4px solid #5d91ff !important;
  box-shadow:
    0 0 24px rgba(70, 140, 255, 0.7),
    inset 0 0 30px rgba(20, 40, 120, 0.8) !important;
}

/* summary 标题 - 光泽蓝，动效平滑 */
.markdown-body details > summary {
  cursor: pointer !important;
  font-weight: 700 !important;
  font-size: 1em !important;
  color: #8ab8ff !important;
  padding: 6px 0 !important;
  letter-spacing: 0.06em !important;
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  user-select: none !important;
  transition: color 0.25s ease, text-shadow 0.3s ease !important;
  text-shadow:
    0 0 6px rgba(138, 184, 255, 0.95),
    0 0 4px rgba(150, 190, 255, 0.75) !important;
}

.markdown-body details > summary:hover {
  color: #cce1ff !important;
  text-shadow:
    0 0 10px rgba(204, 225, 255, 1),
    0 0 8px rgba(160, 210, 255, 0.95) !important;
}

/* summary 箭头 - 闪光并旋转 */
.markdown-body details > summary::before {
  content: "▶" !important;
  font-size: 0.8em !important;
  color: #7c9fff !important;
  transition: transform 0.3s ease, color 0.3s ease !important;
  filter:
    drop-shadow(0 0 1px rgba(120, 160, 255, 0.8)) !important;
  display: inline-block !important;
  text-shadow: 0 0 3px rgba(120, 160, 255, 0.7) !important;
}

.markdown-body details[open] > summary::before {
  transform: rotate(90deg) !important;
  color: #669cff !important;
  filter: drop-shadow(0 0 4px rgba(102, 156, 255, 0.9)) !important;
}

/* 强调标签加亮 */
.markdown-body details p strong,
.markdown-body details li strong {
  color: #a5c5ff !important;
  font-weight: 700 !important;
  text-shadow: 0 0 3px rgba(130, 170, 255, 0.6) !important;
}

/* 立绘卡片 - 渐变底色及阴影 */
.markdown-body .portrait-card {
  background:
    linear-gradient(145deg, rgba(28, 43, 90, 0.95), rgba(12, 21, 48, 0.95)) !important;
  border: 1px solid rgba(92, 140, 255, 0.4) !important;
  border-radius: 14px !important;
  padding: 14px !important;
  margin: 10px 0 !important;
  box-shadow:
    0 0 18px rgba(40, 95, 210, 0.3),
    inset 0 0 20px rgba(10, 25, 60, 0.55) !important;
  text-align: center !important;
  transition: box-shadow 0.3s ease !important;
}

.markdown-body .portrait-card:hover {
  box-shadow:
    0 0 28px rgba(80, 145, 255, 0.6),
    inset 0 0 30px rgba(20, 30, 80, 0.7) !important;
}

/* 状态数值列表 */
.markdown-body details ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 8px 0 !important;
}

.markdown-body details ul li {
  padding: 6px 0 !important;
  border-bottom: 1px solid rgba(90, 130, 210, 0.15) !important;
  font-size: 0.9em !important;
  color: #d4e5ff !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  transition: background 0.3s ease !important;
}

.markdown-body details ul li:last-child {
  border-bottom: none !important;
}

.markdown-body details ul li::after {
  content: "" !important;
  display: inline-block !important;
  height: 5px !important;
  width: 48px !important;
  background: linear-gradient(90deg, #4a7bff 0%, #a1c6ff 100%) !important;
  border-radius: 5px !important;
  margin-left: auto !important;
  opacity: 0.6 !important;
  transition: opacity 0.3s ease !important;
}

.markdown-body details ul li:hover {
  background: rgba(40, 80, 180, 0.15) !important;
  cursor: default !important;
  font-weight: 700 !important;
}

.markdown-body details ul li:hover::after {
  opacity: 1 !important;
}

/* 记忆区表格 */
.markdown-body details table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
  font-size: 0.85em !important;
  color: #c9ddff !important;
  margin-top: 8px !important;
}

.markdown-body details table th {
  background: rgba(25, 55, 130, 0.7) !important;
  color: #a0c4ff !important;
  font-weight: 700 !important;
  padding: 6px 12px !important;
  border: none !important;
  text-align: left !important;
  border-radius: 8px 8px 0 0 !important;
  box-shadow: inset 0 0 5px rgba(80, 120, 230, 0.45) !important;
}

.markdown-body details table td {
  padding: 8px 12px !important;
  background: rgba(15, 30, 70, 0.6) !important;
  border: none !important;
  vertical-align: top !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: inset 0 0 10px rgba(20, 40, 90, 0.7) !important;
}

.markdown-body details table tr:hover td {
  background: rgba(40, 80, 160, 0.85) !important;
  transition: background 0.3s ease !important;
}

/* 行动推荐列表 */
.markdown-body details ol {
  padding-left: 20px !important;
  margin: 10px 0 !important;
}

.markdown-body details ol li {
  padding: 6px 0 !important;
  color: #bbd4ff !important;
  font-size: 1em !important;
  border-bottom: 1px solid rgba(70, 110, 200, 0.15) !important;
  transition: color 0.3s ease, padding-left 0.3s ease !important;
}

.markdown-body details ol li:hover {
  color: #e6f0ff !important;
  padding-left: 6px !important;
  cursor: default !important;
  font-weight: 700 !important;
}

.markdown-body details ol li:last-child {
  border-bottom: none !important;
}

/* 分割线 */
.markdown-body details hr {
  border: none !important;
  border-top: 1px solid rgba(70, 110, 200, 0.25) !important;
  margin: 12px 0 !important;
}

/* ============================================
   关键帧动画 - 着重柔和流畅
   ============================================ */
@keyframes starTwinkle {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.1);
  }
}

@keyframes shootingStar {
  0% {
    transform: translateX(0) translateY(0) rotate(45deg);
    opacity: 1;
  }
  100% {
    transform: translateX(160%) translateY(120%) rotate(45deg);
    opacity: 0;
  }
}

/* ============================================
   移动端适配
   ============================================ */
@media (max-width: 480px) {
  .bg-gray-100\/90.relative.inline-block::before {
    background-size: 25px 25px, 50px 50px, 35px 35px !important;
  }
  .bg-gray-100\/90.relative.inline-block::after {
    width: 65px !important;
    height: 2px !important;
    animation-duration: 9s !important;
  }
  .markdown-body details {
    padding: 10px 12px !important;
    font-size: 0.82em !important;
  }
  .markdown-body details table {
    font-size: 0.7em !important;
  }
  .markdown-body details ul li::after {
    width: 32px !important;
  }
  .flex.items-center.justify-center.w-6.h-5 {
    width: 22px !important;
    height: 18px !important;
  }
  .flex.items-center.justify-center.w-6.h-5::before {
    width: 22px !important;
    height: 18px !important;
  }
}

/* ============================================
   减少动画偏好适配
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .bg-gray-100\/90.relative.inline-block::before,
  .bg-gray-100\/90.relative.inline-block::after {
    animation-duration: 15s !important;
  }
  .flex.items-center.justify-center.w-6.h-5::before {
    animation-play-state: paused !important;
  }
  .markdown-body details,
  .markdown-body details > summary,
  .markdown-body details ol li,
  .markdown-body details table tr:hover td {
    transition: none !important;
  }
}