* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  margin:0;
  padding:0;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10+ and Edge */
  user-select: none; /* Standard syntax */
}

input {
  -webkit-user-select: text; /* Chrome, Opera, Safari */
  -moz-user-select: text; /* Firefox 2+ */
  -ms-user-select: text; /* IE 10+ */
  user-select: text; /* Standard syntax */
}

#frame-page {
  height: calc(var(--vh, 1vh) * 100);
  border: white calc(var(--vh, 1vh) * 1) solid;
  background: #f57921;
}

.container-all {
  background: white;
  height: calc(var(--vh, 1vh) * 98);
  margin: 0 auto;
  outline: white calc(var(--vh, 1vh) * 15) solid;
  width: calc(var(--vh, 1vh) * 137);
}

.container-game {
  animation: shake 2s;
  border: #f57921 calc(var(--vh, 1vh) * 6) groove;
  background: #f57921;
  border-radius:5%;
  float: left;
  height: calc(var(--vh, 1vh) * 98);
  position: relative;
  width: calc(var(--vh, 1vh) * 98);    
  display: grid;
  grid-template-columns: 
  24%
  24%
  24%
  24%;
  grid-template-rows: 
  24%
  24%
  24%
  24%;

  grid-row-gap: 1.33333333%;

  grid-column-gap: 1.33333333%;

  align-content: center;
  justify-content: center;
}

#all {
  /* Start the shake animation and make the animation last for 0.5 seconds */
  animation: shake 0.5s infinite;

  /* When the animation is finished, start again */ 
  animation-play-state: paused;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

[id^="cube"] {
  border: grey 4px solid;
  background-color: gray;
  font-size: calc(var(--vh, 1vh) * 13);
  font-weight: bold;
  line-height: calc(var(--vh, 1vh) * 18);

  position: relative;
  width: calc(var(--vh, 1vh) * 20.2);
}

.cube-letter {
  background-color: whitesmoke;
  border-radius: 8%;
  opacity: 1;
  position: absolute;
  text-align: center;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
}

[id^="nameScorePlayer"] {
  font-size: 1vw;
}

#box-instructions {
  height: calc(var(--vh, 1vh) * 8);
  margin: 0 auto;
  margin-bottom: calc(var(--vh, 1vh) * 1);
  position: relative;
  width: 100%;
}

#box-instructions button {
  background-color: #efefef;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  font-size: calc(var(--vh, 1vh) * 1.7);
  height: 75%;
  margin-top: 2%;
  position: relative;
  text-align: center;
  width: 40%;
}

#tray-scoring {
  background: white;
  border: #f57921 calc(var(--vh, 1vh) * .15) solid;
  float: left;
  font-size: calc(var(--vh, 1vh) * 2);
  height: auto;
  margin-bottom: calc(var(--vh, 1vh) * 1);
  margin-top: calc(var(--vh, 1vh) * 1);
  margin-left: calc(var(--vh, 1vh) * 3);
  min-height: calc(var(--vh, 1vh) * 25);
  position: relative;
  text-align: center;
  width: calc(var(--vh, 1vh) * 36);
}

#tray-calculator {
  height: auto;
  padding: calc(var(--vh, 1vh) * .5); 
  position: relative;
  width: 100%;
  z-index: 1;
}

#label-tray-calulator {
  background: #f57921;
  color: white;
  display: inline-block;
  font-size: calc(var(--vh, 1vh) * 5);
  font-weight: bold;
  text-align: center;
  margin-bottom: calc(var(--vh, 1vh) * 1);
  width: 100%;
}

th.left, td.left {
  text-align: left;
  width: calc(var(--vh, 1vh) * 11);
}

th.center {
  width: calc(var(--vh, 1vh) * 9);
}


#tray-calculator input {
  font-size: calc(var(--vh, 1vh) * 2);
  width: calc(var(--vh, 1vh) * 10); 
  text-align: center;
}

#tray-calculator button {
  height: calc(var(--vh, 1vh) * 4); 
  margin-top: calc(var(--vh, 1vh) * 1); 
  text-align: center;
  width: 8vw; 
}

#box-playersScoring {
  height: auto;
  left: 50%;
  margin: 0 auto;
  padding-left: calc(var(--vh, 1vh) * 0); 
  position: relative;
  text-align: left;
  transform: translate(-50%, 0);
  width: 90%;
}

#box-timer, #shake {
  background: white;
  border: #f57921 calc(var(--vh, 1vh) * .15) solid;
  float: left;
  font-size: calc(var(--vh, 1vh) * 5);
  font-weight: bold;
  height: calc(var(--vh, 1vh) * 17);
  margin-left: calc(var(--vh, 1vh) * 3);
  margin-top: calc(var(--vh, 1vh) * 2);
  padding: calc(var(--vh, 1vh) * 3);
  position: relative;
  text-align: center;
  width: calc(var(--vh, 1vh) * 36);
}

#shake img {
  height: auto;
  position: relative;
  width: 100%;
}

#box-timer {
  padding: none;
  line-height: calc(var(--vh, 1vh) * 11);
  display: none;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 3; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: calc(var(--vh, 1vh) * 100); /* Full height */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-start {
  display: block;
}

#tray-start {
  background: #f57921;
  border: white 5px solid;
  border-radius: 5%;
  display:block;
  height: auto;
  left: 50%;
  padding: calc(var(--vh, 1vh) * 5); 
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--vh, 1vh) * 75);
  z-index: 1;
}

#tray-start img {
  width: 100%;
}
#tray-start p {
  font-size: calc(var(--vh, 1vh) * 4); 
  margin-top: calc(var(--vh, 1vh) * 1.5); 
  margin-bottom: calc(var(--vh, 1vh) * 1.5); 
}

#tray-start input {
  background: white;
  border: black 1px solid;
  font-size: calc(var(--vh, 1vh) * 2); 
}

#tray-start label {
  font-size: calc(var(--vh, 1vh) * 2); 
}

#tray-start button {
  font-size: calc(var(--vh, 1vh) * 2); 
  width: calc(var(--vh, 1vh) * 8);
}


/* The Modal (background) */
.modal-time {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 3; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: calc(var(--vh, 1vh) * 100); /* Full height */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
}

.modal-time-start {
  display: block;
}

/* Modal Content (image) */
.modal-time-content {
  margin: auto;
  display: block;
  height: auto;
  width: 60%;
}

/* Add Animation */
.modal-time-content {  
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.3s;
  animation-name: zoom;
  animation-duration: 0.3s;
}

@-webkit-keyframes zoom {
  from {-webkit-transform:scale(0)} 
  to {-webkit-transform:scale(1)}
}

@keyframes zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

#warningLandscape {
  background: #f57921;;
  color: white;
  display: none;
  font-size: 8vh;
  height: calc(var(--vh, 1vh) * 100);
  justify-content: center;
  position: absolute;
  text-align: center;
  width: 100%;
  z-index: 100;
}

#warningLandscape p {
  position: absolute;
  top: 50%;
  transform: translate(0%, -50%);
  width: 100%;
}

@media screen and (orientation:portrait) {
  #warningLandscape {
    display: block;
  }  
  html {
    background: #f57921;
  }
  #frame-page {
    display: none;
  }
}