:root {
  --navBodyPadding: var(--navHeight);
  --bodyPadding: var(--footerHeight);

  --doorSize: 150px;
  --openedFontColor: white;
}

body {
  background-image: url("/src/img/snowy-forest.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left;
  background-attachment: fixed;
  min-height: calc(100vh + var(--footerHeight));
}
@media (max-width: 450px) {
  body {
    background-position: -100px;
  }
}
body.openedDoor {
  background-image: url("/src/img/cozy-window.jpg");
}
body.openedRiddle {
  background-image: url("/src/img/riddle.jpg");
}

#adventCalendar {
  width: 100%;
  min-height: calc(100vh - var(--navHeight));
  position: relative;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
}

.adventDoor {
  width: var(--doorSize);
  height: var(--doorSize);
  position: relative;
  margin: 24px;
  border-radius: 2px;
  border: 2px solid white;
  box-shadow: 0px 0px 20px 0px black, 4px 2px 12px 1px black;
  transition: 2s;
  background-image: url("/src/img/symbols/white-bow.png");
  background-size: cover;
  color: white;
  z-index: 1;
}
@media (max-width: 650px) {
  .adventDoor {
    margin: 12px;
  }
}
@media (max-width: 387px) {
  #adventCalendar {
    padding: 20px 8px;
  }

  .adventDoor {
    margin: 8px;
  }
}
.adventDoor.allowed {
  cursor: pointer;
}
.adventDoor.today {
  color: gold;
}
.adventDoor.yellow.today {
  color: red;
}
.adventDoor.allowed:hover,
.adventDoor.allowed:focus {
  animation: shake 0.5s;
}
@keyframes shake {
  0% {
    rotate: 0deg;
  }

  25% {
    rotate: 5deg;
  }

  75% {
    rotate: -5deg;
  }

  100% {
    rotate: 0deg;
  }
}
.adventDoor.red {
  background-color: red;
}
.adventDoor.yellow {
  background-color: gold;
}
.adventDoor.blue {
  background-color: blue;
}
.adventDoor.green {
  background-color: green;
}
.adventDoor.purple {
  background-color: purple;
}
.adventDoor.darkred {
  background-color: darkred;
}
.adventDoor.orange {
  background-color: orange;
}
.adventDoor.gold {
  background-color: lightskyblue;
  background-image: url("/src/img/symbols/golden-bow.png");
}
.adventDoor.black {
  background-image: url("/src/img/riddle.jpg");
  background-position: center;
  border-color: black;
}
.adventDoor.black .adventNumber {
  font-size: 1.5em;
  text-align: end;
}
.adventDoor.notAllowed {
  animation: notAllowed 4s ease-in-out;
}
@keyframes notAllowed {
  0% {
    rotate: 0deg;
    scale: 1;
  }

  5% {
    color: tomato;
  }

  45% {
    rotate: 360deg;
    scale: 0;
    opacity: 0;
    color: tomato;
  }

  55% {
    rotate: 360deg;
    scale: 0;
    opacity: 0;
    color: tomato;
  }

  100% {
    rotate: 360deg;
    scale: 1;
    opacity: 1;
  }
}
.adventDoor.hidden {
  opacity: 0 !important;
  scale: 0 !important;
}

.adventDoor.opened {
  animation: heartbeat 1s infinite;
}
@keyframes heartbeat {
  0% {
    scale: 100%;
  }
  15% {
    scale: 110%;
  }
  25% {
    scale: 105%;
  }
  35% {
    scale: 110%;
  }
  100% {
    scale: 100%;
  }
}

.adventDoor .adventNumber {
  font-size: 2em;
  font-weight: bold;
  color: inherit;
  position: absolute;
  bottom: 4px;
  right: 8px;
  user-select: none;
  text-shadow: 1px 1px 2px black;
}

/* opened */
#openedDiv {
  width: 80%;
  margin-left: 10%;
  height: 0px;
  margin-top: 40px;
  border: 4px double var(--openedFontColor);
  border-radius: 8px;
  box-shadow: 4px 4px 16px 2px black;
  opacity: 0;
  overflow: hidden;

  display: none;
}
@media (max-width: 550px) {
  #openedDiv {
    width: 90%;
    margin-left: 5%;
  }
}
@media (max-width: 450px) {
  #openedDiv {
    width: 95%;
    margin-left: 2.5%;
  }
}
#openedDiv.show {
  display: block;
  animation: showOpened 1s ease-in-out forwards;
}
#openedDiv.hide {
  display: block;
  animation: hideOpened 1s ease-in-out forwards;
}
@keyframes showOpened {
  100% {
    opacity: 1;
    height: calc(100vh - var(--navHeight) - 80px);
  }
}
@keyframes hideOpened {
  0% {
    opacity: 1;
    height: calc(100vh - var(--navHeight) - 80px);
  }

  100% {
    opacity: 0;
    height: 0px;
  }
}
@media (max-width: 500px) {
  :root {
    --bodyPadding: calc(var(--footerHeight) + 100px);
  }

  @keyframes showOpened {
    100% {
      opacity: 1;
      height: 711px;
    }
  }
  @keyframes hideOpened {
    0% {
      opacity: 1;
      height: 711px;
    }

    100% {
      opacity: 0;
      height: 0px;
    }
  }
}
#openedDiv.red {
  background-color: red;
}
#openedDiv.yellow {
  background-color: gold;
  --openedFontColor: black;
}
#openedDiv.blue {
  background-color: blue;
}
#openedDiv.green {
  background-color: green;
}
#openedDiv.purple {
  background-color: purple;
}
#openedDiv.darkred {
  background-color: darkred;
}
#openedDiv.orange {
  background-color: orange;
  --openedFontColor: black;
}
#openedDiv.gold {
  background-color: lightskyblue;
  --openedFontColor: black;
}

#openedContentDiv {
  width: 100%;
  padding: 16px;
  height: calc(100vh - var(--navHeight) - 80px - 64px);
}

@media (max-width: 500px) {
  #openedContentDiv {
    height: 647px;
  }
}

.riddle {
  width: 100%;
  height: calc(100vh - var(--navHeight) - 80px - 64px - 32px);
}

@media (max-width: 500px) {
  .riddle {
    height: 615px;
  }
}

.openedHr {
  border: none;
  border-top: 1px solid var(--openedFontColor);
  margin: 0;
}

.openedCloseBtn {
  background: none;
  border: none;
  width: 100%;
  font-size: 1em;
  height: 52px;
  cursor: pointer;
  margin-top: 3px;
  font-variant-caps: petite-caps;
  letter-spacing: 2px;
  outline: none;
  color: var(--openedFontColor);
  transition: all 0.15s;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4px 8px;
}
.openedCloseBtn:hover,
.openedCloseBtn:focus {
  text-decoration: underline;
  letter-spacing: 4px;
}

/* riddle */
#riddleArea {
  display: none;
  flex-direction: column;
  width: 70%;
  margin-left: 15%;
  margin-top: 50px;
  margin-bottom: 100px;
  border: 1px solid white;
  border-radius: 4px;
  box-shadow: 2px 2px 8px 0px black;
  background-color: black;
  overflow-x: hidden;
  transition: 1s ease-out;
  scale: 0;
  opacity: 0;
}
#riddleArea.show {
  scale: 1;
  opacity: 1;
}
@media (max-width: 700px) {
  #riddleArea {
    width: 80%;
    margin-left: 10%;
  }
}
@media (max-width: 500px) {
  #riddleArea {
    width: 90%;
    margin-left: 5%;
  }
}

#riddleIframe {
  width: 100%;
  height: 1500px;
}

.pacifico {
  font-family: Pacifico;
}

#solutionIframe {
  width: 100%;
  height: 500px;
}

/* transition */
#transition {
  position: fixed;
  top: 0px;
  left: 0px;
  height: 100vh;
  margin-left: 100%;
  width: 100%;
  background: var(--bakawecolor);
  z-index: 2;
  animation-timing-function: ease-in-out;
  animation-duration: 2s;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
}
@keyframes transition {
  50% {
    margin-left: 0px;
  }

  100% {
    margin-left: -100%;
  }
}
#transitionPlVIcon {
  width: 200px;
  margin: 5px;
}
@media (max-width: 210px) {
  #transitionPlVIcon {
    width: 90%;
  }
}
#transitionBaKaweIcon {
  width: 300px;
  margin: 5px;
}
@media (max-width: 310px) {
  #transitionBaKaweIcon {
    width: 90%;
  }
}

/* offline */
#offline {
  position: fixed;
  top: 0px;
  left: 0px;
  height: 100vh;
  margin-left: 100%;
  width: 100%;
  background: var(--bakawecolor);
  z-index: 2;
  animation-timing-function: ease-in-out;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
}
#offline div {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}
#offlineNote {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  padding: 10px 20px;
}
@keyframes show {
  100% {
    margin-left: 0px;
  }
}
@keyframes hide {
  0% {
    margin-left: 0px;
  }
}
#offlinePlVIcon {
  width: 200px;
  margin: 5px;
}
@media (max-width: 210px) {
  #offlinePlVIcon {
    width: 90%;
  }
}
#offlineBaKaweIcon {
  width: 300px;
  margin: 5px;
}
@media (max-width: 310px) {
  #offlineBaKaweIcon {
    width: 90%;
  }
}

/* locked */
#locked {
  position: absolute;
  top: 0px;
  left: 0px;
  height: 100vh;
  margin-left: 0px;
  width: 100%;
  background: var(--bakawecolor);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  flex-wrap: wrap;
}

/* snow */
.snowflake {
  color: #fff;
  font-size: 1em;
  font-family: Arial;
  text-shadow: 0 0 1px #000;
}

@-webkit-keyframes snowflakes-fall {
  0% {
    top: -10%;
  }
  100% {
    top: 100%;
  }
}
@-webkit-keyframes snowflakes-shake {
  0% {
    -webkit-transform: translateX(0px);
    transform: translateX(0px);
  }
  50% {
    -webkit-transform: translateX(80px);
    transform: translateX(80px);
  }
  100% {
    -webkit-transform: translateX(0px);
    transform: translateX(0px);
  }
}
@keyframes snowflakes-fall {
  0% {
    top: -10%;
  }
  100% {
    top: 100%;
  }
}
@keyframes snowflakes-shake {
  0% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(80px);
  }
  100% {
    transform: translateX(0px);
  }
}
.snowflake {
  position: fixed;
  top: -10%;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
  -webkit-animation-name: snowflakes-fall, snowflakes-shake;
  -webkit-animation-duration: 10s, 3s;
  -webkit-animation-timing-function: linear, ease-in-out;
  -webkit-animation-iteration-count: infinite, infinite;
  -webkit-animation-play-state: running, running;
  animation-name: snowflakes-fall, snowflakes-shake;
  animation-duration: 10s, 3s;
  animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite;
  animation-play-state: running, running;
}
.snowflake:nth-of-type(0) {
  left: 1%;
  -webkit-animation-delay: 0s, 0s;
  animation-delay: 0s, 0s;
}
.snowflake:nth-of-type(1) {
  left: 10%;
  -webkit-animation-delay: 1s, 1s;
  animation-delay: 1s, 1s;
}
.snowflake:nth-of-type(2) {
  left: 20%;
  -webkit-animation-delay: 6s, 0.5s;
  animation-delay: 6s, 0.5s;
}
.snowflake:nth-of-type(3) {
  left: 30%;
  -webkit-animation-delay: 4s, 2s;
  animation-delay: 4s, 2s;
}
.snowflake:nth-of-type(4) {
  left: 40%;
  -webkit-animation-delay: 2s, 2s;
  animation-delay: 2s, 2s;
}
.snowflake:nth-of-type(5) {
  left: 50%;
  -webkit-animation-delay: 8s, 3s;
  animation-delay: 8s, 3s;
}
.snowflake:nth-of-type(6) {
  left: 60%;
  -webkit-animation-delay: 6s, 2s;
  animation-delay: 6s, 2s;
}
.snowflake:nth-of-type(7) {
  left: 70%;
  -webkit-animation-delay: 2.5s, 1s;
  animation-delay: 2.5s, 1s;
}
.snowflake:nth-of-type(8) {
  left: 80%;
  -webkit-animation-delay: 1s, 0s;
  animation-delay: 1s, 0s;
}
.snowflake:nth-of-type(9) {
  left: 90%;
  -webkit-animation-delay: 3s, 1.5s;
  animation-delay: 3s, 1.5s;
}
#snowflakes.hidden {
  opacity: 0;
}
