html, body 
{
    padding: 0px;
    color: #fff;
    margin: 0px;
    font-family: sans-serif;
    font-size: small;
    background: #7d8ea2; /* Old browsers */
    background: -moz-linear-gradient(top, #7d8ea2 0%, #121413 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7d8ea2), color-stop(100%,#121413)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #7d8ea2 0%,#121413 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #7d8ea2 0%,#121413 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #7d8ea2 0%,#121413 100%); /* IE10+ */
    background: linear-gradient(to bottom, #7d8ea2 0%,#121413 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7d8ea2', endColorstr='#121413',GradientType=0 ); /* IE6-9 */
    overflow: hidden;
}

html, body, input, textarea
{

    font-family: '微软雅黑';
    font-size: 14px;
}

#container
{
    overflow: scroll;
}

#paper
{
    position: relative;
    display: inline-block;
    background: transparent;
    background-image: url(g/grid.png);
}

#paper svg
{
    background: transparent;
}

#paper svg .link
{
    z-index: 2;
}

#menu
{
    position: absolute;
    display: none;
    width: 40%;
    z-index: 10000;
    padding: 8px;
    cursor: pointer;
}

#menu div
{
    clear: right;
    padding: 4px;
    margin-left: 20px;
    margin-right: 20px;
    border-bottom: 1px solid #ccc;
}

#menu div:hover
{
    background-color: black;
}

#flash
{
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px;
    font-weight: bold;
    display: none;
}

/*
Editor tools
*/
.marker-target
{
    fill: #fff;
    stroke-width: 0;
}

.marker-vertex
{
   fill: #fff;
}

.marker-vertex:hover
{
   fill: #000;
   stroke: none;
}

.marker-arrowhead
{
   fill: #fff;
   stroke: none;
}

.marker-arrowhead:hover
{
   fill: #000;
}

.link-tools .tool-remove circle
{
   fill: #c0392b;
}

.connection
{
    stroke: #fff;
    stroke-width: 1;
}

.inPorts circle
{
    fill: #c0392b;
    stroke-width: 0;
}

.outPorts circle
{
    fill: #8c6;
    stroke-width: 0;
}

/*
Node styles
*/

.node
{
    position: absolute;
    background: #666;
    /* Make sure events are propagated to the JointJS element so, e.g. dragging works.*/
    pointer-events: none;
    -webkit-user-select: none;
    padding: 8px;
    box-sizing: border-box;
    z-index: 2;
}

.node input[type="text"], button
{
    /* Enable interacting with inputs only. */
    pointer-events: auto;   
    border: none;
    box-sizing: border-box;
    background-color: #456;
    color: #fff;
   
}


.node input[type="actor"], .node input[type="variable_set"], .node input[type="variable"]
{
    /* Enable interacting with inputs only. */
    pointer-events: auto;   
    border: none;
    box-sizing: border-box;
    background-color: #456;
    color: #fff;
    width: 50%;
    padding: 4px;
    margin-right: 10px;
    float:right;

}


.node input[type="choice"], .node input[type="achievement"],
.node input[type="honor"]
{
    /* Enable interacting with inputs only. */
    pointer-events: auto;   
    border: none;
    box-sizing: border-box;
    background-color: #456;
    color: #fff;
    width: 50%;
    padding: 4px;
    margin-right: 10px;
    float:right;
}

.node input[type="choice"], .node input[type="achievement"],
.node input[type="honor"], .node input[type="actor"], .node input[type="variable_set"],
.node input[type="variable"]
{
    width: 192px;
    margin-right: 0;
    position: relative;
}

.node input[type="variable_set"], .node input[type="variable"]
{
    width: 142px;
}

.node input[type="variable"]
{
    right: 0;
}

.node textarea 
{
        /* Enable interacting with inputs only. */
    pointer-events: auto;
    border: none;
    box-sizing: border-box;
    background-color: #456;
    color: #fff;
    width: 100%;
    height: 85px;
    resize: none;
}

.node .label
{
    color: #ddd;
    position: relative;
    top: 5px;
}

.node .label.Text
{
    color: #8c6;
}

.node .label.Set
{
    color: #acf;
}

.node .label.Choice
{
    color: #dc5;
}

.node .label.Achievement
{
    color: #b66;
}

.node .label.Honor
{
    color: #a8c;
}

.node .label.Branch
{
    color: #ea6;
}

button
{
    font-size: 9px;
    position: absolute;
    right: -8px;
    top: -8px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    width: 16px;
    height: 16px;
    line-height: 0;
    text-align: center;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

button.add
{
    right: 28px;
}

button.remove
{
    right: 10px;
}

button.delete:hover
{
    background-color: #c0392b;
}

.node button.add:hover
{
    background-color: #8c6;
}

.node button.remove:hover
{
    background-color: #dc5;
}

.node input
{
    width: 100%;
    padding: 4px;
    margin-top: 2px;
 
}

#menu button
{
    position: relative;
    float: right;
    top: 0;
    right: 0;
}

.node
{
    color: #fff;
}

/*
Context menu
*/
.b-m-mpanel, #menu, #flash
{
    background-color: #444;
    position: absolute;
    z-index: 99997;
    -moz-box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.5);
    box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.5);
}

.b-m-split
{
    font-size: 0px;
    margin: 2px;
    border-bottom: 1px solid #777;
}

.b-m-item, .b-m-ifocus
{
    padding: 8px;
    line-height: 100%;
}

span
{
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}

.b-m-ibody
{
    overflow: hidden;
    text-overflow: ellipsis;
}

.b-m-ifocus
{
    background-color: #000;
}

.joint-link .link-tools, .joint-link .marker-vertices
{
    opacity: 0;
    transition: .5s;
}

.joint-link:hover .link-tools, .joint-link:hover .marker-vertices
{
    opacity: 1;
}
