
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap');

/* ===== 根变量 ===== */
:root {
  --blood: #8B0000;
  --flesh: #3D0C0C;
  --bone: #F5E6D3;
  --acid: #9ACD32;
  --shadow: rgba(0,0,0,0.8);
  --dark-bg: #0a0000;
}

/* ===== 主容器 ===== */
.maw-container {
  font-family: 'Noto Serif SC', serif;
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1515 50%, #1a0a0a 100%);
  color: var(--bone);
  padding: 20px;
  border: 3px solid var(--blood);
  border-radius: 8px;
  box-shadow: 0 0 20px var(--blood), inset 0 0 30px var(--shadow);
  position: relative;
  overflow: hidden;
}

.maw-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%238B0000' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  animation: pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.02); }
}

/* ===== 动态眼睛CSS ===== */
.eye-container {
  display: inline-block;
  position: relative;
  width: 32px;
  height: 22px;
  vertical-align: middle;
}

.eyeball {
  width: 32px;
  height: 22px;
  background: radial-gradient(circle at 50% 50%, #e8e8e8 20%, #a0a0a0 80%, #700 100%);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 2px solid #600;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.3), 0 0 5px rgba(139,0,0,0.5);
  animation: eyeTwitch 8s ease-in-out infinite;
}

.iris {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 30% 30%, #8B0000 0%, #4a0000 50%, #1a0000 100%);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: nervousLook 3s infinite alternate cubic-bezier(0.1,0.7,1.0,0.1);
}

.pupil {
  width: 5px;
  height: 5px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 3px #000;
}

.pupil::after {
  content: "";
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  position: absolute;
  top: 0px;
  left: 0px;
}

.eyelid {
  position: absolute;
  width: 100%;
  height: 50%;
  background: linear-gradient(180deg, #2a1515 0%, #1a0a0a 100%);
  left: 0;
  z-index: 10;
  animation: blink 4s ease-in-out infinite;
}

.eyelid.top { top: -50%; border-radius: 50% 50% 0 0; }
.eyelid.bottom { bottom: -50%; border-radius: 0 0 50% 50%; }

@keyframes blink {
  0%, 45%, 55%, 100% { transform: translateY(0); }
  48%, 52% { transform: translateY(50%); }
}

@keyframes nervousLook {
  0% { transform: translate(-50%, -50%); }
  8% { transform: translate(-140%, -50%); }
  15% { transform: translate(-50%, -50%); }
  30% { transform: translate(70%, -100%); }
  50% { transform: translate(-50%, 70%); }
  65% { transform: translate(-50%, -50%) scale(1.3); }
  80% { transform: translate(100%, -40%); }
  100% { transform: translate(-50%, -50%); }
}

@keyframes eyeTwitch {
  0%, 95%, 100% { transform: scale(1); }
  96% { transform: scale(1.05) rotate(2deg); }
  97% { transform: scale(0.98) rotate(-1deg); }
}

.bloodshot {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: 
    linear-gradient(45deg, transparent 45%, rgba(139,0,0,0.3) 50%, transparent 55%),
    linear-gradient(-30deg, transparent 40%, rgba(139,0,0,0.2) 45%, transparent 50%);
  border-radius: 50%;
  pointer-events: none;
}

/* ===== 状态面板 ===== */
.status-panel {
  background: linear-gradient(180deg, #2a0f0f 0%, #1a0808 100%);
  border: 2px solid var(--blood);
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: 0 4px 15px rgba(139,0,0,0.5);
}

.status-title {
  text-align: center;
  font-size: 1.2em;
  color: var(--blood);
  text-shadow: 0 0 10px var(--blood);
  margin-bottom: 15px;
  border-bottom: 1px solid var(--blood);
  padding-bottom: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  padding: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
}

.stat-label { font-weight: bold; min-width: 100px; }

.stat-bar {
  flex: 1;
  height: 20px;
  background: #1a0505;
  border-radius: 10px;
  margin: 0 10px;
  overflow: hidden;
  border: 1px solid #4a1a1a;
}

.stat-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.stat-fill.digest { background: linear-gradient(90deg, #4a0000, #8B0000, #ff4444); }
.stat-fill.sanity { background: linear-gradient(90deg, #2d0a4e, #6a0dad, #9932CC); }
.stat-value { min-width: 50px; text-align: right; font-weight: bold; }

/* ===== 感官面板 ===== */
.sense-panel {
  background: linear-gradient(180deg, #1a1a2a 0%, #0a0a15 100%);
  border: 2px solid #3a3a6a;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
}

.sense-title {
  text-align: center;
  color: #8888cc;
  font-size: 1.1em;
  margin-bottom: 12px;
  text-shadow: 0 0 8px #4444aa;
}

.sense-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sense-box {
  background: rgba(60,60,100,0.2);
  border: 1px solid #4a4a7a;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.sense-icon { font-size: 1.5em; margin-bottom: 8px; }
.sense-label { font-size: 0.85em; color: #9999cc; margin-bottom: 6px; }
.sense-content { font-size: 0.9em; color: var(--bone); line-height: 1.4; }

/* ===== 房屋地图 ===== */
.map-panel {
  background: linear-gradient(180deg, #0f0f1a 0%, #050510 100%);
  border: 2px solid #700;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
  box-shadow: inset 0 0 30px #500;
}

.map-title {
  text-align: center;
  color: #a00;
  font-size: 1.1em;
  margin-bottom: 12px;
  text-shadow: 0 0 15px #f00;
  letter-spacing: 3px;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.map-cell {
  background: linear-gradient(135deg, #0a0000 0%, #180000 100%);
  border: 2px solid #600;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
  min-height: 80px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 25px #000, 0 5px 20px #000;
}

.map-cell.current {
  border-color: #00ff88;
  box-shadow: 0 0 20px rgba(0,255,136,0.5), inset 0 0 15px rgba(0,255,136,0.2);
  animation: currentPulse 2s ease-in-out infinite;
}

.map-cell.danger {
  border-color: #ff0000;
  box-shadow: 0 0 15px rgba(255,0,0,0.5);
  animation: dangerPulse 0.8s infinite;
}

.map-cell.unexplored {
  background: linear-gradient(135deg, #050005 0%, #0a000a 100%);
  border-style: dashed;
  opacity: 0.7;
}

@keyframes currentPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,255,136,0.5); }
  50% { box-shadow: 0 0 35px rgba(0,255,136,0.8); }
}

@keyframes dangerPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

.cell-id { 
  font-size: 0.65rem; 
  color: #600; 
  position: absolute; 
  top: 3px; 
  left: 6px; 
}

.cell-name { 
  font-size: 1rem; 
  color: #a00; 
  margin-bottom: 3px;
  text-shadow: 0 0 8px #000;
}

.cell-desc {
  font-size: 0.75rem;
  color: #600;
  margin-bottom: 5px;
}

.cell-markers { 
  font-size: 1.2em;
  margin-top: 5px;
}

.map-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  font-size: 0.8em;
  color: #888;
  padding: 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 5px;
}

.legend-item { display: flex; align-items: center; gap: 4px; }

/* ===== 环境信息 ===== */
.env-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.env-box {
  background: rgba(139,0,0,0.2);
  border: 1px solid var(--blood);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.env-label { font-size: 0.8em; color: #aa6666; }
.env-value { font-size: 1em; color: var(--bone); margin-top: 5px; }

/* ===== 记忆回廊样式 ===== */
.memory-corridor {
  background: linear-gradient(180deg, #0a0508 0%, #1a0a0f 50%, #0d0609 100%);
  border: 1px solid #3d1a1a;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 
    0 0 20px rgba(80,0,0,0.4),
    inset 0 0 30px rgba(0,0,0,0.8);
  overflow: hidden;
  position: relative;
}

.memory-corridor::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* 折叠标题栏 */
.memory-summary {
  background: linear-gradient(90deg, #1a0808 0%, #2d0f0f 50%, #1a0808 100%);
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #4a1f1f;
  transition: all 0.3s ease;
  list-style: none;
}

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

.memory-summary:hover {
  background: linear-gradient(90deg, #2a0f0f 0%, #3d1515 50%, #2a0f0f 100%);
  text-shadow: 0 0 10px #ff3333;
}

.memory-main-title {
  font-size: 1.1em;
  color: #c9a0a0;
  text-shadow: 0 0 8px rgba(139,0,0,0.6);
  letter-spacing: 3px;
}

.fold-indicator {
  color: #8b0000;
  font-size: 0.9em;
  transition: transform 0.4s ease;
}

details[open] .fold-indicator {
  transform: rotate(180deg);
}

/* 内容区域 */
.memory-content {
  padding: 15px;
  animation: fadeBlood 0.5s ease;
}

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

.memory-config {
  text-align: center;
  font-size: 0.75em;
  color: #5a3a3a;
  padding: 8px;
  border-bottom: 1px dashed #3d1a1a;
  background: rgba(20,5,5,0.6);
  font-family: monospace;
}

.memory-section-title {
  color: #a06060;
  font-size: 0.9em;
  padding: 8px 0;
  margin: 10px 0 8px 0;
  border-bottom: 1px solid #2d1515;
  display: flex;
  align-items: center;
  gap: 8px;
}

.memory-section-title::before,
.memory-section-title::after {
  content: "†";
  color: #4a1f1f;
  font-size: 0.8em;
}

/* 记忆表格 */
.memory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8em;
}

.memory-table th {
  background: linear-gradient(180deg, #1f0a0a, #150606);
  color: #8b4040;
  padding: 8px 6px;
  text-align: left;
  border-bottom: 1px solid #4a1f1f;
  font-weight: normal;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
}

.memory-table td {
  padding: 10px 6px;
  color: #9a7070;
  border-bottom: 1px solid #1f0a0a;
  vertical-align: top;
}

.memory-table tr:hover td {
  background: rgba(80,20,20,0.2);
  color: #c9a0a0;
}

.memory-empty {
  text-align: center;
  color: #3d2020;
  font-style: italic;
  padding: 15px;
}

.memory-no {
  color: #5a2020;
  font-family: monospace;
}

.memory-time {
  color: #6a4040;
  font-family: monospace;
  font-size: 0.9em;
}

.memory-scene {
  color: #8b5050;
}

.memory-event {
  color: #a08080;
  line-height: 1.4;
}

/* 血滴装饰动画 */
.blood-drip {
  position: absolute;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, #4a0000);
  animation: drip 3s infinite;
  opacity: 0.6;
}

@keyframes drip {
  0%, 100% { height: 0; opacity: 0; }
  50% { height: 20px; opacity: 0.6; }
}

/* ===== 行动面板 ===== */
.action-panel {
  background: linear-gradient(180deg, #0f1a0f 0%, #081208 100%);
  border: 2px solid #2a4a2a;
  border-radius: 10px;
  padding: 15px;
  margin: 15px 0;
}

.action-title {
  text-align: center;
  color: #66aa66;
  font-size: 1.1em;
  margin-bottom: 15px;
  text-shadow: 0 0 8px #228822;
}

.action-grid { 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 10px; 
}

.action-btn {
  background: linear-gradient(180deg, #1a2a1a 0%, #0a150a 100%);
  border: 2px solid #3a5a3a;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.action-btn:hover {
  border-color: #66aa66;
  box-shadow: 0 0 15px rgba(102,170,102,0.5);
  transform: translateY(-2px);
}

.action-btn.danger { border-color: #8B0000; }
.action-btn.danger:hover { 
  border-color: #ff4444; 
  box-shadow: 0 0 15px rgba(255,68,68,0.5); 
}

.action-icon { font-size: 1.5em; margin-bottom: 5px; }
.action-name { font-weight: bold; color: var(--bone); }
.action-desc { font-size: 0.8em; color: #888; margin-top: 5px; }

/* ===== 死亡计数器 ===== */
.death-counter {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(139,0,0,0.9);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 1.1em;
  animation: deathFlicker 2s infinite;
  box-shadow: 0 0 15px #f00;
}

@keyframes deathFlicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}


/* ==============================================
   [外观] 深渊风格聊天框 (配合恐怖动画)
   ============================================== */

/* 1. 聊天框整体容器：深色背景 + 微弱红光 */
.bg-gray-100\/90.relative.inline-block {
    background: #1a1a1a !important; /* 深灰近黑 */
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%) !important;
    border: 1px solid #3d1e1e !important; /* 暗红色边框 */
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), 0 0 10px rgba(100, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* 2. 文本内容：确保在深色背景上的绝对可读性 */
.markdown-body {
    color: #e0e0e0 !important; /* 灰白色高对比度文本 */
    font-family: 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.6 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8) !important; /* 增加文字阴影提升清晰度 */
}

/* 代码块背景微调，防止太亮刺眼 */
.markdown-body pre, 
.markdown-body code {
    background-color: #2a2a2a !important;
    color: #f0f0f0 !important;
    border: 1px solid #444 !important;
}

/* 3. 底部附加元素：高对比度适配 */
/* 底部按钮 (复制/编辑等) */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #a0a0a0 !important;
}
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #ff4d4d !important; /* 悬停时变红 */
    background-color: rgba(255, 0, 0, 0.1) !important;
}

/* 模型名称 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #666 !important;
    font-size: 0.75rem !important;
}

/* Token消耗 */
.text-orange-500 {
    color: #d65d5d !important; /* 暗淡的红色 */
}

/* 4. [规则] 移除顶部颜色条 (破坏氛围) */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* ==============================================
   [核心] 恐怖风格加载动画 - 诡眼凝视 (SMIL SVG)
   ============================================== */

/* 1. 隐藏平台默认的三个点加载动画 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 2. 重塑加载容器，为诡眼腾出空间 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 100px !important; /* 加宽以容纳多只眼睛 */
    height: 40px !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

/* 3. 使用伪元素植入SVG动画
   注意：使用SMIL动画确保在CSS动画被禁用时依然生效
   DataURI内容：三只眼睛，瞳孔为血红，眼皮使用ry属性控制开合
*/
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    position: absolute !important;
    inset: -10px -20px !important; /* 稍微扩大显示区域 */
    z-index: 10 !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    opacity: 0.9 !important;
    /* 
       SVG 解释:
       定义了三组椭圆(眼白)和圆(红瞳)
       使用 <animate> 标签控制椭圆的垂直半径(ry)从0到展开再到0，模拟眨眼
       不同眼睛设置了不同的 begin 时间，制造无序恐怖感
    */
    background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 40'%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='1.5' result='coloredBlur'/%3E%3CfeMerge%3E%3CfeMergeNode in='coloredBlur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C!-- Eye 1 (Left) --%3E%3Cg transform='translate(20, 20)'%3E%3Cellipse cx='0' cy='0' rx='12' ry='0' fill='%23d1d1d1'%3E%3Canimate attributeName='ry' values='0;8;8;0;0' keyTimes='0;0.1;0.4;0.5;1' dur='4s' repeatCount='indefinite' begin='0s' /%3E%3C/ellipse%3E%3Ccircle cx='0' cy='0' r='3' fill='%238a0000' filter='url(%23glow)' opacity='0'%3E%3Canimate attributeName='opacity' values='0;1;1;0;0' keyTimes='0;0.1;0.4;0.5;1' dur='4s' repeatCount='indefinite' begin='0s' /%3E%3C/circle%3E%3C/g%3E%3C!-- Eye 2 (Center) --%3E%3Cg transform='translate(50, 20)'%3E%3Cellipse cx='0' cy='0' rx='14' ry='0' fill='%23e0e0e0'%3E%3Canimate attributeName='ry' values='0;0;10;10;0;0' keyTimes='0;0.2;0.3;0.6;0.7;1' dur='3.5s' repeatCount='indefinite' begin='0s' /%3E%3C/ellipse%3E%3Ccircle cx='0' cy='0' r='4' fill='%23ff0000' filter='url(%23glow)' opacity='0'%3E%3Canimate attributeName='opacity' values='0;0;1;1;0;0' keyTimes='0;0.2;0.3;0.6;0.7;1' dur='3.5s' repeatCount='indefinite' begin='0s' /%3E%3C/circle%3E%3C/g%3E%3C!-- Eye 3 (Right) --%3E%3Cg transform='translate(80, 20)'%3E%3Cellipse cx='0' cy='0' rx='11' ry='0' fill='%23cccccc'%3E%3Canimate attributeName='ry' values='0;0;0;7;7;0' keyTimes='0;0.4;0.5;0.8;0.9;1' dur='4.2s' repeatCount='indefinite' begin='0s' /%3E%3C/ellipse%3E%3Ccircle cx='0' cy='0' r='3' fill='%23600000' filter='url(%23glow)' opacity='0'%3E%3Canimate attributeName='opacity' values='0;0;0;1;1;0' keyTimes='0;0.4;0.5;0.8;0.9;1' dur='4.2s' repeatCount='indefinite' begin='0s' /%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") !important;
}

/* ==============================================
   [全局界面] 红黑恐怖风 - 界面框架美化
   ============================================== */

/* --- 1. 顶部栏美化 --- */
/* 主容器：黑红渐变背景 + 血色下边框 */
.sticky.w-full.top-0.flex.items-center {
    background: linear-gradient(180deg, #050505 0%, #1a0505 100%) !important;
    border-bottom: 1px solid #4a0000 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9) !important;
}

/* 模型选择器：暗化背景 */
#ai-model-selector .group.flex.items-center {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #3d1e1e !important;
    color: #e0e0e0 !important;
}

/* 模型名称文字 */
#ai-model-selector .truncate.text-\[13px\] {
    color: #ffcccc !important; /* 惨淡的粉红白色 */
    font-weight: bold !important;
}

/* 下拉箭头与设置按钮图标 */
#ai-model-selector .shrink-0.flex.items-center svg,
#header-setting-button {
    color: #8a0000 !important; /* 暗红色图标 */
}

/* 1. 输入框外层容器：深色背景 */
#ai-chat-bottom-input {
    background-color: #0d0d0d !important;
    border: 1px solid #333333 !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6) !important;
}

/* 输入框容器：深色背景 */
#ai-chat-bottom-input {
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    border-radius: 10px !important;
  caret-color: #ff4444 !important; /* 光标颜色（可选：红色光标） */
}


/* 3. 占位符文字：暗灰色 */
#ai-chat-input::placeholder {
    color: #666666 !important;
    opacity: 1 !important;
}

/* 4. 输入框获得焦点时：微弱红光边框 */
#ai-chat-bottom-input:focus-within {
    border-color: #660000 !important;
    box-shadow: 0 0 12px rgba(100, 0, 0, 0.3) !important;
}

/* 5. 底部背景区域：统一暗化 */
.bg-gradient-to-t {
    background: linear-gradient(to top, #000000 70%, transparent) !important;
}

/* 6. 发送按钮图标：白色/红色 */
button[type="submit"] svg,
svg[data-icon="Send03"] {
    color: #cccccc !important;
}
button[type="submit"]:hover svg,
svg[data-icon="Send03"]:hover {
    color: #ff3333 !important;
}

/* --- 3. 按钮栏与开场白 --- */
/* 开场白选择器：暗化 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
    background-color: #111 !important;
    border-color: #4a0000 !important;
}
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] svg {
    color: #cc0000 !important;
}

/* 功能按钮组：幽灵红风格 */
#ai-mod-button2 button.MuiButton-root {
    background-color: rgba(20, 0, 0, 0.6) !important;
    border: 1px solid #330000 !important;
    color: #b0b0b0 !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
    background-color: #330000 !important;
    color: #ff0000 !important;
    border-color: #ff0000 !important;
}

/* --- 4. 分页栏美化 --- */
/* 普通页码 */
.MuiPaginationItem-root {
    color: #888 !important;
}
/* 选中页码：血红背景 */
.MuiPaginationItem-root.Mui-selected {
    background-color: #660000 !important;
    color: #ffffff !important;
    font-weight: bold !important;
}
/* 跳转输入框 */
.MuiInputBase-input {
    color: #fff !important;
    background-color: #1a1a1a !important;
    border: 1px solid #333 !important;
    text-align: center !important;
}

/* --- 5. 评论区深度美化 --- */
/* 评论区主容器背景：覆盖原本的白色 */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
    background-color: #050505 !important;
    border-top: 2px solid #3d0000 !important;
}

/* 标题 "评论(x)" */
div.text-lg.font-bold {
    color: #ff3333 !important; /* 亮红色标题 */
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5) !important;
}

/* 评分星星：血星 */
span.MuiRating-iconFilled svg {
    color: #cc0000 !important; /* 红色实心星 */
}
span.MuiRating-iconEmpty svg {
    color: #333333 !important; /* 暗灰色空心星 */
}
span.text-orange-500 {
    color: #ff6666 !important; /* 评分数字变红 */
}

/* 评论输入框 */
textarea.rc-textarea {
    background-color: #111 !important;
    color: #eee !important;
    border: 1px solid #333 !important;
}
div.bg-gray-100.text-gray-500 {
    background-color: #1a1a1a !important; /* 字数统计背景 */
    color: #666 !important;
}

/* 发送按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
    background-color: #1a1a1a !important;
}
div[data-state="closed"] svg[data-icon="Send03"] {
    color: #ff0000 !important;
}

/* 评论列表项 */
/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
    color: #aa0000 !important; /* 暗红用户名 */
}
/* 评论内容 */
div.break-all {
    color: #cccccc !important; /* 灰白正文 */
}
/* 时间戳 */
div.text-xs.text-grey-600 {
    color: #555 !important;
}
/* 分割线 */
div.style_divider__mW0YX {
    background-color: #330000 !important;
    opacity: 0.5 !important;
}

/* ===== 正文容器 ===== */
.story-content {
  background: linear-gradient(180deg, #0d0809 0%, #150a0c 100%);
  border: 1px solid #2d1515;
  border-radius: 8px;
  padding: 20px 25px;
  margin: 15px 0;
  line-height: 1.9;
  font-size: 0.95em;
  color: #b8a0a0;
  box-shadow: 
    0 0 25px rgba(60,0,0,0.3),
    inset 0 0 40px rgba(0,0,0,0.6);
  position: relative;
}

.story-content::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: 8px;
}

/* ===== 段落基础 ===== */
.story-content p {
  margin: 12px 0;
  text-indent: 2em;
}

/* ===== 角色对话样式 ===== */

/* 玩家/User - 淡蓝白色 */
.dialog-user {
  color: #a8c8d8;
  text-shadow: 0 0 8px rgba(100,180,220,0.3);
}
.dialog-user::before {
  content: "「";
  color: #5a8a9a;
}
.dialog-user::after {
  content: "」";
  color: #5a8a9a;
}

/* 白鸟 棘 - 冷银白色 */
.dialog-shiratori {
  color: #d0d8e0;
  text-shadow: 0 0 10px rgba(180,200,220,0.4);
  font-style: italic;
}
.dialog-shiratori::before {
  content: "『";
  color: #8090a0;
}
.dialog-shiratori::after {
  content: "』";
  color: #8090a0;
}

/* "它"/怪物 - 腐烂暗红 */
.dialog-creature {
  color: #8b3a3a;
  text-shadow: 0 0 12px rgba(139,0,0,0.6);
  font-weight: bold;
  letter-spacing: 2px;
  animation: creatureVoice 0.1s infinite;
}
.dialog-creature::before {
  content: "⸢";
  color: #4a0000;
}
.dialog-creature::after {
  content: "⸥";
  color: #4a0000;
}
@keyframes creatureVoice {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

/* NPC/其他角色 - 暗黄色 */
.dialog-npc {
  color: #c9b896;
  text-shadow: 0 0 6px rgba(180,160,100,0.3);
}
.dialog-npc::before {
  content: "「";
  color: #8a7a50;
}
.dialog-npc::after {
  content: "」";
  color: #8a7a50;
}

/* ===== 旁白/环境描写 ===== */
.narration {
  color: #7a6868;
  font-style: italic;
  border-left: 2px solid #3d2020;
  padding-left: 15px;
  margin: 15px 0;
}

/* 环境音效/氛围描写 */
.sfx {
  color: #5a4a4a;
  text-align: center;
  font-size: 0.85em;
  letter-spacing: 4px;
  margin: 18px 0;
}
.sfx::before,
.sfx::after {
  content: " ——— ";
  color: #3d2525;
}

/* ===== 重点文字样式 ===== */

/* 重要关键词 - 加粗标红 */
.key {
  color: #cc3333;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(200,0,0,0.5);
}

/* 危险警告 - 闪烁红 */
.danger-text {
  color: #ff2222;
  font-weight: bold;
  text-shadow: 0 0 15px rgba(255,0,0,0.7);
  animation: dangerPulse 1s infinite;
}
@keyframes dangerPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 神秘/未知 - 紫红模糊 */
.mystery {
  color: #9944aa;
  text-shadow: 0 0 10px rgba(150,50,180,0.6);
  font-style: italic;
}

/* 记忆/回忆片段 - 褪色效果 */
.memory-text {
  color: #6a5858;
  opacity: 0.8;
  font-style: italic;
  border-left: 2px dashed #4a3030;
  padding-left: 12px;
}

/* 低语/细小声音 */
.whisper {
  color: #5a4545;
  font-size: 0.85em;
  letter-spacing: 1px;
}

/* 尖叫/强调 */
.scream {
  color: #ee4444;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: 0 0 12px rgba(255,50,50,0.6);
}

/* ===== 角色名称标签 ===== */
.speaker {
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 3px;
  margin-right: 8px;
  font-weight: bold;
}

.speaker-user {
  background: rgba(100,160,200,0.2);
  color: #7ab8d8;
  border: 1px solid #4a7a90;
}

.speaker-shiratori {
  background: rgba(180,200,220,0.15);
  color: #a8b8c8;
  border: 1px solid #6a7a8a;
}

.speaker-creature {
  background: rgba(139,0,0,0.3);
  color: #aa4444;
  border: 1px solid #6a1a1a;
}

.speaker-npc {
  background: rgba(180,160,100,0.2);
  color: #b8a878;
  border: 1px solid #7a6a40;
}

/* ===== 分隔线 ===== */
.story-divider {
  text-align: center;
  color: #3d2020;
  margin: 25px 0;
  letter-spacing: 8px;
}

/* ===== 章节标题 ===== */
.chapter-title {
  text-align: center;
  color: #8b4040;
  font-size: 1.2em;
  letter-spacing: 5px;
  margin: 20px 0;
  text-shadow: 0 0 15px rgba(139,0,0,0.5);
}
.chapter-title::before,
.chapter-title::after {
  content: " ━━━ ";
  color: #4a2020;
}