/* ====== 潜意识漫游 (Memory Dive) 样式 ====== */

.theater-header-section { padding: 20px 16px 16px; }
.theater-header-title { font-size: 32px; font-weight: 800; color: var(--b); margin-bottom: 8px; }
.theater-header-desc { font-size: 13px; color: var(--gm); line-height: 1.5; }

.theater-tab-scroll {
  display: flex; gap: 8px; padding: 0 16px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.theater-tab-scroll::-webkit-scrollbar { display: none; }
.theater-tab-btn {
  padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; white-space: nowrap;
  background: var(--card); color: var(--gm); box-shadow: 0 2px 8px rgba(0,0,0,0.04); cursor: pointer;
  transition: all 0.2s;
}
.theater-tab-btn.active { background: var(--b); color: white; }

.theater-list-section {
  background: var(--card); margin: 0 16px 20px; border-radius: 16px; padding: 0 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.theater-list-header {
  padding: 16px 0 12px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 0.5px solid var(--gl);
}
.theater-list-header-title { font-size: 18px; font-weight: 700; color: var(--b); }
.theater-help-icon { 
  width: 20px; height: 20px; border-radius: 50%; background: var(--gl); color: var(--gm); 
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; cursor: pointer;
}

.theater-script-item { padding: 16px 0; border-bottom: 0.5px solid var(--gl); cursor: pointer; }
.theater-script-item:last-child { border-bottom: none; }
.theater-script-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.theater-script-title { font-size: 16px; font-weight: 600; color: var(--b); }
.theater-script-action {
  padding: 4px 12px; border-radius: 14px; background: rgba(0, 122, 255, 0.1);
  color: var(--blue); font-size: 12px; font-weight: 700;
}
.theater-script-desc { font-size: 13px; color: var(--gm); line-height: 1.5; }

/* === 剧场房间专属样式 === */

/* 选项按钮样式 */
.theater-option-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.theater-option-btn:active {
  background: rgba(255,255,255,0.3);
}

/* 剧场专属聊天气泡样式 */
.th-msg-row { display: flex; gap: 10px; margin-bottom: 16px; }
.th-msg-row.user { flex-direction: row-reverse; }
.th-msg-row.system { justify-content: center; }

.th-avatar { 
  width: 36px; height: 36px; border-radius: 50%; background: #ccc; 
  overflow: hidden; flex-shrink: 0; display:flex; align-items:center; 
  justify-content:center; color:#333; font-size:12px; font-weight:bold; 
}
.th-avatar img { width: 100%; height: 100%; object-fit: cover; }

.th-bubble { 
  max-width: 75%; padding: 10px 14px; border-radius: 16px; 
  font-size: 15px; line-height: 1.5; word-break: break-word; 
}

/* AI 回复：半透明毛玻璃，白字 */
.th-msg-row.ai .th-bubble { 
  background: rgba(255,255,255,0.15); 
  color: #fff; 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255,255,255,0.2); 
  border-top-left-radius: 4px;
}

/* 用户回复：蓝色背景，白字 */
.th-msg-row.user .th-bubble { 
  background: var(--blue); 
  color: #fff; 
  border-top-right-radius: 4px;
}

/* 系统提示：透明背景，灰色小字 */
.th-msg-row.system .th-bubble { 
  background: transparent; 
  color: rgba(255,255,255,0.6); 
  font-size: 13px; 
  text-align: center; 
  padding: 4px 0;
}

/* 原代码 */
.th-msg-row.system .th-bubble { background: transparent; color: rgba(255,255,255,0.6); font-size: 13px; text-align: center; padding: 4px 0; }

/* 修改代码 */
.th-msg-row.system .th-bubble { background: transparent; color: rgba(255,255,255,0.6); font-size: 13px; text-align: center; padding: 4px 0; }

/* 骰子彩色标签 */
.th-dice-tag {
  display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: bold; margin-bottom: 6px; margin-right: 6px;
}
.th-dice-tag.critical-fail { background: #FF3B30; color: white; }
.th-dice-tag.fail { background: #FF9500; color: white; }
.th-dice-tag.success { background: #34C759; color: white; }
.th-dice-tag.critical-success { background: #FFD60A; color: black; }

/* 掷骰子动画 */
@keyframes diceShake {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(15deg) scale(1.2); }
  50% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-15deg) scale(1.2); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes dicePop {
  0% { transform: scale(0.5); opacity: 0; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
