/* ===== 深紫背景优雅风格按钮（深紫黑阴影 + 金边框） ===== */
/* 背景改为深紫色渐变，文字为浅金色/白，对比强烈 */
#prompt-input button:not([type="submit"]) {
    background: linear-gradient(135deg, #5B21B6 0%, #2E1065 100%) !important;  /* 深紫到更深紫渐变 */
    color: #FEF9C3 !important;  /* 淡金色文字，温暖且清晰 */
    border: 2px solid #FBBF24 !important;  /* 金色边框 */
    border-radius: 8px !important;
    box-shadow: 0 5px 0 #1E1B4B !important;  /* 深紫偏黑色阴影 */
    font-weight: bold !important;
    text-transform: none !important;
    transition: all 0.1s ease-in-out !important;
}

/* 悬停效果：背景变亮/饱和度提高，文字更亮，阴影消失下沉 */
#prompt-input button:not([type="submit"]):hover {
    background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 100%) !important;  /* 更亮的深紫色 */
    color: #FEF08A !important;  /* 更鲜明的淡金色 */
    border-color: #D97706 !important;  /* 深金色边框 */
    transform: translateY(3px) !important;
    box-shadow: none !important;
}

/* 活动效果：按入感更明显 */
#prompt-input button:not([type="submit"]):active {
    background: linear-gradient(135deg, #4C1D95 0%, #2E1065 100%) !important;
    border-color: #B45309 !important;
    transform: translateY(5px) scale(0.98) !important;
    box-shadow: none !important;
}

/* ===== 发送按钮（蓝色系） ===== */
#prompt-input [type="submit"] {
    background: linear-gradient(135deg, #2563EB 0%, #1E3A8A 100%) !important;  /* 亮蓝到深蓝 */
    color: #FEF9C3 !important;
    border: 2px solid #60A5FA !important;      /* 浅蓝边框 */
    border-radius: 8px !important;
    box-shadow: 0 5px 0 #172554 !important;    /* 深蓝黑阴影 */
    font-weight: bold !important;
    text-transform: none !important;
    transition: all 0.1s ease-in-out !important;
}

#prompt-input [type="submit"]:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%) !important;
    color: #FEF08A !important;
    border-color: #93C5FD !important;
    transform: translateY(3px) !important;
    box-shadow: none !important;
}

#prompt-input [type="submit"]:active {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E3A8A 100%) !important;
    border-color: #60A5FA !important;
    transform: translateY(5px) scale(0.98) !important;
    box-shadow: none !important;
}

/* ===== 停止按钮（红色系） ===== */
#prompt-input button[aria-label="停止"] {
    background: linear-gradient(135deg, #DC2626 0%, #7F1D1D 100%) !important;  /* 红到深红 */
    color: #FEF9C3 !important;
    border: 2px solid #F87171 !important;      /* 浅红边框 */
    border-radius: 8px !important;
    box-shadow: 0 5px 0 #451A1A !important;    /* 深红黑阴影 */
    font-weight: bold !important;
    text-transform: none !important;
    transition: all 0.1s ease-in-out !important;
}

#prompt-input button[aria-label="停止"]:hover {
    background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%) !important;
    color: #FEF08A !important;
    border-color: #FCA5A5 !important;
    transform: translateY(3px) !important;
    box-shadow: none !important;
}

#prompt-input button[aria-label="停止"]:active {
    background: linear-gradient(135deg, #B91C1C 0%, #7F1D1D 100%) !important;
    border-color: #F87171 !important;
    transform: translateY(5px) scale(0.98) !important;
    box-shadow: none !important;
}

.contents {
    display: block;
    width: 100%;
    border: 2px solid #FBBF24 !important;    /* 与深紫按钮相同的金色边框 */
    border-radius: 8px !important;           /* 与按钮保持一致的圆角 */
    background: rgba(255, 255, 255, 0.08) !important; /* 浅色透明背景 */
    box-shadow: none !important;             /* 无阴影 */
    /* 可根据需要添加内边距或其它布局属性，但不强制 */
    padding: 12px 16px;                      /* 示例内边距，可按需调整 */
}

#prompt-input-body textarea[name="message"] {
    display: block;
    width: 100%;
    border: 2px solid #FBBF24 !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding: 12px 16px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

#prompt-input-body textarea[name="message"]:focus {
    border-color: rgb(242, 206, 4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ----- 青春校园活力配色 · 用户侧 / AI侧 ----- */
/* 基础卡片样式（提取公共属性，减少重复） */
.is-user .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted,
.is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
  border-radius: 12px !important;
  transition: all 0.2s ease;
}

/* ===== 用户侧 —— 天蓝背景 + 蓝色边框与阴影 ===== */
.is-user .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
  background: rgba(214, 234, 248, 0.99) !important;
  border: 2px solid #2980B9 !important;
  box-shadow: -3px 3px 0 rgba(41, 128, 185, 0.25), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  color: #2C1A0E !important;
}
.is-user .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted:hover {
  transform: translate(-1px, 1px);
  border-color: #1A5276 !important;
  box-shadow: -2px 2px 0 rgba(26, 82, 118, 0.3), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

/* ===== AI侧 —— 护眼羊皮纸色 + 暖色边框与阴影 ===== */
.is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
  /* ★ 背景改为浅羊皮纸色（#F5F0E6），护眼柔和 */
  background: rgba(245, 240, 230, 0.99) !important;   /* 羊皮纸白 */
  border: 2px solid #C4A882 !important;              /* 暖灰褐色边框 */
  box-shadow: 3px 3px 0 rgba(160, 120, 80, 0.25), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
  color: #3D2E1B !important;                         /* 深褐文字，与背景协调 */
}
.is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted:hover {
  transform: translate(1px, 1px);
  border-color: #B08968 !important;                  /* 悬停加深边框 */
  box-shadow: 2px 2px 0 rgba(140, 100, 60, 0.30), 0 2px 6px rgba(0, 0, 0, 0.05) !important;
}

@media (prefers-color-scheme: dark) {
  /* ----- AI侧 —— 暗色模式（深暖羊皮纸） ----- */
  .is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
    background: rgba(61, 53, 40, 0.99) !important;    /* 深暖灰，仿旧纸 */
    border-color: #A68B6B !important;                 /* 暖金褐边框 */
    box-shadow: 3px 3px 0 rgba(100, 80, 50, 0.35), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    color: #E8DDD0 !important;                        /* 浅米色文字 */
  }
  .is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted:hover {
    transform: translate(1px, 1px);
    border-color: #C4A882 !important;                 /* 悬停提亮边框 */
    box-shadow: 2px 2px 0 rgba(130, 100, 70, 0.40), 0 2px 6px rgba(0, 0, 0, 0.3) !important;
  }

  /* 移动端深色适配（阴影略减，保持风格） */
  @media (max-width: 768px) {
    .is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted {
      box-shadow: 2px 2px 0 rgba(100, 80, 50, 0.35), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
    .is-assistant .flex.w-fit.max-w-full.min-w-0.flex-col.gap-2.text-sm.border.border-muted:hover {
      box-shadow: 1px 1px 0 rgba(130, 100, 70, 0.40), 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    }
  }
}

/* ===== 卡片样式（角色、消息、任务、新闻、NPC、情节）青春校园风格 ===== */
/* 基础卡片样式 - 大屏幕（合并所有卡片公用类） */
.card, .sms-card, .task-card, .news-card, .npc-card, .plot {
  display: block;
  margin: 10px 2px;
  padding: 2px;
  border-radius: 6px;
  border-width: 2px;
  border-style: solid;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(247,249,252,0.8) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  color: #2d3436;
  font-size: 1em;
  line-height: 1.6;
  word-wrap: break-word;
}

/* 卡片悬停效果 */
.card:hover, .sms-card:hover, .task-card:hover, .news-card:hover, .npc-card:hover, .plot:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* 各卡片边框颜色区分 —— 全新青春校园主题色（清爽蓝紫+活力粉橙） */
.card { border-color: #5F9EF8; }    /* 角色卡片 - 淡海蓝 */
.sms-card { border-color: #48D1CC; } /* 消息卡片 - 明快浅海绿 */
.task-card { border-color: #FFB347; } /* 任务卡片 - 暖橘 */
.news-card { border-color: #FF7B7B; } /* 新闻卡片 - 珊瑚粉 */
.npc-card { border-color: #C792EA; } /* NPC卡片 - 淡紫 */
.plot { border-color: #F48FB1; }      /* 情节卡片 - 樱花粉 */

/* 卡片内部通用元素 */
.card p, .sms-card p, .task-card p, .news-card p, .npc-card p, .plot p,
.card ul, .sms-card ul, .task-card ul, .news-card ul, .npc-card ul, .plot ul,
.card ol, .sms-card ol, .task-card ol, .news-card ol, .npc-card ol, .plot ol,
.card pre, .sms-card pre, .task-card pre, .news-card pre, .npc-card pre, .plot pre,
.card blockquote, .sms-card blockquote, .task-card blockquote, .news-card blockquote, .npc-card blockquote, .plot blockquote {
  margin: 4px 0;
  padding: 0;
}

.card h1, .card h2, .card h3, .card h4,
.sms-card h1, .sms-card h2, .sms-card h3, .sms-card h4,
.task-card h1, .task-card h2, .task-card h3, .task-card h4,
.news-card h1, .news-card h2, .news-card h3, .news-card h4,
.npc-card h1, .npc-card h2, .npc-card h3, .npc-card h4,
.plot h1, .plot h2, .plot h3, .plot h4 {
  margin-top: 4px;
  margin-bottom: 4px;
  color: #2d3436;
}

.card code,
.sms-card code,
.task-card code,
.news-card code,
.npc-card code,
.plot code {
  background: rgba(95,158,248,0.1);
  color: #2d3436;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.9em;
}

.card pre,
.sms-card pre,
.task-card pre,
.news-card pre,
.npc-card pre,
.plot pre {
  background: rgba(247, 249, 252, 0.8);
  padding: 12px;
  border-radius: 4px;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.1);
}

/* 深色模式卡片适配 */
@media (prefers-color-scheme: dark) {
  .card, .sms-card, .task-card, .news-card, .npc-card, .plot {
    background: linear-gradient(135deg, rgba(45,52,54,0.9) 0%, rgba(30,35,40,0.8) 100%);
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(255,255,255,0.05);
  }

  .card code, .sms-card code, .task-card code, .news-card code, .npc-card code, .plot code {
    background: rgba(255,255,255,0.15);
    color: #e0e0e0;
  }

  .card pre, .sms-card pre, .task-card pre, .news-card pre, .npc-card pre, .plot pre {
    background: rgba(60, 70, 73, 0.95);
    color: #e0e0e0;
    border-color: rgba(255,255,255,0.1);
  }

  .card h1, .card h2, .card h3, .card h4,
  .sms-card h1, .sms-card h2, .sms-card h3, .sms-card h4,
  .task-card h1, .task-card h2, .task-card h3, .task-card h4,
  .news-card h1, .news-card h2, .news-card h3, .news-card h4,
  .npc-card h1, .npc-card h2, .npc-card h3, .npc-card h4,
  .plot h1, .plot h2, .plot h3, .plot h4 {
    color: #e0e0e0;
  }
}

/* 行动选项卡片样式 */
.act-option {
  display: block;
  margin: 20px 2px 10px 2px; 
  padding: 10px;
  border-radius: 6px;
  border-width: 2px;
  border-style: solid;
  border-color: #f59e0b;  /* 琥珀色 - 代表行动/选择 */
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(247,249,252,0.1) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  color: #2d3436;
  font-size: 1em;
  line-height: 1.6;
  word-wrap: break-word;
}

/* 悬停效果 */
.act-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 代码块样式 */
.act-option code {
  background: rgba(99,102,241,0.1);
  color: #2d3436;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 0.95em;
}

.act-option pre {
  background: rgba(247, 249, 252, 0.8);
  padding: 2px;
  border-radius: 2px;
  overflow-x: auto;
  border: 1px solid rgba(0,0,0,0.1);
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .act-option {
    background: linear-gradient(135deg, rgba(45,52,54,0.2) 0%, rgba(30,35,40,0.1) 100%);
    color: #badbe4;
    box-shadow: 0 2px 10px rgba(255,255,255,0.05);
  }
}

/* ========== 小屏幕优化（响应式设计）========== */
@media (max-width: 768px) {
  .act-option {
    margin: 10px 0px 0px 0px; 
    padding: 4px;  
    font-size: 0.95em; 
    backdrop-filter: blur(4px); 
  }
}

/* ===== 折叠状态栏（details）青春校园风格 ===== */
details {
  background: rgba(135, 206, 235, 0.02);  /* 浅天蓝色 (SkyBlue) + 85% 透明度 */
  border: 2px solid #2563EB;
  border-radius: 6px;
  margin: 10px 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  color: rgba(45, 52, 54, 0.9);
  backdrop-filter: blur(8px);
  padding: 2px 10px;
}

/* 展开状态 - 保持原有蓝白风格，阴影保留 */
details[open] {
  background: rgba(247, 249, 252, 0.7);
  backdrop-filter: blur(15px) saturate(180%);
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3),
              0 2px 4px rgba(37, 99, 235, 0.2),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  padding: 2px;
}

/* 折叠状态悬停 - 去除阴影，保留微上浮效果 */
details:hover:not([open]) {
  transform: translateY(-2px);
  box-shadow: none;  /* 清楚悬停阴影 */
}

/* ----- 摘要区域（深蓝色调）----- */
details summary {
  font-size: 1.1em;
  font-weight: 800;
  cursor: pointer;
  color: #1E293B;
  padding: 12px 10px;
  margin: 0;
  position: relative;
  transition: all 0.3s ease;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

details summary .summary-text {
  background: linear-gradient(90deg, #2563EB, #06B6D4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex: 1;
  padding: 0 8px;
}

/* 自定义箭头（保持深蓝色） */
details summary::after {
  content: '➤';
  font-size: 0.9em;
  transition: all 0.3s ease;
  color: #2563EB;
  margin: 0 8px;
  transform-origin: center;
  font-weight: bold;
}

details[open] summary::after {
  transform: rotate(90deg);
  color: #06B6D4;
}

details summary:hover {
  background: rgba(37, 99, 235, 0.05);
}

details summary:active {
  transform: translateY(1px);
}

/* ----- 内容区域通用样式（深蓝色调点缀）----- */
details > *:not(summary) {
  margin: 1px;
  padding: 0;
  font-size: 1.1em;
  line-height: 1.6;
}

details p,
details ul,
details ol,
details pre,
details blockquote {
  margin: 1px;
  line-height: 1.6;
  padding: 0;
}

/* 列表项标记改为深蓝色 */
details li::before {
  content: '•';
  color: #3B82F6;
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* 文字强调改为深蓝色调 */
details strong,
details b {
  color: #2563EB;
  font-weight: 800;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

details em {
  color: #06B6D4;
  font-style: italic;
  font-weight: 600;
}

details code {
  color: #1E293B;
  background: rgba(37, 99, 235, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1em;
}

details pre {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 249, 252, 0.95) 100%);
  padding: 2px;
  border-radius: 2px;
  overflow-x: auto;
  color: #1E293B;
  font-family: 'Consolas', 'Monaco', monospace;
  margin: 1px;
}

/* ----- 表格美化（深蓝色边框/阴影）----- */
table {
  display: block;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1px 0;
  font-size: 0.95em;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-wrap: break-word;
  border-radius: 4px;
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.15),
              0 2px 8px rgba(6, 182, 212, 0.1);
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(247,249,252,0.8) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

table th {
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  color: white;
  font-weight: 700;
  text-align: left;
  padding: 6px 12px;
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #FDE047;
}

table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.1);
  transition: all 0.2s ease;
  font-weight: 500;
  min-width: 80px;
}

table tr {
  transition: all 0.2s ease;
}

table tr:hover {
  background: rgba(253, 224, 71, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

table tr:hover td {
  border-bottom-color: #FDE047;
}

table tr:last-child td {
  border-bottom: none;
}

/* ----- 滚动条自定义（深蓝色）----- */
details ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

details ::-webkit-scrollbar-track {
  background: rgba(37, 99, 235, 0.1);
  border-radius: 4px;
}

details ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  border-radius: 4px;
}

details ::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #06B6D4, #2563EB);
}

/* ----- 展开动画 ----- */
details[open] > *:not(summary) {
  animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- 深色模式适配（深蓝色系延续）----- */
@media (prefers-color-scheme: dark) {
  details {
    color: rgba(247, 249, 252, 0.9);
    background: rgba(0, 100, 150, 0.45); /* 深天蓝色，透明度 45% */
    border-color:  #3B82F6;
  }

  details[open] {
    background: rgba(30, 41, 59, 0.7);
  }

  details summary {
    color: #F1F5F9;
  }

  details code {
    color: #E2E8F0;
    background: rgba(255, 255, 255, 0.15);
  }

  details pre {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    color: #E2E8F0;
  }

  table {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-color: rgba(96, 165, 250, 0.3);
  }
}

/* ===== 打印样式 ===== */
@media print {
  details {
    border: 1px solid #ddd !important;
    background: white !important;
    color: black !important;
    break-inside: avoid;
  }

  details[open] {
    border: 1px solid #ddd !important;
  }

  table {
    box-shadow: none !important;
    background: white !important;
    border: 1px solid #ddd;
  }

  details summary::after {
    display: none !important;
  }

  .card, .sms-card, .task-card, .news-card, .npc-card, .plot {
    background: white !important;
    color: black !important;
    border: 2px solid #ccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}

/* ===== 移动端响应式（合并媒体查询）===== */
@media (max-width: 768px) {
  /* ----- details 折叠栏移动适配 ----- */
  details {
    margin: 4px 0;
    padding: 2px;
    font-size: 0.95em;
  }

  details[open] {
    font-size: 0.95em;
    line-hight: 1.5;
  }

  details > *:not(summary) {
    font-size: 0.95em;
    line-height: 1.2;
  }

  details summary {
    font-size: 0.95em;
    padding: 4px 6px;
  }

  details pre {
    padding: 2px;
    margin: 1px 0px;
  }

  details code {
    padding: 0;
    font-size: 0.95em;
  }

  .table {
    font-size: 0.9em;
    border-radius: 4px;
    display: block;
    position: relative;
    width: 100%;
    margin: 1px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  .table table {
    display: block;
    min-width: 400px;
    width: auto;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0;
  }

  table th,
  table td {
    padding: 4px 6px;
    min-width: 40px;
  }

  table td.allow-wrap {
    white-space: normal;
    word-break: break-word;
  }

  /* ----- 卡片移动适配（减小内外边距）----- */
  .card, .sms-card, .task-card, .news-card, .npc-card, .plot {
    margin: 4px 0;
    padding: 2px;
    font-size: 0.95em;
  }

  .card pre, .sms-card pre, .task-card pre, .news-card pre, .npc-card pre, .plot pre {
    padding: 2px;
    font-size: 0.95em;
  }

  .card code, .sms-card code, .task-card code, .news-card code, .npc-card code, .plot code {
    padding: 0;
    font-size: 0.95em;
  }

  .card p, .sms-card p, .task-card p, .news-card p, .npc-card p, .plot p,
  .card ul, .sms-card ul, .task-card ul, .news-card ul, .npc-card ul, .plot ul,
  .card ol, .sms-card ol, .task-card ol, .news-card ol, .npc-card ol, .plot ol,
  .card blockquote, .sms-card blockquote, .task-card blockquote, .news-card blockquote, .npc-card blockquote, .plot blockquote {
    margin: 2px 0;
  }

  .card h1, .card h2, .card h3, .card h4,
  .sms-card h1, .sms-card h2, .sms-card h3, .sms-card h4,
  .task-card h1, .task-card h2, .task-card h3, .task-card h4,
  .news-card h1, .news-card h2, .news-card h3, .news-card h4,
  .npc-card h1, .npc-card h2, .npc-card h3, .npc-card h4,
  .plot h1, .plot h2, .plot h3, .plot h4 {
    margin-top: 2px;
    margin-bottom: 2px;
  }
}

/* ===== 当前状态栏（status-info）青春校园风格 ===== */
.status-info {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
  margin: 10px 2px;
  padding: 2px;
  border: 2px solid #6366f1;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(247,249,252,0.8) 100%);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  color: #2d3436;
  font-weight: bold;
  transition: all 0.3s ease;
}

.status-info:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.status-info > .time,
.status-info > .weather,
.status-info > .location {
  flex: 1 1 0%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  border-right: 2px solid rgba(99,102,241,0.2);
  white-space: normal;
  word-break: break-word;
  transition: background 0.2s;
}

.status-info > .location:last-child {
  border-right: none;
}

.status-info > .time:hover,
.status-info > .weather:hover,
.status-info > .location:hover {
  background: rgba(99,102,241,0.05);
  border-radius: 4px;
}

.status-info .time { color: #6366f1; }
.status-info .weather { color: #2ecc71; }
.status-info .location { color: #ff9f1c; }

.status-info .time::before {
  content: "📅 ";
  font-size: 1.2em;
  margin-right: 6px;
  line-height: 1;
}
.status-info .weather::before {
  content: "☀️ ";
  font-size: 1.2em;
  margin-right: 6px;
  line-height: 1;
}
.status-info .location::before {
  content: "📍 ";
  font-size: 1.2em;
  margin-right: 6px;
  line-height: 1;
}

/* 深色模式 · 青春霓虹变奏 */
@media (prefers-color-scheme: dark) {
  .status-info {
    background: linear-gradient(135deg, rgba(45,52,54,0.9) 0%, rgba(30,35,40,0.85) 100%);
    border-color: #a78bfa;
    box-shadow: 0 4px 20px rgba(167,139,250,0.1);
    color: #f7f9fc;
  }

  .status-info > .time,
  .status-info > .weather,
  .status-info > .location {
    border-right-color: rgba(167,139,250,0.3);
    color: #f7f9fc;
  }

  .status-info .time { color: #a78bfa; }
  .status-info .weather { color: #6ee7b7; }
  .status-info .location { color: #fbbf24; }

  .status-info > .time:hover,
  .status-info > .weather:hover,
  .status-info > .location:hover {
    background: rgba(167,139,250,0.1);
  }

  .status-info .time::before,
  .status-info .weather::before,
  .status-info .location::before {
    opacity: 0.95;
  }
}

/* 移动响应式 */
@media (max-width: 768px) {
  .status-info {
    margin: 4px 0;
    padding: 2px;
    font-size: 0.9em;
  }

  .status-info > .time,
  .status-info > .weather,
  .status-info > .location {
    padding: 6px 4px;
    font-size: 0.9em;
  }

  .status-info .time::before,
  .status-info .weather::before,
  .status-info .location::before {
    font-size: 1em;
    margin-right: 4px;
  }

  .status-info {
    flex-wrap: wrap;
  }
  .status-info > .time,
  .status-info > .weather,
  .status-info > .location {
    flex: 1 1 auto;
  }
}

/* 打印样式 */
@media print {
  .status-info {
    background: white !important;
    border: 2px solid #ccc !important;
    box-shadow: none !important;
    color: black !important;
    page-break-inside: avoid;
  }

  .status-info > .time,
  .status-info > .weather,
  .status-info > .location {
    border-right-color: #aaa !important;
    color: black !important;
  }

  .status-info .time::before,
  .status-info .weather::before,
  .status-info .location::before {
    color: black !important;
    opacity: 1;
  }
}

/* 角色卡片进度条 - 青春校园主题 */
.role-status {
    margin: 15px 0;
    position: relative;
    z-index: 2;
}

.label {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    z-index: 4;
    background: rgba(0, 0, 0, 0.4);
    padding: 2px;
    box-shadow: 
        0 0 3px rgba(0, 0, 0, 0.6),
        inset 0 0 5px rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    font-family: 'Orbitron', 'Rajdhani', sans-serif;
    text-shadow: 0 0 3px currentColor;
}

.hp .label {
    color: #ff477e;
    border-left-color: #ff477e;
    background: rgba(20, 20, 20, 0.4);
    box-shadow: 
        0 0 3px rgba(0, 0, 0, 0.6),
        inset 0 0 5px rgba(255,71,126,0.25);
}

.mp .label {
    color: #6366f1;
    border-left-color: #6366f1;
    background: rgba(20, 20, 20, 0.4);
    box-shadow: 
        0 0 3px rgba(0, 0, 0, 0.6),
        inset 0 0 5px rgba(99,102,241,0.25);
}

.st .label {
    color: #ff9f1c;
    border-left-color: #ff9f1c;
    background: rgba(20, 20, 20, 0.4);
    box-shadow: 
        0 0 3px rgba(0, 0, 0, 0.6),
        inset 0 0 5px rgba(255,159,28,0.25);
}

.container {
    height: 26px;
    background: rgba(40, 40, 60, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 0 4px rgba(0, 0, 0, 0.9),
        0 0 3px rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.4);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%);
    animation: scan 2.5s linear infinite;
    z-index: 1;
}

.fill {
    height: 100%;
    position: relative;
    transition: width 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: calc(var(--progress-width, 75%));
    max-width: 100%;
    border-radius: 4px;
}

.hp .fill {
    background: linear-gradient(90deg,
        rgba(255,71,126,0.7),
        #ff477e 40%,
        #ff1a66 70%,
        #ff477e 100%);
    box-shadow: 
        0 0 5px rgba(255,71,126,0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
}

.mp .fill {
    background: linear-gradient(90deg,
        rgba(99,102,241,0.7),
        #6366f1 40%,
        #4f52e0 70%,
        #6366f1 100%);
    box-shadow: 
        0 0 5px rgba(99,102,241,0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
}

.st .fill {
    background: linear-gradient(90deg,
        rgba(255,159,28,0.7),
        #ff9f1c 40%,
        #ff8000 70%,
        #ff9f1c 100%);
    box-shadow: 
        0 0 5px rgba(255,159,28,0.6),
        inset 0 0 8px rgba(255, 255, 255, 0.2);
}

.fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.15) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
    border-radius: 4px;
}

.value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #FFF;
    font-weight: 800;
    font-size: 0.75rem;
    text-shadow: 
        0 0 3px rgba(0, 0, 0, 0.9),
        1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 3;
    padding: 2px 8px;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.5px;
}

/* 进度条低值变色 */
.hp .value.low {
    color: #FFCCCC;
    background: rgba(255,30,102,0.4);
    text-shadow: 0 0 5px rgba(255,30,102,0.8);
}

.mp .value.low {
    color: #CCDDFF;
    background: rgba(79,82,224,0.4);
    text-shadow: 0 0 5px rgba(79,82,224,0.8);
}

.st .value.low {
    color: #FFE0CC;
    background: rgba(255,128,0,0.4);
    text-shadow: 0 0 5px rgba(255,128,0,0.8);
}

/* 动画效果 */
@keyframes scan {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 低血量警告 */
.hp .fill.low-hp {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 
            0 0 5px rgba(255,71,126,0.6),
            inset 0 0 8px rgba(255, 255, 255, 0.2);
    }
    50% {
        opacity: 0.7;
        box-shadow: 
            0 0 8px rgba(255,71,126,0.8),
            inset 0 0 10px rgba(255, 255, 255, 0.3);
    }
}

.label, .value {
    pointer-events: none;
}

@media (max-width: 768px) {
    .container {
        height: 22px;
    }

    .label {
        font-size: 0.7rem;
    }

    .value {
        font-size: 0.7rem;
    }
}

/* ========== custom-details 样式（论坛风格 - 完全覆盖默认样式）========== */
/* 重置所有默认 details 样式，使用更高优先级 */
.custom-details,
.custom-details[open],
.custom-details:not([open]) {
  all: initial; /* 重置所有属性 */
  display: block;
  margin: 0 0 15px 0;
  border-radius: 0;
  background: none;
  border: none;
  backdrop-filter: none;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  color: inherit;
}

/* 重新设置必要的属性 */
.custom-details {
  display: block;
  margin: 0 0 15px 0;
}

.custom-details summary {
  all: initial; /* 重置 summary 的所有样式 */
  cursor: pointer;
  outline: none;
  display: block;
  list-style: none;
  padding: 0;
  margin: 0;
  background: none;
}

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

/* 移除默认箭头 */
.custom-details summary::after {
  display: none !important;
}

.custom-details summary .summary-text {
  all: initial; /* 重置内部文本样式 */
  display: inline;
}

.custom-details summary h3 {
  color: #333333;
  margin: 0;
  display: inline-block;
  font-size: 20px;
  font-weight: normal;
  transition: color 0.2s;
  background: none;
  padding: 0;
}

.custom-details summary:hover h3 {
  color: #b8960c;
}

/* 重置展开状态 */
.custom-details[open] {
  background: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* 重置内容区域 */
.custom-details > *:not(summary) {
  all: initial;
  display: block;
}

.custom-details .details-content {
  padding-top: 15px;
  font-family: Arial, sans-serif;
}

/* 重置内部元素样式 */
.custom-details p,
.custom-details ul,
.custom-details ol,
.custom-details pre,
.custom-details blockquote {
  all: initial;
  display: block;
  margin-bottom: 15px;
  line-height: 1.5;
}

.custom-details p {
  display: block;
  margin-bottom: 15px;
  line-height: 1.5;
}

.custom-details li::before {
  display: none;
}

.custom-details strong,
.custom-details b {
  color: inherit;
  font-weight: bold;
  text-shadow: none;
}

/* 确保论坛容器内的 custom-details 使用正确的字体 */
.forum-post-container .custom-details,
.forum-post-container .custom-details * {
  font-family: Arial, sans-serif;
}

/* ========== 模拟论坛样式 - 浅色/深色模式自适应 ========== */

/* 浅色模式（默认） */
/* 主容器 */
.forum-post-container {
  background-color: #faf8f0;
  border: 1px solid #e0d5b5;
  padding: 20px;
  font-family: Arial, sans-serif;
  color: #333333;
  max-width: 800px;
  margin: auto;
  width: 100%;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  border-radius: 0px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 头部区域 */
.post-header-area {
  border-bottom: 2px solid #b8960c;
  margin-bottom: 15px;
  padding-bottom: 10px;
}

.post-header-area h2 {
  color: #b8960c;
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

/* 发帖人信息行 */
.post-meta {
  font-size: 12px;
  color: #888888;
  margin-top: 0;
  margin-bottom: 12px;
}

.post-meta .username {
  color: #2c7cb6;
  font-weight: bold;
}

/* 分割线 */
.divider-light {
  border: none;
  border-top: 1px solid #e0d5b5;
  margin: 15px 0;
}

.divider-gold {
  border: none;
  border-top: 2px solid #b8960c;
  margin: 20px 0 10px;
}

/* 正文段落样式 */
.post-text p {
  margin-bottom: 15px;
  line-height: 1.5;
  color: #333333;
}

/* 图片容器 */
.image-placeholder {
  background: #f0ebd8;
  padding: 10px;
  border: 1px dashed #d4c9a8;
  text-align: center;
  margin: 15px 0;
}

.image-placeholder p {
  margin: 0;
  font-style: italic;
  color: #666666;
}

/* 回复区块 */
.replies-section {
  background: #ffffff;
  padding: 1px 15px;
  margin-top: 15px;
  font-size: 14px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.replies-section h4 {
  color: #b8960c;
  margin: 15px 0 10px 0;
  font-size: 16px;
}

.reply-item {
  border-top: 1px solid #e0d5b5;
  padding: 10px 0;
}

.reply-item:first-of-type {
  border-top: none;
}

.reply-author {
  font-weight: bold;
  margin: 0 0 5px 0;
}

.reply-author strong {
  color: #333333;
}

.reply-like {
  color: #888888;
  font-size: 12px;
  margin-left: 8px;
}

.reply-text {
  margin: 5px 0 0 0;
  line-height: 1.4;
  color: #666666;
}

/* 保持强标记的样式一致性 */
.forum-post-container strong, 
.forum-post-container b {
  color: #333333;
}

/* ========== 深色模式 - 统一媒体查询 ========== */
@media (prefers-color-scheme: dark) {
  /* 主容器 */
  .forum-post-container {
    background-color: #2a2a2a;
    border-color: #444444;
    color: #e0e0e0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
  }

  /* 头部区域 */
  .post-header-area {
    border-bottom-color: #d4af37;
  }

  .post-header-area h2 {
    color: #d4af37;
  }

  /* custom-details 深色模式 */
  .custom-details summary h3 {
    color: #e0e0e0;
  }

  .custom-details summary:hover h3 {
    color: #d4af37;
  }

  /* 发帖人信息行 */
  .post-meta {
    color: #888888;
  }

  .post-meta .username {
    color: #5dade2;
  }

  /* 分割线 */
  .divider-light {
    border-top-color: #444444;
  }

  .divider-gold {
    border-top-color: #d4af37;
  }

  /* 正文段落样式 */
  .post-text p {
    color: #e0e0e0;
  }

  /* 图片容器 */
  .image-placeholder {
    background: #1a1a1a;
    border-color: #555555;
  }

  .image-placeholder p {
    color: #aaaaaa;
  }

  /* 回复区块 */
  .replies-section {
    background: #333333;
  }

  .replies-section h4 {
    color: #d4af37;
  }

  .reply-item {
    border-top-color: #444444;
  }

  .reply-author strong {
    color: #e0e0e0;
  }

  .reply-like {
    color: #888888;
  }

  .reply-text {
    color: #aaaaaa;
  }

  /* 强标记样式 */
  .forum-post-container strong,
  .forum-post-container b {
    color: #e0e0e0;
  }

  /* custom-details 内部文本颜色 */
  .forum-post-container .custom-details,
  .forum-post-container .custom-details .details-content {
    color: #e0e0e0;
  }
}

/* ========== 小屏幕适配（768px及以下）- 优化字体大小，不改变边距 ========== */
@media (max-width: 768px) {

  .forum-post-container {
    padding: 6px;
  }
  
/* 分割线 */
  .divider-light {
    margin: 4px 0;
  }

  .divider-gold {
    border: none;
    margin: 6px 0 4px;
  }

  .post-header-area h2 {
    font-size: 16px;
  }

  .custom-details summary h3 {
    font-size: 14px;
  }

  .post-text p {
    margin-bottom: 6px;  /* 原有边距调整，保持不变 */
    font-size: 14px;
  }

  /* 发帖人信息行 */
  .post-meta,
  .post-meta .username {
    font-size: 12px;
  }

  .replies-section {
    padding: 1px 6px;
    margin-top: 6px;
  }

  /* 回复区块标题 */
  .replies-section h4 {
    font-size: 14px;
  }

  .reply-item {
    padding: 6px 0;
  }

  /* 回复者姓名 */
  .reply-author {
    font-size: 14px;
    margin: 0 0 2px 0;
  }

  /* 回复内容正文 */
  .reply-text {
    font-size: 14px;
  }

  /* 点赞数等辅助信息 */
  .reply-like {
    font-size: 12px;
  }

  /* 图片占位符内文字 */
  .image-placeholder p {
    font-size: 12px;
  }

  /* custom-details 内部所有内容区域（确保折叠内容在移动端清晰可读） */
  .custom-details > *:not(summary),
  .custom-details .details-content,
  .custom-details .details-content p,
  .custom-details .details-content ul,
  .custom-details .details-content li,
  .custom-details .details-content blockquote,
  .custom-details .details-content pre {
    font-size: 14px;
  }

  /* 正文区域的其他块级元素（列表、引用、代码块等） */
  .post-text ul,
  .post-text ol,
  .post-text blockquote,
  .post-text pre {
    font-size: 14px;
  }
}

/* ========== 微信聊天界面样式 - 完整版 ========== */
/* ---------- 全局重置 ---------- */
.wechat-app,
.wechat-app * {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}

.wechat-app {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f5f5f5;
width: 100%;
max-width: 500px;
margin: 0 auto;
border-radius: 24px;
overflow-y: auto;
overflow-x: hidden;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

/* 自定义滚动条 */
.wechat-app::-webkit-scrollbar {
width: 4px;
}
.wechat-app::-webkit-scrollbar-track {
background: transparent;
}
.wechat-app::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.2);
border-radius: 4px;
}

/* ========== 完全重置 details.talk-list ========== */
.talk-list,
.talk-list[open],
.talk-list:not([open]) {
all: initial;
display: block;
margin: 0;
border-bottom: 0.5px solid #e5e5e5;
background-color: #ffffff;
}

.talk-list font {
    font-size: inherit !important;
    color: inherit !important;
}

/* 重置 summary 默认样式 */
.talk-list summary {
all: initial;
display: flex;
align-items: center;
padding: 12px 16px;
cursor: pointer;
list-style: none;
background-color: #ffffff;
gap: 12px;
}
.talk-list summary::-webkit-details-marker {
display: none;
}
.talk-list summary:active {
background-color: #f2f2f2;
}

/* 重置内部所有元素（为了彻底清除继承样式，再单独定义） */
.talk-list * {
all: initial;
}

/* ---------- 重新定义微信会话列表样式 ---------- */
.talk-list summary {
display: flex !important;
align-items: center !important;
padding: 12px 16px !important;
gap: 12px !important;
}

.talk-list .talk-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
background-color: #e5e5e5;
display: flex !important;
align-items: center;
justify-content: center;
flex-shrink: 0;
overflow: hidden;
}
.talk-list .talk-avatar span {
font-size: 28px;
line-height: 1;
display: inline-block;
}

.talk-list .talk-info {
flex: 1;
min-width: 0;
display: block !important;
}
.talk-list .talk-name {
font-size: 17px;
font-weight: 500;
color: #111111;
line-height: 1.3;
margin-bottom: 4px;
display: block;
}
.talk-list .talk-preview {
font-size: 13px;
color: #8e8e93;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: block;
}

.talk-list .talk-meta {
text-align: right;
flex-shrink: 0;
display: block !important;
}
.talk-list .talk-time {
font-size: 11px;
color: #8e8e93;
margin-bottom: 6px;
white-space: nowrap;
display: block;
}
.talk-list .talk-badge {
background-color: #fa5151;
color: #ffffff;
font-size: 11px;
font-weight: 500;
min-width: 18px;
height: 18px;
border-radius: 9px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 5px;
line-height: 1;
}

/* ---------- 聊天记录区域（展开后） ---------- */
.talk-list .chat-history {
display: none;
padding: 12px 12px 20px 12px;
}
.talk-list[open] .chat-history {
display: block;
border-top: 0.5px solid #e5e5e5;
background-color: #f5f5f5;
}

/* 聊天头部 */
.talk-list .chat-header {
background-color: #ffffff;
padding: 8px 16px;
border-bottom: 0.5px solid #e5e5e5;
margin-bottom: 12px;
border-radius: 8px 8px 0 0;
}
.talk-list .chat-header h3 {
margin: 0;
font-size: 17px;
font-weight: 500;
text-align: center;
color: #111111;
display: block;
}

/* 系统时间标签 */
.talk-list .system-message {
text-align: center;
margin: 16px 0 20px 0;
display: block;
}
.talk-list .time-tag {
background-color: rgba(0, 0, 0, 0.06);
display: inline-block;
padding: 4px 12px;
border-radius: 16px;
font-size: 11px;
color: #5e5e60;
letter-spacing: 0.2px;
}

/* 消息行 */
.talk-list .message-row {
display: flex;
margin-bottom: 16px;
align-items: flex-start;
gap: 8px;
}
.talk-list .message-left {
justify-content: flex-start;
}
.talk-list .message-right {
justify-content: flex-end;
}

/* 聊天气泡内头像 */
.talk-list .message-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #c4c4c4;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.talk-list .message-avatar span {
font-size: 22px;
line-height: 1;
display: inline-block;
}

.talk-list .message-content {
max-width: 70%;
display: flex;
flex-direction: column;
}

/* 气泡——真实微信风格 */
.talk-list .message-bubble {
padding: 9px 12px;
font-size: 16px;
line-height: 1.45;
word-wrap: break-word;
word-break: break-word;
position: relative;
}
/* 对方气泡（白色） */
.talk-list .message-left .message-bubble {
background-color: #ffffff;
color: #111111;
border-radius: 18px 18px 18px 4px;
box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.05);
}
/* 我的气泡（微信绿） */
.talk-list .message-right .message-bubble {
background-color: #d9f0e3;
color: #111111;
border-radius: 18px 18px 4px 18px;
}

/* 消息元数据（时间、状态） */
.talk-list .message-meta {
font-size: 10px;
color: #8e8e93;
margin-top: 4px;
display: flex;
gap: 6px;
align-items: center;
}
.talk-list .message-left .message-meta {
justify-content: flex-start;
padding-left: 4px;
}
.talk-list .message-right .message-meta {
justify-content: flex-end;
padding-right: 4px;
}
.talk-list .message-status {
font-size: 10px;
letter-spacing: -0.5px;
display: inline-block;
}

/* 图片消息 */
.talk-list .image-message {
max-width: 200px;
max-height: 200px;
border-radius: 12px;
overflow: hidden;
background-color: #e5e5e5;
}
.talk-list .image-message img {
width: 100%;
height: auto;
display: block;
object-fit: cover;
}

/* 引用消息（可选） */
.talk-list .quote-message {
background-color: rgba(0, 0, 0, 0.04);
border-left: 3px solid #c4c4c4;
padding: 6px 8px;
margin-bottom: 6px;
border-radius: 6px;
font-size: 13px;
color: #6c6c70;
word-break: break-all;
}

/* ========== 深色模式（完全匹配微信） ========== */
@media (prefers-color-scheme: dark) {
.wechat-app {
background-color: #111111;
}
.talk-list,
.talk-list[open],
.talk-list:not([open]) {
background-color: #1f1f1f;
border-bottom-color: #2c2c2e;
}
.talk-list summary {
background-color: #1f1f1f;
}
.talk-list summary:active {
background-color: #2c2c2e;
}
.talk-list .talk-name {
color: #ffffff;
}
.talk-list .talk-preview {
color: #8e8e93;
}
.talk-list .talk-time {
color: #636366;
}
.talk-list[open] .chat-history {
background-color: #111111;
border-top-color: #2c2c2e;
}
.talk-list .chat-header {
background-color: #1f1f1f;
border-bottom-color: #2c2c2e;
}
.talk-list .chat-header h3 {
color: #ffffff;
}
.talk-list .time-tag {
background-color: rgba(255, 255, 255, 0.1);
color: #98989e;
}
/* 对方气泡深色 */
.talk-list .message-left .message-bubble {
background-color: #2c2c2e;
color: #ffffff;
box-shadow: none;
}
/* 我的气泡深色 */
.talk-list .message-right .message-bubble {
background-color: #1f6e43;
color: #ffffff;
}
.talk-list .message-meta {
color: #636366;
}
.talk-list .quote-message {
background-color: rgba(255, 255, 255, 0.06);
border-left-color: #636366;
color: #aeaeb2;
}
.talk-list .image-message {
background-color: #3a3a3c;
}
.talk-list .talk-badge {
background-color: #fa5151;
}
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
.wechat-app {
max-width: 100%;
border-radius: 0;
height: 50vh;
}
.talk-list summary {
padding: 6px 8px;
}
.talk-list .talk-avatar {
width: 32px;
height: 32px;
}
.talk-list .talk-name {
font-size: 12px;
}
.talk-list .talk-time {
font-size: 9px;
}
.talk-list .talk-preview {
font-size: 12.5px;
}
.talk-list .message-content {
max-width: 80%;
}
.talk-list .message-bubble {
font-size: 12px;
padding: 2px 3px;
}
/* 对方气泡（白色） */
.talk-list .message-left .message-bubble {
border-radius: 6px 6px 6px 2px;
}
/* 我的气泡（微信绿） */
.talk-list .message-right .message-bubble {
border-radius: 6px 6px 2px 6px;
}
.message-avatar {
width: 32px;
height: 32px;
}
.talk-list .image-message {
max-width: 160px;
max-height: 160px;
}
.talk-list .chat-header {
padding: 4px 8px;
margin-bottom: 6px;
border-radius: 4px 4px 0 0;
}
.talk-list .chat-header h3 {
font-size: 12px;
}
.message-meta span {
font-size: 8px;
gap: 2px;
}
}

/* ======对话行容器====== */
.npc-talk,
.my-talk {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 24px;
    max-width: 100%;
}

.npc-talk {
    flex-direction: row !important;
}

.my-talk {
    flex-direction: row-reverse !important;
}

/* ======姓名框 · 黏土效果====== */
.npc-name,
.my-name {
    flex-shrink: 0;
    padding: 6px 18px;
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: 0.3px;
    line-height: 1.4;
    margin-top: 1px;
    max-width: 80px; 
    word-break: break-all;
    border: none;
    border-radius: 14px;
    color: #ffffff;

    /* 黏土多层阴影 */
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.15),
        0 6px 12px rgba(0, 0, 0, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.06),
        inset 0 2px 8px rgba(255, 255, 255, 0.25);

    transform: translateY(-2px);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
    user-select: none;
}

.npc-name:hover,
.my-name:hover {
    transform: translateY(-4px);
    box-shadow:
        0 6px 0 rgba(0, 0, 0, 0.12),
        0 10px 20px rgba(0, 0, 0, 0.06),
        inset 0 -3px 6px rgba(0, 0, 0, 0.04),
        inset 0 2px 8px rgba(255, 255, 255, 0.30);
}

.npc-name:active,
.my-name:active {
    transform: translateY(2px);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.18),
        0 4px 8px rgba(0, 0, 0, 0.06),
        inset 0 2px 4px rgba(0, 0, 0, 0.10),
        inset 0 -1px 4px rgba(255, 255, 255, 0.10);
    transition-duration: 0.06s;
}

/* ---- NPC 姓名框 · 深粉色（对应浅粉气泡） ---- */
.npc-name {
    background: radial-gradient(circle at 30% 25%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 70%),
        #b34a4a;
    /* 主色：深粉色，与气泡阴影呼应 */
    box-shadow:
        0 4px 0 #7a2e2e,
        /* 更深粉色做厚度 */
        0 6px 12px rgba(0, 0, 0, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.08),
        inset 0 2px 8px rgba(255, 255, 255, 0.20);
}
.npc-name:hover {
    box-shadow:
        0 6px 0 #7a2e2e,
        0 10px 20px rgba(0, 0, 0, 0.06),
        inset 0 -3px 6px rgba(0, 0, 0, 0.06),
        inset 0 2px 8px rgba(255, 255, 255, 0.28);
}
.npc-name:active {
    box-shadow:
        0 2px 0 #7a2e2e,
        0 4px 8px rgba(0, 0, 0, 0.06),
        inset 0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 -1px 4px rgba(255, 255, 255, 0.08);
}

/* ---- 用户姓名框 · 深蓝色（对应浅蓝气泡） ---- */
.my-name {
    background: radial-gradient(circle at 30% 25%,
            rgba(255, 255, 255, 0.15) 0%,
            transparent 70%),
        #2d5a8a;
    /* 主色：深蓝色，与气泡阴影呼应 */
    box-shadow:
        0 4px 0 #1a3f5a,
        /* 更深蓝色做厚度 */
        0 6px 12px rgba(0, 0, 0, 0.08),
        inset 0 -3px 6px rgba(0, 0, 0, 0.08),
        inset 0 2px 8px rgba(255, 255, 255, 0.20);
}
.my-name:hover {
    box-shadow:
        0 6px 0 #1a3f5a,
        0 10px 20px rgba(0, 0, 0, 0.06),
        inset 0 -3px 6px rgba(0, 0, 0, 0.06),
        inset 0 2px 8px rgba(255, 255, 255, 0.28);
}
.my-name:active {
    box-shadow:
        0 2px 0 #1a3f5a,
        0 4px 8px rgba(0, 0, 0, 0.06),
        inset 0 2px 4px rgba(0, 0, 0, 0.12),
        inset 0 -1px 4px rgba(255, 255, 255, 0.08);
}

/* ======对话气泡（护眼配色）====== */
.talk-word {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    border: 2px solid;
    border-radius: 8px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 1em;
    position: relative;
}

/* ---- NPC 气泡 · 护眼浅粉色 ---- */
.npc-talk .talk-word {
    border-color: #d99e9e;
    background-color: #fce8e8;
    box-shadow: -6px 6px 0 0 #b34a4a;
}

/* ---- 用户气泡 · 护眼浅蓝色 ---- */
.my-talk .talk-word {
    border-color: #7ba9c9;
    background-color: #dceaf7;
    box-shadow: 6px 6px 0 0 #2d5a8a;
}

/* ======三角形（指向姓名框）====== */

/* ---- NPC：左侧 ---- */
.npc-talk .talk-word::before,
.npc-talk .talk-word::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
}
.npc-talk .talk-word::before {
    border-width: 6px 8px 6px 0;
    border-color: transparent #d99e9e transparent transparent;
    filter: drop-shadow(-2px 2px 0 rgba(179, 74, 74, 0.15));
}
.npc-talk .talk-word::after {
    left: -5px;
    border-width: 5px 7px 5px 0;
    border-color: transparent #fce8e8 transparent transparent;
}

/* ---- 用户：右侧 ---- */
.my-talk .talk-word::before,
.my-talk .talk-word::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
}
.my-talk .talk-word::before {
    border-width: 6px 0 6px 8px;
    border-color: transparent transparent transparent #7ba9c9;
    filter: drop-shadow(2px 2px 0 rgba(45, 90, 138, 0.15));
}
.my-talk .talk-word::after {
    right: -5px;
    border-width: 5px 0 5px 7px;
    border-color: transparent transparent transparent #dceaf7;
}

/* ======深色模式 - 改为 .dark 前缀 ====== */
.dark body {
  background: #1a1e24;
}

.dark .npc-name {
  background: radial-gradient(circle at 30% 25%,
          rgba(255, 255, 255, 0.08) 0%,
          transparent 70%),
      #7a3a3a;
  /* 深粉色 */
  box-shadow:
      0 4px 0 #4a1a1a,
      0 6px 12px rgba(0, 0, 0, 0.25),
      inset 0 -3px 6px rgba(0, 0, 0, 0.15),
      inset 0 2px 8px rgba(255, 255, 255, 0.08);
  color: #e8edf5;
}
.dark .npc-name:hover {
  box-shadow:
      0 6px 0 #4a1a1a,
      0 10px 20px rgba(0, 0, 0, 0.20),
      inset 0 -3px 6px rgba(0, 0, 0, 0.12),
      inset 0 2px 8px rgba(255, 255, 255, 0.12);
}
.dark .npc-name:active {
  box-shadow:
      0 2px 0 #4a1a1a,
      0 4px 8px rgba(0, 0, 0, 0.20),
      inset 0 2px 4px rgba(0, 0, 0, 0.18),
      inset 0 -1px 4px rgba(255, 255, 255, 0.04);
}

.dark .my-name {
  background: radial-gradient(circle at 30% 25%,
          rgba(255, 255, 255, 0.08) 0%,
          transparent 70%),
      #1a3f5a;
  /* 深蓝色 */
  box-shadow:
      0 4px 0 #0a1f2a,
      0 6px 12px rgba(0, 0, 0, 0.25),
      inset 0 -3px 6px rgba(0, 0, 0, 0.15),
      inset 0 2px 8px rgba(255, 255, 255, 0.08);
  color: #e8edf5;
}
.dark .my-name:hover {
  box-shadow:
      0 6px 0 #0a1f2a,
      0 10px 20px rgba(0, 0, 0, 0.20),
      inset 0 -3px 6px rgba(0, 0, 0, 0.12),
      inset 0 2px 8px rgba(255, 255, 255, 0.12);
}
.dark .my-name:active {
  box-shadow:
      0 2px 0 #0a1f2a,
      0 4px 8px rgba(0, 0, 0, 0.20),
      inset 0 2px 4px rgba(0, 0, 0, 0.18),
      inset 0 -1px 4px rgba(255, 255, 255, 0.04);
}

.dark .npc-talk .talk-word {
  border-color: #8a4a4a;
  background-color: #2a1a1a;
  color: #e0e4ec;
  box-shadow: -6px 6px 0 0 #4a2a2a;
}
.dark .my-talk .talk-word {
  border-color: #4a7a9a;
  background-color: #1a2a3a;
  color: #e0e4ec;
  box-shadow: 6px 6px 0 0 #1a3a4a;
}

.dark .npc-talk .talk-word::before {
  border-color: transparent #8a4a4a transparent transparent;
  filter: drop-shadow(-2px 2px 0 rgba(74, 42, 42, 0.3));
}
.dark .npc-talk .talk-word::after {
  border-color: transparent #2a1a1a transparent transparent;
}
.dark .my-talk .talk-word::before {
  border-color: transparent transparent transparent #4a7a9a;
  filter: drop-shadow(2px 2px 0 rgba(26, 58, 74, 0.3));
}
.dark .my-talk .talk-word::after {
  border-color: transparent transparent transparent #1a2a3a;
}

/* ======小屏幕适配 (≤768px)====== */
@media (max-width: 768px) {
    .npc-talk,
    .my-talk {
        gap: 8px;
        margin-bottom: 18px;
    }

    .npc-name,
    .my-name {
        font-size: 0.95em;
        padding: 2px 10px;
        border-radius: 12px;
        margin-top: 0;
        transform: translateY(-1px);
        box-shadow:
            0 3px 0 rgba(0, 0, 0, 0.15),
            0 4px 10px rgba(0, 0, 0, 0.06),
            inset 0 -2px 4px rgba(0, 0, 0, 0.06),
            inset 0 2px 6px rgba(255, 255, 255, 0.20);
    }
    .npc-name:hover,
    .my-name:hover {
        transform: translateY(-2px);
        box-shadow:
            0 4px 0 rgba(0, 0, 0, 0.12),
            0 8px 16px rgba(0, 0, 0, 0.05),
            inset 0 -2px 4px rgba(0, 0, 0, 0.04),
            inset 0 2px 6px rgba(255, 255, 255, 0.25);
    }
    .npc-name:active,
    .my-name:active {
        transform: translateY(2px);
        box-shadow:
            0 1px 0 rgba(0, 0, 0, 0.18),
            0 3px 6px rgba(0, 0, 0, 0.05),
            inset 0 2px 4px rgba(0, 0, 0, 0.10),
            inset 0 -1px 4px rgba(255, 255, 255, 0.08);
    }

    .talk-word {
        padding: 8px 12px;
        font-size: 0.95em;
        border-width: 1.5px;
        border-radius: 6px;
    }

    .npc-talk .talk-word::before,
    .npc-talk .talk-word::after {
        top: 12px;
        left: -7px;
    }
    .npc-talk .talk-word::before {
        border-width: 5px 7px 5px 0;
    }
    .npc-talk .talk-word::after {
        left: -4px;
        border-width: 4px 6px 4px 0;
    }

    .my-talk .talk-word::before,
    .my-talk .talk-word::after {
        top: 12px;
        right: -7px;
    }
    .my-talk .talk-word::before {
        border-width: 5px 0 5px 7px;
    }
    .my-talk .talk-word::after {
        right: -4px;
        border-width: 4px 0 4px 6px;
    }

    .npc-talk .talk-word {
        box-shadow: -4px 4px 0 0 #b34a4a;
    }
    .my-talk .talk-word {
        box-shadow: 4px 4px 0 0 #2d5a8a;
    }
    /* 深色模式小屏幕适配 - 使用 .dark 前缀 */
    .dark .npc-talk .talk-word {
        box-shadow: -4px 4px 0 0 #4a2a2a;
    }
    .dark .my-talk .talk-word {
        box-shadow: 4px 4px 0 0 #1a3a4a;
    }
    .dark .npc-name {
        box-shadow:
            0 3px 0 #4a1a1a,
            0 4px 10px rgba(0, 0, 0, 0.25),
            inset 0 -2px 4px rgba(0, 0, 0, 0.15),
            inset 0 2px 6px rgba(255, 255, 255, 0.06);
    }
    .dark .my-name {
        box-shadow:
            0 3px 0 #0a1f2a,
            0 4px 10px rgba(0, 0, 0, 0.25),
            inset 0 -2px 4px rgba(0, 0, 0, 0.15),
            inset 0 2px 6px rgba(255, 255, 255, 0.06);
    }
}