/* 基础样式重置 */
:host {
  all: initial;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  z-index: 99999;
  position: fixed;
  top: 20px;
  left: 20px;
  line-height: 1.5;
}

/* 容器 */
.nm-container {
  position: relative;
  /* 移除容器的背景和阴影，避免悬浮球模式下出现白边 */
  background-color: transparent;
  color: #333;
  transition: all 0.3s ease;
}

/* 悬浮球样式 */
.nm-ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

.nm-ball img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: rotate 10s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 主面板样式 */
.nm-panel {
  width: 360px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  /* 将阴影移到面板上 */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* 头部 */
.nm-header {
  height: 48px;
  background: #f5f7fa;
  border-bottom: 1px solid #e4e7ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  cursor: move; /* 拖拽手势 */
  user-select: none;
}

.nm-header-title {
  font-weight: 600;
  font-size: 14px;
  color: #303133;
  flex: 1;
  text-align: center;
}

.nm-header-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #909399;
  border-radius: 4px;
  transition: background 0.2s;
}

.nm-header-btn:hover {
  background: #e6e8eb;
  color: #409eff;
}

/* 内容区域 */
.nm-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

/* 激活界面 */
.nm-activation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
  text-align: center;
}

.nm-input {
  width: 100%;
  padding: 8px 12px;
  margin: 16px 0;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  outline: none;
  box-sizing: border-box;
}

.nm-input:focus {
  border-color: #409eff;
}

.nm-btn {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
  border: 1px solid #dcdfe6;
  color: #606266;
  text-align: center;
  box-sizing: border-box;
  outline: none;
  margin: 0;
  transition: .1s;
  font-weight: 500;
  padding: 10px 20px;
  font-size: 14px;
  border-radius: 4px;
  width: 100%;
}

.nm-btn-primary {
  color: #fff;
  background-color: #79bbff;
  border-color: #79bbff;
}

.nm-btn-primary:hover {
  background: #a0cfff;
  border-color: #a0cfff;
}

/* 隐藏类 */
.hidden {
  display: none !important;
}