* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  text-decoration: none;
  font-family: cursive, Helvetica, sans-serif; }

button {
  border: none;
  cursor: pointer; }

body {
  background: url(../images/background.png) no-repeat center fixed;
  background-size: cover;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; }
  body header {
    width: 100vw; }

#header-section {
  width: 100%;
  height: 15vh;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-top: 4px solid yellowgreen;
  border-bottom: 4px solid yellowgreen;
  background-color: #95c7d8;
  color: rgba(255, 255, 255, 0.932); }
  #header-section .header-p {
    animation: myanim 7s infinite; }

@keyframes myanim {
  70% {
    font-size: 20px; } }

#main-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; }
  #main-container #timer-h {
    margin-top: 1rem;
    background-color: #cd8f32;
    color: #2b2929;
    visibility: hidden;
    width: 100vw;
    text-align: center; }
  #main-container .ease-timer {
    animation: timeranim 7s infinite; }

@keyframes timeranim {
  70% {
    font-size: 20px; } }
  #main-container #board-sizes-div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 7vh;
    width: 70%; }
    #main-container #board-sizes-div button {
      width: 100%;
      height: 3rem;
      font-size: 25px;
      margin-bottom: 1rem;
      cursor: pointer;
      background: rgba(119, 189, 28, 0.6);
      border: 2px solid black;
      color: rgba(255, 255, 255, 0.932);
      border-radius: 5px; }
  #main-container .board {
    margin-top: 7vh;
    display: none;
    perspective: 1000px;
    padding-left: 2.5%; }
    #main-container .board .cell {
      cursor: pointer;
      transform: scale(1);
      transform-style: preserve-3d;
      transform: transform .5s;
      display: flex;
      justify-content: center;
      align-items: center;
      transform-style: preserve-3d;
      transition: transform .5s;
      border-radius: 2px;
      border: 1px solid black;
      background: rgba(119, 189, 28, 0.6);
      box-shadow: 0 0 0.8rem 0 #646060; }
      #main-container .board .cell .front-card, #main-container .board .cell .back-card {
        backface-visibility: hidden; }
      #main-container .board .cell .back-card {
        transform: rotateY(180deg); }
    #main-container .board .cell:active {
      transform: scale(0.97);
      transition: transform .2s; }
    #main-container .board .cell.flip {
      transform: rotateY(180deg); }
  #main-container .two-by-two-board {
    grid-template-columns: repeat(2, 50%);
    grid-auto-rows: minmax(4.5rem, auto);
    grid-row-gap: 0.5em;
    width: 90vw; }
    #main-container .two-by-two-board .cell {
      width: 94%;
      height: 9rem; }
  #main-container .three-by-two-board {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(4.5rem, auto);
    grid-row-gap: 0.5em;
    width: 90vw; }
    #main-container .three-by-two-board .cell {
      width: 94%;
      height: 6.5rem; }
  #main-container .four-by-two-board {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(4.5rem, auto);
    grid-row-gap: 0.5em;
    width: 90vw; }
    #main-container .four-by-two-board .cell {
      width: 94%;
      height: 4.7rem; }
  #main-container .four-by-three-board {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(4.5rem, auto);
    grid-row-gap: 0.4em;
    width: 100vw;
    padding: 1rem;
    margin-right: 44%; }
    #main-container .four-by-three-board .cell {
      width: 20vw;
      height: 4.7rem;
      margin-right: 0.3rem; }
  #main-container .board > div {
    background-color: rgba(117, 11, 20, 0.6); }

img {
  max-width: 80%;
  max-height: 80%;
  margin-top: 10%; }

#message-container {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(24, 54, 6, 0.7);
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 5rem;
  flex-direction: column;
  padding-top: 6rem;
  width: 100vw; }
  #message-container #results-message-text {
    text-align: center;
    font-size: 25px;
    font-weight: bold; }

.message-container button {
  font-size: 1.5rem;
  background-color: white;
  border: 2px solid darkgreen;
  padding: .25em .5em;
  cursor: pointer; }

.message-container button:hover {
  background-color: darkgreen;
  color: white;
  border-color: white; }

.message-container.show {
  display: flex; }

/* Large screens */
@media screen and (min-width: 768px) and (max-width: 1170px) {
  #header-section h1 {
    font-size: 2.5rem; }
  #header-section .header-p {
    font-size: 1.5rem;
    animation: myanim 7s infinite; }
  @keyframes myanim {
    70% {
      font-size: 1.2rem; } }
  #main-container #timer-h {
    font-size: 22px; }
  #main-container #board-sizes-div {
    width: 20rem; }
    #main-container #board-sizes-div .board-size-btn {
      height: 3.5rem;
      margin-bottom: 1.5rem; }
  #main-container .two-by-two-board {
    width: 60vw;
    grid-row-gap: 1em; }
    #main-container .two-by-two-board .cell {
      height: 19vh; }
  #main-container .three-by-two-board {
    width: 65vw;
    grid-row-gap: 1em; }
    #main-container .three-by-two-board .cell {
      height: 10rem; }
  #main-container .four-by-two-board {
    grid-row-gap: 1em; }
    #main-container .four-by-two-board .cell {
      height: 10rem; }
  #main-container .four-by-three-board {
    grid-row-gap: 1em; }
    #main-container .four-by-three-board .cell {
      height: 10rem;
      margin-left: 0.2rem;
      margin-right: 0.2rem; }
  #message-container {
    padding-top: 3rem;
    width: 100vw; }
    #message-container #results-message-text {
      font-size: 30px; }
  .message-container button {
    font-size: 2rem; } }

@media screen and (min-width: 1171px) {
  #main-container #board-sizes-div {
    width: 21rem; }
    #main-container #board-sizes-div .board-size-btn {
      height: 3rem; }
  #main-container .two-by-two-board {
    width: 25vw;
    grid-row-gap: 0.7em; }
    #main-container .two-by-two-board .cell {
      height: 20vh; }
  #main-container .three-by-two-board {
    width: 45vw;
    grid-row-gap: 1em; }
    #main-container .three-by-two-board .cell {
      height: 10rem; }
  #main-container .four-by-two-board {
    width: 45vw;
    grid-row-gap: 1em; }
    #main-container .four-by-two-board .cell {
      height: 8.5rem; }
  #main-container .four-by-three-board {
    margin-top: 2vh;
    margin-left: 30rem;
    width: 100vw; }
    #main-container .four-by-three-board .cell {
      height: 8rem;
      width: 8rem; }
  #message-container {
    width: 100vw; } }
