/******************************************
/* CSS
/*******************************************/

:root {
  height: 100%;
  background: url('../mopiu4.png');
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}

/* Box Model Hack */
* {
  box-sizing: border-box;
  font-family: 'Short Stack', cursive, 'Courier New', Courier, monospace;
}

body {
  display: flex;
}

body>* {
  margin: 0 0.2em;
}

body>div {
  flex: 0 0 62%;
}

body>section {
  flex: 0 0 38%;
}

body>div>div#selectable {
  padding: 0.5em;

}

#selectable .ui-selecting {
  background-color: rgba(226, 135, 245, 0.97);

}

#selectable .ui-selected {
  background-color: rgba(226, 135, 245, 0.97);


}

#selectable {

  color: #4a4a4d;
  display: grid;
  padding: .1rem;
  width: 100%;

  align-items: center;
  justify-content: center;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  border: 5px solid rgb(247, 179, 191);
}

/******************************************
/* LAYOUT
/*******************************************/

body {
  overflow: hidden;
}

.box {
  text-align: center;
  font-size: xx-large;
  height: 5.5rem;
  line-height: 5.5rem;
  transition-duration: 1s;
  transition-timing-function: linear;
}

.main {
  display: flex;
  flex-direction: column;
}

.main>* {
  width: 95%;
  border-radius: 15px;
  margin: 0 auto;
  padding: 5px 5px;
}

.speech {
  display: block;
  border: 5px solid rgb(247, 179, 191);
  background-color: pink;
  text-align: center;
  font-size: 24px;
  height: 70%;
  /* outline: none; */
  position: relative;
}

p {
  display: block;
  position: absolute;
  bottom: 0;
  margin: 1em auto;
  width: 98%;
  border: 1px solid black;
}

span {
  font-size: 0.5em;
  display: block;
  position: absolute;
  bottom: 0;
  right: 1em;
}

.oContain {
  display: flex;
  justify-content: stretch;
  background: #3498db;
  border: 5px solid rgb(89, 165, 247);
  height: 16.88em;
}

.container {
  display: flex;
  flex-direction: column;
  margin-top: -0.12em;
  width: 100%;
}

.container>* {
  flex: 1 0 42%;
  min-width: 50%;
}

/******************************************
/* ADDITIONAL STYLES
/*******************************************/

h3 {
  color: #333;
  border-bottom: 2px solid #333;
  font-size: 1.8em;
}

h4 {
  color: #111;
  line-height: 1.88em;
  font-size: 1.3em;
}

input {
  height: 24px;
  line-height: 24px;

  font-size: 34px;
  margin: 0.25em auto;
  display: block;
  border-radius: 15px;
  margin: .24em .16em;
  text-align: center;
}

/* all buttons */
.button {
  display: block;
  padding: 0px 5px;
  font-size: 24px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  outline: none;
  color: #fff;
  background-color: #4CAF50;
  border: none;
  border-radius: 15px;
  box-shadow: 0 5.8px #999;
  margin: .24em .16em;
}

.button:hover {
  background-color: #3e8e41
}

.button:active {
  background-color: #3e8e41;
  box-shadow: 0 8px #666;
  transform: translateY(4px);
}

/* make button non-spammable*/
.btn-danger[disabled] {
  opacity: 0.3;
}

#freshIt {
  background-color: #f80808;
}

#answer {
  background-color: rgb(152, 162, 5);
}

/* jQuery the 100 boxes */
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,

/* We use html here because we need a greater specificity to make sure disabled
works properly when clicked or hovered */
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
  border: 1px solid #c5c5c5;
  background: rgba(246, 246, 246, 0.9966);
  font-weight: normal;
  color: #454545;

}

/* .clearBorder {
  transition-property: background-color;
  transition-timing-function: linear; 
  transition-duration: 5s;
  background-color: #c5c5c5 !important;
} */

.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
  color: #454545;
  text-decoration: none;
}

/* .jiggle,  */
.ui-selecting {
  -webkit-animation: jiggle 0.5s infinite;
  -moz-animation-duration: 0.5s;
  -moz-animation-name: jiggle;
  -moz-animation-iteration-count: infinite;
  -webkit-transform: rotate(-1deg);
  -moz-transform: rotate(-1deg);
}

@-moz-keyframes jiggle {
  0% {
    -moz-transform: rotate(-1deg);
  }

  50% {
    -moz-transform: rotate(1deg);
  }
}

@-webkit-keyframes jiggle {
  0% {
    -webkit-transform: rotate(-1deg);
  }

  50% {
    -webkit-transform: rotate(1deg);
  }
}

.readyToAnswer {
  -webkit-animation: jiggleSlow 42s infinite;
  /* animation-delay: 24s; */
  -webkit-animation-direction: alternate;

  -moz-animation-direction: alternate;
  -moz-animation-name: jiggleSlow;
  -moz-animation-iteration-count: infinite;
  -webkit-transform: rotate(-3deg);
  -moz-transform: rotate(-3deg);
}

@-moz-keyframes jiggleSlow {
  0% {
    -moz-transform: rotate(0deg);
  }

  97% {
    -moz-transform: rotate(0deg);
  }

  98% {
    -moz-transform: rotate(3deg);
  }

  99% {
    -moz-transform: rotate(-3deg);
  }

  100% {
    -moz-transform: rotate(0deg);
  }
}

@-webkit-keyframes jiggleSlow {
  0% {
    -webkit-transform: rotate(0deg);
  }

  97% {
    -webkit-transform: rotate(0deg);
  }

  98% {
    -webkit-transform: rotate(3deg);
  }

  99% {
    -webkit-transform: rotate(-3deg);
  }

  100% {
    -webkit-transform: rotate(0deg);
  }
}


/* .color change,  */
.ui-selected {
  -webkit-animation: colorChange 999s infinite;
  -moz-animation-duration: 999s;
  -moz-animation-name: jiggle;
  -moz-animation-iteration-count: infinite;
  /* -webkit-transform: rotate(-1deg); */
  /* -moz-transform: rotate(-1deg); */
}

@-moz-keyframes colorChange {
  0% {
    background-color: rgba(226, 135, 245, 0.97);
  }

  20% {
    background-color: rgba(244, 180, 97, 0.97);
  }

  40% {
    background-color: rgba(220, 224, 103, 0.97);
  }

  60% {
    background-color: rgba(151, 232, 160, 0.97);
  }

  80% {
    background-color: rgba(143, 193, 255, 0.97);
  }

  100% {
    background-color: rgba(255, 82, 255, 0.97);
  }
}

@-webkit-keyframes colorChange {
  0% {
    background-color: rgba(226, 135, 245, 0.97);
  }

  20% {
    background-color: rgba(244, 180, 97, 0.97);
  }

  40% {
    background-color: rgba(220, 224, 103, 0.97);
  }

  60% {
    background-color: rgba(151, 232, 160, 0.97);
  }

  80% {
    background-color: rgba(143, 193, 255, 0.97);
  }

  100% {
    background-color: rgba(255, 82, 255, 0.97);
  }
}




/* hide */
.hidden {
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s 2s, opacity 2s linear;
}

.rotate {
  /* animation: spin 3s linear 1;
  transform: rotate(360deg);
  -webkit-transition-duration: 1s;
  -moz-transition-duration: 1s;
    -o-transition-duration: 1s;
    -webkit-transition-timing-function: linear;
    -moz-transition-timing-function: linear;
    -o-transition-timing-function: linear; */
  transition-property: background-color, border-radius;
  transition-timing-function: linear;
  transition-duration: 1s;
  /* background-color: #e3e !important; */
  border-radius: 50% !important;
}

@keyframes spin {
  0% {
    transform: rotateX(0deg);
  }

  100% {
    transform: rotateX(360deg);
  }
}

.rotateY {
  /* animation: spinY 5s linear 1;
  transform: rotate(360deg);
  -webkit-transition-duration: 1s;
  -moz-transition-duration: 1s;
    -o-transition-duration: 1s;
       transition-duration: 1s;
-webkit-transition-timing-function: linear;
  -moz-transition-timing-function: linear;
    -o-transition-timing-function: linear;
       transition-timing-function: linear; */
  transition-property: background-color, border-radius;
  transition-timing-function: linear;
  transition-duration: 1s;
  background-color: rgba(255, 45, 45, 0.99) !important;
  /* border-radius: 20% !important; */

}

@keyframes spinY {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(360deg);
  }
}

/* .box:hover {
  animation: fast 1s linear infinite;
  transform: rotate(360deg);
  -webkit-transition-duration: 1s;
  -moz-transition-duration: 1s;
    -o-transition-duration: 1s;
       transition-duration: 1s;
-webkit-transition-timing-function: linear;
  -moz-transition-timing-function: linear;
    -o-transition-timing-function: linear;
       transition-timing-function: linear;
} */


.colorChangeOnceSelected {
  background: #2db34a;
  -webkit-transition-property: background;
  -moz-transition-property: background;
  -o-transition-property: background;
  transition-property: background;
  -webkit-transition-duration: 1s;
  -moz-transition-duration: 1s;
  -o-transition-duration: 1s;
  transition-duration: 1s;
  -webkit-transition-timing-function: linear;
  -moz-transition-timing-function: linear;
  -o-transition-timing-function: linear;
  transition-timing-function: linear;
}

.box:hover {
  background: rgba(237, 237, 92, 0.9);
}