body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  padding: 20px;
}

#app {
  background-color: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 600px;
  margin: 0 auto;
}

.tree-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: flex-start;
}

.btn-primary {
  background-color: #1890ff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #40a9ff;
}

.tree ul {
  list-style-type: none;
  padding-left: 20px;
  margin: 0;
}

.tree > ul {
  padding-left: 0;
}

.tree-node-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
}

.tree-node-container:hover {
  background-color: #f0f0f0;
}

.tree-node-container.leaf-clicked {
  background-color: #e3f2fd;
  color: #1976d2;
}

.node-content {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
}

.node-name {
  font-size: 16px;
  font-weight: 500;
}

.arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
  color: #666;
}

.arrow-icon.is-active {
  transform: rotate(90deg);
}

.leaf-icon {
  width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.node-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.2s;
}

.tree-node-container:hover .node-actions {
  opacity: 1;
}

.action-btn {
  border: none;
  background: transparent;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #909399;
  transition: all 0.2s;
}

.action-btn:hover {
  background-color: #e4e7ed;
}

.action-btn.add:hover {
  color: #67c23a;
}

.action-btn.rename:hover {
  color: #409eff;
}

.action-btn.delete:hover {
  color: #f56c6c;
}

.child-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.child-menu.show {
  max-height: 2000px;
  opacity: 1;
}
