/* =========================================================
   《这样算是僵尸吗》 深度美化主题 & 状态栏魔法引擎 (V4 闪亮粉顶栏版 - 修正)
   ========================================================= */

/* =========================================
   1. 消息气泡区 (对话流)
   ========================================= */
/* 用户气泡：魔装少女春奈 (粉色系) */
#customized-question-content {
  background: linear-gradient(135deg, #ffe6f2, #ffb3d9) !important;
  border: 1px solid #ff66b2 !important;
  box-shadow: 0 4px 15px rgba(255, 102, 178, 0.2) !important;
  border-radius: 16px 16px 0 16px !important;
}
#customized-question-content .markdown-body,
#customized-question-content .text-gray-900 {
  color: #1a1a1a !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}
#customized-question-content .bg-\[\#c9e1e9\] {
  display: none !important;
}

/* AI气泡：死灵法师优克莉伍德 (暗紫/银灰系) */
#customized-answer-content {
  background: linear-gradient(135deg, #2a2a35, #1a1a24) !important;
  border: 1px solid #6a5acd !important;
  box-shadow: 0 4px 20px rgba(106, 90, 205, 0.3) !important;
  border-radius: 16px 16px 16px 0 !important;
}
#customized-answer-content .markdown-body,
#customized-answer-content .text-gray-900 {
  color: #e6e6fa !important;
  font-family: system-ui, -apple-system, sans-serif !important;
}
#customized-answer-content .bg-\[\#F1CBCB\] {
  display: none !important;
}

/* 模型标识与 Token 消耗 */
#customized-answer-content .text-purple-500.mt-1 {
  color: #ff66b2 !important;
  opacity: 0.8 !important;
}
#customized-answer-content .text-orange-500 {
  color: #9370db !important;
  font-weight: 600 !important;
}

/* =========================================
   ★ 修复：消息操作按钮 & 荧光悬浮特效 ★
   ========================================= */
#customized-answer-content button,
#customized-question-content button {
  color: #888c94 !important;
  transition: all 0.3s ease !important;
  background: transparent !important;
}

#customized-question-content button:hover {
  color: #ff66b2 !important;
  filter: drop-shadow(0 0 6px rgba(255, 102, 178, 0.9)) !important;
  transform: scale(1.15) !important;
}

#customized-answer-content button:hover {
  color: #9932cc !important;
  filter: drop-shadow(0 0 6px rgba(153, 50, 204, 0.9)) !important;
  transform: scale(1.15) !important;
}

/* =========================================
   2. 加载动画 (固定位置 + 发光呼吸灯特效)
   ========================================= */
#customized-answer-content .flex.items-center.justify-center.w-6.h-5 > div {
  display: none !important;
}
#customized-answer-content .flex.items-center.justify-center.w-6.h-5::before {
  content: '' !important;
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  /* 使用标准 SVG 滤镜实现发光，兼容性更好 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cfilter id='glow' x='-20%25' y='-20%25' width='140%25' height='140%25'%3E%3CfeGaussianBlur stdDeviation='3' result='blur'/%3E%3CfeMerge%3E%3CfeMergeNode in='blur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)' stroke-width='2' fill='none'%3E%3Canimate attributeName='opacity' values='0.2; 1; 0.2' dur='2.5s' repeatCount='indefinite' /%3E%3Canimate attributeName='stroke' values='%239370db; %23ff66b2; %239370db' dur='2.5s' repeatCount='indefinite' /%3E%3Ccircle cx='50' cy='50' r='40' /%3E%3Cpolygon points='50,10 85,75 15,75' /%3E%3Cpolygon points='50,90 15,25 85,25' /%3E%3Ccircle cx='50' cy='50' r='20' stroke-dasharray='5,5' /%3E%3Ccircle cx='50' cy='50' r='3' fill='%23ff66b2'%3E%3Canimate attributeName='fill' values='%239370db; %23ff66b2; %239370db' dur='2.5s' repeatCount='indefinite' /%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
#customized-answer-content .flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
}

/* =========================================
   3. 界面控制区 (全局 UI)
   ========================================= */
/* ★ 顶部控制栏修改：亮粉色高亮 ★ */
.sticky.top-0 {
  background: rgba(26, 26, 36, 0.85) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid rgba(255, 102, 178, 0.4) !important; /* 边框也换成粉色 */
}
#customized-model-selector .truncate {
  color: #ff66b2 !important; /* 亮粉色 */
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(255, 102, 178, 0.4) !important; /* 增加发光感提升清晰度 */
}
/* 顶部栏的图标（如下拉箭头、设置按钮）也一并变粉 */
.sticky.top-0 svg,
.sticky.top-0 button {
  color: #ff66b2 !important;
}

.bg-gradient-to-t {
  background: linear-gradient(to top, rgba(26, 26, 36, 1) 40%, rgba(26, 26, 36, 0)) !important;
}
.bg-white.border-\[1\.5px\] {
  background: rgba(250, 240, 245, 0.92) !important;
  border: 1.5px solid #ff66b2 !important;
  border-radius: 20px !important;
  box-shadow: 0 0 15px rgba(255, 102, 178, 0.2) !important;
}

/* 用户打字部分颜色：深紫色 */
#ai-chat-input {
  color: #4b0082 !important;
  font-weight: 500 !important;
}
#ai-chat-input::placeholder {
  color: rgba(75, 0, 130, 0.5) !important;
}

#ai-send-button {
  background: linear-gradient(135deg, #ff66b2, #9370db) !important;
  border-radius: 50% !important;
  box-shadow: 0 0 10px rgba(255, 102, 178, 0.4) !important;
}
#ai-send-button:hover {
  transform: rotate(-15deg) scale(1.1) !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

#ai-mod-button2 .MuiButton-outlinedPrimary {
  border-color: #6a5acd !important;
  color: #e6e6fa !important;
  background: rgba(26, 26, 36, 0.6) !important;
  border-radius: 8px !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary:hover {
  background: rgba(255, 102, 178, 0.2) !important;
  border-color: #ff66b2 !important;
  box-shadow: 0 0 8px rgba(255, 102, 178, 0.3) !important;
}

/* =========================================
   4. 评论区
   ========================================= */
.absolute.bottom-0.z-20.inset-x-0.bg-white {
  background: #1a1a24 !important;
  border-top: 2px solid #ff66b2 !important;
  border-radius: 20px 20px 0 0 !important;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5) !important;
}
.absolute.bottom-0.z-20.inset-x-0.bg-white .text-lg.font-bold,
.absolute.bottom-0.z-20.inset-x-0.bg-white .text-grey-600 {
  color: #e6e6fa !important;
}
.MuiRating-iconFilled {
  color: #ff66b2 !important;
}
.MuiRating-iconEmpty {
  color: rgba(230, 230, 250, 0.2) !important;
}
textarea[placeholder="发表评论"] {
  background: rgba(42, 42, 53, 0.8) !important;
  color: #e6e6fa !important;
  border-radius: 12px !important;
}
.group.ml-0 div.break-all {
  color: #dcdcdc !important;
}
.group.ml-0 .text-sm.text-grey-600 span.font-bold {
  color: #ff66b2 !important;
}

/* =========================================
   5. HTML 状态栏深度美化 (优的魔法记事本)
   ========================================= */
#customized-answer-content .markdown-body details {
  background: rgba(30, 30, 42, 0.7) !important;
  border: 1px solid rgba(106, 90, 205, 0.5) !important;
  border-radius: 12px !important;
  margin-bottom: 12px !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.2) !important;
  transition: all 0.3s ease !important;
}
#customized-answer-content .markdown-body details[open] {
  border-color: #ff66b2 !important;
  box-shadow: 0 0 15px rgba(255, 102, 178, 0.2) !important;
}
#customized-answer-content .markdown-body summary {
  background: linear-gradient(90deg, rgba(106, 90, 205, 0.3), transparent) !important;
  color: #ffb3d9 !important;
  padding: 12px 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  border-bottom: 1px solid transparent !important;
}
#customized-answer-content .markdown-body summary::-webkit-details-marker {
  display: none !important;
}
#customized-answer-content .markdown-body summary::before {
  content: '✦' !important;
  color: #ff66b2 !important;
  margin-right: 10px !important;
  font-size: 1.2em !important;
  transition: transform 0.3s ease !important;
}
/* 以下三处关键修正：将 &gt; 替换为 > */
#customized-answer-content .markdown-body details[open] > summary::before {
  transform: rotate(90deg) !important;
  color: #9370db !important;
}
#customized-answer-content .markdown-body details[open] > summary {
  background: linear-gradient(90deg, rgba(255, 102, 178, 0.2), transparent) !important;
  border-bottom: 1px solid rgba(255, 102, 178, 0.3) !important;
  color: #fff !important;
  text-shadow: 0 0 5px #ff66b2 !important;
}
#customized-answer-content .markdown-body details > *:not(summary) {
  padding: 12px 16px !important;
  color: #dcdcdc !important;
  line-height: 1.6 !important;
}
#customized-answer-content .markdown-body table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 10px 0 !important;
  background: rgba(20, 20, 30, 0.8) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) !important;
}
#customized-answer-content .markdown-body th {
  background: linear-gradient(to bottom, rgba(106, 90, 205, 0.5), rgba(72, 61, 139, 0.8)) !important;
  color: #fff !important;
  padding: 10px !important;
  font-weight: bold !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  text-align: left !important;
}
#customized-answer-content .markdown-body td {
  padding: 8px 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #e6e6fa !important;
}
#customized-answer-content .markdown-body tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02) !important;
}
#customized-answer-content .markdown-body tr:hover td {
  background: rgba(255, 102, 178, 0.1) !important;
}
#customized-answer-content .markdown-body hr {
  border: none !important;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, #6a5acd, #ff66b2, transparent) !important;
  margin: 16px 0 !important;
  opacity: 0.7 !important;
}

/* 响应式适配 */
@media (max-width: 768px) {
  #customized-question-content { border-radius: 12px 12px 0 12px !important; }
  #customized-answer-content { border-radius: 12px 12px 12px 0 !important; }
}