/* 悬浮按钮容器 */
.text-to-image-button {
  position: absolute;
  z-index: 999999;
  padding: 8px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -100%);
  animation: fadeIn 0.2s ease-out;
  user-select: none;
}

/* 按钮样式 */
.text-to-image-button .convert-button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  background: #4a90e2;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.text-to-image-button .convert-button:hover {
  background: #357abd;
}

/* 箭头指示器 */
.text-to-image-button::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ffffff;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -90%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -100%);
  }
}

/* 暗色主题 */
@media (prefers-color-scheme: dark) {
  .text-to-image-button {
    background: #2d2d2d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .text-to-image-button::after {
    border-top-color: #2d2d2d;
  }

  .text-to-image-button .convert-button {
    background: #64b5f6;
  }

  .text-to-image-button .convert-button:hover {
    background: #42a5f5;
  }
}

/* 确保插件UI层级高于页面内容 */
.text-to-image-extension {
  z-index: 999999;
}

/* 选中文本高亮样式 */
::selection {
  background: rgba(74, 144, 226, 0.2);
}

/* 提示消息样式 */
.text-to-image-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000000;
}

/* 避免样式冲突 */
.text-to-image-extension * {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
} 