/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #ededed; /* 微信背景色 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: #333;
  line-height: 1.5;
  position: relative;
}

html.wechat-browser,
html.wechat-browser body {
  height: 100%;
  overflow: hidden;
}

html.wechat-browser #main-content {
  height: 100%;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

html.wechat-browser #form-container,
html.wechat-browser #form-start,
html.wechat-browser #email-input-screen,
html.wechat-browser #result-container {
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.wechat-browser .scene-container {
  justify-content: flex-start;
  padding-top: 12px;
}

html.wechat-browser .scene-intro {
  min-height: auto;
}

html.wechat-browser #form-start.scene-container {
  justify-content: center;
}

html.wechat-browser #form-start .scene-intro {
  min-height: 65vh;
}

/* 容器样式 */
.container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: 70px; /* 为固定底部按钮留出空间 */
  overflow-x: hidden;
}

.scene-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
}

/* 表单容器 - 微信聊天界面风格 */
.form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  background-color: #ffffff5c;
  padding: 10px 0;
  overflow-y: auto;
}

/* 进度指示器样式 - 微信风格 */
#progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 100%;
  max-width: 650px;
  padding: 0 0px;
}

.progress-bar-container {
  width: 100%;
  height: 3px;
  background-color: #e5e5e5;
  border-radius: 1.5px;
  margin-bottom: 8px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #07c160; /* 微信绿色 */
  border-radius: 1.5px;
  transition: width 0.3s ease;
}

.progress-number-indicator {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* 问题容器样式 - 微信对话风格 */
.question-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  padding: 0 15px;
}

.question-display {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  position: relative;
  max-width: 100%;
  align-self: flex-start;
  padding: 20px;
  background-color: #ffffff; /* 添加白色背景 */
}

/* 微信风格的问题气泡 */
.question-title-wrapper {
  background-color: #fff;
  padding: 12px 16px;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
  margin-left: 45px;
  margin-bottom: 5px;
}

/* 微信头像 */
.question-avatar {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  position: absolute;
  left: -45px;
  top: 0;
  background-color: #f0f0f0;
  overflow: hidden;
}

.loading-screen {
  display: none !important;
}

.question-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.question-title {
  font-size: 16px;
  font-weight: normal;
  color: #333;
  margin: 0;
  word-break: break-word;
}

.question-description {
  font-size: 14px;
  color: #666;
  margin-top: 8px;
  word-break: break-word;
}

/* 问题图片容器样式 */
.question-image-container {
  width: 100%;
  margin: 0px 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  order: -1;
  margin-bottom: 20px;
  margin-top: -20px;
}
.question-image-container img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* 回答容器 - 微信用户回复风格 */
.answer-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 0 0px;
  margin-bottom: 20px;
}

/* 选项样式 - 微信聊天选项风格 */
.options-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 88%;
  max-width: 88%;
  align-self: flex-end;
}

.option-button {
  padding: 12px 16px;
  background-color: #95ec69; /* 微信发送消息绿色 */
  border: none;
  border-radius: 16px 4px 16px 16px;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  position: relative;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background-color 0.2s ease;
}

.option-button:hover {
  background-color: #86d95b;
}

.option-button.selected {
  background-color: #76c046;
  color: #333;
}

.option-button.selected::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: bold;
  color: #333;
}

/* 多选提示 */
.multiple-hint {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
  align-self: flex-end;
  background-color: rgba(0, 0, 0, 0.03);
  padding: 6px 10px;
  border-radius: 12px;
  max-width: 88%;
}

/* 文本输入区域样式 */
.textarea-wrapper {
  width: 88%;
  align-self: flex-end;
  margin-bottom: 10px;
  position: relative;
}

.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 16px;
  border: none;
  border-radius: 16px 4px 16px 16px;
  font-size: 16px;
  resize: vertical;
  background-color: #95ec69;
  color: #333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-textarea:focus {
  outline: none;
  background-color: #86d95b;
}

/* 固定在底部的按钮区域 */
.form-buttons {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 12px 15px;
  background-color: #f6f6f6;
  border-top: 1px solid #e0e0e0;
  z-index: 100;
}

.scroll-indicator {
  position: fixed;
  left: 50%;
  bottom: 70px;
  transform: translateX(-50%) translateY(8px);
  height: 22px;
  padding: 2px 16px;
  border-radius: 999px;
  background: rgba(7, 193, 96, 0.95);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 101;
  box-shadow: 0 10px 18px rgba(7, 193, 96, 0.25);
}

.scroll-indicator.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.scroll-indicator-icon {
  display: block;
  animation: scroll-indicator-float 1.2s ease-in-out infinite;
}

.scroll-indicator-text {
  font-size: 12px;
  letter-spacing: 0.3px;
  line-height: 1;
}

@keyframes scroll-indicator-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.btn {
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
  text-align: center;
  font-size: 17px;
}

.btn-primary {
  background-color: #07c160; /* 微信绿色 */
  color: white;
  flex: 1;
  margin-left: 10px;
}

.btn-primary:hover {
  background-color: #06ad56;
}

.btn-secondary {
  background-color: #f2f2f2;
  color: #333;
  width: 80px;
}

.btn-secondary:hover {
  background-color: #e5e5e5;
}

.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 加载动画 */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 邮箱输入界面样式 */
.email-input-container {
  width: 100%;
  max-width: 500px;
  padding: 25px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.email-input-container h3 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  font-size: 18px;
  font-weight: normal;
  color: #333;
}

.email-input-container p {
  margin-bottom: 20px;
  text-align: center;
  color: #888;
  font-size: 14px;
}

/* 表单控件样式 */
.form-control {
  display: block;
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 16px;
  transition: border-color 0.2s;
  min-height: 60px;
  font-size: 1.5em;
  line-height: 1.65;
}

.form-control:focus {
  border-color: #07c160;
  outline: none;
}

/* 结果界面样式 */
.result-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 15px;
  margin: 0px;
}

.result-quick-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(10, 30, 22, 0.1);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 12px 28px rgba(10, 30, 22, 0.12);
  backdrop-filter: blur(10px);
}

.result-quick-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(14, 34, 26, 0.12);
  background: #f7f9f8;
  color: #1a2b27;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(16, 40, 28, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.2s ease;
}

.quick-btn:hover {
  background: #eef4f1;
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(16, 40, 28, 0.12);
}

.quick-btn:active {
  transform: translateY(0);
}

.quick-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.quick-label {
  white-space: nowrap;
}

.quick-primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, #07c160, #0bbf66);
  box-shadow: 0 10px 20px rgba(7, 193, 96, 0.35);
}

.quick-primary:hover {
  filter: brightness(0.97);
}

.result-hero {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
}

.result-hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.result-header {
  display: flex;
  align-items: center;
  margin-bottom: 0px;
  padding-bottom: 0px;
  border-bottom: 1px solid #f0f0f0;
}

.result-header.has-actions {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
}

.result-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.result-header-main .result-avatar {
  margin-right: 0;
}

.result-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.result-header-actions .btn {
  padding: 6px 12px;
  font-size: 14px;
  width: auto;
  text-decoration: none;
}

.result-avatar {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  margin-right: 15px;
  display: none;
}
.result-title {
  margin: 0;
  font-size: 18px;
  font-weight: normal;
  color: #333;
}

@media (max-width: 768px) {
  .result-quick-bar {
    padding: 10px;
    border-radius: 14px;
  }

  .quick-btn {
    padding: 9px 10px;
    font-size: 13px;
  }

  .result-quick-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-header-actions .btn {
    padding: 5px 10px;
    font-size: 13px;
  }

  .result-title {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.result-text {
  flex: 1;
  margin-bottom: 20px;
  overflow-y: auto;
  padding: 0;
  color: #333;
  font-size: 15px;
  line-height: 1.6;
}

.result-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-top: 5px;
  border-top: 1px solid #f0f0f0;
}

.result-buttons .btn-primary {
  margin-left: 0;
  margin-right: 0;
}

.result-buttons .btn-secondary {
  width: auto;
  padding: 10px 12px;
  text-decoration: none;
}

#call-teacher-bottom {
  white-space: nowrap;
}

.result-buttons #send-email,
.result-buttons #call-teacher-bottom {
  display: none;
}

/* 加载界面样式 */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #07c160;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

.loading-text {
  font-size: 16px;
  color: #333;
}

/* 错误消息样式 */
.error-message {
  padding: 12px 15px;
  background-color: #fef0f0;
  border: 1px solid #fde2e2;
  border-radius: 4px;
  color: #f56c6c;
  margin: 10px 0;
  font-size: 14px;
}

/* 链接样式 */
.result-links-container {
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
}

.links-title {
  font-size: 16px;
  margin-bottom: 15px;
  color: #333;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.link-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.link-prompt {
  font-size: 14px;
  color: #888;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 4px;
  text-decoration: none;
  color: #07c160;
  transition: background-color 0.2s ease;
}

.link-item:hover {
  background-color: #e9f7ef;
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 17, 24, 0.6);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: linear-gradient(180deg, #ffffff 0%, #f6f8f7 100%);
  margin: 8vh auto;
  padding: 22px 20px 18px;
  border-radius: 16px;
  width: min(92vw, 520px);
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: 0 18px 50px rgba(10, 30, 22, 0.28);
  border: 1px solid rgba(7, 193, 96, 0.12);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(7, 193, 96, 0.12);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0c1314;
}

.close-button {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #3a4a46;
  padding: 0 8px;
  line-height: 1;
}

.wechat-qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

#wechat-qr-image {
  width: min(72vw, 240px);
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(16, 40, 28, 0.12);
  border: 1px solid rgba(7, 193, 96, 0.12);
}

.wechat-qr-tip {
  margin: 0;
  color: #5f6b67;
  font-size: 14px;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.email-form label {
  font-size: 13px;
  color: #52605a;
}

.email-form input[type="email"],
.email-form input[type="tel"] {
  border: 1px solid rgba(7, 193, 96, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(9, 24, 18, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-form input[type="email"]:focus,
.email-form input[type="tel"]:focus {
  outline: none;
  border-color: rgba(7, 193, 96, 0.6);
  box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12);
}

.modal .btn {
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
}

.modal .confirm-button {
  background: linear-gradient(135deg, #0bd26b, #07c160);
  color: #fff;
  border: none;
  box-shadow: 0 10px 18px rgba(7, 193, 96, 0.2);
}

.modal .btn-secondary.close-button {
  background: #eef3f0;
  color: #2f3a35;
  border: 1px solid rgba(7, 193, 96, 0.18);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .container {
    padding-bottom: 60px;
  }

  .form-buttons {
    padding: 10px 12px;
  }

  .btn {
    font-size: 20px;
    padding: 8px 0;
  }

  .question-title {
    font-size: 15px;
  }

  .question-description {
    font-size: 13px;
  }

  .option-button {
    font-size: 15px;
    padding: 10px 14px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-display,
.options-wrapper,
.textarea-wrapper {
  animation: fadeIn 0.3s ease-out;
}

/* 微信风格的开始页面 */
.form-start {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 15px;
  text-align: center;
}

.sales-avatar-container {
  width: 70px;
  height: 70px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 15px;
}

.sales-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.greeting {
  font-size: 18px;
  color: #333;
  margin-bottom: 15px;
}

.sales-intro {
  font-size: 14px;
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.start-button {
  background-color: #07c160;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 30px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.start-button:hover {
  background-color: #06ad56;
}

/* 确保所有主要容器都有不透明背景 */
.container,
.scene-container,
.question-container,
.answer-container,
.options-container {
  background-color: transparent;
  display: block;

  display: flex;
  gap: 0px;
  flex-flow: wrap;
  margin-bottom: 80px;
}

#main-content {
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: flex-start;
  margin-bottom: 0;
}

/* 确保所有模态框和弹出层在不使用时完全隐藏 */
.modal,
.loading-screen,
.overlay {
}

/* 确保所有可能有半透明背景的元素都有正确的背景色 */
.question-display,
.form-control,
.result-container {
  background-color: #ffffff; /* 完全不透明的白色 */
}

/* 强制移除所有可能的遮罩层 */
/* 修复加载指示器可能导致的灰色遮罩问题 */
.loading-indicator {
  background-color: transparent !important;
  position: relative;
  z-index: 1;
}

/* 表单容器 - 微信聊天界面风格 */
.form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  background-color: #ffffff !important; /* 强制使用不透明白色背景 */
  padding: 0px 0;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10; /* 提高z-index确保它在其他元素之上 */
}

/* 确保加载屏幕完全隐藏 */
.loading-screen,
div[class*="loading"],
.loading-indicator,
.spinner {
  display: none !important;
  background-color: transparent !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* 确保分析结果容器有正确的背景 */
#analysis-result {
  background-color: #ffffff !important;
  position: relative;
  z-index: 5;
  line-height: 2em;
}

.markdown-body > :first-child {
  margin-top: 0 !important;
  text-align: justify;
}

/* 选项容器样式 */
#options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: flex-start;
}

/* 选项按钮样式 */
.option-button {
  background-color: #f0f2f5;
  border: 1px solid #d1d9e6;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 1.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  font-weight: normal;
  margin-bottom: 8px;
  background: #fff;
}

.option-button:hover {
  background-color: #e4e9f2;
  border-color: #b0bec5;
}

.option-button:active {
  background-color: #d6e0f0;
  transform: scale(0.98);
}

/* 确保文本输入框在选项下方有足够空间 */
#answer-input {
  margin-top: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: 1px solid #d1d9e6;
  border-radius: 8px;
  font-size: 16px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

#answer-input:focus {
  border-color: #4a90e2;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

/* 添加提示文本 */
.input-hint {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
  font-style: italic;
  width: 100%;
  text-align: left;
  padding-left: 5px;
}

/* 改进表单布局 */
.form-container {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

  max-width: 800px;
  margin: 0 auto;
}

.question-container {
  margin-bottom: 20px;
}

.question-display {
  font-size: 18px;
  font-weight: 500;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.5;
}

.answer-container {
  display: flex;
  flex-direction: column;
}

/* 进度指示器样式 */
.progress-indicator {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background-color: #eaeaea;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #4a90e2;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
  text-align: right;
}

/* 按钮样式 */

#next-button {
  position: relative;
  display: block;
  min-width: 184px;
  width: 100%;
  width: -webkit-fit-content;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  padding: 12px 24px;
  box-sizing: border-box;
  font-weight: 500;
  font-size: 17px;
  text-align: center;
  text-decoration: none;
  color: #fff;
  line-height: 1.41176471;
  border-radius: 50px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
  background-color: #07c160;
  max-width: 650px;
}

#next-button:hover {
  background-color: #07c160;
}

#next-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* 问题显示区域样式增强 */
.question-display {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding-top: 0px;
  width: 100%;
  padding-top: 35px;
}

/* 段落样式 */
.question-display p {
  margin-bottom: 12px;
}

/* 最后一个段落不需要底部边距 */
.question-display p:last-child {
  margin-bottom: 0;
  font-size: 1.2em;
}

/* 强调文本样式 */
.question-display strong {
  color: #0066cc;
}

/* 斜体文本样式 */
.question-display em {
  font-style: italic;
  color: #666;
}

/* 下划线文本样式 */
.question-display u {
  text-decoration: underline;
  text-decoration-color: #0066cc;
  text-decoration-thickness: 2px;
}

.question-options-info {
  margin-top: 15px;
  padding: 12px;
  background-color: #f8f9fa;
  border-radius: 5px;
}
.options-title {
  font-weight: bold;
  margin-bottom: 8px;
  color: #07c160;
  font-size: 18px;
  gap: 10px;
  margin: 15px 8px;
}
.options-list {
  color: #495057;
  margin: auto;
}
.option-item {
  margin: 6px 0;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  font-size: larger;
  background: #fff;
  line-height: 1, 4;
  gap: 5;
  margin-bottom: 12px;
  border-radius: 18px;
  border: 1px #ddd solid;
  /* display: flex; */
  /* flex-wrap: nowrap; */
  /* flex-direction: row; */
  /* align-content: center; */
  /* justify-content: space-evenly; */
  min-width: 100%;
  display: inline-block;
  right: auto;
}

ai-assist-user-tip {
  color: #f43703;
}

.markdown-body h1 {
  font-size: 1.6em;
  color: #07c160;
}

.markdown-body h2 {
  font-size: 1.4em;
  color: #666;
}

.markdown-body img {
  max-width: 100%;
  box-sizing: initial;
  background-color: #fff;
  border-radius: 12px;
}

.option-item:hover {
  background-color: #e9ecef;
}
.question-additional-info {
  margin-top: 15px;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 5px;
  /* border-left: 3px solid #17a2b8; */
}
.info-content {
  color: #07c160;
  text-align: justify;
}

.option-item-1 {
  /* 您的样式定义 */
  background-color: #e9ecef;
  border-radius: 4px;
  padding: 6px 12px;
  /* 其他样式... */
}
/* AI辅助按钮样式 - 修改位置 */

/* 确保文本框样式不会覆盖按钮 */
#text-answer {
  order: 1; /* 确保文本框在按钮后面 */
  width: 100%;
  margin-top: 0;
}

/* 确保answer-container是一个flex容器，这样order属性才能生效 */
.answer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.ai-assist-container {
  display: flex;
  text-align: right !important;
  margin-bottom: 8px;
  width: 100%;
  order: -1;
  justify-content: space-between;
}
.ai-assist-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #07c160;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  z-index: 10;
  position: relative;
  font-size: 0.8em;
  height: 36px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
}

.ai-assist-button:hover {
  background-color: #06ad56; /* 微信绿色的深色版本 */
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(7, 193, 96, 0.4);
}

.ai-assist-button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(7, 193, 96, 0.3);
}

.ai-assist-button:disabled {
  background-color: #a8e2c0;
  cursor: not-allowed;
  box-shadow: none;
}

/* 智能填写图标样式 */
.smart-fill-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  fill: white;
}

/* 旋转动画，用于加载状态 */
@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ai-assist-button.loading .smart-fill-icon {
  animation: rotating 1.5s linear infinite;
}

/* 确保文本框样式不会覆盖按钮 */
#text-answer,
#supplement-text {
  order: 1;
  width: 100%;
  margin-top: 5px;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: border-color 0.3s;
  resize: vertical;
  text-align: justify;
  font-size: 18px;
  font-family: auto;
}
#text-answer:focus,
#supplement-text:focus {
  border-color: #07c160;
  outline: none;
  box-shadow: 0 0 0 2px rgba(133, 133, 133, 0.2);
  color: #333;
}

/* 确保answer-container是一个flex容器，这样order属性才能生效 */
.answer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.back {
  width: 60px;
  border: 1px #f0f0f000 solid;
  font-size: 1em;
  background: #eee0;
  border-radius: 4px;
  padding: 4px 0;
  color: #333333;
  top: -10px;
  margin-top: -5px;
}

.result-container {
  position: relative;
}

#send-email {
  position: static;
  top: auto;
  right: auto;
}

/* 调整其他界面中的btn-secondary按钮位置，如有需要 */
.scene-container {
  position: relative;
}

#exit-form {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* 调整表单界面中的返回按钮位置 */
#form-container {
  position: relative;
}

#back-to-start {
  position: absolute;
  top: 6px;
  right: 5px;
  z-index: 10;
  background: #fafafa;
  border-radius: 4px;
  padding: 2px 12px;
  font-size: 14px;
  margin: 0px;
  color: #1b1b1b;
  display: none;
}

/* 调整邮箱输入界面中的取消按钮位置 */
#cancel-email {
  position: absolute;
  top: 10px;
  right: 10px;
}

.btn-secondary {
  right: 0px;

  /* padding: 4px 0px 4px 0px !important; */
}

.form-control2 {
  margin-top: 20px !important;
  padding-top: 20px;
}

/* 添加这段代码到您的 CSS 文件中 */
.scene-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 65vh; /* 使用视口高度的70%，可根据需要调整 */
  text-align: center;
  padding: 20px;
  width: 100%;
}

/* 如果 scene-container 需要调整以支持垂直居中 */
.scene-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  width: 100%;
}

/* 如果有表格，确保它也能正确居中 */
.intro-table {
  margin: 0 auto;
  width: auto;
}

.footer-link-container {
  bottom: 0px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

#start-form {
  height: 60px;
  width: 70vw;
}

.form-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 650px;
  margin: 0 auto;
  background-color: #ffffff00 !important;
  padding: 0px 0;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10;
  padding: 0;
  margin: 0 auto;
}

.question-display {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding-top: 0px;
  width: 100%;
  padding-top: 30px;
  padding-left: 15px;
  padding-right: 15px;
}
.question-container {
  margin-bottom: 20px;
  padding-top: -20px;
  margin-top: -22px;
  padding: 0;
}

.answer-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.answer-container.answer-rise {
  animation: answer-rise-in 0.6s ease;
}

@keyframes answer-rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* AI思考状态样式 */
.ai-thinking {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  margin: 15px 0;
}

.thinking-animation {
  position: relative;
  height: 30px;
  width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thinking-text {
  margin-top: 15px;
  color: #555;
  font-size: 16px;
  font-weight: 500;
}

/* 点脉冲动画 */
.dot-pulse {
  position: relative;
  left: -9999px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #4b9cdb;
  color: #4b9cdb;
  box-shadow: 9999px 0 0 -5px;
  animation: dot-pulse 1.5s infinite linear;
  animation-delay: 0.25s;
}

.dot-pulse::before,
.dot-pulse::after {
  content: "";
  display: inline-block;
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #4b9cdb;
  color: #4b9cdb;
}

.dot-pulse::before {
  box-shadow: 9984px 0 0 -5px;
  animation: dot-pulse-before 1.5s infinite linear;
  animation-delay: 0s;
}

.dot-pulse::after {
  box-shadow: 10014px 0 0 -5px;
  animation: dot-pulse-after 1.5s infinite linear;
  animation-delay: 0.5s;
}

.footer-link {
  color: #07c161;
  text-decoration: none;
  font-size: 18px;
  opacity: 0.8;
  transition: opacity 0.3s ease;
  padding-top: 10px;
  font-weight: 700;
}

@keyframes dot-pulse-before {
  0% {
    box-shadow: 9984px 0 0 -5px;
  }
  30% {
    box-shadow: 9984px 0 0 2px;
  }
  60%,
  100% {
    box-shadow: 9984px 0 0 -5px;
  }
}

@keyframes dot-pulse {
  0% {
    box-shadow: 9999px 0 0 -5px;
  }
  30% {
    box-shadow: 9999px 0 0 2px;
  }
  60%,
  100% {
    box-shadow: 9999px 0 0 -5px;
  }
}

@keyframes dot-pulse-after {
  0% {
    box-shadow: 10014px 0 0 -5px;
  }
  30% {
    box-shadow: 10014px 0 0 2px;
  }
  60%,
  100% {
    box-shadow: 10014px 0 0 -5px;
  }
}

/* 问题显示区域样式 */
#question-display {
  transition: opacity 0.3s ease;
  margin-bottom: 20px;
}

#question-display p {
  margin-bottom: 10px;
  line-height: 1.6;
  font-size: 1em;
  font-weight: 400;
  text-align: justify;
  padding: 0 10px 0px 5px;
}

/* 强调文本样式 */
#question-display strong {
  font-weight: 600;
  color: #333;
}

#question-display em {
  font-style: italic;
  color: #555;
}

#question-display u {
  text-decoration: underline;
  text-decoration-color: #4b9cdb;
  text-decoration-thickness: 2px;
}

/* 错误消息样式 */
.error-message {
  background-color: #fff5f5;
  border: 1px solid #ffcccc;
  border-radius: 4px;
  padding: 15px;
  margin: 15px 0;
  color: #d63031;
  font-size: 14px;
  text-align: center;
}

.error-message p {
  margin-bottom: 10px;
}

.error-message button {
  background-color: #d63031;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.error-message button:hover {
  background-color: #b71c1c;
}

/* 格式化问题的样式 */
.formatted-question {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  padding: 10px 0;
}

.formatted-question p.question-paragraph {
  margin-bottom: 16px;
  text-align: left;
}

.formatted-question strong {
  font-weight: 600;
}

.formatted-question em {
  font-style: italic;
}

.formatted-question u {
  text-decoration: underline;
}

.formatted-question ul.question-list,
.formatted-question ol.question-list {
  margin-left: 20px;
  margin-bottom: 16px;
}

.formatted-question ul.question-list li,
.formatted-question ol.question-list li {
  margin-bottom: 8px;
  text-align: left;
}

/* 适应移动设备的响应式样式 */
@media (max-width: 768px) {
  .formatted-question {
    font-size: 15px;
    font-weight: bold;
    font-size: 1.1em;
    text-align: justify;
    padding: 0px 0px;
  }

  .formatted-question p.question-paragraph {
    margin-bottom: 12px;
  }
}

.tips-link-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #ffffff;
  color: #333;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.12);
  transition: all 0.2s ease;
  border-radius: 50px;
  border: 2px solid #ececec;
}

.tips-link-button-container {
  text-align: right;
}

.tips-link-button span {
  margin-right: 4px; /* 增加了文本和图标之间的间距 */
  position: relative;
  z-index: 1;
}

.tips-link-button svg {
  min-width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
  margin-left: 0px; /* 增加了图标和文本之间的间距 */
}

/* 音频播放器样式 */
.tips-audio-container {
  margin-top: 0px;

  padding: 20px 0 0 0;
  padding-left: 0px;

  border-radius: 8px;
}

.tips-audio-title {
  font-weight: 500;
  margin-bottom: 0px;
  color: #333;
}

.tips-audio-player {
  width: 100%;
  height: 40px;
  outline: none;
  border-radius: 20px;
}

/* 自定义音频播放器样式 (Chrome, Safari, Edge) */
.tips-audio-player::-webkit-media-controls-panel {
  background-color: #ededed;
}

.tips-audio-player::-webkit-media-controls-play-button {
  background-color: #ededed;
  border-radius: 50%;
  transform: scale(1.2);
}

.tips-audio-player::-webkit-media-controls-current-time-display,
.tips-audio-player::-webkit-media-controls-time-remaining-display {
  color: #333;
}

/* 问题提示容器样式 */
.question-tips-container {
  display: flex;
  margin-top: 12px;
  padding: 15px 10px;
  background-color: #fafafa;
  border-radius: 6px;
}

.question-tips-icon {
  font-size: 18px;
  margin-right: 10px;
  color: #f0b400;
}

.markdown-body li {
  word-wrap: break-all;
  margin-bottom: 30px;
}

.question-tips-content {
  flex: 1;
  line-height: 1.5;
  color: #a4a4a4;
}

/* 链接按钮行 */
.tips-link-buttons-row {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* 链接按钮 */
.tips-link-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 15px;
  background-color: #ffffff;
  color: #333;
  border-radius: 5px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.12);
  transition: all 0.2s ease;
  border-radius: 50px;
  border: 2px solid #ececec;
}

/* 智能填空助手SVG图标 */
.smart-fill-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
  fill: white;
}

/* 文本输入框样式增强 - 处理所有情况 */
#text-answer,
#supplement-text,
.text-answer,
input[type="text"],
textarea {
  color: #999; /* 默认颜色为灰色 */
  transition: color 0.2s ease;
}

/* 当输入框有内容时（无论是否有placeholder） */
#text-answer:not(:placeholder-shown),
#supplement-text:not(:placeholder-shown),
.text-answer:not(:placeholder-shown),
input[type="text"]:not(:placeholder-shown),
textarea:not(:placeholder-shown) {
  color: #000 !important; /* 有内容时字体为黑色 */
}

/* 对于没有placeholder的输入框，当有值时改变颜色 */
#text-answer.has-content,
#supplement-text.has-content,
.text-answer.has-content,
input[type="text"].has-content,
textarea.has-content {
  color: #000 !important; /* 有内容时字体为黑色 */
}

/* 当输入框获得焦点时 */
#text-answer:focus,
#supplement-text:focus,
.text-answer:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: #07c160;
  outline: none;
  box-shadow: 0 0 0 2px rgba(133, 133, 133, 0.2);
  color: #000 !important; /* 聚焦时字体为黑色 */
}

/* 确保placeholder文本本身是灰色的 */
#text-answer::placeholder,
#supplement-text::placeholder,
.text-answer::placeholder,
input[type="text"]::placeholder,
textarea::placeholder {
  color: #999;
  opacity: 1; /* Firefox需要这个 */
}

/* 进度指示器样式 */
.progress-steps-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 15px 0;
  position: relative;
  padding: 0 10px;
}

/* 连接线 */
.progress-steps-container::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 30px;
  right: 30px;
  height: 2px;
  background-color: #e0e0e0;
  z-index: 1;
}

/* 单个步骤容器 */
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  min-width: 40px;
}

/* 步骤数字圆圈 */
.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 5px;
  transition: all 0.3s ease;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 步骤文字标签 */
.step-label {
  font-size: 12px;
  color: #666;
  text-align: center;
  min-width: 40px;
  transition: all 0.3s ease;
  font-weight: normal;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.7); /* 文字阴影增加可见度 */
  background-color: rgba(255, 255, 255, 0.7); /* 半透明背景增加对比度 */
  padding: 2px 5px;
  border-radius: 3px;
  margin-top: 3px;
}

/* 当前步骤样式 */
.progress-step.active .step-number {
  background-color: var(--button-color, #666);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.progress-step.active .step-label {
  color: var(--button-color, #666);
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.9);
}

/* 已完成步骤样式 */
.progress-step.completed .step-number {
  background-color: #4caf50;
  color: white;
}

.progress-step.completed .step-label {
  color: #4caf50;
  background-color: rgba(255, 255, 255, 0.8);
}

/* 响应式调整 */
@media (max-width: 768px) {
  .progress-steps-container {
    padding: 0 5px;
  }

  .step-number {
    width: 25px;
    height: 25px;
    font-size: 12px;
  }

  .step-label {
    font-size: 10px;
    min-width: 30px;
  }
}

/* 增强文字可见性的额外样式 */
#progress-indicator {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  margin: 0px 0 0 0px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding-bottom: 10px;
}

.compact-progress-container {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 12px;
}

.progress-logo {
  height: 20px;
  width: auto;
  display: block;
  margin-right: 10px;
  border-radius: 3px;
  object-fit: contain;
}

.compact-progress-bar-wrapper {
  flex-grow: 1;
  height: 2px;
  background-color: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 8px;
  position: relative;
}

.compact-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #07c160, #10d56c);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.compact-progress-numbers {
  font-size: 13px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  min-width: 40px;
  text-align: right;
}

.compact-history-nav {
  display: flex;
  align-items: center;
}

.compact-back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #f5f5f5;
  border: none;
  color: #c7c7c7;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
  position: relative;
}

.compact-back-button:hover {
  background-color: #e8f5e9;
  color: #07c160;
  transform: scale(1.05);
}

.compact-back-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.compact-back-button i {
  font-size: 14px;
}

.compact-back-button:hover::after {
  content: "返回上一题";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
}

.compact-back-button:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.7);
  margin-bottom: -1px;
  z-index: 10;
}

/* 历史问题下拉菜单 */
.compact-history-dropdown {
  position: relative;
}

.compact-history-button {
  /* display: flex; */
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #fff;
  border: none;
  color: #f9f9f9;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 10px;
}

.compact-history-button:hover {
  background-color: #e8f5e9;
  color: #07c160;
}

.compact-history-button i {
  font-size: 14px;
}

.compact-history-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 100;
  min-width: 180px;
  max-width: 250px;
  display: none;
  margin-top: 6px;
}

.compact-history-menu.active {
  display: block;
}

.compact-history-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 13px;
  color: #333;
}

.compact-history-item:hover {
  background-color: #f5f5f5;
}

.compact-history-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #e8f5e9;
  color: #07c160;
  font-weight: 500;
  margin-right: 8px;
  font-size: 11px;
}

.compact-history-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  color: #999;
}
/* 响应式调整 */
@media (max-width: 480px) {
  .compact-progress-container {
    padding: 14px 15px 0 0;
    padding-left: 15px;
  }

  .compact-back-button,
  .compact-history-button {
    width: 24px;
    height: 24px;
  }

  .compact-progress-numbers {
    font-size: 12px;
    min-width: 36px;
  }
}

/* 加载动画样式 */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* 加载容器样式 */
.result-text .loading {
  text-align: center;
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 20px 0;
}

/* =========================================================
   WeChat-friendly Markdown CSS (for .markdown-body)
   Style goal: clean, calm, professional, easy to read on mobile
   Primary accent: WeChat Green #07C160
   ========================================================= */

/* ----------- Base ----------- */
.markdown-body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: #1f1f1f;
  letter-spacing: 0.02em;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

/* Better spacing in WeChat narrow UI */
.markdown-body > *:first-child {
  margin-top: 0 !important;
}
.markdown-body > *:last-child {
  margin-bottom: 0 !important;
}

/* ----------- Headings ----------- */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  font-weight: 600;
  line-height: 1.35;
  margin: 1.4em 0 0.6em;
  scroll-margin-top: 72px; /* helpful in embedded viewers */
}

.markdown-body h1 {
  font-size: 1.9em;
  font-weight: 650;
  color: #1f1f1f;
  border-left: 4px solid #07c160;
  padding-left: 12px;
  margin-top: 1.2em;
}

.markdown-body h2 {
  font-size: 1.6em;
  color: #2ba471;
  margin-top: 1.6em;
}

.markdown-body h3 {
  font-size: 1.45em;
  font-weight: 600;
  color: #07c160;
  margin-top: 1.4em;
}

.markdown-body h4 {
  font-size: 1.15em;
  font-weight: 600;
  color: #5c5c5c;
  margin-top: 1.2em;
}

/* Optional: subtle divider under h2/h3 (enable if you like)
.markdown-body h2 { padding-bottom: .25em; border-bottom: 1px solid #EDEDED; }
.markdown-body h3 { padding-bottom: .2em; border-bottom: 1px dashed #EDEDED; }
*/

/* ----------- Text / Paragraphs ----------- */
.markdown-body p {
  margin: 0.85em 0;
}

.markdown-body strong {
  font-weight: 650;
  color: #2ba471; /* WeChat-friendly emphasis instead of pure black */
}

.markdown-body em {
  font-style: italic;
  color: #3a3a3a;
}

.markdown-body small {
  font-size: 0.92em;
  color: #8a8a8a;
}

.markdown-body a {
  color: #07c160;
  text-decoration: none;
  border-bottom: 1px solid rgba(7, 193, 96, 0.35);
}
.markdown-body a:active {
  opacity: 0.75;
}

/* ----------- Horizontal rule ----------- */
.markdown-body hr {
  border: none;
  height: 1px;
  background: #ededed;
  margin: 1.6em 0;
}

/* ----------- Blockquote (great for conclusions/notes) ----------- */
.markdown-body blockquote {
  margin: 1em 0;
  padding: 0.85em 1em;
  background: #f7f9f8;
  border-left: 4px solid #07c160;
  color: #4a4a4a;
  border-radius: 10px;
}
.markdown-body blockquote p {
  margin: 0.4em 0;
}

/* ----------- Lists ----------- */
.markdown-body ul,
.markdown-body ol {
  margin: 0.8em 0;
  padding-left: 1.25em;
}

.markdown-body li {
  margin: 1.65em 0;
  line-height: 1.65;
}

.markdown-body ul li::marker {
  color: rgba(7, 193, 96, 0.9);
}

.markdown-body ol li::marker {
  color: rgba(43, 164, 113, 0.95);
  font-weight: 600;
}

/* Nested lists spacing */
.markdown-body li > ul,
.markdown-body li > ol {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

/* ----------- Code ----------- */
.markdown-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  font-size: 0.92em;
  background: #f3f5f7;
  padding: 0.15em 0.35em;
  border-radius: 6px;
  color: #2b2b2b;
}

.markdown-body pre {
  background: #0f172a; /* calm dark */
  color: #e5e7eb;
  padding: 12px 14px;
  border-radius: 12px;
  overflow: auto;
  margin: 1em 0;
  -webkit-overflow-scrolling: touch;
}
.markdown-body pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.92em;
  line-height: 1.65;
}

/* ----------- Tables ----------- */
.markdown-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1em 0;
  font-size: 0.95em;
  overflow: hidden;
  border: 1px solid #ededed;
  border-radius: 12px;
}

.markdown-body th,
.markdown-body td {
  padding: 10px 12px;
  border-bottom: 1px solid #ededed;
  vertical-align: top;
}

.markdown-body th {
  text-align: left;
  background: #f7f9f8;
  color: #2b2b2b;
  font-weight: 650;
}

.markdown-body tr:last-child td {
  border-bottom: none;
}

/* Zebra stripes for readability */
.markdown-body tbody tr:nth-child(2n) td {
  background: #fbfcfc;
}

/* ----------- Images ----------- */
.markdown-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0.9em auto;
  border-radius: 12px;
}

/* Captions (if you write: <p class="caption"> ) */
.markdown-body .caption {
  margin-top: -0.4em;
  font-size: 0.92em;
  color: #8a8a8a;
  text-align: center;
}

/* ----------- “Card” blocks (use: <div class="card"> ... ) ----------- */
.markdown-body .card {
  background: #ffffff;
  border: 1px solid #ededed;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 1em 0;
}
.markdown-body .card .title {
  font-weight: 650;
  color: #1f1f1f;
  margin-bottom: 0.35em;
}
.markdown-body .card .meta {
  font-size: 0.92em;
  color: #8a8a8a;
}

/* ----------- Callouts (use: <div class="callout ok|warn|info"> ) ----------- */
.markdown-body .callout {
  border-radius: 14px;
  padding: 12px 14px;
  margin: 1em 0;
  border: 1px solid #ededed;
  background: #f7f9f8;
}

.markdown-body .callout.ok {
  border-left: 4px solid #07c160;
}

.markdown-body .callout.info {
  border-left: 4px solid #2ba471;
}

.markdown-body .callout.warn {
  border-left: 4px solid #f59e0b; /* warm amber */
  background: #fffbeb;
  border-color: #fde68a;
}

/* ----------- Subtle highlight line (use: <span class="hl"> ) ----------- */
.markdown-body .hl {
  background: linear-gradient(transparent 60%, rgba(7, 193, 96, 0.18) 0);
  padding: 0 2px;
  border-radius: 4px;
}

/* ----------- Footnotes / muted sections (use: <div class="muted"> ) ----------- */
.markdown-body .muted {
  color: #8a8a8a;
  font-size: 0.95em;
}

/* ----------- Selection (nice touch) ----------- */
.markdown-body ::selection {
  background: rgba(7, 193, 96, 0.18);
}

/* ----------- Mobile fine-tuning ----------- */
@media (max-width: 420px) {
  .markdown-body {
    font-size: 16px;
    line-height: 1.78;
  }
  .markdown-body h1 {
    font-size: 1.75em;
  }
  .markdown-body h2 {
    font-size: 1.5em;
  }
  .markdown-body h3 {
    font-size: 1.35em;
  }
  .markdown-body h4 {
    font-size: 1.12em;
  }
  .markdown-body table {
    font-size: 0.94em;
  }
}
