html,body{
    margin: 0;
    padding: 0;
}

*{
    user-drag: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none
}

[v-cloak]{
    opacity: 0;
}

:root{
    --VP1Color: red;
    --VP2Color: #FF9800;
    --VP3Color: #4CAF50;
}

#app {
    width: 100vw;
    height: calc(100vh - 5em);
    
    overflow: hidden;
    position: relative;
    overflow-y: auto;
}

header {
    position: sticky;
    top: 0;
    z-index: var(--markZIndex);
    grid-area: head;
}

.main_edit {
    width: 100%;
    height: 4em;
    display: flex;
    box-sizing: border-box;
    padding: 0 1em;
    border-bottom: 1px solid var(--el-border-color-darker);
    border-right: 1px solid var(--el-border-color-darker);
    border-left: 1px solid var(--el-border-color-darker);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    grid-area: ml;
    justify-content: space-between;
    align-items: center;
}

.main_edit>h1{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    pointer-events: none;
}

.logo{
    height: 2em;
    margin-right: 3em;
}

.head_menu{
    display: flex;
    align-items: end;
}

.head_menu_item {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-right: 2em;
}

.head_menu_item svg {
    width: 2em;
    height: 2em;
    margin-right: 0.5em;
}

main {
    width: 100vw;
    --bodyHeight: calc(100vh -5em);
    height: var(--bodyHeight);
    display: grid;
    grid-template-areas:
        "ml c"
        "b c";
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
}

.main_top {
    box-sizing: border-box;
    padding: 0.5em;
    border-top: none;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.main_top_item {
    cursor: pointer;
    margin: 0 1em;
    width: 2em;
    height: 2em;
    position: relative;
}

.main_top_item:has( .menu_down) {
    display: flex;
    align-items: center;
    width: 3.5em;
}

.main_top_item img {
    width: 100%;
    height: 100%;
}

.main_top_item svg {
    width: 100%;
    height: 100%;
}

.main_top_item svg path{
    fill: var(--fill);
}

.main_top_item:hover svg path{
    fill: var(--primaryColor);
}

.main_top_item:hover>img:nth-child(1){
    display: none;
}

.main_top_item:hover>img:nth-child(2){
    display: block !important;
}

.menu_down{
    width: 1.5em !important;
    height: 1.5em !important;
    margin-left: 0.5em;
}

.main_top_item:hover .menu_pop{
    pointer-events: all;
    opacity: 1;
}

.menu_pop {
    position: absolute;
    background: #fff;
    left: 0;
    top: 100%;
    z-index: 2;
    box-shadow: 0 0 10px #c4c4c4;
    border-radius: 0.5em;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
}

.menu_item {
    white-space: nowrap;
    padding: 1em 2em;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.menu_item:hover{
    background: var(--el-bg-color-page);
    color: var(--primaryColor);
}

.current_menu{
    color: var(--primaryColor);
}

.viewport_example {
    width: 2.5em;
    height: 2em;
    margin-right: 1em;
    box-sizing: border-box;
    border: 1px solid;
}

.viewport_example div {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid;
}

.center {
    grid-area: b;
    display: grid;
    grid-template-areas:
        "v1 v2"
        "v3 v4";
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: calc(100vw - 300px - 2em);
    height: calc(100vh - 9em);
    overflow: hidden;
    position: relative;
}

.center>div {
    box-sizing: border-box;
    border: 1px solid var(--el-border-color-darker);
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #000;
}

.center>div>canvas{
    pointer-events: none;
    /* opacity: 0; */
}

#viewport_1 {
    grid-area: v1;
    --vColor: var(--VP1Color);
}
#viewport_2 {
    grid-area: v2;
    --vColor: var(--VP2Color);
}
#viewport_3 {
    grid-area: v3;
    --vColor: var(--VP3Color);
}
#viewport_4{
    grid-area: v4
}

.viewport_menus {
    position: absolute;
    right: 1em;
    top: 50%;
    transform: translateY(-50%);
    width: fit-content;
    box-sizing: border-box;
    padding: 0 0.5em;
    z-index: 2;
    overflow: hidden;
    border-radius: 0.5em;
    opacity: 0;
    transition: opacity .2s;
}

.center>div:hover .viewport_menus{
    opacity: 1;
}

.threshold {
    position: absolute;
    right: 0.5em;
    bottom: 0.5em;
    z-index: 1;
    font-size: 2em;
    color: #fff;
}

.viewport_menu {
    width: 2em;
    height: 2em;
    margin: 3em 0;
    cursor: pointer !important;
    background: #fff;
    padding: 0.5em;
    border-radius: 0.5em;
}

.viewport_menu svg {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.viewport_menu:hover path{
    fill: var(--primaryColor);
}

.scaleplate {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1;
    color: var(--vColor);
    pointer-events: none;
    transform: translate(0, 0);
}

.line {
    pointer-events: all;
    cursor: pointer;
}

.scaleplate_top {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: fit-content;
    box-sizing: border-box;
    padding-top: 2em;
}

.scaleplate_items {
    display: flex;
    align-items: flex-end;
}

.scaleplate_top .scaleplate_item {
    position: relative;
    width: 1em;
    height: 0.3em;
    border-left: 1px solid;
    display: flex;
    align-items: flex-start;
    --val: attr(val);
}

.scaleplate_top .unit {
    height: 0.8em;
}

.scaleplate_top .scaleplate_item:last-child {
    width: 0;
}

.scaleplate_item.unit::after {
    content: var(--val);
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-0.5em, -100%);
    font-weight: 700;
    pointer-events: none;
}

.scaleplate_top .scaleplate_item:last-child::after {
    transform: translate(0.5em, -0.5em);
}

.scaleplate_left {
    position: absolute;
    width: 100%;
    left: 1em;
    top: 50%;
    transform: translateY(-50%) scaleY(-1);
}

.scaleplate_left .scaleplate_items {
    display: block;
}

.scaleplate_left .scaleplate_item {
    width: 0.3em;
    height: 1em;
    border-top: 1px solid;
    --val: attr(val);
    position: relative;
}

.scaleplate_left .scaleplate_item:last-child {
    height: 0;
}

.scaleplate_left .unit {
    width: 0.8em;
}

.scaleplate_left .unit::after {
    content: var(--val);
    position: absolute;
    left: 100%;
    transform: scaleY(-1);
    pointer-events: none;
}

.line_y {
    position: absolute;
    height: 100%;
    width: 1em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.line_y::after {
    content: "";
    display: block;
    height: 100%;
    width: 1px;
    background: var(--bgc);
}

.line_x {
    position: absolute;
    height: 1em;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.line_x::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    background: var(--bgc);
}

.line[viewNum="1"]{
    --bgc: var(--VP1Color);
}

.line[viewNum="2"]{
    --bgc: var(--VP2Color);
}

.line[viewNum="3"]{
    --bgc: var(--VP3Color);
}

.right {
    grid-area: c;
    width: calc(300px + 2em);
    box-sizing: border-box;
    padding: 1em;
}

.dicom_detial_item {
    width: 100%;
    margin-top: 2em;
    display: grid;
    grid-template-columns: auto 1fr;
    color: #666;
}

.dicom_detial_item_title {
    font-weight: 700;
    width: fit-content;
    margin-right: 1em;
    color: #000;
}

.direction_2 {
    position: absolute;
    right: 3em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
}

.direction_1 {
    position: absolute;
    left: 3em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
}

.dicom_loading {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background: #fff5 !important;
    backdrop-filter: blur(5px);
    z-index: 2;
    display: none;
}

.dicom_loading_inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2em;
}

.dicom_loading_inner::after {
    content: "";
    width: 1em;
    height: 1em;
    position: absolute;
    left: -0.5em;
    top: 50%;
    transform: translate(-100%, -50%) rotate(0deg);
    border: 2px solid var(--primaryColor);
    border-right-color: transparent;
    border-radius: 2em;
    animation: loading .5s infinite linear;
}

@keyframes loading{
    from{
        transform: translate(-100%, -50%) rotate(0deg);
    }
    to{
        transform: translate(-100%, -50%) rotate(360deg);
    }
}

footer {
    width: 100%;
    padding: 3em 10%;
    font-size: 1.8em;
    box-sizing: border-box;
}

footer img {
    height: 23em;
    margin: 1em;
    box-sizing: border-box;
    border: 1px solid var(--el-border-color-darker);
}

.download_example {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0 1em;
}

.download_example svg {
    width: 3em;
    height: 3em;
    margin-right: 0.5em;
}