/* ═══ B平台表格修正（自动注入）═══ */
.rili-markdown-renderer table { display:table!important; table-layout:auto!important; width:100%!important; border-collapse:collapse!important; }
.rili-markdown-renderer table caption { display:table-caption!important; caption-side:top!important; text-align:center!important; padding:8px!important; }
.rili-markdown-renderer thead { display:table-header-group!important; }
.rili-markdown-renderer tbody { display:table-row-group!important; }
.rili-markdown-renderer tr { display:table-row!important; }
.rili-markdown-renderer th, .rili-markdown-renderer td { display:table-cell!important; }

/* ═══ B平台按钮组保护（自动注入 — 防止按钮消失）═══
   原理：B平台消息操作按钮结构为：
   .flex.items-center.gap-1.ml-auto (hover显隐包装)
     └── .bg-muted.rounded.flex.p-0.5 (按钮组容器)
           └── button.rounded-full.size-7 (单个按钮)
   以下规则使用高specificity + !important确保按钮
   不被任何转换后/透传的CSS规则意外隐藏
   ═══════════════════════════════════════════════ */
/* 按钮组容器保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5,
.is-user .bg-muted.rounded.flex.p-0\.5,
.is-assistant .bg-muted.rounded.flex.p-0\.5 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}
/* 单个按钮保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5 > button,
.is-user .bg-muted.rounded.flex.p-0\.5 > button,
.is-assistant .bg-muted.rounded.flex.p-0\.5 > button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
}
/* hover显隐包装层保护 — 仅保留B平台原生的opacity过渡 */
.flex.items-center.gap-1.ml-auto.md\:opacity-0.group-hover\:opacity-100 {
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
/* 操作行保护 */
.flex.w-full.items-center.justify-between.gap-2.px-2 {
  display: flex !important;
  visibility: visible !important;
  overflow: visible !important;
}

/* ═══ B平台顶部栏适配说明（自动注入）═══
   A: div.sticky > div.flex.justify-between
      ├── 左侧空区
      ├── #ai-model-selector (居中)
      └── 右侧工具(设置按钮等)
   B: <header.flex.justify-between>
      ├── #nav-left (侧边栏开关)
      ├── #nav-middle (可能为空)
      └── #nav-right (通知/主题/语言)
   B平台模型按钮不在header内，选择器:
   button:has(> .flex-1.truncate.text-left)
   ═══════════════════════════════════════ */
header.flex.justify-between { position: relative; overflow: visible; }

/* ========== 全局末世主题美化 - 整合版 ========== */

/* 整体背景 - 废土氛围 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%) !important;
  border: 2px solid #3a3a3a !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05) !important;
  position: relative !important;
  isolation: isolate !important;
}

/* 废土背景动效 - 飘落的灰烬 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 60% 70%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 90% 60%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 33% 80%, rgba(255,255,255,0.1), transparent);
  background-size: 200% 200%;
  background-position: 0% 0%;
  animation: ashFall 20s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

@keyframes ashFall {
  0% { background-position: 0% 0%; }
  100% { background-position: 0% 200%; }
}

/* 确保内容在动效之上 */
.rili-markdown-renderer {
  position: relative !important;
  z-index: 1 !important;
  background: transparent !important;
  color: #e0e0e0 !important;
}

/* 隐藏顶部颜色条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}

/* ========== 文本内容样式 ========== */
.rili-markdown-renderer {
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif !important;
  line-height: 1.8 !important;
  font-size: 15px !important;
}

.rili-markdown-renderer p {
  margin: 12px 0 !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

.rili-markdown-renderer strong, .rili-markdown-renderer b {
  color: #00ff88 !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(0,255,136,0.3) !important;
}

/* 正文区域 text 标签 */
text {
  display: block;
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 4px solid #e74c3c;
}

text p {
  text-indent: 2em;
  line-height: 2;
  margin: 15px 0;
  color: #2c3e50;
  font-size: 16px;
}

/* 兼容 old text 选择器 */
text p {
  text-indent: 2em;
  line-height: 1.9;
  margin: 12px 0;
  color: #2c3e50;
}

top, status {
  display: block;
}

/* ========== 顶部时间栏 ========== */
.top-bar {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  border: 1px solid #444;
}

.time-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #00ff88;
  font-weight: bold;
  font-size: 15px;
  text-shadow: 0 0 10px rgba(0,255,136,0.5);
}

.time-info .icon {
  font-size: 18px;
  filter: drop-shadow(0 0 5px rgba(0,255,136,0.8));
}

/* 旧版时间地点样式兼容 */
.time-location {
  display: flex;
  justify-content: space-around;
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.time-location span {
  color: #ecf0f1;
  font-weight: bold;
  font-size: 14px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ========== 折叠面板 details / summary ========== */
details {
  margin: 12px 0;
  border: 2px solid #34495e;
  border-radius: 8px;
  overflow: hidden;
  background: #2c3e50;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: all 0.3s;
}

details:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

summary {
  background: linear-gradient(to right, #34495e, #2c3e50);
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #ecf0f1;
  user-select: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}

summary:hover {
  background: linear-gradient(to right, #3d566e, #34495e);
  padding-left: 25px;
}

details[open] summary {
  border-bottom: 3px solid #e74c3c;
  background: linear-gradient(to right, #e74c3c, #c0392b);
}

.panel-content {
  padding: 20px;
  background: linear-gradient(to bottom, #34495e 0%, #2c3e50 100%);
  color: #ecf0f1;
}

/* 兼容旧版 details 样式 */
details {
  margin: 10px 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  overflow: hidden;
}

summary {
  background: linear-gradient(to right, #34495e, #2c3e50);
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
  color: #ecf0f1;
  user-select: none;
  transition: all 0.3s;
}

summary:hover {
  background: linear-gradient(to right, #3d566e, #34495e);
  padding-left: 20px;
}

details[open] summary {
  border-bottom: 2px solid #e74c3c;
}

/* ========== 信息行 ========== */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  color: #95a5a6;
  font-size: 14px;
  font-weight: bold;
}

.info-row .value {
  color: #ecf0f1;
  font-size: 15px;
  font-weight: bold;
}

.value-desc {
  color: #bdc3c7;
  font-size: 13px;
  font-style: italic;
  margin-top: 5px;
  display: block;
}

/* ========== 异能等级颜色 ========== */
.grade-SSS { color: #ff0080 !important; text-shadow: 0 0 10px #ff0080; }
.grade-SS { color: #ff6b00 !important; text-shadow: 0 0 8px #ff6b00; }
.grade-S { color: #ffd700 !important; text-shadow: 0 0 6px #ffd700; }
.grade-A { color: #9b59b6 !important; text-shadow: 0 0 4px #9b59b6; }
.grade-B { color: #95a5a6 !important; }

/* ========== 战斗力等级颜色 ========== */
.combat-S { color: #e74c3c !important; font-size: 18px !important; }
.combat-A { color: #e67e22 !important; font-size: 17px !important; }
.combat-B { color: #f39c12 !important; font-size: 16px !important; }
.combat-C { color: #95a5a6 !important; font-size: 15px !important; }
.combat-D { color: #7f8c8d !important; font-size: 14px !important; }

/* ========== 数值条 ========== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 15px 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-label {
  color: #95a5a6;
  font-size: 13px;
  font-weight: bold;
}

.stat-bar {
  width: 100%;
  height: 20px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  position: relative;
}

.bar-fill {
  height: 100%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px currentColor;
  position: relative;
}

.bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
}

.bar-fill.hp { background: linear-gradient(to right, #e74c3c, #c0392b); }
.bar-fill.mp { background: linear-gradient(to right, #3498db, #2980b9); }
.bar-fill.hunger { background: linear-gradient(to right, #f39c12, #e67e22); }
.bar-fill.thirst { background: linear-gradient(to right, #1abc9c, #16a085); }
.bar-fill.love { background: linear-gradient(to right, #e91e63, #c2185b); }
.bar-fill.loyalty { background: linear-gradient(to right, #9c27b0, #7b1fa2); }

.stat-value {
  color: #ecf0f1;
  font-size: 12px;
  font-weight: bold;
  text-align: right;
}

/* ========== 背包物品 ========== */
.inventory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
  padding: 15px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}

/* ========== 设施列表 ========== */
.facility-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
}

.facility-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 5px;
  border-left: 3px solid #3498db;
}

.facility-name {
  color: #ecf0f1;
  font-weight: bold;
}

.facility-level {
  color: #f39c12;
  font-weight: bold;
}

/* ========== 资源网格 ========== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin: 15px 0;
}

.resource-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s;
}

.resource-item:hover {
  background: rgba(0,0,0,0.4);
  transform: scale(1.05);
}

.res-icon {
  font-size: 24px;
  margin-bottom: 5px;
}

.res-name {
  color: #95a5a6;
  font-size: 12px;
  margin-bottom: 3px;
}

.res-value {
  color: #ecf0f1;
  font-weight: bold;
  font-size: 14px;
}

/* ========== NPC卡片 ========== */
.npc-card {
  background: linear-gradient(135deg, rgba(233,30,99,0.1) 0%, rgba(156,39,176,0.1) 100%);
  border: 2px solid rgba(233,30,99,0.3);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s;
}

.npc-card:hover {
  border-color: rgba(233,30,99,0.6);
  box-shadow: 0 6px 12px rgba(233,30,99,0.4);
  transform: translateY(-3px);
}

.npc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(233,30,99,0.3);
}

.npc-name {
  color: #e91e63;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(233,30,99,0.5);
}

.npc-age, .npc-job {
  color: #bdc3c7;
  font-size: 13px;
}

.npc-ability, .npc-appearance, .npc-personality, .npc-status {
  margin: 10px 0;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 5px;
}

.npc-stats {
  margin: 15px 0;
}

/* 兼容旧版 NPC 卡片 */
.npc-card {
  border-left-color: #e91e63;
  background: linear-gradient(to right, rgba(233, 30, 99, 0.05), transparent);
  margin-bottom: 12px;
}

.npc-card b {
  color: #e91e63;
}

/* ========== 关系等级 ========== */
.relation-陌生人 { color: #95a5a6 !important; }
.relation-熟人 { color: #3498db !important; }
.relation-朋友 { color: #2ecc71 !important; }
.relation-恋人 { color: #e91e63 !important; }
.relation-伴侣 { color: #9b59b6 !important; }
.relation-性伴侣 { color: #e74c3c !important; }

/* ========== 任务系统 ========== */
.quest-section {
  margin: 15px 0;
}

.quest-title {
  color: #f39c12;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid rgba(243,156,18,0.3);
}

.quest-item {
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border-left: 4px solid;
  background: rgba(0,0,0,0.2);
}

.quest-item.main {
  border-left-color: #e74c3c;
  background: linear-gradient(to right, rgba(231,76,60,0.1), transparent);
}

.quest-item.side {
  border-left-color: #3498db;
  background: linear-gradient(to right, rgba(52,152,219,0.1), transparent);
}

.quest-name {
  color: #ecf0f1;
  font-weight: bold;
  font-size: 15px;
  display: block;
  margin-bottom: 5px;
}

.quest-desc {
  color: #bdc3c7;
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
}

.quest-reward {
  color: #f39c12;
  font-size: 13px;
  font-weight: bold;
  display: block;
}

/* ========== 地点卡片 ========== */
.location-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0;
  transition: all 0.3s;
}

.location-card:hover {
  background: rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.3);
  transform: translateX(5px);
}

.loc-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.loc-name {
  color: #ecf0f1;
  font-weight: bold;
  font-size: 15px;
}

.loc-distance {
  color: #95a5a6;
  font-size: 13px;
}

.loc-stats {
  display: flex;
  gap: 20px;
  margin: 10px 0;
}

.loc-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.loc-label {
  color: #95a5a6;
  font-size: 12px;
}

.loc-stars {
  color: #f39c12;
  font-size: 14px;
}

.loc-status {
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  margin-top: 8px;
}

.status-未探索 { background: rgba(231,76,60,0.3); color: #e74c3c; }
.status-已探索 { background: rgba(243,156,18,0.3); color: #f39c12; }
.status-已清理 { background: rgba(46,204,113,0.3); color: #2ecc71; }

/* ========== 记忆系统 ========== */
.memory-section {
  margin: 15px 0;
}

.memory-title {
  color: #3498db;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid rgba(52,152,219,0.3);
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.memory-item {
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 5px;
  border-left: 3px solid #3498db;
  font-size: 13px;
  line-height: 1.6;
}

.memory-item.long {
  border-left-color: #9b59b6;
}

.mem-no, .mem-time, .mem-loc {
  color: #95a5a6;
  margin-right: 8px;
}

.mem-event {
  color: #ecf0f1;
}

.mem-icon {
  margin-right: 8px;
  font-size: 16px;
}

/* ========== 行动推荐 ========== */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-item {
  padding: 12px;
  background: linear-gradient(to right, rgba(46,204,113,0.2), transparent);
  border-left: 4px solid #2ecc71;
  border-radius: 5px;
  color: #ecf0f1;
  font-size: 14px;
  transition: all 0.3s;
  cursor: pointer;
}

.action-item:hover {
  background: linear-gradient(to right, rgba(46,204,113,0.3), transparent);
  padding-left: 20px;
  box-shadow: 0 2px 8px rgba(46,204,113,0.3);
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 20px;
  color: #95a5a6;
  font-style: italic;
}

.empty-state.safe {
  color: #2ecc71;
}

/* ========== 通用信息块 ========== */
.player-info, .base-info, .npc-card, .quest-list, .location-list, .memory {
  background: rgba(44, 62, 80, 0.1);
  padding: 10px;
  border-left: 3px solid #e74c3c;
  margin: 8px 0;
  line-height: 1.8;
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
  .top-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== UI组件美化 - 按钮、输入框等 ========== */

/* 底部按钮美化 */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
  color: #00ff88 !important;
  background: rgba(0,255,136,0.1) !important;
  border: 1px solid rgba(0,255,136,0.3) !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  transition: all 0.3s !important;
  text-shadow: 0 0 5px rgba(0,255,136,0.3) !important;
}

.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
  background: rgba(0,255,136,0.2) !important;
  border-color: rgba(0,255,136,0.6) !important;
  box-shadow: 0 0 15px rgba(0,255,136,0.4) !important;
  transform: translateY(-2px) !important;
}

/* 模型名称文本 */
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground {
  color: #95a5a6 !important;
  font-size: 12px !important;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5) !important;
}

/* Token消耗文本 */
/* [Token消耗hover逻辑转换未启用]
.text-orange-500 {
  color: #f39c12 !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(243,156,18,0.5) !important;
}
*/

/* 顶部栏美化 */
header.flex.justify-between {
  background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 100%) !important;
  border-bottom: 2px solid #00ff88 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.8), 0 0 30px rgba(0,255,136,0.2) !important;
  padding: 12px 20px !important;
}

/* 模型选择器 */
#nav-middle .group.flex.items-center {
  background: rgba(0,255,136,0.1) !important;
  border: 2px solid rgba(0,255,136,0.3) !important;
  border-radius: 8px !important;
  padding: 8px 15px !important;
  transition: all 0.3s !important;
}

#nav-middle .group.flex.items-center:hover {
  background: rgba(0,255,136,0.2) !important;
  border-color: rgba(0,255,136,0.6) !important;
  box-shadow: 0 0 20px rgba(0,255,136,0.3) !important;
}

#nav-middle button:has(> .flex-1.truncate.text-left) .flex-1.truncate.text-left {
  color: #00ff88 !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(0,255,136,0.5) !important;
}

#nav-middle .shrink-0.flex.items-center svg {
  color: #00ff88 !important;
  filter: drop-shadow(0 0 3px rgba(0,255,136,0.5)) !important;
}

/* 历史记录图标 */
header.flex.justify-between.w-full.top-0 svg.lucide-clock-8 {
  color: #3498db !important;
  filter: drop-shadow(0 0 5px rgba(52,152,219,0.5)) !important;
  transition: all 0.3s !important;
}

header.flex.justify-between.w-full.top-0 svg.lucide-clock-8:hover {
  color: #5dade2 !important;
  filter: drop-shadow(0 0 10px rgba(52,152,219,0.8)) !important;
  transform: scale(1.1) !important;
}

/* 设置按钮 */
#nav-right button {
  background: rgba(231,76,60,0.1) !important;
  border: 2px solid rgba(231,76,60,0.3) !important;
  border-radius: 8px !important;
  transition: all 0.3s !important;
}

#nav-right button:hover {
  background: rgba(231,76,60,0.2) !important;
  border-color: rgba(231,76,60,0.6) !important;
  box-shadow: 0 0 20px rgba(231,76,60,0.4) !important;
}

#nav-right button svg {
  color: #e74c3c !important;
  filter: drop-shadow(0 0 5px rgba(231,76,60,0.5)) !important;
}

/* 开场白选择器 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: linear-gradient(135deg, rgba(0,255,136,0.1), rgba(52,152,219,0.1)) !important;
  border: 2px solid rgba(0,255,136,0.3) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
  transition: all 0.3s !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  background: linear-gradient(135deg, rgba(0,255,136,0.2), rgba(52,152,219,0.2)) !important;
  border-color: rgba(0,255,136,0.6) !important;
  box-shadow: 0 4px 12px rgba(0,255,136,0.3) !important;
  transform: translateY(-2px) !important;
}

div.flex.items-center.h-9.cursor-pointer.group svg {
  color: #00ff88 !important;
  filter: drop-shadow(0 0 3px rgba(0,255,136,0.5)) !important;
}

/* 按钮栏美化 */
#ai-mod-button2 button.MuiButton-root {
  background: linear-gradient(135deg, rgba(52,152,219,0.2), rgba(155,89,182,0.2)) !important;
  border: 2px solid rgba(52,152,219,0.4) !important;
  color: #3498db !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(52,152,219,0.3) !important;
  transition: all 0.3s !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  background: linear-gradient(135deg, rgba(52,152,219,0.3), rgba(155,89,182,0.3)) !important;
  border-color: rgba(52,152,219,0.7) !important;
  box-shadow: 0 0 20px rgba(52,152,219,0.5) !important;
  transform: scale(1.05) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
  filter: drop-shadow(0 0 3px rgba(52,152,219,0.5)) !important;
}

/* 底部栏背景 */
.bg-gradient-to-t {
  background: linear-gradient(to top, #1a1a1a 0%, rgba(26,26,26,0.95) 70%, transparent 100%) !important;
}

/* 输入框容器 */
#ai-chat-bottom-input {
  background: linear-gradient(135deg, #2d2d2d, #1a1a1a) !important;
  border: 2px solid #00ff88 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 30px rgba(0,255,136,0.2) !important;
  padding: 5px !important;
}

/* 主输入框 */
#ai-chat-input {
  background: rgba(0,0,0,0.3) !important;
  color: #e0e0e0 !important;
  font-size: 15px !important;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif !important;
  border: none !important;
  padding: 12px !important;
}

#ai-chat-input::placeholder {
  color: #7f8c8d !important;
  font-style: italic !important;
}

#ai-chat-input::selection {
  background: rgba(0,255,136,0.3) !important;
  color: #ffffff !important;
}

/* 分页栏美化 */
.MuiPaginationItem-root {
  background: rgba(52,152,219,0.1) !important;
  border: 1px solid rgba(52,152,219,0.3) !important;
  color: #3498db !important;
  font-weight: bold !important;
  transition: all 0.3s !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(52,152,219,0.2) !important;
  border-color: rgba(52,152,219,0.6) !important;
  box-shadow: 0 0 10px rgba(52,152,219,0.4) !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #3498db, #2980b9) !important;
  border-color: #3498db !important;
  color: #ffffff !important;
  box-shadow: 0 0 15px rgba(52,152,219,0.6) !important;
}

.MuiPaginationItem-root.Mui-disabled {
  background: rgba(127,140,141,0.1) !important;
  border-color: rgba(127,140,141,0.2) !important;
  color: #7f8c8d !important;
}

.MuiPaginationItem-icon {
  color: #3498db !important;
  filter: drop-shadow(0 0 3px rgba(52,152,219,0.5)) !important;
}

/* 评论区美化 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: linear-gradient(to bottom, #1a1a1a 0%, #2d2d2d 100%) !important;
  border-top: 2px solid #00ff88 !important;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.8) !important;
}

div.text-lg.font-bold {
  color: #00ff88 !important;
  text-shadow: 0 0 10px rgba(0,255,136,0.5) !important;
}

p.MuiTypography-body1.text-grey-600 {
  color: #95a5a6 !important;
}

span.MuiRating-iconEmpty svg {
  color: #34495e !important;
}

span.MuiRating-iconFilled svg {
  color: #f39c12 !important;
  filter: drop-shadow(0 0 5px rgba(243,156,18,0.6)) !important;
}

/* [Token消耗hover逻辑转换未启用]
span.text-orange-500 {
  color: #f39c12 !important;
  font-weight: bold !important;
  text-shadow: 0 0 5px rgba(243,156,18,0.5) !important;
}
*/

textarea.rc-textarea {
  background: rgba(0,0,0,0.3) !important;
  border: 2px solid rgba(0,255,136,0.3) !important;
  color: #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-size: 14px !important;
  transition: all 0.3s !important;
}

textarea.rc-textarea:focus {
  border-color: rgba(0,255,136,0.6) !important;
  box-shadow: 0 0 15px rgba(0,255,136,0.3) !important;
}

div.bg-gray-100.text-gray-500 {
  background: rgba(0,0,0,0.2) !important;
  color: #95a5a6 !important;
  border-radius: 5px !important;
  padding: 5px 10px !important;
}

div.cursor-pointer.group.flex.items-center.justify-center {
  background: linear-gradient(135deg, rgba(46,204,113,0.2), rgba(39,174,96,0.2)) !important;
  border: 2px solid rgba(46,204,113,0.4) !important;
  border-radius: 8px !important;
  transition: all 0.3s !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
  background: linear-gradient(135deg, rgba(46,204,113,0.3), rgba(39,174,96,0.3)) !important;
  border-color: rgba(46,204,113,0.7) !important;
  box-shadow: 0 0 20px rgba(46,204,113,0.5) !important;
  transform: scale(1.05) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
  color: #2ecc71 !important;
  filter: drop-shadow(0 0 5px rgba(46,204,113,0.5)) !important;
}

div.style_divider__mW0YX {
  background: linear-gradient(to right, transparent, rgba(0,255,136,0.3), transparent) !important;
  height: 2px !important;
}

.flex.w-full.items-center.justify-between.gap-2.px-2.css-1dmzxoz {
  gap: 10px !important;
}

button.MuiButton-containedPrimary {
  background: linear-gradient(135deg, #3498db, #2980b9) !important;
  border: 2px solid #3498db !important;
  color: #ffffff !important;
  font-weight: bold !important;
  box-shadow: 0 4px 10px rgba(52,152,219,0.4) !important;
  transition: all 0.3s !important;
}

button.MuiButton-containedPrimary:hover {
  box-shadow: 0 6px 15px rgba(52,152,219,0.6) !important;
  transform: translateY(-2px) !important;
}

button.MuiButton-outlinedPrimary {
  background: rgba(52,152,219,0.1) !important;
  border: 2px solid rgba(52,152,219,0.4) !important;
  color: #3498db !important;
  font-weight: bold !important;
  transition: all 0.3s !important;
}

button.MuiButton-outlinedPrimary:hover {
  background: rgba(52,152,219,0.2) !important;
  border-color: rgba(52,152,219,0.7) !important;
  box-shadow: 0 0 15px rgba(52,152,219,0.3) !important;
}

div.p-3.overflow-y-auto {
  background: rgba(0,0,0,0.2) !important;
  border-radius: 8px !important;
}

div.group.ml-0 {
  background: rgba(0,0,0,0.3) !important;
  border-left: 3px solid #3498db !important;
  border-radius: 8px !important;
  padding: 12px !important;
  margin: 10px 0 !important;
  transition: all 0.3s !important;
}

div.group.ml-0:hover {
  background: rgba(0,0,0,0.4) !important;
  border-left-color: #5dade2 !important;
  transform: translateX(5px) !important;
}

div.group img.rounded-full {
  border: 2px solid #00ff88 !important;
  box-shadow: 0 0 10px rgba(0,255,136,0.3) !important;
}

div.text-sm.text-grey-600 span.font-bold {
  color: #00ff88 !important;
  text-shadow: 0 0 5px rgba(0,255,136,0.3) !important;
}

span.text-\[10px\] {
  color: #f39c12 !important;
  background: rgba(243,156,18,0.2) !important;
  padding: 2px 6px !important;
  border-radius: 3px !important;
}

div.break-all {
  color: #e0e0e0 !important;
  line-height: 1.6 !important;
}

div.text-xs.text-grey-600 {
  color: #7f8c8d !important;
}

button.text-gray-400 {
  color: #95a5a6 !important;
  transition: all 0.3s !important;
}

button.text-gray-400:hover {
  color: #e74c3c !important;
}

button.text-gray-400 svg {
  filter: drop-shadow(0 0 3px currentColor) !important;
}

span.cursor-pointer {
  color: #3498db !important;
  font-weight: bold !important;
  transition: all 0.3s !important;
}

span.cursor-pointer:hover {
  color: #5dade2 !important;
  text-shadow: 0 0 5px rgba(52,152,219,0.5) !important;
}

div.ml-8.border-l {
  border-left-color: rgba(0,255,136,0.3) !important;
}