@import url("https://fonts.googleapis.com/css2?family=Mountains+of+Christmas&display=swap");

* {
  font-family: "Mountains of Christmas", serif;
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
}

:root {
  --red: #dc3d2a;
  --blue: #87ceeb;
}

.overflow {
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
  border-radius: 12px;
}

button {
  position: relative;
  width: 150px;
  height: 50px;
  border: 0px solid;
  outline: 0px solid;
  cursor: pointer;
  background: var(--blue);
  border-radius: 12px;
}

body {
  background: linear-gradient(250deg, var(--red), var(--blue));;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.santa {
  width: 45px;
  position: absolute;
  z-index: -1;
  top: 0px;
  transition: 250ms;
}

.christmas-tree {
  width: 30px;
  position: absolute;
  transform: translateY(30px);
  transition: 300ms;
  transition-delay: 500ms;
}

.christmas-tree-1 {
  left: 0px;
  top: 20px;
}

.christmas-tree-2 {
  right: 0px;
  top: 20px;
}

.cloud-container {
  position: absolute;
  width: 100%;
  transform: translateY(-40px);
  transition: 250ms;
  transition-delay: 250ms;
}

.cloud {
  fill: #fff;
  position: absolute;
}

.cloud:nth-child(1) {
  left: 30px;
  top: 3px;
  animation-name: cloud;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: backwards;
}

.cloud:nth-child(2) {
  right: 30px;
  top: 14px;
  animation-name: cloud;
  animation-duration: 4s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-fill-mode: backwards;
}

@keyframes cloud {
  0% {
    transform: translateX(0px);
  }

  50% {
    transform: translateX(-4px);
  }

  100% {
    transform: translateX(4px);
  }
}

.snowflake {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.snowflake:nth-child(1) {
  transition: 0.8s;
  filter: drop-shadow(0 0 10px #fffdef);
  width: 30px;
  height: 30px;
  inset: 0;
}

.snowflake:nth-child(2) {
  transition: 0.8s;
  filter: drop-shadow(0 0 10px #fffdef);
  width: 20px;
  height: 20px;
  inset: 0;
}

.snowflake:nth-child(3) {
  transition: 0.8s;
  filter: drop-shadow(0 0 10px #fffdef);
  width: 40px;
  height: 40px;
  inset: 0;
}

.snowflake:nth-child(4) {
  transition: 0.8s;
  filter: drop-shadow(0 0 10px #fffdef);
  width: 10px;
  height: 10px;
  inset: 0;
}

.snowflake:nth-child(5) {
  transition: 0.8s;
  filter: drop-shadow(0 0 10px #fffdef);
  width: 8px;
  height: 8px;
  inset: 0;
}

.sun {
  position: absolute;
  inset: 0;
  margin: auto;
  animation-name: sun;
  animation-duration: 5s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

@keyframes sun {
  from {
    transform: rotate(0.5turn);
  }

  to {
    transform: rotate(1turn);
  }
}

.text-container {
  color: white;
  background: var(--red);
  width: 100%;
  height: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  z-index: 11;
  transition: 250ms;
  font-size: 20px;
}

/* hover state css */
button:hover {
  box-shadow: 0 0 25px var(--blue);
}

button:hover .christmas-tree {
  transform: translateY(0px);
}

button:hover .cloud-container {
  transform: translateY(0px);
}

button:hover .snowflake:nth-child(1) {
  top: 95%;
  left: 25%;
  animation-name: sun;
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 1;
}

button:hover .snowflake:nth-child(2) {
  top: -35%;
  left: 10%;
  animation-name: sun;
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  opacity: 1;
}

button:hover .snowflake:nth-child(3) {
  opacity: 1;
  top: -80%;
  left: -30%;
  animation-name: sun;
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

button:hover .snowflake:nth-child(4) {
  opacity: 1;
  top: 120%;
  left: 80%;
  animation-name: sun;
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

button:hover .snowflake:nth-child(5) {
  opacity: 1;
  top: 25%;
  left: 115%;
  animation-name: sun;
  animation-duration: 20s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

button:hover .santa {
  transform: translate(-30px, -40px);
}

button:hover .text-container {
  transform: translateY(-100%);
}

button:hover .snowflaked {
 transition: all 0.8s ease;
  color: #87ceeb;
  font-size: 2.5em;
  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);
  }
}
.snowflaked {
  transition: all 0.8s ease;
  position: fixed;
  top: -10%;
  z-index: 9999;
  -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;
}
.snowflaked:nth-of-type(0) {
  left: 1%;
  -webkit-animation-delay: 0s, 0s;
  animation-delay: 0s, 0s;
}
.snowflaked:nth-of-type(1) {
  left: 10%;
  -webkit-animation-delay: 1s, 1s;
  animation-delay: 1s, 1s;
}
.snowflaked:nth-of-type(2) {
  left: 20%;
  -webkit-animation-delay: 6s, 0.5s;
  animation-delay: 6s, 0.5s;
}
.snowflaked:nth-of-type(3) {
  left: 30%;
  -webkit-animation-delay: 4s, 2s;
  animation-delay: 4s, 2s;
}
.snowflaked:nth-of-type(4) {
  left: 40%;
  -webkit-animation-delay: 2s, 2s;
  animation-delay: 2s, 2s;
}
.snowflaked:nth-of-type(5) {
  left: 50%;
  -webkit-animation-delay: 8s, 3s;
  animation-delay: 8s, 3s;
}
.snowflaked:nth-of-type(6) {
  left: 60%;
  -webkit-animation-delay: 6s, 2s;
  animation-delay: 6s, 2s;
}
.snowflaked:nth-of-type(7) {
  left: 70%;
  -webkit-animation-delay: 2.5s, 1s;d
  animation-delay: 2.5s, 1s;
}
.snowflaked:nth-of-type(8) {
  left: 80%;
  -webkit-animation-delay: 1s, 0s;
  animation-delay: 1s, 0s;
}
.snowflaked:nth-of-type(9) {
  left: 90%;
  -webkit-animation-delay: 3s, 1.5s;
  animation-delay: 3s, 1.5s;
}

