/* ==========================================================================
   红军班智能体 UI · 黑金战术风（篝火电台徽章 / 电影对白条 / 围炉夜话）
   严禁蓝紫渐变、白底卡片、Emoji、浏览器默认控件样式
   ========================================================================== */

/* ---------- 1. 篝火电台徽章（沙盘 & 作战舱右下角） ---------- */
.campfire-badge {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 42;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(214, 163, 68, 0.52);
  background: radial-gradient(circle at 22% 50%, rgba(198, 42, 31, 0.28), rgba(15, 13, 11, 0.94) 68%);
  color: #f4ebd8;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(214, 163, 68, 0.16) inset;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: var(--font-sans, "Noto Sans SC", "Microsoft YaHei", sans-serif);
}

.campfire-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(242, 211, 139, 0.85);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 22px rgba(198, 42, 31, 0.32);
}

.campfire-badge.in-cabin {
  position: absolute;
  right: 22px;
  bottom: 18px;
  z-index: 25;
}

.campfire-badge.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

body.is-intro #btn-campfire-badge,
body.is-cine #btn-campfire-badge,
body.is-cabin #btn-campfire-badge {
  display: none;
}

.cb-ring {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(145deg, #f2d38b, #a86c22 55%, #c62a1f);
  flex: none;
}

.cb-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
  background: #15130f;
}

.cb-ember {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e55330;
  border: 2px solid #15130f;
  box-shadow: 0 0 8px rgba(229, 83, 48, 0.9);
  animation: emberBreath 2.4s ease-in-out infinite;
}

@keyframes emberBreath {
  0%, 100% { transform: scale(0.92); box-shadow: 0 0 6px rgba(229, 83, 48, 0.7); }
  50% { transform: scale(1.14); box-shadow: 0 0 14px rgba(242, 162, 68, 0.95); }
}

.cb-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.cb-meta strong {
  font-family: var(--font-serif, "Noto Serif SC", "Songti SC", serif);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #f2d38b;
}

.cb-meta small {
  font-size: 11px;
  color: rgba(244, 235, 216, 0.68);
  margin-top: 2px;
}

/* ---------- 作战舱互动页底部智能体触发条 ---------- */
.cabin-agent-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 190px 10px 16px;
  background: linear-gradient(90deg, rgba(21, 19, 15, 0.96), rgba(32, 24, 18, 0.94));
  border-top: 1px solid rgba(214, 163, 68, 0.24);
  flex: none;
}

.cabin-agent-dock-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(244, 235, 216, 0.8);
}

.cabin-agent-dock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d6a344;
  box-shadow: 0 0 8px rgba(214, 163, 68, 0.7);
}

.cabin-agent-dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-agent-cta {
  appearance: none;
  border: 1px solid rgba(214, 163, 68, 0.58);
  background: linear-gradient(180deg, rgba(198, 42, 31, 0.88), rgba(138, 24, 17, 0.94));
  color: #fdf6e6;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 7px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.btn-agent-cta:hover {
  border-color: #f2d38b;
  box-shadow: 0 0 16px rgba(198, 42, 31, 0.45);
  transform: translateY(-1px);
}

.btn-agent-cta.is-gold {
  background: linear-gradient(180deg, rgba(214, 163, 68, 0.24), rgba(154, 108, 32, 0.22));
  color: #f2d38b;
}

.btn-agent-cta.is-highlight {
  box-shadow: 0 0 0 2px rgba(242, 211, 139, 0.4), 0 0 22px rgba(198, 42, 31, 0.55);
}

/* ---------- 2. 电影对白条（作战舱底部黑金无框浮层） ---------- */
.agent-strip {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  z-index: 30;
  border-radius: 6px;
  border: 1px solid rgba(214, 163, 68, 0.36);
  background: linear-gradient(180deg, rgba(16, 14, 12, 0.93) 0%, rgba(10, 9, 8, 0.97) 100%);
  box-shadow: 0 -10px 38px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 236, 200, 0.06) inset;
  backdrop-filter: blur(12px);
  color: #f6eedc;
  overflow: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.agent-strip[hidden] {
  display: none;
}

/* trio 三人交锋顶部亮灯指示条 */
.strip-trio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(214, 163, 68, 0.18);
  background: rgba(24, 19, 14, 0.85);
}

.strip-trio-bar[hidden] {
  display: none;
}

.trio-kicker {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #d6a344;
  font-weight: 600;
}

.trio-avatars {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trio-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  border: 1px solid rgba(255, 236, 200, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(246, 238, 220, 0.56);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
}

.trio-pill img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(0.55) brightness(0.75);
  transition: filter 0.2s ease;
}

.trio-pill.is-done {
  color: rgba(246, 238, 220, 0.85);
  border-color: rgba(214, 163, 68, 0.34);
}

.trio-pill.is-done img {
  filter: none;
}

.trio-pill.is-active {
  color: #f2d38b;
  border-color: #f2d38b;
  background: rgba(198, 42, 31, 0.26);
  box-shadow: 0 0 14px rgba(214, 163, 68, 0.28);
}

.trio-pill.is-active img {
  filter: none;
}

.trio-lamp {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 236, 200, 0.2);
}

.trio-pill.is-active .trio-lamp {
  background: #f2d38b;
  box-shadow: 0 0 8px #f2d38b;
}

.trio-pill.is-done .trio-lamp {
  background: #2f9e72;
}

/* 对白条主体三栏 */
.strip-main {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}

.strip-portrait {
  position: relative;
  width: 128px;
  height: 156px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(214, 163, 68, 0.42);
  background: #0d0b09;
  flex: none;
}

.strip-portrait img,
.strip-portrait video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.ai-cast-tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2px 6px;
  background: rgba(10, 9, 8, 0.78);
  color: rgba(242, 211, 139, 0.88);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
  border-top: 1px solid rgba(214, 163, 68, 0.22);
}

.strip-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.strip-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.strip-nameplate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 12px;
  border-left: 3px solid #c62a1f;
  background: rgba(214, 163, 68, 0.12);
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2d38b;
}

.strip-role-title {
  font-size: 12px;
  color: rgba(246, 238, 220, 0.62);
}

/* 声波动效 */
.strip-wave {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
  margin-left: 4px;
  opacity: 0.25;
  transition: opacity 0.2s ease;
}

.strip-wave.is-active {
  opacity: 1;
}

.strip-wave i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: #d6a344;
}

.strip-wave.is-active i:nth-child(1) { animation: waveBar 0.75s ease-in-out infinite 0s; }
.strip-wave.is-active i:nth-child(2) { animation: waveBar 0.65s ease-in-out infinite 0.14s; }
.strip-wave.is-active i:nth-child(3) { animation: waveBar 0.8s ease-in-out infinite 0.25s; }
.strip-wave.is-active i:nth-child(4) { animation: waveBar 0.6s ease-in-out infinite 0.1s; }
.strip-wave.is-active i:nth-child(5) { animation: waveBar 0.72s ease-in-out infinite 0.2s; }

@keyframes waveBar {
  0%, 100% { height: 4px; }
  50% { height: 15px; }
}

.strip-text {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  color: #f8f1e2;
  letter-spacing: 0.02em;
  max-height: 136px;
  overflow-y: auto;
  word-break: break-word;
}

.agent-strip.is-expanded .strip-text {
  max-height: 260px;
}

.strip-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 102px;
}

.strip-btn {
  appearance: none;
  border: 1px solid rgba(255, 236, 200, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #f2e8d4;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.strip-btn:hover {
  border-color: #d6a344;
  color: #f2d38b;
  background: rgba(214, 163, 68, 0.12);
}

.strip-btn.primary {
  border-color: rgba(214, 163, 68, 0.56);
  background: rgba(198, 42, 31, 0.85);
  color: #fff6e6;
}

.strip-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

/* 对白条内联追问输入框 */
.strip-followup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(214, 163, 68, 0.18);
  background: rgba(12, 10, 8, 0.92);
}

.strip-followup[hidden] {
  display: none;
}

.strip-followup input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(214, 163, 68, 0.34);
  border-radius: 4px;
  color: #f8f1e2;
  font-size: 15px;
  padding: 8px 12px;
  outline: none;
}

.strip-followup input:focus {
  border-color: #f2d38b;
}

/* ---------- 3. 围炉夜话（半屏面板 Dialog） ---------- */
.fireside-dlg {
  position: fixed;
  inset: auto 0 0 0;
  width: 100vw;
  max-width: 100vw;
  height: 58vh;
  min-height: 460px;
  max-height: 76vh;
  margin: 0;
  padding: 0;
  border: none;
  border-top: 2px solid rgba(214, 163, 68, 0.58);
  background: #0d0b09;
  color: #f6eedc;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.86);
  overflow: hidden;
}

.fireside-dlg::backdrop {
  background: rgba(6, 5, 4, 0.66);
  backdrop-filter: blur(5px);
}

.fireside-shell {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fireside-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) brightness(0.32) saturate(1.1);
  transform: scale(1.06);
  pointer-events: none;
  z-index: 0;
}

.fireside-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 10, 8, 0.72) 0%, rgba(16, 12, 9, 0.82) 55%, rgba(10, 9, 8, 0.96) 100%);
  pointer-events: none;
  z-index: 1;
}

.fireside-head,
.fireside-body,
.fireside-input-bar,
.fireside-roster {
  position: relative;
  z-index: 2;
}

.fireside-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px 12px;
  border-bottom: 1px solid rgba(214, 163, 68, 0.22);
}

.fireside-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fireside-seal {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  background: #c62a1f;
  border: 1px solid rgba(242, 211, 139, 0.65);
  display: grid;
  place-items: center;
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 16px;
  font-weight: 700;
  color: #fdf6e6;
}

.fireside-head h3 {
  margin: 0;
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: #f2d38b;
}

.fireside-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(246, 238, 220, 0.68);
}

.fireside-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fireside-body {
  flex: 1;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 16px 28px;
  min-height: 0;
  overflow: hidden;
}

.fireside-speaker-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fireside-portrait {
  position: relative;
  width: 172px;
  height: 215px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(214, 163, 68, 0.48);
  background: #14110e;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.56);
}

.fireside-portrait img,
.fireside-portrait video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.fireside-speaker-meta {
  text-align: center;
}

.fireside-speaker-meta strong {
  display: block;
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 16px;
  color: #f2d38b;
  letter-spacing: 0.08em;
}

.fireside-speaker-meta small {
  font-size: 12px;
  color: rgba(246, 238, 220, 0.65);
}

.fireside-log {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 6px;
}

.fs-msg {
  padding: 12px 16px;
  border-radius: 6px;
  line-height: 1.65;
  font-size: 16px;
  max-width: 92%;
}

.fs-msg.is-agent {
  align-self: flex-start;
  background: rgba(21, 19, 15, 0.88);
  border: 1px solid rgba(214, 163, 68, 0.28);
  border-left: 3px solid #c62a1f;
  color: #f8f1e2;
}

.fs-msg.is-user {
  align-self: flex-end;
  background: rgba(214, 163, 68, 0.16);
  border: 1px solid rgba(214, 163, 68, 0.42);
  color: #fff6e4;
}

.fs-msg-head {
  font-size: 12px;
  color: #d6a344;
  margin-bottom: 4px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.fireside-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  border-top: 1px solid rgba(214, 163, 68, 0.18);
  background: rgba(14, 12, 10, 0.9);
}

.fireside-input-bar input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(214, 163, 68, 0.36);
  border-radius: 4px;
  color: #f8f1e2;
  font-size: 16px;
  padding: 10px 14px;
  outline: none;
}

.fireside-input-bar input:focus {
  border-color: #f2d38b;
}

.btn-voice {
  appearance: none;
  border: 1px solid rgba(214, 163, 68, 0.42);
  background: rgba(255, 255, 255, 0.04);
  color: #f2d38b;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-voice.is-listening {
  border-color: #c62a1f;
  background: rgba(198, 42, 31, 0.32);
  color: #fff;
}

.fireside-voice-hint {
  font-size: 12px;
  color: rgba(246, 238, 220, 0.6);
  white-space: nowrap;
}

/* 底部四位角色铭牌 */
.fireside-roster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px 28px 16px;
  background: rgba(10, 9, 8, 0.96);
  border-top: 1px solid rgba(214, 163, 68, 0.16);
}

.roster-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid rgba(255, 236, 200, 0.14);
  background: rgba(21, 19, 15, 0.86);
  color: #f4ebd8;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.roster-card:hover {
  border-color: rgba(214, 163, 68, 0.56);
}

.roster-card.is-active {
  border-color: #f2d38b;
  background: linear-gradient(90deg, rgba(198, 42, 31, 0.26), rgba(21, 19, 15, 0.94));
  box-shadow: 0 0 16px rgba(214, 163, 68, 0.22);
}

.roster-card img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1px solid rgba(214, 163, 68, 0.45);
  flex: none;
}

.roster-card strong {
  display: block;
  font-family: var(--font-serif, "Noto Serif SC", serif);
  font-size: 15px;
  color: #f2d38b;
  letter-spacing: 0.06em;
}

.roster-card small {
  display: block;
  font-size: 11px;
  color: rgba(246, 238, 220, 0.65);
  margin-top: 2px;
}

/* 教师端预置回应提示徽章 */
.agent-fallback-pill {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f2d38b;
  background: rgba(198, 42, 31, 0.22);
  border: 1px solid rgba(214, 163, 68, 0.45);
}

@media (max-width: 900px) {
  .strip-main {
    grid-template-columns: 88px 1fr;
  }
  .strip-portrait {
    width: 88px;
    height: 110px;
  }
  .strip-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .fireside-body {
    grid-template-columns: 1fr;
  }
  .fireside-speaker-card {
    display: none;
  }
  .fireside-roster {
    grid-template-columns: repeat(2, 1fr);
  }
}
