.mk-chat-container * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.mk-chat-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.mk-trigger-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 2;
  animation: mkTriggerPulse 2.5s ease-in-out infinite;
}

@keyframes mkTriggerPulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 0 rgba(64,158,255,0.3);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), 0 0 0 10px rgba(64,158,255,0);
  }
}

.mk-trigger-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  animation-play-state: paused;
}

.mk-trigger-btn svg {
  display: block;
}

.mk-chat-window {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 380px;
  height: 560px;
  background: #f5f5f5;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.25s, transform 0.25s;
}

.mk-chat-window--hidden {
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  pointer-events: none;
}

.mk-chat-window--visible {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.mk-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  background: #4CAF50;
  color: #fff;
  flex-shrink: 0;
  user-select: none;
}

.mk-chat-header-left, .mk-chat-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mk-chat-header-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.mk-chat-header-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}

.mk-chat-header-btn:hover {
  opacity: 1;
  background: rgba(255,255,255,0.15);
}

.mk-chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-y: overlay;
  padding: 12px;
  scroll-behavior: smooth;
  position: relative;
}

.mk-chat-body::-webkit-scrollbar {
  width: 4px;
}

.mk-chat-body::-webkit-scrollbar-track {
  background: transparent;
}

.mk-chat-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
}

.mk-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

.mk-history-tip {
  text-align: center;
  padding: 8px 0 12px;
  cursor: pointer;
  user-select: none;
}

.mk-history-tip-text {
  font-size: 12px;
  color: #999;
  background: rgba(0,0,0,0.04);
  padding: 4px 14px;
  border-radius: 12px;
  display: inline-block;
}

.mk-history-loading {
  text-align: center;
  padding: 12px 0;
  font-size: 12px;
  color: #999;
}

.mk-history-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 4px 0;
}

.mk-history-divider-line {
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.mk-history-divider-text {
  font-size: 11px;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}

.mk-recommend-bar {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border-top: none;
  flex-shrink: 0;
  margin: 0 12px 8px;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.mk-recommend-bar--hidden {
  display: none;
}

.mk-recommend-title {
  font-size: 12px;
  font-weight: 500;
  color: #999;
  letter-spacing: 0.5px;
  padding: 8px 10px 6px;
}

.mk-recommend-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px 4px;
}

.mk-recommend-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: #F5F7FA;
  color: #1D2129;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.2s;
  word-break: break-all;
  line-height: 1.5;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.mk-recommend-btn:hover {
  background: #EBF0F5;
}

.mk-recommend-btn-arrow {
  flex-shrink: 0;
  color: #86909C;
  font-size: 14px;
  margin-left: 8px;
  line-height: 1;
  align-self: flex-start;
  margin-top: 2px;
}

.mk-chat-footer {
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #e8e8e8;
}

.mk-input-panel {
  background: #fff;
}

.mk-input-row {
  display: flex;
  align-items: flex-end;
  padding: 8px 12px;
  gap: 8px;
}

.mk-input-textarea {
  flex: 1;
  border: 1px solid #e0e0e0;
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  max-height: 100px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.mk-input-textarea:focus {
  border-color: #4CAF50;
}

.mk-input-textarea:disabled {
  background: #f5f5f5;
  color: #999;
}

.mk-input-plus, .mk-input-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.mk-input-plus {
  background: #f0f0f0;
  color: #666;
}

.mk-input-plus:hover {
  background: #e0e0e0;
}

.mk-input-send {
  background: #4CAF50;
  color: #fff;
}

.mk-input-send--disabled {
  background: #ccc;
  cursor: default;
}

.mk-input-send--disabled:hover {
  background: #ccc;
}

.mk-input-send:not(.mk-input-send--disabled):hover {
  background: #43A047;
}

.mk-input-actions {
  padding: 8px 12px 12px;
  display: flex;
  gap: 12px;
  transition: all 0.2s;
}

.mk-input-actions--hidden {
  display: none;
}

.mk-input-actions--visible {
  display: flex;
}

.mk-input-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  transition: all 0.2s;
}

.mk-input-action-btn:hover {
  background: #f0f0f0;
}

.mk-input-action-btn span {
  font-size: 12px;
  color: #666;
}

.mk-input-action-btn--end span {
  color: #F44336;
}

.mk-input-action-btn svg {
  display: block;
}

.mk-msg {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 8px;
  animation: mkFadeIn 0.3s ease;
}

@keyframes mkFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mk-msg--user {
  justify-content: flex-end;
}

.mk-msg--system {
  justify-content: center;
}

.mk-msg__avatar {
  flex-shrink: 0;
}

.mk-msg__avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.mk-msg__bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  position: relative;
}

.mk-msg__bubble--left {
  background: #fff;
  border-top-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.mk-msg__bubble--right {
  background: #4CAF50;
  color: #fff;
  border-top-right-radius: 4px;
}

.mk-msg__bubble--agent {
  background: #fff3e0;
  border-top-left-radius: 4px;
}

.mk-msg__name {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.mk-msg__text {
  line-height: 1.6;
  word-break: break-word;
}

.mk-msg__text h1, .mk-msg__text h2, .mk-msg__text h3 {
  margin: 8px 0 4px;
  font-weight: 600;
  line-height: 1.4;
}

.mk-msg__text h1 { font-size: 18px; }
.mk-msg__text h2 { font-size: 16px; }
.mk-msg__text h3 { font-size: 15px; }

.mk-msg__text p {
  margin: 4px 0;
}

.mk-msg__text strong {
  font-weight: 600;
}

.mk-msg__text em {
  font-style: italic;
}

.mk-msg__text code {
  background: rgba(0,0,0,0.06);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
}

.mk-msg__text blockquote {
  border-left: 3px solid #ddd;
  padding-left: 10px;
  margin: 6px 0;
  color: #666;
}

.mk-msg__text ul {
  margin: 4px 0;
  padding-left: 20px;
}

.mk-msg__text ul li {
  margin: 2px 0;
  list-style: disc;
}

.mk-msg__text a {
  color: #4CAF50;
  text-decoration: none;
}

.mk-msg__text a:hover {
  text-decoration: underline;
}

.mk-msg__bubble--right .mk-msg__text a {
  color: #fff;
  text-decoration: underline;
}

.mk-msg__link {
  color: #4CAF50;
  text-decoration: none;
  font-size: 13px;
}

.mk-msg__link:hover {
  text-decoration: underline;
}

.mk-msg__bubble--right .mk-msg__link {
  color: #fff;
  text-decoration: underline;
}

.mk-msg__copyable-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.mk-msg__link-text {
  font-size: 12px;
  color: #4CAF50;
  word-break: break-all;
}

.mk-msg__copy-btn {
  padding: 2px 8px;
  border: 1px solid #4CAF50;
  border-radius: 4px;
  background: transparent;
  color: #4CAF50;
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.mk-msg__copy-btn:hover {
  background: #4CAF50;
  color: #fff;
}

.mk-msg__inline-img {
  cursor: pointer;
  border-radius: 6px;
  margin: 4px 0;
}

.mk-msg__media {
  margin: 4px 0;
}

.mk-msg__media-img {
  max-width: 200px;
  border-radius: 6px;
  cursor: pointer;
}

.mk-msg__media-video {
  max-width: 220px;
  border-radius: 6px;
}

.mk-msg__file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.03);
  border-radius: 8px;
  margin: 4px 0;
}

.mk-msg__file-icon {
  font-size: 28px;
}

.mk-msg__file-info {
  flex: 1;
  min-width: 0;
}

.mk-msg__file-name {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mk-msg__file-size {
  font-size: 11px;
  color: #999;
}

.mk-msg__file-download {
  padding: 4px 10px;
  border: 1px solid #4CAF50;
  border-radius: 12px;
  color: #4CAF50;
  text-decoration: none;
  font-size: 12px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.mk-msg__file-download:hover {
  background: #4CAF50;
  color: #fff;
}

.mk-msg__actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  justify-content: flex-end;
}

.mk-msg__action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
}

.mk-msg__action-btn:hover {
  opacity: 1;
  background: rgba(0,0,0,0.04);
}

.mk-msg__action-btn--active {
  opacity: 1;
}

.mk-msg__action-icon {
  width: 16px;
  height: 16px;
}

.mk-msg__system-bubble {
  background: rgba(0,0,0,0.05);
  color: #888;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 12px;
  text-align: center;
  max-width: 85%;
  line-height: 1.5;
}

.mk-msg__loading {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.mk-msg__loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #bbb;
  animation: mkLoadingBounce 1.2s infinite ease-in-out;
}

.mk-msg__loading-dot:nth-child(2) { animation-delay: 0.2s; }
.mk-msg__loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes mkLoadingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.mk-msg__typing-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: #4CAF50;
  margin-left: 2px;
  vertical-align: middle;
  animation: mkBlink 0.8s step-end infinite;
}

@keyframes mkBlink {
  50% { opacity: 0; }
}

.mk-msg__loading-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #66bb6a, #43a047);
}

.mk-feedback-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mkOverlayIn 0.2s ease;
}

.mk-leave-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: mkOverlayIn 0.2s ease;
  overflow-y: auto;
}

@keyframes mkOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mk-feedback-modal, .mk-platform-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 340px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: mkModalIn 0.25s ease;
}

.mk-leave-modal {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  width: 320px;
  max-width: 90%;
  max-height: 85%;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: mkModalIn 0.25s ease;
}

.mk-leave-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}

.mk-leave-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.mk-leave-close:hover {
  color: #333;
}

.mk-leave-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
}

.mk-leave-subtitle {
  font-size: 13px;
  color: #999;
  padding: 4px 20px 12px;
}

.mk-leave-required {
  color: #f44336;
  margin-left: 2px;
}

@keyframes mkModalIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.mk-feedback-title, .mk-leave-title, .mk-platform-title {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.mk-feedback-subtitle {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.mk-feedback-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mk-feedback-reason-btn {
  padding: 6px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.mk-feedback-reason-btn:hover {
  border-color: #4CAF50;
  color: #4CAF50;
}

.mk-feedback-reason-btn--selected {
  background: #4CAF50;
  color: #fff;
  border-color: #4CAF50;
}

.mk-feedback-textarea {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.2s;
}

.mk-feedback-textarea:focus {
  border-color: #4CAF50;
}

.mk-feedback-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

.mk-leave-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}

.mk-feedback-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.mk-feedback-btn--cancel {
  background: #f0f0f0;
  color: #666;
}

.mk-feedback-btn--cancel:hover {
  background: #e0e0e0;
}

.mk-feedback-btn--submit {
  background: #4CAF50;
  color: #fff;
}

.mk-feedback-btn--submit:hover {
  background: #43A047;
}

.mk-leave-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.mk-leave-btn--cancel {
  background: #f0f0f0;
  color: #666;
}

.mk-leave-btn--cancel:hover {
  background: #e0e0e0;
}

.mk-leave-btn--submit {
  background: #4CAF50;
  color: #fff;
}

.mk-leave-btn--submit:hover {
  background: #43A047;
}

.mk-leave-form {
  padding: 0 20px 16px;
}

.mk-leave-label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 4px;
  margin-top: 12px;
}

.mk-leave-label:first-child {
  margin-top: 0;
}

.mk-leave-input {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.mk-leave-input:focus {
  border-color: #4CAF50;
}

.mk-leave-textarea {
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  min-height: 80px;
  transition: border-color 0.2s;
}

.mk-leave-textarea:focus {
  border-color: #4CAF50;
}

.mk-leave-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mk-leave-image-btn {
  width: 60px;
  height: 60px;
  border: 1px dashed #ccc;
  border-radius: 6px;
  background: #fafafa;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mk-leave-image-btn:hover {
  border-color: #4CAF50;
  color: #4CAF50;
}

.mk-leave-thumb {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
}

.mk-leave-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mk-leave-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.mk-platform-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.mk-platform-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.mk-platform-item:hover {
  border-color: #4CAF50;
  background: #f8fdf8;
}

.mk-platform-item--active {
  border-color: #4CAF50;
  background: #f0f9f0;
}

.mk-platform-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e8f5e9;
  color: #4CAF50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.mk-platform-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mk-platform-info {
  flex: 1;
  min-width: 0;
}

.mk-platform-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.mk-platform-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.mk-platform-check {
  color: #4CAF50;
  font-size: 18px;
  font-weight: 700;
}

.mk-platform-close-btn {
  width: 100%;
  margin-top: 8px;
}

.mk-session-end-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  height: 100%;
}

.mk-session-end-icon {
  margin-bottom: 16px;
}

.mk-session-end-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.mk-session-end-desc {
  font-size: 14px;
  color: #999;
  margin-bottom: 24px;
  line-height: 1.5;
}

.mk-session-restart-btn {
  padding: 10px 32px;
  border: none;
  border-radius: 20px;
  background: #4CAF50;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.mk-session-restart-btn:hover {
  background: #43A047;
}

.mk-offline-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0);
  z-index: 50;
  transition: background 0.3s ease;
  pointer-events: none;
}

.mk-offline-mask--show {
  background: rgba(0,0,0,0.4);
  pointer-events: auto;
}

.mk-offline-panel {
  background: #f8f8f8;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  opacity: 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.12);
  flex-shrink: 0;
  position: relative;
  z-index: 51;
}

.mk-offline-panel--show {
  max-height: 260px;
  opacity: 1;
}

.mk-offline-panel__handle {
  width: 40px;
  height: 4px;
  background: #c7c7cc;
  border-radius: 2px;
  margin: 10px auto 0;
}

.mk-offline-panel__msg {
  background: rgba(255,255,255,0.85);
  margin: 12px 16px;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
  padding: 14px 16px;
}

.mk-offline-panel__msg-text {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  text-align: center;
  word-wrap: break-word;
  word-break: break-all;
}

.mk-offline-panel__options {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 24px;
}

.mk-offline-panel__option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s;
}

.mk-offline-panel__option:active {
  transform: scale(0.92);
}

.mk-offline-panel__option-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.mk-offline-panel__option-icon--leave {
  background: #fff3e0;
}

.mk-offline-panel__option-icon--return {
  background: #e8f5e9;
}

.mk-offline-panel__option span {
  font-size: 12px;
  color: #555;
}

@media (prefers-color-scheme: dark) {
  .mk-chat-container {
    color: #e5e5e5;
  }

  .mk-chat-window {
    background: linear-gradient(180deg, #0a0e1a 0%, #0f1322 25%, #161a2c 50%, #1e2236 75%, #252a3e 100%);
  }

  .mk-chat-header {
    background: #1a1f2e;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .mk-chat-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
  }

  .mk-msg__bubble--left {
    background: #2c2c2e;
    color: #e5e5ea;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  }

  .mk-msg__bubble--right {
    background: #2d5a1e;
    color: #d4e8c7;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  }

  .mk-msg__bubble--right .mk-msg__link {
    color: #d4e8c7;
  }

  .mk-msg__bubble--agent {
    background: #3a2a1a;
    color: #e5d5c0;
  }

  .mk-recommend-bar {
    background: #2c2c2e;
    box-shadow: 0 1px 6px rgba(0,0,0,0.25);
  }

  .mk-recommend-title {
    color: #666;
  }

  .mk-recommend-btn {
    background: #3A3A3C;
    color: #E5E5EA;
  }

  .mk-recommend-btn:hover {
    background: #48484A;
  }

  .mk-recommend-btn-arrow {
    color: #636366;
  }

  .mk-chat-footer {
    background: #1c1c1e;
    border-top-color: rgba(255,255,255,0.06);
  }

  .mk-input-panel {
    background: #1c1c1e;
  }

  .mk-input-textarea {
    background: #2c2c2e;
    border-color: #3a3a3c;
    color: #e5e5e5;
  }

  .mk-input-textarea:focus {
    border-color: #4a9eff;
  }

  .mk-input-plus {
    background: #3a3a3c;
    color: #aaa;
  }

  .mk-msg__name {
    color: #888;
  }

  .mk-msg__system-bubble {
    background: rgba(255,255,255,0.08);
    color: #999;
  }

  .mk-msg__text code {
    background: rgba(255,255,255,0.1);
  }

  .mk-msg__text blockquote {
    border-left-color: #555;
    color: #aaa;
  }

  .mk-msg__text a {
    color: #4a9eff;
  }

  .mk-msg__loading-avatar {
    background: linear-gradient(135deg, #4a9eff, #357abd);
  }

  .mk-session-end-title {
    color: #e5e5e5;
  }

  .mk-session-end-desc {
    color: #888;
  }

  .mk-session-restart-btn {
    background: #4a9eff;
  }

  .mk-session-restart-btn:hover {
    background: #357abd;
  }

  .mk-leave-modal {
    background: #2c2c2e;
  }

  .mk-leave-title {
    color: #e5e5e5;
  }

  .mk-leave-subtitle {
    color: #888;
  }

  .mk-leave-label {
    color: #aaa;
  }

  .mk-leave-input, .mk-leave-textarea {
    background: #3a3a3c;
    border-color: #4a4a4c;
    color: #e5e5e5;
  }

  .mk-leave-input:focus, .mk-leave-textarea:focus {
    border-color: #4a9eff;
  }

  .mk-leave-close {
    color: #888;
  }

  .mk-leave-close:hover {
    color: #e5e5e5;
  }

  .mk-leave-btn--cancel {
    background: #3a3a3c;
    color: #aaa;
  }

  .mk-leave-btn--cancel:hover {
    background: #48484a;
  }

  .mk-leave-image-btn {
    border-color: #555;
    background: #3a3a3c;
    color: #888;
  }

  .mk-leave-image-btn:hover {
    border-color: #4a9eff;
    color: #4a9eff;
  }

  .mk-history-tip-text {
    color: #888;
    background: rgba(255,255,255,0.06);
  }

  .mk-history-loading {
    color: #888;
  }

  .mk-history-divider-line {
    background: #3a3a3c;
  }

  .mk-history-divider-text {
    color: #666;
  }

  .mk-end-service-btn {
    background: rgba(255,75,75,0.85);
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 6px 16px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255,75,75,0.3);
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
  }

  .mk-end-service-btn:hover {
    background: rgba(230,55,55,1);
    transform: scale(1.05);
  }

  .mk-offline-panel {
    background: #1c1c1e;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
  }

  .mk-offline-panel__handle {
    background: #48484a;
  }

  .mk-offline-panel__msg {
    background: rgba(255,255,255,0.08);
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
  }

  .mk-offline-panel__msg-text {
    color: #e5e5e5;
  }

  .mk-offline-panel__option-icon--leave {
    background: #3d2e14;
  }

  .mk-offline-panel__option-icon--return {
    background: #1a3a1e;
  }

  .mk-offline-panel__option span {
    color: #ccc;
  }
}

.mk-end-service-btn {
  position: absolute;
  bottom: 70px;
  right: 12px;
  background: rgba(255,75,75,0.85);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 6px 16px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,75,75,0.3);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.mk-end-service-btn:hover {
  background: rgba(230,55,55,1);
  transform: scale(1.05);
}
