/* ========== 1. 强制隐藏顶部冗余颜色装饰条 ========== */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}

/* ========== 2. 卡片基础样式（所有暖杏卡片统一） ========== */
.bg-gray-100\/90.relative.inline-block,
.current-situation,
.character-info,
.npc-info {
  background: rgba(250, 235, 210, 0.95) !important;
  backdrop-filter: blur(4px) !important;
  border: 2px solid #b22234 !important;
  border-radius: 28px !important;
  box-shadow: 0 10px 25px rgba(0, 20, 30, 0.2), inset 0 0 15px rgba(255, 140, 66, 0.1) !important;
  color: #2c3e50 !important;
  transition: all 0.2s ease !important;
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif !important;
}

/* 悬停效果统一 */
.bg-gray-100\/90.relative.inline-block:hover,
.current-situation:hover,
.character-info:hover,
.npc-info:hover {
  border-color: #ff8c42 !important;
  box-shadow: 0 12px 28px rgba(0, 20, 30, 0.25), inset 0 0 20px rgba(255, 140, 66, 0.15) !important;
}

/* 聊天框特殊 hover 背景（比其他卡片稍亮）保留 */
.bg-gray-100\/90.relative.inline-block:hover {
  background: rgba(255, 240, 215, 0.95) !important;
}

/* ========== 3. 聊天框专属光影特效 ========== */
.bg-gray-100\/90.relative.inline-block {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate !important;
  padding: 12px 16px !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-image: 
    radial-gradient(circle at 15% 30%, rgba(200, 160, 100, 0.15) 0px, transparent 30px),
    radial-gradient(circle at 80% 60%, rgba(180, 120, 60, 0.1) 0px, transparent 40px),
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px) !important;
  background-size: 30px 30px, 50px 50px, 20px 20px !important;
  z-index: -1 !important;
  opacity: 0.5 !important;
  animation: paperShake 6s ease-in-out infinite alternate !important;
  pointer-events: none !important;
}

@keyframes paperShake {
  0% { opacity: 0.4; background-position: 0% 0%, 0% 0%, 0% 0%; }
  100% { opacity: 0.7; background-position: 1% 2%, -1% -1%, 0.5% 0.5%; }
}

.bg-gray-100\/90.relative.inline-block::after {
  content: "" !important;
  position: absolute !important;
  top: -20% !important;
  left: -10% !important;
  width: 120% !important;
  height: 120% !important;
  background-image: 
    radial-gradient(circle at 15% 40%, rgba(255, 140, 66, 0.4) 2px, transparent 2px),
    radial-gradient(circle at 70% 25%, rgba(178, 34, 52, 0.3) 3px, transparent 3px),
    radial-gradient(circle at 45% 80%, rgba(255, 200, 100, 0.3) 2px, transparent 2px) !important;
  background-repeat: no-repeat !important;
  background-size: 200% 200% !important;
  z-index: -1 !important;
  opacity: 0.4 !important;
  animation: confetti 12s linear infinite !important;
  pointer-events: none !important;
}

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  50% { opacity: 0.5; }
  100% { transform: translateY(15%) rotate(5deg); opacity: 0.2; }
}

/* ========== 4. 文本内容 ========== */
.markdown-body {
  color: #2c3e50 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.6 !important;
  z-index: 1 !important;
  background: transparent !important;
  text-shadow: none !important;
}

/* ========== 5. 底部元素（按钮、消耗） ========== */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
  color: #ffffff !important;
  background: #b22234 !important;
  border-radius: 40px !important;
  margin: 4px !important;
  transition: all 0.2s !important;
  border: 1px solid #ff8c42 !important;
  box-shadow: 0 4px 0 #7a1f2a !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  padding: 6px 16px !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  background: #c4283c !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #7a1f2a !important;
}

.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
  color: #2c3e50 !important;
  font-weight: 500 !important;
  opacity: 0.9 !important;
  background: rgba(255, 255, 240, 0.5) !important;
  padding: 2px 8px !important;
  border-radius: 20px !important;
}

/* ========== 6. 加载动画 ========== */
.style_dot-flashing__8L91Q.style_text__zGhNq {
  display: none !important;
}

.flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cdefs%3E%3Cfilter id='soft'%3E%3CfeGaussianBlur stdDeviation='1' result='blur'/%3E%3CfeMerge%3E%3CfeMergeNode in='blur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Ccircle cx='4' cy='12' r='3' fill='%23b22234' filter='url(%23soft)'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.2s' repeatCount='indefinite' begin='0'/%3E%3C/circle%3E%3Ccircle cx='12' cy='12' r='3' fill='%23ff8c42' filter='url(%23soft)'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.2s' repeatCount='indefinite' begin='0.4s'/%3E%3C/circle%3E%3Ccircle cx='20' cy='12' r='3' fill='%232c3e50' filter='url(%23soft)'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.2s' repeatCount='indefinite' begin='0.8s'/%3E%3C/circle%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}

/* ========== 7. 额外按钮（主按钮） ========== */
.MuiButton-containedPrimary {
  background: linear-gradient(145deg, #ff8c42, #b22234) !important;
  color: white !important;
  border: none !important;
  border-radius: 40px !important;
  box-shadow: 0 6px 0 #7a1f2a !important;
  font-weight: bold !important;
  padding: 10px 24px !important;
}

.MuiButton-containedPrimary:hover {
  background: linear-gradient(145deg, #ff9f5c, #c4283c) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #7a1f2a !important;
}


/* ========== 9. 当前情况卡片专属 ========== */
.current-situation {
  padding: 16px 20px !important;
  margin: 20px 0 !important;
}

.current-situation summary {
  color: #b22234 !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 32px !important;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.current-situation summary::-webkit-details-marker {
  display: none;
}

.current-situation summary::before {
  content: "▼";
  position: absolute;
  left: 0;
  top: 2px;
  color: #ff8c42;
  font-size: 1rem;
  transition: transform 0.2s;
}
.current-situation[open] summary::before {
  transform: rotate(180deg);
}

.current-situation p,
.current-situation ul,
.current-situation .markdown-body {
  color: #2c3e50 !important;
  margin: 8px 0 0 0 !important;
  line-height: 1.8 !important;
  font-size: 1rem !important;
}

.current-situation p {
  padding: 4px 0 !important;
  border-bottom: 1px dashed rgba(178, 34, 52, 0.2) !important;
}

.current-situation p:last-of-type {
  border-bottom: none !important;
}

/* ========== 10. 主角信息卡片专属 ========== */
.character-info {
  padding: 18px 22px !important;
  margin: 20px 0 !important;
}

.character-info summary {
  color: #b22234 !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 38px !important;
  margin-bottom: 15px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #ff8c42 !important;
  padding-bottom: 8px !important;
}

.character-info summary::before {
  content: "🆔";
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.6rem;
}

.character-info summary::-webkit-details-marker {
  display: none;
}

.character-info p {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  margin: 6px 0 !important;
  padding: 0 !important;
  border-bottom: 1px dashed rgba(178, 34, 52, 0.2) !important;
  line-height: 1.6 !important;
}

.character-info p:last-of-type {
  border-bottom: none !important;
}

.character-info p strong {
  color: #b22234 !important;
  font-weight: 600 !important;
}

.character-info ul {
  list-style: none;
  padding-left: 0;
  margin: 5px 0 !important;
}

.character-info li {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  margin-bottom: 4px;
  border-bottom: 1px dashed rgba(178, 34, 52, 0.1);
  padding: 4px 0;
}

/* ========== 11. NPC信息卡片专属 ========== */
.npc-info {
  padding: 18px 22px !important;
  margin: 20px 0 !important;
}

.npc-info summary {
  color: #b22234 !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 38px !important;
  margin-bottom: 15px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #ff8c42 !important;
  padding-bottom: 8px !important;
}

.npc-info summary::before {
  content: "👥";
  position: absolute;
  left: 0;
  top: -2px;
  font-size: 1.6rem;
}

.npc-info summary::-webkit-details-marker {
  display: none;
}

.npc-info hr {
  border: none;
  border-top: 2px dashed #b22234 !important;
  margin: 24px 0 20px 0 !important;
  opacity: 0.5;
}

.npc-info p {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 8px;
  margin: 6px 0 !important;
  padding: 0 !important;
  border-bottom: 1px dashed rgba(178, 34, 52, 0.15) !important;
  line-height: 1.6 !important;
}

.npc-info p:last-of-type {
  border-bottom: none !important;
}

.npc-info p strong {
  color: #b22234 !important;
  font-weight: 600 !important;
}

/* 修复内心想法样式（使用属性选择器匹配包含“💭内心想法”的段落） */
.npc-info p[class*="thought"],
.npc-info p:has(> strong:contains("💭内心想法")) /* 现代浏览器可用，但为保险改用下面的方式 */ {
  background: rgba(255, 140, 66, 0.05);
  border-left: 4px solid #ff8c42;
  padding-left: 12px !important;
  margin-top: 10px !important;
  font-style: italic;
  border-bottom: none !important;
}

/* 更兼容的内心想法匹配：如果内容包含特定文本（用JS加类名更可靠，这里提供一个备用） */
.npc-info p:first-child:has(> strong) { /* 示例，实际需要你给内心想法的段落加类名 .thought */
  /* 建议在生成HTML时给内心想法段落添加 class="thought" */
}

/* 如果你无法修改HTML，可以用这段粗略匹配（可能误伤）：
.npc-info p:contains("💭") {
  background: rgba(255, 140, 66, 0.05);
  border-left: 4px solid #ff8c42;
  padding-left: 12px !important;
  font-style: italic;
} 
但CSS没有:contains，所以建议你为内心想法的<p>加上 class="thought" */
.thought {
  background: rgba(255, 140, 66, 0.05);
  border-left: 4px solid #ff8c42;
  padding-left: 12px !important;
  margin-top: 10px !important;
  font-style: italic;
  border-bottom: none !important;
}

.npc-info .thought + p {
  margin-left: 20px;
  border-left: 2px dotted #ff8c42;
  padding-left: 12px !important;
}

/* ========== 12. 移动端适配 ========== */
@media (max-width: 600px) {
  .character-info p,
  .npc-info p {
    grid-template-columns: 1fr !important;
    gap: 2px;
  }
  .character-info p strong,
  .npc-info p strong {
    display: inline-block;
    width: auto;
    margin-right: 8px;
  }
  .character-info summary,
  .npc-info summary,
  .current-situation summary {
    font-size: 1.2rem !important;
  }
  .current-situation,
  .character-info,
  .npc-info {
    padding: 12px 16px !important;
    border-radius: 20px !important;
  }
}

@media (max-width: 480px) {
  .bg-gray-100\/90.relative.inline-block {
    padding: 10px !important;
    border-radius: 18px !important;
  }
}