/* Box Model Hack */
* {
  box-sizing: border-box;
}

/* Clear fix hack */
.clearfix:after {
  content: ".";
  display: block;
  clear: both;
  visibility: hidden;
  line-height: 0;
  height: 0;
}

.clear {
  clear: both;
}

/******************************************
/* BASE STYLES
/*******************************************/

/******************************************
/* LAYOUT
/*******************************************/
header {
}

footer {
}

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


/* Bounce Animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0px)
  }
  25%, 75% {
    transform: translateY(2px)
  }
  50% {
    transform: translateY(2px)
  }
}
/* Opacity Animation */
@keyframes opacityShow {
  0% {
    opacity: 0%;
  }
  100% {
    opacity: 100%;
  }
}
/* Scale down with clicked */
.scaleOnClick:active {
  scale: 95%;
}

/*******************************************/
/* MOBILE */
/*******************************************/
@media (width <= 600px) {
  /* Basics */
  img {
    width: 58px;
    aspect-ratio: 230/360;
  }

  body {
    background-color: rgb(0, 0, 0);
    background-image: url("../images/gung3.webp");
    background-size: fill;
    clear: both;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    font-family: "Gowun Dodum", sans-serif;
    font-weight: 400;
    font-style: normal;
    height: 100vh;
  }

  /* Header */
  header {
    margin: 15px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
  }

  #headTitles {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
  }

  #titleOne {
    text-align: left;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 26px;
    margin: 0;
  }

  #titleTwo {
    text-align: left;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 30px;
    margin: 0;
  }

  #infoResetDiv {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
  }

  #resetButton {
    width: 40px;
    aspect-ratio: 1/1;
    border: none;
    margin: 0px 10px;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #resetButton:active {
    scale: 95%;
  }

  #infoButton {
    width: 40px;
    aspect-ratio: 1/1;
    border: none;
    margin: 0px 10px;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #infoButton:active {
    scale: 95%;
  }

  #date {
    text-align: center;
    color: white;
    text-shadow: 1px 1px 0.5px black;
    margin: 2vw;
  }

  /* Piles and Spread */
  #pileSpreadContainer {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
  }

  /* Piles */
  #pilesContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    border-bottom: 2px rgb(255, 255, 255) solid;
    box-shadow: 0 3px 2px -2px rgb(0, 0, 0);
    padding-bottom: 10px;
    margin: 0 10px 0 10px;
  }

  .pileClass {
    box-shadow: 0 0 3px 1px white;
    border-radius: 5%;
    width: 35px;
    aspect-ratio: 230/345;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .pileImg {
    width: 85%;
    aspect-ratio: 230/360;
  }

  /* Spread */
  #spreadContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    margin-top: 10px;
    width: 100%;
  }

  .columnClass {
    width: 25%;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    height: 185px;
  }

  .spreadRow1 {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
  }
  .spreadRow2 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -70px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
  }
  .spreadRow3 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -140px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
  }
  .spreadRow4 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -210px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
  }

  .spreadRow5 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -280px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
  }

  /* Hand and Buttons */
  #handContainer {
    margin: 0 0;
    padding: 0 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
  }

  /* Left Box */
  #leftBox {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    padding: 0 0;
    width: 20%;
    height: 300px;
  }

  #facedown {
    width: 58px;
    aspect-ratio: 230/360;
    display: flex;
    align-items: center;
    box-shadow: 0 0 3px 1px rgb(255, 255, 255);
    margin-top: 15px;
    z-index: 1;
  }

  #facedown:active {
    scale: 95%;
  }

  /* Right Box */
  #rightBox {
    width: 80%;
  }

  #visibleHandContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    padding: 15px 0;
  }

  .handCards {
    width: 58px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 5px 1px rgb(0, 0, 0);
    animation: opacityShow .4s 1;
  }

  .handCards:active {
    scale: 95%;
  }

  /* Results */
  #endingOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #resultBox {
    width: 90%;
    height: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    border-radius: 20px;
    overflow: auto;
    overflow-x: hidden;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #resultTitle {
    padding: 0;
    margin-bottom: 10px;
    font-size: 20px;
    text-decoration: underline;
  }

  #resultCardsDiv {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    margin: 0 0px;
    padding: 0;
    overflow: auto;
    box-shadow: 0 0 2px 2px grey;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 10px;
  }

  .pileResultRows {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(6, 1fr);
    padding: 0;
    margin: 2%;
    width: 20%;
  }

  .resultCardClass {
    width: 100%;
    aspect-ratio: 230/360;
    padding: 0px;
  }

  #resultMonthsDiv {
    width: 100%;
    margin-bottom: 10px;
  }

  .monthsDiv {
    min-height: 260px;
    overflow: auto;
  }

  .buttonsDiv {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
  }

  #resultCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #resultCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #resultLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }

  #resultLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Info */
  #infoOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #infoBox {
    width: 93%;
    height: 93%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    border-radius: 20px;
    overflow: auto;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #infoTitle {
    padding: 0;
    margin-bottom: 10px;
    font-size: 20px;
    text-decoration: underline;
  }

  #instructionDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 0 1px 1px grey;
    border-radius: 20px;
    padding: 10px;
    overflow: auto;
    margin-bottom: 10px;
    height: 600px;
  }

  .instructions {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: lighter;
  }

  #paragraphThree {
    padding: 0 5px 0 15px;
  }

  .monthsDiv {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    box-shadow: 0 0 1px 1px grey;
    border-radius: 20px;
    overflow: auto;
    margin-bottom: 10px;
    padding: 5px;
  }

  .monthRow {
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(1, 1fr);
    width: 100%;
    padding: 5px 2px;
    border-bottom: 1px black solid;
    align-items: center;
  }

  .monthImg {
    width: 100%;
    aspect-ratio: 920/360;
    padding: 2px 5px;
    grid-column-start: 1;
    grid-column-end: 45;
  }

  .monthInfo {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    padding: 2px 5px;
    grid-column-start: 45;
    grid-column-end: 101;
    font-size: 15px;
  }


  #infoCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #infoCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #infoLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }

  #infoLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Impossible */
  #impossibleOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #impossibleBox {
    width: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 0 30px;
    overflow: auto;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #impossibleTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 20px;
    text-decoration: underline;
    text-align: center;
  }

  #impossibleResetButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleResetButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #impossibleResetButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #impossibleCloseButton {
    background-color: rgb(248, 128, 128);
    border: rgb(255, 17, 17) 4px solid;
    color: white;
    font-weight: bold;
    font-size: 12px;
    width: 150px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleCloseButton:hover {
    background-color: rgb(255, 17, 17);
  }

  #impossibleCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* MISC */
  #createdBy {
    font-size: 12px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #infoCopyright {
    font-size: 12px;
    padding-bottom: 5px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #titleCopyright {
    font-size: 10px;
    margin: 0;
    color: rgb(255, 255, 255);
  }

  .greyed {
    opacity: 50%;
  }

  .glowing {
    box-shadow: 0 0 10px 5px rgb(255, 255, 255);
    z-index: 3;
  }

  .bounce {
    animation: bounce .75s infinite;
  }

  #emptyMessage {
    display: none;
    font-size: 15px;
  }

  #clickToSeeResult {
    display: none;
    font-size: 15px;
    color: white;
    text-shadow: 2px 2px black;
    position: relative;
    animation: bounce 1s infinite;
  }
}

/*******************************************/
/* TABLET */
/*******************************************/
@media (600px < width <= 1024px) {
  /* Basics */
  img {
    width: 80px;
    aspect-ratio: 230/360;
  }

  body {
    background-color: rgb(0, 0, 0);
    background-image: url("../images/gung3.webp");
    background-size: fill;
    clear: both;
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    font-family: "Gowun Dodum", sans-serif;
    font-weight: 400;
    font-style: normal;
    height: 100vh;
    position: relative;
    animation: opacityShow 1s 1;
  }

  /* Header */
  header {
    margin: 30px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
  }

  #headTitles {
    display: flex;
    flex-flow: column nowrap;
    align-items: flex-start;
  }

  #titleOne {
    text-align: left;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 35px;
    margin: 0;
  }

  #titleTwo {
    text-align: left;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 40px;
    margin: 0;
  }

  #infoResetDiv {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    justify-content: space-between;
  }

  #resetButton {
    width: 45px;
    aspect-ratio: 1/1;
    border: none;
    margin: 10px 0;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #resetButton:active {
    scale: 95%;
  }

  #infoButton {
    width: 45px;
    aspect-ratio: 1/1;
    border: none;
    margin: 10px 0;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #infoButton:active {
    scale: 95%;
  }

  #date {
    text-align: center;
    color: white;
    text-shadow: 1px 1px 0.5px black;
    margin: 2vw;
  }

  /* Piles and Spread */
  #pileSpreadContainer {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
  }

  /* Piles */
  #pilesContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    border-bottom: 2px rgb(255, 255, 255) solid;
    box-shadow: 0 3px 2px -2px rgb(0, 0, 0);
    padding-bottom: 15px;
    margin: 0 20px 0 20px;
  }

  .pileClass {
    box-shadow: 0 0 3px 1px white;
    border-radius: 5%;
    width: 50px;
    aspect-ratio: 230/345;
    display: flex;
    justify-content: center;
    align-items: center;

  }

  .pileImg {
    width: 85%;
    aspect-ratio: 230/360;
  }

  /* Spread */
  #spreadContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    margin-top: 10px;
    width: 100%;
  }

  .columnClass {
    width: 25%;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    height: 270px;
  }

  .spreadRow1 {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow2 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -90px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow3 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -180px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow4 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -270px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow5 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -360px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }

  /* Hand and Buttons */
  #handContainer {
    margin: 0 0;
    padding: 0 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
  }

  /* Left Box */
  #leftBox {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    padding: 0 0;
    width: 20%;
    height: 300px;
  }

  #facedown {
    width: 80px;
    aspect-ratio: 230/360;
    display: flex;
    align-items: center;
    box-shadow: 0 0 3px 1px rgb(255, 255, 255);
    margin-top: 15px;
    z-index: 1;
  }

  #facedown:active {
    scale: 95%;
  }
  /* Right Box */
  #rightBox {
    width: 80%;
  }

  #visibleHandContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    padding: 15px 0;
  }

  .handCards {
    width: 80px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
    animation: opacityShow .4s 1;
  }

  .handCards:active {
    scale: 95%;
  }

  /* Results */
  #endingOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #resultBox {
    width: 90%;
    height: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 0 30px;
    overflow: auto;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #resultTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 35px;
    text-decoration: underline;
  }

  #resultCardsDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 0;
    overflow: auto;
    box-shadow: 0 0 2px 2px grey;
    border-radius: 20px;
    padding: 10px;
    margin-bottom: 15px;
  }

  .pileResultRows {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    padding: 0;
    margin: 1%;
    width: 48%;
  }

  .resultCardClass {
    width: 100%;
    aspect-ratio: 230/360;
    padding: 0px;
  }

  #resultMonthsDiv {
    width: 100%;
    margin-bottom: 15px;
  }

  .monthsDiv {
    min-height: 260px;
    overflow: auto;
  }

  .buttonsDiv {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
  }

  #resultCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #resultCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #resultLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }

  #resultLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Info */
  #infoOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #infoBox {
    width: 90%;
    height: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0;
    border-radius: 20px;
    padding: 0 30px;
    position: relative;
    overflow: auto;
    animation: opacityShow 1s 1;
  }

  #infoTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 35px;
    text-decoration: underline;
  }

  #instructionDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
  }

  .instructions {
    margin: 0 0 15px 0;
    font-size: 18px;
  }

  #paragraphThree {
    padding: 15px;
  }

  .monthsDiv {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    box-shadow: 0 0 2px 2px grey;
    border-radius: 20px;
    overflow: auto;
    margin-bottom: 15px;
    padding: 5px;
  }

  .monthRow {
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(1, 1fr);
    width: 100%;
    padding: 5px 2px;
    border-bottom: 1px black solid;
    align-items: center;
  }

  .monthImg {
    width: 100%;
    aspect-ratio: 920/360;
    padding: 2px 5px;
    grid-column-start: 1;
    grid-column-end: 40;
  }

  .monthInfo {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    padding: 2px 5px;
    grid-column-start: 40;
    grid-column-end: 101;
    font-size: 20px;
  }


  #infoCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #infoCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #infoLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }

  #infoLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Impossible */
  #impossibleOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #impossibleBox {
    width: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 0 30px;
    animation: opacityShow 1s 1;
  }

  #impossibleTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 35px;
    text-align: center;
    text-decoration: underline;
  }

  #impossibleResetButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleResetButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #impossibleResetButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #impossibleCloseButton {
    background-color: rgb(248, 128, 128);
    border: rgb(255, 17, 17) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleCloseButton:hover {
    background-color: rgb(255, 17, 17);
  }

  #impossibleCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* MISC */
  #createdBy {
    font-size: 15px;
    padding-bottom: 5px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #infoCopyright {
    font-size: 15px;
    padding-bottom: 5px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #titleCopyright {
    font-size: 12px;
    margin: 0;
    color: rgb(255, 255, 255);
  }

  .greyed {
    opacity: 50%;
  }

  .glowing {
    box-shadow: 0 0 10px 5px rgb(255, 255, 255);
    z-index: 3;
  }

  .bounce {
    animation: bounce 1.5s infinite;
  }

  #emptyMessage {
    display: none;
    font-size: 25px;
  }

  #clickToSeeResult {
    display: none;
    font-size: 25px;
    color: white;
    text-shadow: 2px 2px black;
    position: relative;
    animation: bounce 1s infinite;
  }
}

/*******************************************/
/* Desktop Landscape*/
/*******************************************/
@media (1024px < width) {
  /* Basics */
  img {
    width: 100px;
    aspect-ratio: 230/360;
  }

  body {
    background-color: rgb(0, 0, 0);
    background-image: url("../images/gung3.webp");
    background-size: fill;
    clear: both;
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(100, 1fr);
    font-family: "Gowun Dodum", sans-serif;
    font-weight: 400;
    font-style: normal;
    height: 100vh;
  }

  /* Header */
  header {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    grid-column-start: 70;
    grid-column-end: 101;
    grid-row-start: 10;
    grid-row-end: 101;
    margin: 0 0 0 0;
  }

  #headTitles {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
  }

  #titleOne {
    text-align: left;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 100px;
    margin: 0;
    writing-mode: vertical-rl;
  }

  #titleTwo {
    text-align: center;
    color: rgb(255, 255, 255);
    text-shadow: 4px 6px 5px black;
    font-size: 50px;
    margin: 0;
  }

  #infoResetDiv {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    bottom: 20px;
    margin: 30px 0;
  }

  #resetButton {
    width: 50px;
    aspect-ratio: 1/1;
    border: none;
    margin: 0px 15px;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #resetButton:active {
    scale: 95%;
  }

  #infoButton {
    width: 50px;
    aspect-ratio: 1/1;
    border: none;
    margin: 0px 15px;
    filter: invert(1);
    opacity: 70%;
    background-color: black;
    border-radius: 50%;
    border: 1px black solid;
  }

  #infoButton:active {
    scale: 95%;
  }

  #date {
    text-align: center;
    color: white;
    text-shadow: 1px 1px 0.5px black;
    margin: 2vw;
  }

  /* Piles and Spread */
  #pileSpreadContainer {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    grid-column-start: 1;
    grid-column-end: 70;
    grid-row-start: 1;
    grid-row-end: 50;
    margin: 30px 0 0 0;
  }

  /* Piles */
  #pilesContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    border-bottom: 2px rgb(255, 255, 255) solid;
    box-shadow: 0 3px 2px -2px rgb(0, 0, 0);
    padding-bottom: 15px;
    margin: 0 20px 0 20px;
  }

  .pileClass {
    box-shadow: 0 0 3px 1px white;
    border-radius: 5%;
    width: 80px;
    aspect-ratio: 230/345;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .pileImg {
    width: 85%;
    aspect-ratio: 230/360;
  }

  /* Spread */
  #spreadContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    margin-top: 10px;
    width: 100%;
  }

  .columnClass {
    width: 25%;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    height: 250px;
  }

  .spreadRow1 {
    position: static;
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow2 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -130px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow3 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -260px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow4 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -390px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }
  .spreadRow5 {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -520px;
    background-image: url("../images/back.webp");
    background-size: cover;
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
  }

  /* Hand and Buttons */
  #handContainer {
    margin: 0 0;
    padding: 0 0;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    grid-column-start: 1;
    grid-column-end: 70;
    grid-row-start: 50;
    grid-row-end: 101;
  }

  /* Left Box */
  #leftBox {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    align-items: center;
    padding-top: 15px;
    width: 15%;
    height: 100%;
  }

  #facedown {
    width: 100px;
    aspect-ratio: 230/360;
    display: flex;
    align-items: center;
    box-shadow: 0 0 3px 1px rgb(255, 255, 255);
    z-index: 1;
  }

  #facedown:active {
    scale: 95%;
  }

  /* Right Box */
  #rightBox {
    width: 85%;
  }

  #visibleHandContainer {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    padding-top: 15px;
  }

  .handCards {
    width: 100px;
    aspect-ratio: 230/360;
    box-shadow: 0 0 10px 2px rgb(0, 0, 0);
    animation: opacityShow .4s 1;
  }

  .handCards:active {
    scale: 95%;
  }

  /* Results */
  #endingOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #resultBox {
    width: 90%;
    height: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 0 30px;
    overflow: auto;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #resultTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 40px;
    text-decoration: underline;
  }

  #resultCardsDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 0;
  }

  .pileResultRows {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(1, 1fr);
    box-shadow: 0 0 1vh 1px rgb(0, 0, 0);
    padding: 0;
    margin: 1%;
    width: 48%;
  }

  .resultCardClass {
    width: 100%;
    aspect-ratio: 230/360;
    padding: 0px;
  }

  #resultMonthsDiv {
    width: 100%;
    margin: 0 0px;
  }

  .monthsDiv {
    min-height: 260px;
    overflow: auto;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
  }

  .buttonsDiv {
    width: 100%;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-evenly;
  }

  #resultCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }

  #resultCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #resultLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #resultLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }

  #resultLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Info */
  #infoOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #infoBox {
    width: 90%;
    height: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0;
    border-radius: 20px;
    padding: 0 30px;
    overflow: auto;
    position: relative;
    animation: opacityShow 1s 1;
  }

  #infoTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 40px;
    text-decoration: underline;
  }

  #instructionDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
  }

  .instructions {
    margin: 0 0 15px 0;
    font-size: 18px;
  }

  #paragraphThree {
    padding: 15px;
  }

  .monthsDiv {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    align-items: flex-start;
    box-shadow: 0 0 2px 2px grey;
    border-radius: 20px;
    overflow: auto;
    margin-bottom: 15px;
    padding: 5px;
  }

  .monthRow {
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(1, 1fr);
    width: 50%;
    padding: 5px 2px;
    border-bottom: 1px black solid;
    align-items: center;
    align-self: flex-end;
  }

  .monthImg {
    width: 100%;
    aspect-ratio: 920/360;
    padding: 2px 5px;
    grid-column-start: 1;
    grid-column-end: 50;
  }

  .monthInfo {
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    padding: 2px 5px;
    grid-column-start: 50;
    grid-column-end: 101;
    font-size: 20px;
  }


  #infoCloseButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoCloseButton:hover {
    background-color: rgb(48, 99, 55);
  }
  
  #infoCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #infoLanguageButton {
    background-color: rgb(148, 148, 148);
    border: rgb(104, 104, 104) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #infoLanguageButton:hover {
    background-color: rgb(104, 104, 104);
  }
  
  #infoLanguageButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* Impossible */
  #impossibleOverlay {
    z-index: 100;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: none /*change to none later */;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
  }

  #impossibleBox {
    width: 90%;
    background-color: white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 0 30px;
    animation: opacityShow 1s 1;
  }

  #impossibleTitle {
    padding: 0;
    margin-bottom: 15px;
    font-size: 40px;
    text-align: center;
    text-decoration: underline;
  }

  #impossibleResetButton {
    background-color: rgb(68, 131, 78);
    border: rgb(48, 99, 55) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleResetButton:hover {
    background-color: rgb(48, 99, 55);
  }
  
  #impossibleResetButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  #impossibleCloseButton {
    background-color: rgb(248, 128, 128);
    border: rgb(255, 17, 17) 6px solid;
    color: white;
    font-weight: bold;
    font-size: 18px;
    width: 200px;
    aspect-ratio: 18/4;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 10px;
  }

  #impossibleCloseButton:hover {
    background-color: rgb(255, 17, 17);
  }
  
  #impossibleCloseButton:active {
    transform: translateY(1px);
    transition: .1s;
  }

  /* MISC */
  #createdBy {
    font-size: 15px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #infoCopyright {
    font-size: 15px;
    padding-bottom: 5px;
    margin: 0;
    color: rgb(77, 77, 77);
  }

  #titleCopyright {
    font-size: 12px;
    margin: 0;
    color: rgb(255, 255, 255);
  }

  .greyed {
    opacity: 50%;
  }

  .glowing {
    box-shadow: 0 0 10px 5px rgb(255, 255, 255);
    z-index: 3;
  }

  .bounce {
    animation: bounce 1.5s infinite;
  }

  #emptyMessage {
    display: none;
    font-size: 30px;
  }

  #clickToSeeResult {
    display: none;
    font-size: 30px;
    color: white;
    text-shadow: 2px 2px black;
    position: relative;
    animation: bounce 1s infinite;
  }
}
