/* =========================================================================
   Ambient & Left Dock Module Styles (左侧独立多功能面板 / 白噪音混音台与扩展中心)
   ========================================================================= */

.left-dock-slot {
  position: relative;
  z-index: 15;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), inset 0 0 16px rgba(16, 185, 129, 0.03);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), margin-right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.left-dock-slot:hover {
  border-color: var(--border-bright);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.8), 0 0 12px var(--emerald-glow), inset 0 0 20px rgba(16, 185, 129, 0.05);
}

/* 顶部标签切换器 (Tabs: 白噪音混音台 / 扩展工具箱) */
.ambient-tabs-bar {
  display: flex;
  background: rgba(4, 9, 7, 0.85);
  border-bottom: 1px solid rgba(52, 211, 153, 0.18);
  padding: 4px 8px;
  gap: 4px;
  flex-shrink: 0;
}

.ambient-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  outline: none;
}

.ambient-tab-btn:hover {
  color: var(--text-muted);
  background: rgba(52, 211, 153, 0.08);
}

.ambient-tab-btn.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--emerald-bright);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.15);
}

.ambient-tab-btn svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* 主面板滚动容器 */
.left-dock-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 211, 153, 0.28) rgba(4, 9, 7, 0.6);
}

.left-dock-content::-webkit-scrollbar {
  width: 4px;
}

.left-dock-content::-webkit-scrollbar-track {
  background: rgba(4, 9, 7, 0.6);
}

.left-dock-content::-webkit-scrollbar-thumb {
  background: rgba(52, 211, 153, 0.28);
  border-radius: 2px;
}

.left-dock-content::-webkit-scrollbar-thumb:hover {
  background: var(--emerald-bright);
}

/* 视窗切换动画 */
.left-dock-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInTab 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* =========================================================================
   模块 1: 白噪音混音台 (SOUNDSCAPE MIXER)
   ========================================================================= */

/* 独立角色语音与白噪音主音量控制卡片 */
.soundscape-master-card,
.voice-master-card {
  background: rgba(3, 7, 5, 0.7);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 4px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.voice-master-card {
  background: rgba(4, 11, 8, 0.78);
  border-color: rgba(52, 211, 153, 0.32);
}

.voice-master-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.master-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
}

.master-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--emerald-bright);
}

.master-stats-badge {
  font-size: 9px;
  padding: 1px 5px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 3px;
  color: var(--emerald-pale);
}

.master-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-master-action {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--emerald-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 8px;
  border-radius: 3px;
  cursor: var(--scope-cursor);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  outline: none;
  white-space: nowrap;
}

.btn-master-action:hover {
  background: rgba(52, 211, 153, 0.25);
  color: #fff;
  border-color: var(--emerald-bright);
  box-shadow: 0 0 8px var(--emerald-glow);
}

.btn-master-action.active {
  background: rgba(16, 185, 129, 0.3);
  border-color: var(--emerald-bright);
  color: #fff;
}

.btn-master-action svg {
  width: 12px;
  height: 12px;
}

/* 场景预设快捷药丸组 (Quick Presets) */
.presets-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.presets-label {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
}

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

.preset-chip {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 3px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 5px 2px;
  text-align: center;
  cursor: var(--scope-cursor);
  transition: all 0.2s ease;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-chip:hover {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--emerald-bright);
  color: #fff;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.3);
}

.preset-chip.active {
  background: rgba(16, 185, 129, 0.28);
  border-color: var(--emerald-bright);
  color: #fff;
  font-weight: 700;
}

/* 独立声道列表 (Sound Channels Tracks) */
.channels-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channels-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.channels-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 声道分类标头 */
.channel-group-header {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--emerald-bright);
  padding: 8px 2px 4px 2px;
  margin-top: 2px;
  border-bottom: 1px dashed rgba(52, 211, 153, 0.22);
  display: flex;
  align-items: center;
  gap: 6px;
}

.channel-group-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 2px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--emerald-bright);
  letter-spacing: 0.5px;
}

.channel-group-title {
  color: var(--text-muted);
  font-size: 9.5px;
}

/* 单个音轨卡片 */
.sound-channel-card {
  background: rgba(5, 11, 8, 0.72);
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 4px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s ease;
}

.sound-channel-card:hover {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(8, 16, 12, 0.85);
}

.sound-channel-card.active {
  border-color: var(--emerald-bright);
  background: rgba(6, 20, 14, 0.85);
  box-shadow: inset 0 0 12px rgba(16, 185, 129, 0.08), 0 0 10px rgba(52, 211, 153, 0.15);
}

.channel-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.channel-main-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--text-main);
}

.channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.channel-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-dim);
  transition: stroke 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.sound-channel-card:hover .channel-icon svg {
  stroke: var(--emerald-bright);
  transform: scale(1.05);
}

.sound-channel-card.active .channel-icon svg {
  stroke: var(--emerald-bright);
  filter: drop-shadow(0 0 4px rgba(52, 211, 153, 0.6));
}

.channel-title {
  font-weight: 600;
  letter-spacing: 0.5px;
}

.channel-tag {
  font-size: 8px;
  font-family: var(--font-mono);
  padding: 1px 4px;
  border-radius: 2px;
  background: rgba(52, 211, 153, 0.1);
  color: var(--emerald-pale);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

/* 动量音量均衡器 (Equalizer Visualizer Bars) */
.channel-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 18px;
}

.viz-bar {
  flex: 1;
  background: rgba(52, 211, 153, 0.25);
  border-radius: 1px;
  height: 12px;
  transform-origin: bottom;
  transform: scaleY(0.2);
  transition: transform 0.15s ease, background 0.2s ease;
}

.sound-channel-card.active .viz-bar {
  background: var(--emerald-bright);
  animation: eqBounce 0.8s infinite ease-in-out alternate;
  will-change: transform;
}

.sound-channel-card.active .viz-bar:nth-child(2) {
  animation-delay: 0.25s;
  animation-duration: 0.65s;
}

.sound-channel-card.active .viz-bar:nth-child(3) {
  animation-delay: 0.45s;
  animation-duration: 0.9s;
}

@keyframes eqBounce {
  0% { transform: scaleY(0.18); }
  100% { transform: scaleY(1); }
}

/* 滑块与数值行 */
.channel-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.channel-toggle-btn {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: var(--scope-cursor);
  outline: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.channel-toggle-btn:hover {
  border-color: var(--emerald-bright);
  color: var(--emerald-bright);
}

.sound-channel-card.active .channel-toggle-btn {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--emerald-bright);
  color: #fff;
  box-shadow: 0 0 8px var(--emerald-glow);
}

.channel-toggle-btn svg {
  width: 10px;
  height: 10px;
  fill: currentColor;
}

/* 霓昂赛博滑动条 (Custom Cyber Sliders) */
.cyber-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(52, 211, 153, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: var(--scope-cursor);
  position: relative;
  transition: background 0.2s ease;
}

.cyber-slider:hover {
  background: rgba(52, 211, 153, 0.28);
}

.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-main);
  border: 2px solid var(--emerald-primary);
  box-shadow: 0 0 6px var(--emerald-glow);
  cursor: var(--scope-cursor);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: var(--emerald-bright);
  border-color: #fff;
  box-shadow: 0 0 10px var(--emerald-bright);
}

.cyber-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-main);
  border: 2px solid var(--emerald-primary);
  box-shadow: 0 0 6px var(--emerald-glow);
  cursor: var(--scope-cursor);
}

.channel-volume-text {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}


/* =========================================================================
   模块 2: 扩展插槽与工具中心 (EXTENSIONS // TOOLS)
   ========================================================================= */

.tools-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 专注便签挂件 (Cyber Scratchpad) */
.tool-widget-card {
  background: rgba(3, 7, 5, 0.75);
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 4px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.tool-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--emerald-bright);
  letter-spacing: 0.8px;
  font-weight: 700;
}

.tool-widget-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scratchpad-textarea {
  width: 100%;
  height: 90px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 3px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  padding: 8px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
}

.scratchpad-textarea:focus {
  border-color: var(--emerald-bright);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.25);
}

.scratchpad-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--text-dim);
}

/* 轻量待办微清单 (Quick Goals) */
.quick-todo-input-wrap {
  display: flex;
  gap: 4px;
}

.quick-todo-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 3px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 6px;
  outline: none;
}

.quick-todo-input:focus {
  border-color: var(--emerald-bright);
}

.quick-todo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text-main);
  transition: all 0.18s ease;
}

.todo-item.done {
  opacity: 0.55;
  text-decoration: line-through;
  color: var(--text-dim);
}

.todo-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border: 1px solid var(--emerald-bright);
  border-radius: 2px;
  background: transparent;
  cursor: var(--scope-cursor);
  position: relative;
  flex-shrink: 0;
}

.todo-checkbox:checked {
  background: var(--emerald-bright);
}

.todo-checkbox:checked::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 1px;
  font-size: 9px;
  color: #000;
  font-weight: 900;
}

.todo-del-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: var(--scope-cursor);
  font-size: 11px;
  padding: 0 4px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.todo-item:hover .todo-del-btn {
  opacity: 1;
}

.todo-del-btn:hover {
  color: #ef4444;
}

/* 扩展插槽占位 (Extensible Placeholder) */
.plugin-slot-card {
  border: 1px dashed rgba(52, 211, 153, 0.3);
  border-radius: 4px;
  padding: 12px 10px;
  background: rgba(2, 6, 4, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.plugin-slot-tag {
  font-size: 9px;
  letter-spacing: 0.8px;
  color: var(--emerald-primary);
  font-weight: 700;
}

.plugin-slot-hint {
  font-size: 9px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* 左侧收起浮动气泡样式已统一收敛至 css/layout.css (.cyber-floating-pill) */
