/* converted from pages/chat4/chat4.wxss */
/* miniprogram/pages/chat4/chat4.wxss */

body {
    height: 100%;
    background: #ffffff;
  }
  
  .ChatPage {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
  }
  
  .ChatHeaderBar {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    border-bottom: 0.5px solid #e8edf5;
    padding: calc(env(safe-area-inset-top) + 9px) 12px 12px;
    background: #78a6ff;
    transition: height 0.26s ease, min-height 0.26s ease;
  }
  
  .ChatHeaderBar--collapsed {
    min-height: 96px;
  }
  
  .ChatHeaderBg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
    transform: scale(1);
    transform-origin: center center;
    transition: transform 0.26s ease;
  }
  
  .ChatHeaderBar--collapsed .ChatHeaderBg {
    transform: scale(1.03);
  }
  
  .ChatHeaderFx {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
  }
  
  .ChatHeaderFx--strong {
    width: 46%;
    background: linear-gradient(90deg, rgba(2, 6, 16, 0.44) 0%, rgba(2, 6, 16, 0.40) 20%, rgba(2, 6, 16, 0.34) 42%, rgba(2, 6, 16, 0.22) 72%, rgba(2, 6, 16, 0) 100%);
  }
  
  .ChatHeaderFx--mid {
    width: 70%;
    background: linear-gradient(90deg, rgba(6, 14, 32, 0.28) 0%, rgba(6, 14, 32, 0.23) 24%, rgba(6, 14, 32, 0.16) 46%, rgba(6, 14, 32, 0.085) 72%, rgba(6, 14, 32, 0) 100%);
  }
  
  .ChatHeaderFx--light {
    width: 84%;
    background: linear-gradient(90deg, rgba(10, 20, 44, 0.10) 0%, rgba(10, 20, 44, 0.075) 28%, rgba(10, 20, 44, 0.045) 52%, rgba(10, 20, 44, 0.015) 74%, rgba(10, 20, 44, 0) 100%);
  }
  
  .ChatHeaderShade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.13) 22%, rgba(0, 0, 0, 0.085) 48%, rgba(0, 0, 0, 0.028) 70%, rgba(0, 0, 0, 0) 84%),
      linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.28) 78%, rgba(0, 0, 0, 0.38) 90%, rgba(0, 0, 0, 0.58) 100%);
  }
  
  .ChatHeaderMain {
    position: relative;
    z-index: 2;
    flex: 1;
    min-width: 0;
    padding-right: 10px;
  }
  
  .ChatHeaderTitle {
    display: block;
    margin-top: 6px;
    margin-left: 6px;
    font-size: 24px;
    line-height: 1.22;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  }
  
  .ChatHeaderSubtitle {
    display: block;
    margin-top: 0;
    margin-left: 6px;
    font-size: 11px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 3px 9px rgba(0, 0, 0, 0.16);
  }
  
  .TopAction {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 7px 11px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(255, 255, 255, 0.72);
  }
  
  .TopActionText {
    color: #4a5a72;
    font-size: 12px;
    font-weight: 700;
  }
  
  .ChatHeaderNotice {
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    z-index: 2;
    pointer-events: none;
    white-space: nowrap;
    font-size: 11.5px;
    line-height: 16px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  }
  
  .ChatBody {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #ffffff;
  }
  
  .StateWrap {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
  }
  
  .StateText {
    font-size: 14px;
    color: #6d7992;
  }
  
  .StateText--error {
    color: #d93b3b;
  }
  
  /* 初始态：这里必须和 wxml 的 IntroScroll / EmptyStage / QuestionSheet / EmptyHint 对齐 */
  .IntroScroll {
    height: 100%;
    background: #ffffff;
  }
  
  .EmptyStage {
    min-height: 100%;
    padding: 11px 12px 9px;
    box-sizing: border-box;
  }
  
  .QuestionSheet {
    min-height: 100%;
    box-sizing: border-box;
  }
  .QuestionSheet--empty {
    display: flex;
    flex-direction: column;
  }
  
  .EmptyHint {
    flex: 1;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 0.5px solid #e4ebf4;
    box-shadow: 0 6px 15px rgba(55, 89, 160, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0px 20px 20px;
    box-sizing: border-box;
  }
  
  .EmptyHintText {
    text-align: center;
    font-size: 14px;
    line-height: 1.8;
    color: #6f7b8f;
  }
  
  .IntroActionWrap {
    padding-top: 11px;
  }
  
  .PrimaryBtn {
    width: 100%;
    min-height: 44px;
    border-radius: 499.5px;
    background: linear-gradient(135deg, #eef3f8 0%, #ffffff 100%);
    border: 0.5px solid #dde4ee;
    color: #4a5a72;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  
/* 背景：上浅蓝，下很淡的浅黄 */
.StageScreen {
    position: relative;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(180deg, #eef7ff 0%, #f8fbff 42%, #fffdf7 100%);
  }
  
  .StageScreen--assistant,
  .StageScreen--user {
    background: linear-gradient(180deg, #eef7ff 0%, #f8fbff 42%, #fffdf7 100%);
  }
  
  .RippleCanvas {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(180deg, #eef7ff 0%, #f8fbff 42%, #fffdf7 100%);
  }
  .RippleLayer {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
  }
  
  .RippleGroup {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
  }
  
  .RippleGroup--active {
    opacity: 1;
  }
  
  .RippleRing,
  .RippleGlow {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4999.5px;
    pointer-events: none;
  }
  
  .RippleGroup--assistant .RippleRing,
  .RippleGroup--assistant .RippleGlow {
    top: 42%;
  }
  
  .RippleGroup--user .RippleRing,
  .RippleGroup--user .RippleGlow {
    top: calc(100% - 54px - env(safe-area-inset-bottom));
  }
  
 /* 波纹颜色 */
.RippleRing {
    opacity: 0.28;
    border: 2.5px solid rgba(92, 136, 212, 0.38);
  }
  
  .RippleGroup--user .RippleRing {
    border-color: rgba(216, 178, 52, 0.58);
  }
  
  .RippleGlow {
    width: 76px;
    height: 76px;
    opacity: 0.12;
    background: radial-gradient(circle, rgba(92, 136, 212, 0.16) 0%, rgba(92, 136, 212, 0.07) 42%, rgba(92, 136, 212, 0) 76%);
  }
  
  .RippleGroup--user .RippleGlow {
    background: radial-gradient(circle, rgba(216, 178, 52, 0.24) 0%, rgba(216, 178, 52, 0.10) 42%, rgba(216, 178, 52, 0) 76%);
  }
  
  .RippleRing--core {
    width: 39px;
    height: 39px;
  }
  
  .RippleRing--1 {
    width: 93px;
    height: 93px;
  }
  
  .RippleRing--2 {
    width: 166px;
    height: 166px;
  }
  
  .RippleRing--3 {
    width: 255px;
    height: 255px;
  }
  
  .RippleRing--4 {
    width: 350px;
    height: 350px;
  }
  
  .RippleGroup--active .RippleRing--1 {
    animation: rippleSoft 1.08s ease-out infinite;
  }
  
  .RippleGroup--active .RippleRing--2 {
    animation: rippleSoft 1.08s ease-out 0.15s infinite;
  }
  
  .RippleGroup--active .RippleRing--3 {
    animation: rippleSoft 1.08s ease-out 0.30s infinite;
  }
  
  .RippleGroup--active .RippleRing--4 {
    animation: rippleSoft 1.08s ease-out 0.45s infinite;
  }
  
  .RippleGroup--active .RippleGlow {
    animation: glowSoft 0.84s ease-in-out infinite;
  }
  
  .LyricsViewport {
    position: absolute;
    max-width: 96%;
    left: 14px;
    right: 4px;
    top: 32px;
    bottom: calc(90px + env(safe-area-inset-bottom));
    z-index: 5;
    overflow: hidden;
  }
  
  .LyricsStack {
    min-height: 100%;
    padding: 0 7px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  
  .LyricsLine {
    width: 100%;
    min-height: 27px;
    padding: 0 3px 7px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
  }
  
  .LyricsLine--user {
    justify-content: flex-end;
  }
  
  .LyricsBubble {
    max-width: 94%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  
  .LyricsText {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    word-break: break-word;
    white-space: pre-wrap;
  }
  
/* 文字颜色 */
.LyricsLine--assistant .LyricsText {
    color: #4f6d9a;
  }
  
  .LyricsLine--user .LyricsText {
    color: #9c7d22;
  }
  
  .LyricsLine--placeholder .LyricsText {
    color: #4f6d9a;
  }
  
  .StageScreen--user .LyricsLine--placeholder .LyricsText {
    color: #9c7d22;
  }
  
  .LyricsBottomAnchor {
    width: 100%;
    height: 1px;
  }
  
  .VoiceDock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
  }
  
  .VoiceCancelTag {
    margin-bottom: 9px;
    padding: 5px 12px;
    border-radius: 499.5px;
    background: rgba(255, 255, 255, 0.72);
    color: #8c98ad;
    font-size: 12px;
    font-weight: 600;
    border: 0.5px solid rgba(220, 226, 236, 0.72);
    box-shadow: 0 4px 10px rgba(72, 101, 166, 0.04);
  }
  
  .VoiceCancelTag--active {
    color: #b49709;
    border-color: rgba(220, 190, 22, 0.36);
  }
  
  .VoiceTouchBtn {
    pointer-events: auto;
    width: 66px;
    height: 66px;
    margin-bottom: 9px;
    border-radius: 33px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(214, 219, 226, 0.90);
    box-shadow: 0 7px 16px rgba(53, 74, 117, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, opacity 0.16s ease;
  }
  
  .VoiceTouchBtn--pressed {
    transform: scale(0.95);
  }
  
  .VoiceTouchBtn--disabled {
    opacity: 0.52;
  }
  
  .VoiceTouchBtnInner {
    position: relative;
    width: 30px;
    height: 36px;
  }
  
  .VoiceTouchBtnRing {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(206, 212, 220, 0.72);
  }
  
  .VoiceMicHead {
    position: absolute;
    left: 8px;
    top: 2px;
    width: 14px;
    height: 17px;
    border-radius: 9px;
    background: #7c7c7c;
  }
  
  .VoiceMicStem {
    position: absolute;
    left: 13.5px;
    top: 16px;
    width: 3px;
    height: 9px;
    border-radius: 499.5px;
    background: #7c7c7c;
  }
  
  .VoiceMicBase {
    position: absolute;
    left: 8px;
    bottom: 4px;
    width: 14px;
    height: 3px;
    border-radius: 499.5px;
    background: #7c7c7c;
  }
  
  @keyframes rippleSoft {
    0% {
      opacity: 0.40;
      transform: translate(-50%, -50%) scale(0.62);
    }
    30% {
      opacity: 0.66;
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.22);
    }
  }
  
  @keyframes glowSoft {
    0%, 100% {
      opacity: 0.12;
      transform: translate(-50%, -50%) scale(0.94);
    }
    50% {
      opacity: 0.28;
      transform: translate(-50%, -50%) scale(1.10);
    }
  }


  /* 超时提示：左右居中，只改文字颜色，不改普通台词字号/字体 */
.LyricsLine--timeout {
    width: 100%;
    justify-content: center !important;
    text-align: center;
  }
  
  .LyricsLine--timeout .LyricsBubble {
    margin-left: auto;
    margin-right: auto;
  }
  
  .LyricsLine--timeout .LyricsText {
    color: #d93025;
    text-align: center;
  }

/* =========================
   chat4 结束演练报告按钮
   ========================= */
.ReportActionDock {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: calc(97px + env(safe-area-inset-bottom));
  z-index: 9;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.ReportActionBtn {
  pointer-events: auto;
  max-width: 100%;
  min-height: 36px;
  padding: 9px 14px;
  border-radius: 499.5px;
  background: rgba(255, 255, 255, 0.82);
  border: 0.5px solid rgba(224, 96, 96, 0.36);
  box-shadow: 0 6px 14px rgba(160, 70, 70, 0.10);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.ReportActionText {
  font-size: 13px;
  line-height: 1.45;
  color: #c74242;
  font-weight: 700;
  text-align: center;
  word-break: break-word;
  white-space: normal;
}

/* =========================
   chat4 演练报告：Markdown 文字直出
   ========================= */
.LyricsLine--report {
  width: 100%;
  justify-content: flex-start !important;
  align-items: flex-start;
  padding: 0 3px 9px;
  box-sizing: border-box;
}

.ReportMarkdownCard {
  width: 94%;
  max-width: 94%;
  padding: 12px 13px 11px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.74);
  border: 0.5px solid rgba(210, 218, 230, 0.58);
  box-shadow: 0 6px 15px rgba(60, 80, 120, 0.06);
  box-sizing: border-box;
  backdrop-filter: blur(3px);
}

.ReportMarkdownCard .MdH1,
.ReportMarkdownCard .MdH2,
.ReportMarkdownCard .MdH3,
.ReportMarkdownCard .MdP {
  white-space: pre-wrap;
  word-break: break-word;
  color: #3f4652;
}

.ReportMarkdownCard .MdH1 {
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 700;
}

.ReportMarkdownCard .MdH2 {
  margin-top: 7px;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
}

.ReportMarkdownCard .MdH3 {
  margin-top: 6px;
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 700;
}

.ReportMarkdownCard .MdP {
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.75;
  font-weight: 400;
}

.ReportMarkdownCard .MdList {
  margin: 4px 0 6px;
}

.ReportMarkdownCard .MdListItem {
  display: flex;
  align-items: flex-start;
  margin-bottom: 4px;
}

.ReportMarkdownCard .MdBullet {
  width: 21px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1.75;
  color: #5a6270;
  font-weight: 700;
}

.ReportMarkdownCard .MdListContent {
  flex: 1;
  font-size: 13px;
  line-height: 1.75;
  color: #3f4652;
  word-break: break-word;
}

.ReportMarkdownCard .Seg--bold {
  font-weight: 700;
  color: #303846;
}

.ReportMarkdownCard .Seg--code {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(235, 240, 248, 0.95);
  color: #303846;
}
