/* ═══ B平台加载动画适配（自动注入）═══ */
.flex.items-center.justify-center.size-6 { opacity: 1 !important; }
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }
.is-assistant.w-fit { width: 100% !important; }
.is-assistant > .border.border-muted:has(.flex.items-center.justify-center.size-6) {
  width: 100% !important; background: transparent !important;
  border: none !important; padding: 0 !important;
}
.is-assistant .space-y-3:has(.flex.items-center.justify-center.size-6) {
  display: flex; justify-content: center; width: 100%;
}

/* ═══ 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; }

/* ═══════════════════════════════════════
   末日终端面板 & 全局主题样式
   ═══════════════════════════════════════ */

/* ═══════ 全局动画定义 ═══════ */
@keyframes scanline {
  0% { top: -100%; }
  100% { top: 100%; }
}

@keyframes flicker {
  0%, 97% { opacity: 1; }
  98% { opacity: 0.85; }
  100% { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(74, 222, 128, 0.3); }
  50% { text-shadow: 0 0 8px rgba(74, 222, 128, 0.5), 0 0 16px rgba(74, 222, 128, 0.15); }
}

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

/* ═══════ 正文区域（新版）═══════════ */
text {
  display: block !important;
  background: linear-gradient(180deg, #0c0a08, #0f0d0a, #0c0a08) !important;
  border-left: 2px solid rgba(255, 120, 50, 0.12) !important;
  padding: 20px 16px !important;
  margin: 0 !important;
  border-radius: 2px !important;
  position: relative !important;
  overflow: hidden !important;
}

text::before {
  content: '' !important;
  position: absolute !important;
  top: -100% !important;
  left: 0 !important;
  right: 0 !important;
  height: 200% !important;
  background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255, 245, 230, 0.007) 3px, rgba(255, 245, 230, 0.007) 4px) !important;
  pointer-events: none !important;
  animation: scanline 12s linear infinite !important;
}

text::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 2px !important;
  height: 100% !important;
  background: linear-gradient(180deg, transparent, rgba(255, 120, 50, 0.2), rgba(255, 80, 30, 0.08), transparent) !important;
  pointer-events: none !important;
}

text p {
  color: #c8bfb0 !important;
  font-size: 15px !important;
  line-height: 2 !important;
  text-indent: 2em !important;
  margin: 0 0 10px 0 !important;
  font-family: Georgia, 'Noto Serif SC', 'Source Han Serif SC', serif !important;
  animation: flicker 8s infinite !important;
  letter-spacing: 0.3px !important;
}

text p:first-child::first-letter {
  font-size: 1.6em !important;
  color: #e8a87c !important;
  float: left !important;
  line-height: 1 !important;
  margin: 4px 4px 0 0 !important;
  font-weight: bold !important;
  text-shadow: 0 0 6px rgba(232, 168, 124, 0.3) !important;
}

/* ═══════ text 内部标签样式 ═══════ */
text q {
  color: #e8dcc8 !important;
  font-size: 15.5px !important;
  font-style: normal !important;
  quotes: none !important;
  position: relative !important;
  padding-left: 6px !important;
  border-left: 2px solid rgba(232, 168, 124, 0.25) !important;
  margin-left: 2px !important;
  display: inline !important;
  line-height: inherit !important;
}

text q::before,
text q::after {
  content: none !important;
}

text i {
  color: #7a9bb5 !important;
  font-size: 13.5px !important;
  font-style: italic !important;
  opacity: 0.85 !important;
  letter-spacing: 0.5px !important;
  display: inline !important;
  line-height: inherit !important;
}

text mark {
  display: inline-block !important;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), rgba(45, 180, 100, 0.04)) !important;
  color: #4ade80 !important;
  font-size: 12px !important;
  font-family: 'Courier New', monospace !important;
  border: 1px solid rgba(74, 222, 128, 0.15) !important;
  border-radius: 3px !important;
  padding: 2px 8px !important;
  margin: 4px 0 !important;
  letter-spacing: 1px !important;
  text-shadow: 0 0 4px rgba(74, 222, 128, 0.25) !important;
  line-height: 1.6 !important;
}

text em {
  color: #5a5550 !important;
  font-style: normal !important;
  font-size: 14px !important;
  letter-spacing: 4px !important;
  opacity: 0.7 !important;
  display: inline !important;
  line-height: inherit !important;
}

/* ═══════ 末日终端面板（新版 - 增强版）═══════════ */
.dp {
  background: linear-gradient(165deg, #060a08, #0a100c, #060a08) !important;
  border: 1px solid rgba(74, 222, 128, 0.08) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  margin-top: 14px !important;
  font-family: 'Courier New', 'Noto Sans SC', monospace !important;
  position: relative !important;
  overflow: hidden !important;
  animation: flicker 12s infinite !important;
}

.dp::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.15), transparent) !important;
}

.dp::after {
  content: '' !important;
  position: absolute !important;
  top: -100% !important;
  left: 0 !important;
  right: 0 !important;
  height: 200% !important;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 255, 80, 0.005) 2px, rgba(0, 255, 80, 0.005) 3px) !important;
  pointer-events: none !important;
  animation: scanline 10s linear infinite !important;
}

.dp-h {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 10px 4px 8px !important;
  border-bottom: 1px solid rgba(74, 222, 128, 0.06) !important;
  margin-bottom: 4px !important;
  color: #4ade80 !important;
  letter-spacing: 3px !important;
  animation: pulse-glow 4s ease-in-out infinite !important;
}

.dp-h span:first-child {
  font-size: 16px !important;
  filter: drop-shadow(0 0 3px rgba(74, 222, 128, 0.4)) !important;
}

.dp-h span:nth-child(2) {
  font-size: 11px !important;
  text-transform: uppercase !important;
}

.dp-h span:last-child {
  font-size: 8px !important;
  color: rgba(74, 222, 128, 0.2) !important;
}

.dp details {
  border-bottom: 1px solid rgba(74, 222, 128, 0.04) !important;
  padding: 1px 0 !important;
}

.dp details:last-of-type {
  border-bottom: none !important;
}

.dp summary {
  font-size: 12px !important;
  color: rgba(74, 222, 128, 0.7) !important;
  cursor: pointer !important;
  padding: 7px 4px !important;
  letter-spacing: 2px !important;
  transition: all 0.4s ease !important;
  list-style: none !important;
  user-select: none !important;
  position: relative !important;
}

.dp summary::-webkit-details-marker {
  display: none !important;
}

.dp summary::after {
  content: '[ + ]' !important;
  float: right !important;
  font-size: 9px !important;
  color: rgba(74, 222, 128, 0.25) !important;
  transition: all 0.3s !important;
}

.dp details[open] summary::after {
  content: '[ - ]' !important;
  color: rgba(74, 222, 128, 0.5) !important;
}

.dp summary:hover {
  color: #86efac !important;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.25) !important;
  padding-left: 8px !important;
}

.dp details[open] summary {
  color: #86efac !important;
  text-shadow: 0 0 6px rgba(74, 222, 128, 0.15) !important;
}

.dp details[open] > summary ~ p {
  animation: fadeSlide 0.3s ease forwards !important;
}

.dp details p {
  font-size: 11.5px !important;
  color: #6b8a72 !important;
  line-height: 1.9 !important;
  padding: 1px 8px !important;
  margin: 0 !important;
  transition: color 0.3s !important;
}

.dp details:hover p {
  color: #7f9f86 !important;
}

.dp-f {
  text-align: center !important;
  font-size: 8px !important;
  color: rgba(74, 222, 128, 0.15) !important;
  letter-spacing: 3px !important;
  padding: 8px 0 4px !important;
  border-top: 1px solid rgba(74, 222, 128, 0.04) !important;
  margin-top: 4px !important;
  text-transform: uppercase !important;
}

/* ═══════ 末日终端面板（原版）═══════════ */
.rili-markdown-renderer .doomsday-panel {
  background: linear-gradient(170deg, #060a0b 0%, #0c1214 40%, #091010 100%) !important;
  border: 1px solid #1a3a2a !important;
  border-radius: 10px !important;
  padding: 0 !important;
  margin: 20px 0 !important;
  font-family: 'Consolas', 'Courier New', 'SF Mono', monospace !important;
  overflow: hidden !important;
  box-shadow: 0 0 20px rgba(0, 255, 100, 0.06), 0 0 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(0, 255, 100, 0.05) !important;
  position: relative !important;
  isolation: isolate !important;
}

.rili-markdown-renderer .doomsday-panel::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 100, 0.015) 2px,
    rgba(0, 255, 100, 0.015) 4px
  ) !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

.rili-markdown-renderer .doomsday-panel > * {
  position: relative !important;
  z-index: 1 !important;
}

/* 头部 */
.rili-markdown-renderer .panel-header {
  background: linear-gradient(90deg, #0d1f15 0%, #132b1c 50%, #0d1f15 100%) !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  border-bottom: 1px solid #1a3a2a !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5) !important;
}

.rili-markdown-renderer .panel-icon {
  font-size: 20px !important;
  filter: drop-shadow(0 0 6px rgba(255, 80, 20, 0.8)) !important;
}

.rili-markdown-renderer .panel-title {
  font-size: 15px !important;
  font-weight: bold !important;
  color: #4ade80 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4) !important;
}

.rili-markdown-renderer .panel-ver {
  font-size: 10px !important;
  color: #3a6b4a !important;
  margin-left: auto !important;
  letter-spacing: 1px !important;
}

/* 区块通用 */
.rili-markdown-renderer .panel-section {
  padding: 10px 16px !important;
  border-bottom: 1px solid rgba(26, 58, 42, 0.4) !important;
}

.rili-markdown-renderer .panel-section:last-of-type {
  border-bottom: none !important;
}

.rili-markdown-renderer .section-title {
  font-size: 13px !important;
  font-weight: bold !important;
  color: #4ade80 !important;
  letter-spacing: 2px !important;
  padding: 6px 0 !important;
  cursor: pointer !important;
  transition: color 0.3s ease, text-shadow 0.3s ease !important;
  list-style: none !important;
}

.rili-markdown-renderer .section-title:hover {
  color: #86efac !important;
  text-shadow: 0 0 12px rgba(74, 222, 128, 0.5) !important;
}

.rili-markdown-renderer .section-title::-webkit-details-marker {
  display: none !important;
}

/* 信息行 */
.rili-markdown-renderer .info-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 4px 8px !important;
  margin: 2px 0 !important;
  border-radius: 4px !important;
  transition: background 0.2s ease !important;
}

.rili-markdown-renderer .info-row:hover {
  background: rgba(0, 255, 100, 0.03) !important;
}

.rili-markdown-renderer .info-row .label {
  font-size: 12px !important;
  color: #5a8a6a !important;
  font-weight: bold !important;
  min-width: 70px !important;
  letter-spacing: 1px !important;
}

.rili-markdown-renderer .info-row .value {
  font-size: 12px !important;
  color: #c8e6d0 !important;
  text-align: right !important;
  flex: 1 !important;
  margin-left: 12px !important;
}

/* 特殊值高亮 */
.rili-markdown-renderer .date-val {
  color: #f59e0b !important;
  font-weight: bold !important;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.3) !important;
}

.rili-markdown-renderer .level-val {
  color: #60a5fa !important;
  font-weight: bold !important;
}

.rili-markdown-renderer .system-name {
  color: #c084fc !important;
  font-weight: bold !important;
  text-shadow: 0 0 6px rgba(192, 132, 252, 0.3) !important;
}

.rili-markdown-renderer .caution-val {
  color: #f87171 !important;
  font-style: italic !important;
}

/* 数值条 */
.rili-markdown-renderer .stat-bar {
  display: flex !important;
  align-items: center !important;
  padding: 4px 8px !important;
  margin: 3px 0 !important;
  gap: 10px !important;
}

.rili-markdown-renderer .stat-bar .label {
  font-size: 12px !important;
  color: #5a8a6a !important;
  font-weight: bold !important;
  min-width: 50px !important;
}

.rili-markdown-renderer .bar {
  flex: 1 !important;
  height: 16px !important;
  background: #0a1510 !important;
  border-radius: 3px !important;
  border: 1px solid #1a3a2a !important;
  overflow: hidden !important;
  position: relative !important;
}

.rili-markdown-renderer .bar-fill {
  height: 100% !important;
  border-radius: 2px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 9px !important;
  font-weight: bold !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8) !important;
  transition: width 0.6s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.rili-markdown-renderer .bar-fill.hp {
  background: linear-gradient(90deg, #16a34a, #22c55e) !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.3) !important;
}

.rili-markdown-renderer .bar-fill.mp {
  background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3) !important;
}

.rili-markdown-renderer .bar-fill.hunger {
  background: linear-gradient(90deg, #ca8a04, #eab308) !important;
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.3) !important;
}

.rili-markdown-renderer .bar-fill.thirst {
  background: linear-gradient(90deg, #0891b2, #06b6d4) !important;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3) !important;
}

.rili-markdown-renderer .bar-fill.exp {
  background: linear-gradient(90deg, #7c3aed, #a855f7) !important;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3) !important;
}

/* NPC卡片 */
.rili-markdown-renderer .npc-card {
  background: rgba(0, 255, 100, 0.02) !important;
  border: 1px solid rgba(26, 58, 42, 0.5) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  margin: 6px 0 !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.rili-markdown-renderer .npc-card:hover {
  border-color: #2d6b42 !important;
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.08) !important;
}

.rili-markdown-renderer .npc-name {
  font-size: 13px !important;
  font-weight: bold !important;
  color: #86efac !important;
  margin-bottom: 4px !important;
  letter-spacing: 1px !important;
}

/* 电台广播 */
.rili-markdown-renderer .radio-broadcast {
  background: rgba(245, 158, 11, 0.03) !important;
  border-left: 3px solid #f59e0b !important;
  padding: 10px 14px !important;
  margin: 6px 0 !important;
  border-radius: 0 6px 6px 0 !important;
}

.rili-markdown-renderer .broadcast-time {
  font-size: 11px !important;
  color: #f59e0b !important;
  font-weight: bold !important;
  margin-bottom: 6px !important;
}

.rili-markdown-renderer .broadcast-content {
  font-size: 12px !important;
  color: #d4a06a !important;
  line-height: 1.7 !important;
}

/* 任务卡片 */
.rili-markdown-renderer .quest-card {
  background: rgba(96, 165, 250, 0.03) !important;
  border: 1px solid rgba(37, 99, 235, 0.2) !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  margin: 6px 0 !important;
}

.rili-markdown-renderer .quest-name {
  font-size: 12px !important;
  font-weight: bold !important;
  color: #60a5fa !important;
  margin-bottom: 4px !important;
}

.rili-markdown-renderer .quest-desc {
  font-size: 11px !important;
  color: #94a3b8 !important;
  line-height: 1.6 !important;
}

/* 记忆区 */
.rili-markdown-renderer .memory-zone {
  margin: 8px 0 !important;
  padding: 8px 12px !important;
  border-left: 2px solid #7c3aed !important;
  background: rgba(124, 58, 237, 0.03) !important;
  border-radius: 0 6px 6px 0 !important;
}

.rili-markdown-renderer .memory-title {
  font-size: 12px !important;
  font-weight: bold !important;
  color: #a78bfa !important;
  margin-bottom: 6px !important;
}

.rili-markdown-renderer .memory-content {
  font-size: 11px !important;
  color: #9ca3af !important;
  line-height: 1.7 !important;
}

/* 底部 */
.rili-markdown-renderer .panel-footer {
  background: linear-gradient(90deg, #0d1f15, #091510, #0d1f15) !important;
  padding: 8px 16px !important;
  border-top: 1px solid #1a3a2a !important;
  text-align: center !important;
}

.rili-markdown-renderer .footer-text {
  font-size: 10px !important;
  color: #3a6b4a !important;
  letter-spacing: 2px !important;
}

/* details折叠优化 */
.rili-markdown-renderer .doomsday-panel details {
  margin: 0 !important;
}

.rili-markdown-renderer .doomsday-panel details[open] > summary {
  color: #86efac !important;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.4) !important;
}

/* ═══════ 聊天框美化 ═══════ */
/* 隐藏顶部彩条 */
[class*="bg-[#F1CBCB]"],
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}

/* 统一聊天框 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
  background: linear-gradient(160deg, #0b1012 0%, #101819 50%, #0b1012 100%) !important;
  border: 1px solid rgba(0, 255, 100, 0.1) !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 255, 100, 0.03) !important;
  transition: box-shadow 0.4s ease, border-color 0.4s ease !important;
  position: relative !important;
  isolation: isolate !important;
}

.is-user > .border.border-muted,
.is-assistant > .border.border-muted:hover {
  border-color: rgba(0, 255, 100, 0.2) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 255, 100, 0.06) !important;
}

/* 聊天框扫描线背景效果 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 255, 100, 0.008) 3px,
    rgba(0, 255, 100, 0.008) 6px
  ) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  border-radius: 12px !important;
}

/* 输入聊天框区分 */
.is-user > .border.border-muted {
  border-color: rgba(96, 165, 250, 0.15) !important;
}

.is-user > .border.border-muted:hover {
  border-color: rgba(96, 165, 250, 0.3) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.7), 0 0 20px rgba(96, 165, 250, 0.05) !important;
}

/* 文本内容 */
.rili-markdown-renderer {
  color: #d1d5db !important;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
  font-size: 15px !important;
  line-height: 1.85 !important;
  background: transparent !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 底部按钮 */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
  color: #4a8a5a !important;
  transition: color 0.3s ease, text-shadow 0.3s ease !important;
}

.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
  color: #4ade80 !important;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4) !important;
}

/* 模型名 */
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground {
  color: #3a6b4a !important;
  font-family: 'Consolas', monospace !important;
  font-size: 11px !important;
}

/* Token消耗 */
/* [Token消耗hover逻辑转换未启用]
.text-orange-500 {
  color: #b45309 !important;
  font-size: 11px !important;
}
*/

/* 自定义加载动画 */
.flex.items-center.justify-center.size-6 > .flex.gap-2 {
  display: none !important;
}

.flex.items-center.justify-center.size-6 {
  position: relative !important;
  height: 30px !important;
  width: 40px !important;
}

.flex.items-center.justify-center.size-6::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 24px !important;
  height: 24px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' stroke='%231a3a2a' stroke-width='2' fill='none'/%3E%3Ccircle cx='20' cy='20' r='16' stroke='%234ade80' stroke-width='2' fill='none' stroke-dasharray='25 75' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='20' cy='4' r='2' fill='%234ade80'%3E%3Canimate attributeName='opacity' values='1;0.3;1' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
}

.flex.items-center.justify-center.size-6::after {
  content: 'LOADING...' !important;
  position: absolute !important;
  top: calc(50% + 18px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  font-size: 8px !important;
  color: #3a6b4a !important;
  letter-spacing: 3px !important;
  font-family: 'Consolas', monospace !important;
  white-space: nowrap !important;
}

/* ═══════ 顶部栏 ═══════ */
header.flex.justify-between {
  background: linear-gradient(90deg, #080c0e 0%, #0e1517 50%, #080c0e 100%) !important;
  border-bottom: 1px solid rgba(0, 255, 100, 0.1) !important;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.6) !important;
}

#nav-middle .group.flex.items-center {
  background: rgba(0, 255, 100, 0.04) !important;
  border: 1px solid rgba(0, 255, 100, 0.1) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  transition: border-color 0.3s ease !important;
}

#nav-middle .group.flex.items-center:hover {
  border-color: rgba(0, 255, 100, 0.25) !important;
}

#nav-middle button:has(> .flex-1.truncate.text-left) .flex-1.truncate.text-left {
  color: #4ade80 !important;
  font-family: 'Consolas', monospace !important;
  font-weight: bold !important;
  letter-spacing: 1px !important;
}

#nav-middle .shrink-0.flex.items-center svg {
  color: #3a6b4a !important;
}

header.flex.justify-between.w-full.top-0 svg.lucide-clock-8 {
  color: #4a8a5a !important;
}

header.flex.justify-between.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background-color: #ef4444 !important;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6) !important;
}

header.flex.justify-between.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: #4a8a5a !important;
}

header.flex.justify-between.w-full.top-0 svg:has(use[href="#icon-icon-set"]) {
  color: #4a8a5a !important;
}

#nav-right button {
  transition: transform 0.3s ease !important;
}

#nav-right button:hover {
  transform: rotate(30deg) !important;
}

#nav-right button svg {
  color: #4a8a5a !important;
  transition: color 0.3s ease !important;
}

#nav-right button:hover svg {
  color: #4ade80 !important;
}

/* ═══════ 开场白选择器 ═══════ */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: #0e1517 !important;
  border-color: rgba(0, 255, 100, 0.12) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  border-color: rgba(0, 255, 100, 0.3) !important;
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.06) !important;
}

div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"] {
  color: #4a8a5a !important;
}

div.flex.items-center.h-9.cursor-pointer.group svgbutton:has(> .flex-1.truncate.text-left) svg {
  color: #3a6b4a !important;
}

/* ═══════ 按钮栏 ═══════ */
#ai-mod-button2 {
  background: transparent !important;
}

#ai-mod-button2 button.MuiButton-root {
  background: rgba(0, 255, 100, 0.04) !important;
  border: 1px solid rgba(0, 255, 100, 0.12) !important;
  color: #5a9a6a !important;
  border-radius: 6px !important;
  font-family: 'Consolas', monospace !important;
  font-size: 12px !important;
  transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  background: rgba(0, 255, 100, 0.08) !important;
  border-color: rgba(0, 255, 100, 0.3) !important;
  color: #4ade80 !important;
  box-shadow: 0 0 12px rgba(0, 255, 100, 0.1) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
  color: inherit !important;
}

/* ═══════ 底部栏 ═══════ */
.bg-gradient-to-t {
  background: linear-gradient(to top, #080c0e 0%, transparent 100%) !important;
}

#ai-chat-bottom-input {
  background: #0b1012 !important;
  border: 1px solid rgba(0, 255, 100, 0.12) !important;
  border-radius: 10px !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 255, 100, 0.03) !important;
  transition: border-color 0.3s ease !important;
}

#ai-chat-bottom-input:focus-within {
  border-color: rgba(0, 255, 100, 0.3) !important;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 100, 0.06) !important;
}

#ai-chat-input {
  background: transparent !important;
  color: #c8e6d0 !important;
  font-family: 'Noto Sans SC', 'PingFang SC', sans-serif !important;
  font-size: 14px !important;
  caret-color: #4ade80 !important;
}

#ai-chat-input::placeholder {
  color: #2d5a3a !important;
  font-style: italic !important;
  letter-spacing: 1px !important;
}

#ai-chat-input::selection {
  background: rgba(74, 222, 128, 0.25) !important;
  color: #fff !important;
}

/* ═══════ 分页栏 ═══════ */
.MuiPaginationItem-root {
  color: #5a8a6a !important;
  border-color: rgba(0, 255, 100, 0.1) !important;
  transition: all 0.3s ease !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(0, 255, 100, 0.06) !important;
  color: #4ade80 !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: rgba(0, 255, 100, 0.12) !important;
  color: #4ade80 !important;
  border-color: rgba(0, 255, 100, 0.3) !important;
  font-weight: bold !important;
}

.MuiPaginationItem-root.Mui-disabled {
  color: #1a3a2a !important;
}

.MuiPaginationItem-icon {
  color: #4a8a5a !important;
}

.flex.w-full.items-center.justify-between.gap-2.px-2.css-1uwir8f {
  color: #5a8a6a !important;
}

.flex.w-full.items-center.justify-between.gap-2.px-2.css-1uwir8f .MuiBox-root {
  color: #5a8a6a !important;
  font-family: 'Consolas', monospace !important;
}

.MuiInputBase-input {
  color: #c8e6d0 !important;
  background: rgba(0, 255, 100, 0.03) !important;
  border-color: rgba(0, 255, 100, 0.12) !important;
}

/* ═══════ 评论区 ═══════ */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: linear-gradient(180deg, #0a0e10 0%, #0c1214 100%) !important;
  border-color: rgba(0, 255, 100, 0.08) !important;
}

div.text-lg.font-bold {
  color: #4ade80 !important;
  font-family: 'Consolas', monospace !important;
  letter-spacing: 2px !important;
}

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

span.MuiRating-iconEmpty svg {
  color: #1a3a2a !important;
}

span.MuiRating-iconFilled svg {
  color: #f59e0b !important;
  filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.4)) !important;
}

/* [Token消耗hover逻辑转换未启用]
span.text-orange-500 {
  color: #f59e0b !important;
}
*/

div.flex.flex-col.border-gray-200 {
  border-color: rgba(0, 255, 100, 0.1) !important;
}

textarea.rc-textarea {
  background: rgba(0, 255, 100, 0.02) !important;
  color: #c8e6d0 !important;
  border-color: rgba(0, 255, 100, 0.1) !important;
  font-family: 'Noto Sans SC', sans-serif !important;
  border-radius: 6px !important;
}

textarea.rc-textarea:focus {
  border-color: rgba(0, 255, 100, 0.3) !important;
  box-shadow: 0 0 10px rgba(0, 255, 100, 0.05) !important;
}

div.bg-gray-100.text-gray-500 {
  background: rgba(0, 255, 100, 0.03) !important;
  color: #3a6b4a !important;
}

div.cursor-pointer.group.flex.items-center.justify-center {
  transition: transform 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
  transform: scale(1.1) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
  color: #4ade80 !important;
  transition: color 0.3s ease, filter 0.3s ease !important;
}

div[data-state="closed"] svg[data-icon="Send03"]:hover {
  filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5)) !important;
}

div.style_divider__mW0YX {
  background: rgba(0, 255, 100, 0.08) !important;
}

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

button.MuiButton-containedPrimary {
  background: rgba(0, 255, 100, 0.12) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(0, 255, 100, 0.2) !important;
}

button.MuiButton-outlinedPrimary {
  color: #3a6b4a !important;
  border-color: rgba(0, 255, 100, 0.1) !important;
}

button.MuiButton-outlinedPrimary:hover {
  background: rgba(0, 255, 100, 0.06) !important;
  color: #4ade80 !important;
}

div.p-3.overflow-y-auto {
  background: transparent !important;
}

div.group.ml-0 {
  border-bottom: 1px solid rgba(0, 255, 100, 0.04) !important;
  transition: background 0.2s ease !important;
}

div.group.ml-0:hover {
  background: rgba(0, 255, 100, 0.02) !important;
}

div.group img.rounded-full {
  border: 2px solid rgba(0, 255, 100, 0.15) !important;
  box-shadow: 0 0 6px rgba(0, 255, 100, 0.1) !important;
}

div.text-sm.text-grey-600 span.font-bold {
  color: #86efac !important;
}

span.text-\[10px\] {
  color: #3a6b4a !important;
  background: rgba(0, 255, 100, 0.05) !important;
  border-radius: 3px !important;
  padding: 1px 4px !important;
}

div.break-all {
  color: #b0c4b8 !important;
  line-height: 1.7 !important;
}

div.text-xs.text-grey-600 {
  color: #2d5a3a !important;
}

button.text-gray-400 {
  color: #2d5a3a !important;
  transition: color 0.3s ease !important;
}

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

button.text-gray-400 svg {
  transition: transform 0.3s ease !important;
}

button.text-gray-400:hover svg {
  transform: scale(1.15) !important;
}

span.cursor-pointer {
  color: #3a6b4a !important;
  transition: color 0.3s ease !important;
}

span.cursor-pointer:hover {
  color: #4ade80 !important;
}

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

/* ═══════ 移动端适配 ═══════ */
@media (max-width: 480px) {
  .rili-markdown-renderer .doomsday-panel {
    margin: 10px 0 !important;
    border-radius: 6px !important;
  }
  .rili-markdown-renderer .panel-header {
    padding: 10px 12px !important;
  }
  .rili-markdown-renderer .panel-title {
    font-size: 12px !important;
    letter-spacing: 1px !important;
  }
  .rili-markdown-renderer .panel-section {
    padding: 8px 10px !important;
  }
  .rili-markdown-renderer .info-row .label,
  .rili-markdown-renderer .info-row .value {
    font-size: 11px !important;
  }
  .rili-markdown-renderer .bar {
    height: 14px !important;
  }
  .rili-markdown-renderer .bar-fill {
    font-size: 8px !important;
  }
  .flex.items-center.justify-center.size-6 {
    height: 26px !important;
    width: 36px !important;
  }
  .flex.items-center.justify-center.size-6::before {
    width: 20px !important;
    height: 20px !important;
  }
}

/* ═══════ 低动效偏好 ═══════ */
@media (prefers-reduced-motion: reduce) {
  .is-user > .border.border-muted,
.is-assistant > .border.border-muted,
  .is-user > .border.border-muted,
.is-assistant > .border.border-muted:hover {
    transition: none !important;
  }
}