.main-content {
    position:absolute;
    margin-left: max(2vw, 50vw - 88.885vh + 2vh);
    margin-top: max(2vh, 50vh - 28.125vw + 2vw);
    width: min(100vw - 4vw, 177.77vh - 4vh);
    height: min(100vh - 4vh, 56.25vw - 4vw);
}

.backscreen {
    position:absolute;
    margin-left: max(2vw, 50vw - 88.885vh + 2vh);
    margin-top: max(2vh, 50vh - 28.125vw + 2vw);
    width: min(100vw - 4vw, 177.77vh - 4vh);
    height: min(100vh - 4vh, 56.25vw - 4vw);
}

* {
    margin: 0;
    padding: 0;
    user-select: none;
    font-family: 'Mountains of Christmas';
    color:#09a059;
}

.overlapMarker {
    background-color: rgba(1,0,0,0.5);
    animation: bgColorAnim 0.25s infinite alternate;
}

@keyframes bgColorAnim {
    to {
        background-color: rgb(0, 2, 48);
    }

    from {
        background-color: rgba(255,255,255,0.5);
    }
}

body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #FFFFFF;
}

#bg {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    opacity: 0.05;
    background: url(Contents/snowflakes.jpg) no-repeat bottom center;
    background-size: cover;
}

#logo {
    display:block;
    position:absolute;
    bottom:20px;
    left:20px;
    width:15%;
}
#logo img { width:100%; }

.sidebar {
    position: absolute;
    left: 0;
    margin-left: 70%;
    padding: -15px;
    width: 30%;
    font-size: calc(1.6 * min(1vw, 1.5vh));
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    background-color: #fcf6f6;
    border-radius: 15px;
}

.sidebarbox {
    margin: 5%;
}

.sidebar h1 {
    font-size:300%;
    line-height:90%;
    transform:rotate(-10deg);
    padding:0 0.5em 0.5em 0.5em;
    color: red;
}

#overlapOverlay {
    z-index:2;
    pointer-events:none;
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
}

#lightBackground {
    z-index:-10;
    pointer-events:none;
    position:absolute;
    left:-5%;
    top:0;
    width:110%;
    height:100%;
    background-color: #fbfffc
}

.score {
    font-size:150%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    /*margin:6%;*/
    width: 100%;
    margin-left: auto; 
    margin-right: 0; 
    text-align: left; 
    background-color: rgb(250, 242, 242); 
}

.pieceCount {
    display:none;
}

.areaCount {
    display: inline-block;
    color:red;
    width: 0%;
    white-space: nowrap;
    font-size:66.6%;
    position: relative;
    left: 15px;
}

#yourscore {
    display:block;
    color: red;
    background-color: #09a05952;
    width: 0%;
    white-space: nowrap;
    border-right: red solid 3px;
}

#optimalscore {
    display:block;
    color: red;
    background-color: #09a05936;
    width: 55.5%;
    white-space: nowrap;
    border-right: red solid 3px;
}

#downloadRaw {
    font-size:50%;
    color:rgba(255, 0, 0, 0.4);
}

#graphicsattr {
    font-size:50%;
    color:rgba(22, 22, 22, 0.4);
}

#atelerisgurobi {
    font-size:50%;
    /*color:rgba(22, 22, 22, 0.4);*/
}

#dialogbg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    font-size: calc(2 * min(1vw, 1.778vh));
    text-align: center;
    z-index:100;
}

#dialog {
    position: absolute;
    left: 10%;
    top: 10%;
    width: 80%;
    height: 70%;
    padding:2%;
    background: rgba(0,0,0,0.9);
    border:1px solid #fff;
    box-shadow: 1em 1em 1em rgba(0,0,0,0.7);
}

button {
    background-color: red;
    border: none;
    color: white;
    padding: 0.3em;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-radius:0.4em;
    font-size: 90%;
    margin-top: 0.1em;
    margin-bottom: 0.5em;
    cursor: pointer;
}

button:disabled {
    background-color:#aaa;
    cursor:default;
}

#form {
    opacity:0;
    z-index:5;
    position:absolute;
    width:42%;
    left:21%;
    top:50%;
    transform: translateY(250%);
    padding: 4vw 8%;
    font-size: calc(2 * min(1vw, 1.778vh));
    border-radius:1vw;
    background:rgba(0,0,0,0.95);
    transition: opacity 0.4s, transform 0.4s;
}
#form.visible {
    opacity:1;
    transform: translateY(-50%);
}
#form label {
    display:inline-block;
    width:33%;
    padding-top:0.1em;
    padding-bottom: 2%;
}
#form input[type=checkbox] + label {
    display:inline;
}
#form input {
    width:60%;
    border-radius:0.4em;
    color:#000000;
    padding: 0.1em 0.3em;
    font-size:0.9em;
}
#form input[type=checkbox] {
    width:1em;
    height:1em;
    margin-right:0.5em;
}
#form button {
    display:inline-block;
    width:30%;
}
#form button + button {
    margin-left:3%;
}

.lds {
  display:block;
  position:absolute;
  top:50%;
  left:50%;
  width: 10vw;
  height: 10vw;
  margin-left:-5vw;
  margin-top:-5vw;
  background: rgba(0,0,0,0.9);
  border-radius:2vw;
  transform: translateY(200vw);
}
.lds-active {
    transform: translateY(0);
}

.lds-ring {
  z-index:10;
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50%;
  height: 50%;
  margin: -25% 0 0 -25%;
  border: 0.5em solid #fff;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: #fff transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.lds-conf-ok, .lds-conf-err {
    font-size:500%;
    opacity:0;
    line-height:10vw;
    text-align:center;
    transition:opacity 0.4s;
}
.lds-show {
    opacity:1;
}

.lds-conf-ok {
    z-index:11;
    color:green;
    /*margin-left: -20vw;*/
}
.lds-conf-err {
    z-index:12;
    color:red;
    /*margin-left: 10vw;*/
}