/* 搜索浮层样式 */
.bm-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  z-index: 2147483647;
  backdrop-filter: blur(4px);
  animation: bm-fade-in 0.2s ease;
}

.bm-search-overlay.bm-fade-out {
  animation: bm-fade-out 0.2s ease;
}

@keyframes bm-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bm-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.bm-search-modal {
  width: 600px;
  max-width: 90vw;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bm-search-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.bm-search-icon {
  width: 20px;
  height: 20px;
  color: #999;
  margin-right: 12px;
  flex-shrink: 0;
}

.bm-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  color: #333;
}

.bm-search-input::placeholder {
  color: #999;
}

.bm-search-kbd {
  background: #f0f0f0;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  font-family: inherit;
  cursor: pointer;
}

.bm-search-body {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.bm-search-loading,
.bm-search-empty,
.bm-search-hint {
  padding: 40px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

.bm-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.bm-search-item:hover,
.bm-search-item.active {
  background: #f5f5f5;
}

.bm-search-favicon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  flex-shrink: 0;
}

.bm-search-item-content {
  flex: 1;
  min-width: 0;
}

.bm-search-item-title {
  font-weight: 500;
  color: #333;
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-search-item-url {
  font-size: 12px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bm-search-item-tags {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.bm-search-tag {
  background: #e0e0e0;
  color: #666;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.bm-search-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 12px;
  border-top: 1px solid #eee;
  background: #fafafa;
  font-size: 12px;
  color: #999;
}

.bm-search-footer kbd {
  background: #e0e0e0;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  font-family: inherit;
}

/* Toast 样式 */
.bm-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 2147483647;
  animation: bm-toast-in 0.3s ease;
}

.bm-toast.bm-toast-hide {
  animation: bm-toast-out 0.3s ease;
}

@keyframes bm-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes bm-toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

