html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.lite-chatmaster {
  height: 100%;
  width: 100%;
  position: relative;
}
.lite-chatbox {
  height: calc(100% - 80px);
}
.lite-chatbox > div:last-child {
  margin-bottom: 20px;
}
::-webkit-scrollbar {
  width: 3px;
  height: 1px;
}
.new-message-indicator {
  position: absolute !important;
  bottom: 80px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  background: #2f8f0a !important;
  color: white !important;
  padding: 10px 22px !important;
  border-radius: 24px !important;
  cursor: pointer !important;
  z-index: 1000 !important;
  box-shadow: 0 4px 12px rgba(47, 143, 10, 0.3) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: none;
  transition: all 0.3s ease !important;
  border: none !important;
  min-width: 140px !important;
  text-align: center !important;
}
.new-message-indicator:hover {
  background: #267908 !important;
  transform: translateX(-50%) scale(1.06) !important;
  box-shadow: 0 6px 16px rgba(47, 143, 10, 0.4) !important;
}
.new-message-indicator:active {
  transform: translateX(-50%) scale(0.96) !important;
}
.circle-number {
  width: 40px;
  height: 40px;
  background-color: #4CAF50;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.circle-number.round {
  border-radius: 50%;
  background-color: #ff9999;
}
.lite-chatbox .circle-number {
  width: 80px;
  height: 80px;
  font-size: 40px;
}
.error-bubble {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f44336, #d32f2f);
  color: white;
  padding: 8px 20px;
  border-radius: 25px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-size: 14px;
  font-weight: 500;
  display: none;
  transition: all 0.3s ease;
  border: 2px solid white;
  min-width: 140px;
  text-align: center;
}
.wechat-input-container {
  display: flex;
  align-items: flex-end;
  padding: 10px 16px;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
  min-height: 56px;
  box-sizing: border-box;
  width: 100%;
  position: sticky;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.wechat-tool-button {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  padding: 8px;
  margin: 0 10px 0 0;
  color: #364fc7;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
.wechat-tool-button:hover {
  transform: translateY(-2px);
  background: #f5f7fa;
  border-color: #a855f7;
  color: #a855f7;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2);
}
.wechat-tool-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
}
.wechat-editor {
  flex: 1;
  min-height: 40px;
  max-height: 120px;
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  box-sizing: border-box;
  outline: none;
  word-wrap: break-word;
  word-break: break-all;
  resize: none;
  transition: all 0.3s ease;
  color: #1e293b;
}
.wechat-editor:empty:before {
  content: attr(placeholder);
  color: #94a3b8;
}
.wechat-editor:focus {
  background: #ffffff;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12), 0 2px 8px rgba(16, 185, 129, 0.1);
  transition: all 0.3s ease;
}
.wechat-send-button {
  display: block;
  visibility: visible;
  opacity: 1;
  background: #10b981;
  color: white;
  border: 1px solid #10b981;
  border-radius: 14px;
  padding: 10px 20px;
  margin-left: 10px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 40px;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 70px;
  position: relative;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}
.wechat-send-button:hover {
  transform: translateY(-2px);
  background: #059669;
  border-color: #059669;
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}
.wechat-send-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.3);
}
.wechat-send-button:disabled {
  background: #ccc;
  color: #999;
  border-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
  text-shadow: none;
}
.lite-chatinput {
  width: 100%;
  height: 80px;
  position: relative;
  bottom: 0;
  background: transparent;
  border-top: none;
  padding: 0;
}
.lite-chatinput .boundary {
  display: none;
}
.lite-chatbox-tool {
  position: absolute;
  margin-left: 3px;
  z-index: 3;
}
#toolMusk {
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 2;
}
.wechat-editor img {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  margin: 2px 0;
  border-radius: 0;
  display: inline-block;
  vertical-align: middle;
}

/* 撤回确认对话框 - 简约大气风格 */
.withdraw-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.withdraw-dialog.show {
  display: flex;
}

.withdraw-dialog-box {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  width: 300px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  animation: withdrawPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes withdrawPop {
  from {
    transform: scale(0.92) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.withdraw-dialog-box p {
  margin: 0 0 24px 0;
  font-size: 16px;
  color: #1a1a1a;
  font-weight: 500;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

.withdraw-dialog-btns {
  display: flex;
  gap: 12px;
}

.withdraw-dialog-btns button {
  flex: 1;
  padding: 11px 0;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease;
}

.withdraw-dialog-btns button:active {
  transform: scale(0.97);
}

.withdraw-dialog-btns button:first-child {
  background: #f2f3f5;
  color: #4e5969;
}

.withdraw-dialog-btns button:first-child:hover {
  background: #e5e6eb;
}

.withdraw-dialog-btns button:last-child {
  background: #07c160;
  color: #fff;
}

.withdraw-dialog-btns button:last-child:hover {
  background: #06a851;
}

.cmsg .content, .cmsg .name {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

.cright {
  position: relative;
  margin-bottom: 15px;
}

.cright .content {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.cright .content::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M512 0C229.888 0 1.536 229.376 1.536 512S230.4 1024 512 1024s510.464-229.376 510.464-512S794.112 0 512 0z m310.272 823.296c-40.448 40.448-87.04 72.192-139.776 94.208-54.272 23.04-111.616 34.304-171.008 34.304s-116.736-11.776-171.008-34.304c-52.224-22.016-99.328-53.76-139.776-94.208-40.448-40.448-72.192-87.552-94.208-139.776-23.04-54.272-34.304-112.128-34.304-171.52 0-59.392 11.776-117.248 34.304-171.52 22.016-52.224 53.76-99.328 94.208-139.776 40.448-40.448 87.04-72.192 139.776-94.208C395.264 83.456 452.608 71.68 512 71.68s116.736 11.776 171.008 34.304c52.224 22.016 99.328 53.76 139.776 94.208 40.448 40.448 72.192 87.552 94.208 139.776 23.04 54.272 34.304 112.128 34.304 171.52 0 59.392-11.776 117.248-34.304 171.52-22.528 52.736-54.272 99.84-94.72 140.288z' fill='%23FF931D'/%3E%3Cpath d='M462.336 312.32V212.992L265.728 407.04 462.336 599.04V482.816c59.392 0 210.944 1.536 210.944 159.744 0 82.944-57.856 152.576-134.656 168.448 123.904-16.896 219.136-123.904 219.136-254.464 0.512-242.176-254.464-244.224-295.424-244.224z' fill='%23FF931D'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cright .content:hover::before {
  opacity: 1;
  transform: scale(1.15);
}

.lite-chatbox .content {
  max-width: 100%;
  word-break: break-word;
  word-wrap: break-word;
}

.lite-chatbox .cright .content {
  max-width: calc(100% - 112px);
}

.lite-chatbox .cleft .content {
  max-width: calc(100% - 112px);
}

.cmsg.active {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  transition: background 0.2s;
}

.cmsg img:not(.headIcon) {
  cursor: pointer;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  transition: transform 0.2s ease;
}

.cmsg img:not(.headIcon):hover {
  transform: scale(1.05);
}

.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.image-modal.show {
  opacity: 1;
  visibility: visible;
}

.image-modal-content {
  max-width: 90%;
  max-height: 90%;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  touch-action: none;
  /* 缩放/旋转/位移由 JS 动态写入 inline style 控制 */
}

.image-modal-btn {
  position: absolute;
  top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
  z-index: 10000;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.image-modal-btn:hover {
  background-color: rgba(0, 0, 0, 0.75);
}

.image-modal-close {
  right: 16px;
}

.image-modal-close:hover {
  transform: rotate(90deg);
}

.image-modal-rotate {
  right: 68px;
}

.image-modal-rotate:hover {
  transform: rotate(180deg);
}

.image-modal-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: imageModalSpin 0.8s linear infinite;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 10001;
}

.image-modal-loading.show {
  opacity: 1;
}

@keyframes imageModalSpin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .image-modal-btn {
    width: 40px;
    height: 40px;
    top: 12px;
  }
  .image-modal-close { right: 12px; }
  .image-modal-rotate { right: 60px; }
}

.lite-chatbox * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.wechat-editor, .wechat-editor * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

@media (max-width: 768px) {
  .wechat-input-container {
    flex-wrap: nowrap;
    align-items: center;
    padding: 4px 8px;
    min-height: 44px;
  }
  .wechat-editor {
    max-height: 100px;
    overflow: hidden;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
  }
  .wechat-send-button {
    margin-left: 4px;
    padding: 6px 12px;
    font-size: 14px;
    height: 32px;
    min-width: 50px;
  }
  .wechat-tool-button {
    width: 32px;
    height: 32px;
    margin: 0 4px 0 0;
  }
  .wechat-editor img {
    max-width: 100% !important;
    max-height: 80px !important;
    height: auto !important;
    display: inline-block;
    vertical-align: middle;
  }
  
  .cright .content::before {
    left: -26px;
    top: 3px;
  }
}
