/* Main styles */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";

  z-index: 0;

  /*overflow-y: hidden;*/
}

#backgroundMain {
  z-index: 0;
}

#main-footer {
  background: #333;
  opacity: 70%;
  color: #fff;
  text-align: center;
  width: 100%;
  height: 7%;
  left: 0;
  bottom: 0;
}

/* #backgroundMain img {
  max-height: 768px;
} */

nav {
  padding-top: 1px !important;
  padding-bottom: 1px !important;
}

/* Extra small devices (phones, 768px and down) */
@media only screen and (max-width: 767px) {
  #main-footer1 {
    display: none;
  }

  .mobile {
    display: inherit;
    max-height: 853px;
  }

  .tablet {
    display: none;
  }

  .normal {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  a.navbar-brand {
    font-size: 1rem;
  }

  nav {
    font-size: 1rem !important;
  }

  #two {
    background: url(images/background-mobile.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #three {
    background: url(tetris/images/background-mobile.jpg) no-repeat center center
      fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #four {
    background: url(memory/images/background-mobile.jpg) no-repeat center center
      fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  .col-xl-3 {
    display: none;
  }

  .col-md-5 {
    display: none;
  }

  .sample {
    width: 17vw;
    height: auto;
  }

  #animation {
    width: 200px;
    height: 350px;
  }

  #locked {
    width: 200px;
    height: 350px;
  }

  #background {
    width: 200px;
    height: 350px;
  }

  #menu {
    display: none;
  }

  #gameboard {
    width: 85vw;
    height: 85vw;
    margin-bottom: 60vh;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
  }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
  #main-footer1 {
    font-size: 18px;
  }

  .normal {
    display: none;
  }

  .tablet {
    display: inherit;
  }

  .mobile {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  a.navbar-brand {
    font-size: 1.2rem;
  }

  nav {
    font-size: 1.2rem !important;
    padding-left: 5rem !important;
    padding-right: 5rem !important;
  }

  #navbarCollapse {
    padding-left: 5rem;
    padding-right: 5rem;
  }

  #two {
    background: url(images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #three {
    background: url(tetris/images/background.JPG) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }

  #choice {
    display: none;
  }

  .sample {
    width: 20vw;
    height: auto;
  }

  #basement {
    display: none;
  }

  #attic {
    display: none;
  }

  #divTA {
    margin-top: 2rem;
  }

  #menu {
    display: none;
  }

  #gameboard {
    width: 640px;
    height: 640px;
    margin: 2% 2%;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
  }
}

/* Extra large devices (large laptops and desktops, 1024px and up) */
@media only screen and (min-width: 1024px) and (max-width: 1439px) {
  #main-footer1 {
    font-size: 24px;
  }

  .tablet {
    display: none;
  }

  #divTA {
    margin-top: 2rem;
  }

  .mobile {
    display: none;
  }

  .normal {
    display: inherit;
    max-height: 768px;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  a.navbar-brand {
    margin-right: 5rem;
    font-size: 1.7rem;
  }

  nav {
    font-size: 1.5rem !important;
    padding-left: 5rem !important;
    padding-right: 4rem !important;
  }

  #navbarCollapse {
    padding-left: 5rem;
    padding-right: 5rem;
  }

  #two {
    background: url(images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #three {
    background: url(tetris/images/background.JPG) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }

  #choice {
    display: none;
  }

  #btn {
    margin-top: 2rem;
  }

  #two .col-xl-3 {
    margin-top: 2rem;
  }

  .sample {
    width: 10vw;
    height: auto;
  }

  #basement {
    display: none;
  }

  #attic {
    display: none;
  }

  #menuS {
    display: none;
  }

  #gameboard {
    width: 640px;
    height: 640px;
    margin: 2% 2%;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
  }
}

/* 1140px and up */
@media only screen and (min-width: 1440px) {
  .sample {
    width: 10vw;
    height: auto;
  }

  #gameboard {
    width: 640px;
    height: 640px;
    margin: 2% 2%;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
  }

  #main {
    margin-left: 10rem;
    margin-right: -20rem;
  }

  #choice {
    display: none;
  }

  #basement {
    display: none;
  }

  #attic {
    display: none;
  }

  #menuS {
    display: none;
  }

  .mobile {
    display: none;
  }

  .tablet {
    display: none;
  }

  .normal {
    display: none;
  }

  .large {
    display: inherit;
  }

  .extralarge {
    display: none;
  }

  #two {
    background: url(images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #three {
    background: url(tetris/images/background.JPG) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }
}

/* 4000px and up */
@media only screen and (min-width: 4000px) {
  .sample {
    width: 10vw;
    height: auto;
  }

  #gameboard {
    width: 640px;
    height: 640px;
    margin: 2% 2%;
    display: flex;
    flex-wrap: wrap;
    perspective: 1000px;
  }

  #main {
    margin-left: 20rem;
    margin-right: -30rem;
  }

  #choice {
    display: none;
  }

  #basement {
    display: none;
  }

  #attic {
    display: none;
  }

  #menuS {
    display: none;
  }

  .mobile {
    display: none;
  }

  .tablet {
    display: none;
  }

  .normal {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: inherit;
  }

  #two {
    background: url(images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
  }

  #three {
    background: url(tetris/images/background.JPG) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }
}

/* IPhone X */
@media only screen and (width: 375px) and (height: 812px) {
  .tablet {
    display: none;
  }

  .mobile {
    display: inherit;
    height: 812px;
  }

  .normal {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  #three {
    background: url(tetris/images/background-mobile.jpg) no-repeat center center
      fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }
}

/* Pixel 2XL */
@media only screen and (width: 411px) and (height: 823px) {
  .tablet {
    display: none;
  }

  .mobile {
    display: inherit;
    height: 823px;
  }

  .normal {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  #three {
    background: url(tetris/images/background-mobile.jpg) no-repeat center center
      fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }
}

/* IPad Pro */
@media only screen and (min-width: 1024px) and (orientation: portrait) {
  #choice {
    display: none;
  }

  #basement {
    display: none;
  }

  #attic {
    display: none;
  }

  #menuS {
    display: none;
  }

  .tablet {
    display: inherit;
    height: 1366px;
  }

  .mobile {
    display: none;
  }

  .normal {
    display: none;
  }

  .large {
    display: none;
  }

  .extralarge {
    display: none;
  }

  #three {
    background: url(tetris/images/background.JPG) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    margin: 0px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
    z-index: 0;
    overflow-y: auto;
  }

  #four {
    background: url(memory/images/background.jpg) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
      "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol";
  }
}

/* Scramble styles */

.sample {
  border: lightslategray solid;
  box-shadow: 5px 5px 5px #888888;
  transform: scale(1);
  transition: transform 0.5s;
}

.sample:active {
  transform: scale(0.9);
  transition: transform 0.2s;
}

#main {
  width: 100%;
  height: auto;
}

#gameBoard {
  width: 100%;
  margin-top: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.square {
  border: solid 2px;
  background-color: black;
}

#refresh {
  text-align: center;
}

/* #message {
  display: none;
  margin-top: 1.5rem;
} */

#choice {
  margin-left: 0.6rem;
}

image {
  width: 100%;
  height: auto;
  touch-action: none;
}

/* Tetris styles */

#counter {
  display: none;
}
#description {
  font-size: 1rem;
  font-weight: lighter;
}

canvas {
  display: block;
  margin: 0 auto;
}
#nextfigure {
  border: 1.2px solid;
  opacity: 0.9;
}

#background {
  border: 1.2px solid;
  opacity: 0.8;
}

#divT {
  font-size: 25px;
  font-weight: bold;
  font-family: monospace;
  text-align: center;
}

.card {
  border: 1.2px solid;
  background-color: rgba(255, 255, 255, 0.8);
}

#score1,
#score2 {
  display: none;
}

#basement {
  padding: 0px;
  margin-right: -3rem;
  margin-left: 1rem;
}

/* Memory styles */

.flex-container {
  display: flex;
  justify-content: center;
}

#main1 {
  width: 1040px;
  height: 860px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  perspective: 1000px;
}

#menu {
  width: 26%;
  align-self: flex-end;
  margin-bottom: 50%;
  background-size: 100%;
  color: white;
}

.cardplace {
  width: calc(23% - 10px);
  height: calc(23% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.cardplaceH {
  width: calc(20% - 10px);
  height: calc(20% - 10px);
  margin: 5px;
  position: relative;
  transform: scale(1);
  transform-style: preserve-3d;
  transition: transform 0.5s;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.cardplace img,
.cardplaceH img {
  width: 100%;
}

.cardplace:active,
.cardplaceH:active {
  transform: scale(0.9);
  transition: transform 0.2s;
}

.cardplace.flip,
.cardplaceH.flip {
  transform: rotateY(180deg);
}

.front-face,
.back-face {
  width: 100%;
  position: absolute;
  backface-visibility: hidden;
}

.front-face {
  transform: rotateY(180deg);
}
