@import url('https://fonts.cdnfonts.com/css/christmas-classica');
body {
  --width-card: 200px;
  --height-card: 300px;
  --color-background: crimson;
  --color-frame: white;
  --color-card: crimson;
  --color-font: white;
  --frame-width: 10px;
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-background);
  color: var(--color-font);
}

#container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  position: relative;
  text-align: center;
  font-family: 'Christmas Classica';
}

.card {
  position: relative;
  width: var(--width-card);
  height: var(--height-card);
  transform-style: preserve-3d;
  transform: perspective(2500px);
  transition: transform 3s;
  font-family: 'Mountains of Christmas';
}

.card .front {
  position: relative;
  background-color: var(--color-card);
  border: var(--color-frame) var(--frame-width) solid;
  width: var(--width-card);
  height: var(--height-card);
  overflow: hidden;
  transform-origin: left;
  transition: 0.3s;
}

.card .inside {
  position: absolute;
  background-color: var(--color-card);
  border: var(--color-frame) var(--frame-width) solid;
  width: var(--width-card);
  height: var(--height-card);
  z-index: -1;
  left: 0;
  top: 0;
}

input#open {
  display: none;
}

.open {
  position: absolute;
  width: var(--width-card);
  height: var(--height-card);
  left: 0;
  top: 0;
  background-color: transparent;
  z-index: 6;
  cursor: pointer;
}

#open:checked ~ .front {
  transform: rotateY(-180deg);
}

#open:checked ~ .front .content {
  display: none;
}

#bakgrund {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

#bakgrund img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#snow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

.snowflake {
  position: absolute;
  top: -10px;
  z-index: 1000;
  opacity: 0.9;
  color: white;
  font-size: 24px;
  pointer-events: none;
  user-select: none;
  animation: fall 10s linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

.container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.santa-left, .santa-right {
  position: relative;
  z-index: 0;
}

.santa-left {
  animation: dance-left 2s infinite ease-in-out;
  left: 35vw;
}

.santa-right {
  animation: dance-right 2s infinite ease-in-out;
  right: 55vw;
}

@keyframes dance-left {
  0% {
      transform: translateY(0) rotate(0deg);
  }
  25% {
      transform: translateY(-10px) rotate(-10deg);
  }
  50% {
      transform: translateY(0) rotate(0deg);
  }
  75% {
      transform: translateY(10px) rotate(10deg);
  }
  100% {
      transform: translateY(0) rotate(0deg);
  }
}

@keyframes dance-right {
  0% {
      transform: translateY(0) rotate(0deg);
  }
  25% {
      transform: translateY(-10px) rotate(10deg);
  }
  50% {
      transform: translateY(0) rotate(0deg);
  }
  75% {
      transform: translateY(10px) rotate(-10deg);
  }
  100% {
      transform: translateY(0) rotate(0deg);
  }
}
