.main {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  background-color: #f4f4f4;
  min-width: 100%;
  min-height: 100vh;
  padding-top: 60px;
}

.ptrChatMain {
  width: 540px;
}

.adContainer {
  position: fixed;
  top: 0;
  left: 0;
  width: 540px;
  height: 60px;
  background-color: #f0faff;
  z-index: 1000;
}

.noticebar {
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adContainerIcon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.swipe {
  font-size: 16px;
  color: #0955b3;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  height: 24px;
  position: relative;
}

.swipe_container {
  -webkit-transition: -webkit-transform 0.5s ease-in-out;
  transition: transform 0.5s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.swipe_item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 24px;
  line-height: 24px;
  display: block;
  width: 100%;
}

/* Tablist 样式 */
.tablist {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  transition: scroll-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tablist::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.tabitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: fit-content;
}

.chatPageContainer {
  width: 100%;
  margin-bottom: 40px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.chatTime {
  margin-top: 20px;
  margin-bottom: 20px;
  font-size: 18px;
  color: #666666;
}

.welcomeContainer {
  width: 100%;
  height: 45px;
  padding: 0 10px;
  background-color: #fee4e4;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcomeIcon {
  width: 45px;
  height: 60px;
  margin-bottom: 15px;
}

.welcomeText {
  font-size: 18px;
  color: #333333;
}

.whitebg {
  width: 100%;
  margin-top: 10px;
  background-color: #ffffff;
  padding: 30px 20px 20px 20px;
  border-radius: 20px;
}

.question {
  width: 100%;
}

.question_head {
  display: flex;
  justify-content: space-between;
}

.question_left {
  width: 140px;
  height: 50px;
  margin-left: 20px;
}

.question_text {
  font-size: 12px;
  color: #999999;
}

.search-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  margin: 8px 20px;
  font-size: 16px;
  background-color: #ffffff;
  border-radius: 0 15px 15px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  width: calc(100% - 40px);
  box-sizing: border-box;
  border: 1px solid #e0e0e0;
}

.search-option:hover {
  background-color: #f8f9fa;
  border-color: #ff6b6b;
}

.option-text {
  flex: 1;
  font-size: 18px;
  color: #333;
  line-height: 1.4;
  font-weight: 500;
}

.option-arrow {
  width: 16px;
  height: 16px;
  margin-left: 10px;
  opacity: 0.6;
}

.answer-item {
  margin: 10px 0;
  padding: 15px;
  background-color: #ffffff;
  border-radius: 0 15px 15px 15px;
  border-left: 3px solid #ff6b6b;
}

.answer-question {
  font-size: 18px;
  font-weight: bold;
  color: #ff6b6b;
  margin-bottom: 10px;
  line-height: 1.4;
}

.answer-content {
  font-size: 20px;
  color: #333333;
  line-height: 1.6;
}

.tablist {
  margin-top: 10px;
  display: flex;
}

.tabitem {
  width: 80px;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tabitem_text {
  font-size: 20px;
  line-height: 1;
  vertical-align: bottom;
}

.tabitem_text.active {
  font-size: 22px;
  font-weight: bold;
  line-height: 1;
  vertical-align: bottom;
}

.activeimg {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question_icon {
  width: 100%;
  display: none;
  transition: all 0.3s ease;
}

.question_icon.active {
  width: 100%;
  display: block;
  transition: all 0.3s ease;
}

.tabcontent {
  font-size: 20px;
}

.tabcontentList {
  height: 55px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tabcontentList::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #efefef;
}

.tabcontentList:last-child::after {
  display: none;
}

.tabsnext {
  width: 6px;
  height: 12px;
}

/* Tab内容面板样式 */
.tabcontent-panel {
  display: none;
}

.tabcontent-panel.active {
  display: block;
}

/* Bottomtag 样式 */
.bottomtag {
  display: flex;
  flex-direction: row;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
  gap: 12px;
  padding: 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
}

.bottomtag::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.bottomtagitem {
  flex-shrink: 0;
  min-width: fit-content;
  padding: 8px 12px;
  background-color: #f5f5f5;
  border-radius: 16px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.bottomtag {
  display: flex;
  gap: 10px;
}

.bottomtagitem {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: bold;
  padding: 8px;
  color: #333333;
  background-color: #ffffff;
  border-radius: 20px;
  white-space: nowrap;
}

.bottomcontent {
  height: 120px;
  background-color: #ffffff;
  gap: 20px;
}

.human-service-container {
  display: flex;
  justify-content: center;
  padding: 10px 20px;
}

.human-service-btn {
  background-color: #ff6b6b;
  color: #ffffff;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.human-service-btn:hover {
  background-color: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.4);
}

.human-service-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

/* Loading 样式 */
.loading-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-size: 16px;
  color: #666;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 居中反馈样式 */
.center-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background: transparent;
  padding: 30px 40px;
  min-width: 280px;
  text-align: center;
}

.center-feedback-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.feedback-text {
  font-size: 18px;
  color: #333;
  font-weight: 500;
}

.feedback-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
}

.success-icon {
  background-color: #4caf50;
  color: white;
}

.error-icon {
  background-color: #f44336;
  color: white;
}

.center-feedback .loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #ff6b6b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 540px;
  box-sizing: border-box;
  z-index: 1001;
}

.bottomflex {
  padding-top: 10px;
  display: flex;
  align-items: center;
}

.bottominput {
  flex: 1;
  height: 65px;
  background-color: #f5f5f5;
  border-radius: 40px;
  border: none;
  outline: none;
  padding: 0 20px;
  font-size: 20px;
  color: #333;
}

.plus-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #666;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 20px;
  margin-right: 10px;
  flex-shrink: 0;
  line-height: 1;
  padding-bottom: 4px; /* Slight adjustment for vertical centering of + */
  box-sizing: border-box;
}

.bottominput::placeholder {
  color: #cac9cc;
  font-size: 20px;
}

.sendtext {
  white-space: nowrap;
}

.guessflex {
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  pointer-events: auto;
  display: none;
}

.sendtext {
  margin-left: 20px;
  margin-right: 20px;
  color: #ff706b;
  font-size: 24px;
}

.qa {
  padding-bottom: 200px;
}

.redqa {
  margin-top: 20px;
  margin-right: 30px;
  display: flex;
  justify-content: flex-end;
}

.redqatext {
  max-width: 410px;
  color: #ffffff;
  background-color: #ff706b;
  border-radius: 15px 0 15px 15px;
  font-size: 20px;
  padding: 15px;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

.whiteqa {
  margin-top: 20px;
  margin-left: 30px;
  display: flex;
  justify-content: flex-start;
}

.whiteqatext {
  max-width: 410px;
  color: #333333;
  background-color: #ffffff;
  border-radius: 0 15px 15px 15px;
  font-size: 20px;
  padding: 15px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.guess {
  background-color: #ffffff;
  padding: 20px;
}

.guesstitle {
  font-size: 22px;
  color: #333333;
  font-weight: bold;
}

.guessitem {
  font-size: 20px;
  color: #333333;
  padding: 7px 14px;
  border-bottom: 1px solid #e0e0e0;
}

@media (max-width: 540px) {
  .ptrChatMain {
    width: 100%;
  }

  .adContainer {
    width: 100%;
    height: 40px;
  }

  .swipe {
    height: 16px;
    overflow: hidden;
    font-size: 12px;
  }

  .swipe_container {
    height: 16px;
  }

  .swipe_item {
    height: 16px;
    line-height: 16px;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adContainerIcon {
    width: 16px;
    height: 16px;
  }

  .chatTime {
    font-size: 12px;
  }

  .main {
    padding-top: 40px;
  }

  .chatPageContainer {
    padding: 0 18px;
  }

  .welcomeContainer {
    height: 30px;
  }

  .welcomeIcon {
    width: 30px;
    height: 40px;
  }

  .welcomeText {
    font-size: 12px;
  }

  .question_left {
    width: 98px;
    height: 35px;
  }

  .tabitem_text {
    font-size: 14px;
  }

  .tabitem_text.active {
    font-size: 16px;
  }

  .activeimg {
    height: 30px;
  }

  .tabitem {
    padding: 0 12px;
  }

  .whitebg {
    padding: 20px 10px 10px 10px;
    border-radius: 20px;
  }

  .tabcontentList {
    font-size: 14px;
    height: 35px;
  }

  .question_icon {
    width: 75%;
  }

  .question_icon.active {
    width: 75%;
  }

  .bottomtag {
    background-color: #f4f4f4;
    padding: 0 6px;
  }

  .bottomtagitem {
    font-size: 11.5px;
    padding: 4px 6px;
  }

  .bottomcontent {
    height: 100px;
  }

  .human-service-container {
    padding: 8px 15px;
  }

  .human-service-btn {
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 16px;
  }

  .bottom {
    width: 100%;
  }

  .guess {
    background-color: #ffffff;
    padding: 15px;
  }

  .guesstitle {
    font-size: 18px;
  }

  .guessitem {
    font-size: 16px;
  }

  .bottominput {
    height: 44px;
    font-size: 16px;
  }

  .plus-btn {
    width: 36px;
    height: 36px;
    font-size: 24px;
    margin-left: 15px;
    margin-right: 8px;
    padding-bottom: 2px;
  }

  .bottominput::placeholder {
    color: #cac9cc;
    font-size: 16px;
  }

  .sendtext {
    font-size: 14px;
  }

  .redqa {
    margin-right: 15px;
  }

  .redqatext {
    max-width: 280px;
    padding: 12px;
    font-size: 14px;
    border-radius: 10px 0 10px 10px;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
  }

  .whiteqa {
    margin-left: 15px;
  }

  /* 移动端 cert 卡片容器样式 */
  .whiteqa.whiteqa-cert-container {
    margin-left: 0;
    margin-right: 0;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    box-sizing: border-box;
  }

  .whiteqatext {
    max-width: 280px;
    padding: 12px;
    font-size: 14px;
    border-radius: 0 10px 10px 10px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* 移动端 cert 卡片样式 */
  .whiteqatext.cert-card-container {
    width: 100%;
    max-width: none;
  }

  .search-option {
    padding: 12px;
    margin: 8px 15px;
    border-radius: 0 10px 10px 10px;
    width: calc(100% - 30px);
  }

  .option-text {
    font-size: 14px;
  }

  .qa {
    padding-bottom: 140px;
  }

  /* Alert 弹窗样式 */
  .alert-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .alert-dialog-overlay.show {
    opacity: 1;
  }

  .alert-dialog {
    background-color: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .alert-dialog-overlay.show .alert-dialog {
    transform: scale(1);
  }

  .alert-dialog-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .alert-dialog-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .alert-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
  }

  .alert-dialog-content {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 24px;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
  }

  .alert-dialog-footer {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .alert-dialog-button {
    background-color: #0955b3;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 100px;
  }

  .alert-dialog-button:hover {
    background-color: #074185;
  }

  .alert-dialog-button:active {
    background-color: #063066;
  }

  /* 虚拟保障认证卡片样式 - 特殊背景和按钮颜色 */
  .whiteqatext.cert-card-container {
    background-color: #ebebeb;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  /* 确保 cert 卡片的父容器左右间距一致 */
  .whiteqa.whiteqa-cert-container {
    margin-left: 0;
    margin-right: 0;
    padding-left: 30px;
    padding-right: 30px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 减少 cert 卡片的顶部内边距（当 cert-header 是第一个子元素时） */
  .whiteqatext.cert-card-container > .cert-header:first-child {
    margin-top: 0;
  }

  .whiteqatext .cert-header {
    text-align: center;
  }

  .whiteqatext .cert-title {
    font-size: 18px;
    font-weight: 600;
    padding-top: 20px;
    padding-bottom: 20px;
    color: #818286;
    margin-top: 0;
    margin-bottom: 2px;
  }

  .whiteqatext .cert-time {
    font-size: 20px;
    font-weight: 500;
    padding-bottom: 20px;
    color: #818286;
    margin-top: 0;
    margin-bottom: 0;
  }

  .whiteqatext .cert-content-list {
    margin-top: 4px;
    margin-bottom: 2px;
  }

  .whiteqatext .cert-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 4px;
    gap: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid #f0f0f0;
  }

  .whiteqatext .cert-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
  }

  .whiteqatext .cert-item-content {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 10px;
    min-width: 0; /* 允许内容收缩 */
  }

  .whiteqatext .cert-item-label {
    font-size: 12px;
    color: #626367;
    min-width: 60px;
    flex-shrink: 0;
    font-weight: bold;
  }

  .whiteqatext .cert-item-value {
    font-size: 12px;
    color: #818286;
    flex: 1;
    word-break: break-all;
    line-height: 1.5;
    min-width: 0; /* 允许内容收缩 */
  }

  .whiteqatext .cert-copy-btn {
    background-color: #a3a3a3;
    color: #f4f4f4;
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
  }

  .whiteqatext .cert-copy-btn:hover {
    background-color: #8f8f8f;
  }

  .whiteqatext .cert-copy-btn:active {
    background-color: #7a7a7a;
  }

  .whiteqatext .cert-footer {
    font-size: 14px;
    color: #818286;
    line-height: 1.6;
    text-align: left;
  }

  .whiteqatext .cert-description {
    margin-top: 20px;
    font-size: 14px;
    color: #818286;
    text-align: center;
    margin-top: 2px;
    padding-top: 4px;
    line-height: 1.6;
    margin-bottom: 0;
  }
}
