
body {
  font-family: "Lora", serif;
  background-color: #022f4e;
  margin: 0;
}

.card-container {
  background-image: url("bg.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.card-container * {
  box-sizing: border-box;
}

.card {
  perspective: 1600px;
  width: 420px;
  height: 600px;

  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);

  transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card.is-opened {
  transform: translate(-50%, -50%) rotate(0deg) translate(175px, 0);
}

.card.is-opened .cart-page-front {
  transform: rotateY(-180deg);
}

@keyframes cardIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -150%) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-10deg);
  }
}

.card-page {
  width: 100%;
  height: 100%;
  position: absolute;
  transition: transform 1s ease-in-out;
  cursor: pointer;
}

.cart-page-front {
  transform-origin: left center;
  transform-style: preserve-3d;
  transform: rotateY(-20deg);
  z-index: 2;
}

.cart-page-outside,
.cart-page-inside {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.cart-page-outside {
  border: 10px solid #fbfbfb;
  background-color: #054d88;
  background-image: url("front-bg.png");
  background-size: cover;
  background-position: center;
}

.cart-page-inside,
.cart-page-bottom {
  background-color: #d4d1d0;
  border: 20px solid #d4d1d0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.cart-page-inside {
  transform: rotateY(-180deg);
  border-right: none !important;
}

.cart-page-bottom {
  z-index: 1;
  border-left: none !important;
  font-size: 18px;
}

.card-images img {
  width: 100%;
  height: 100%;
}

.title {
  font-size: 24px;
  margin-bottom: 16px;
  font-weight: 500;
  color: rgb(1, 39, 119);
}

.text {
  text-align: left;
  margin-left: 36px;
  color: rgb(19, 36, 71);
}

.cart-page-bottom h1 {
  animation: fadeInUpColor 1.5s ease forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767px) {
  .card {
    width: 300px;
    height: 450px;
  }

  .card.is-opened {
    transform: translate(-50%, -50%) rotate(0deg) translate(130px, 0);
  }

  .cart-page-outside {
    border-width: 6px;
  }

  .cart-page-inside,
  .cart-page-bottom {
    border-width: 12px;
  }

  .cart-page-bottom {
    font-size: 14px;
  }
}

@media (max-width: 479px) {
  .card {
    width: 200px;
    height: 330px;
  }

  .card.is-opened {
    transform: translate(-50%, -50%) rotate(0deg) translate(90px, 0);
  }

  .cart-page-inside,
  .cart-page-bottom {
    border-width: 10px;
  }

  .cart-page-bottom {
    font-size: 12px;
    line-height: 1.1;
  }
}

/* Snow */
#snowCanvas {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}
