/* ____________________Прелоадер_______________________ */

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
  /* background-image: url("../images/bg_preload.png"); */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-image 1s ease-in-out;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #eae6ff;
  border-top: 5px solid #6443fa;
  border-radius: 50%;
  animation: spin 2s linear infinite;
}

/* ____________________Страница_______________________ */

.snowball {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-image: url("../images/snowball.png");
  opacity: 1;
}

.main {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: url("../images/bg.png");
  background-size: cover;
  background-position: bottom;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.logo {
  width: 12%;
  min-width: 140px;
  aspect-ratio: 220/50;
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 3;
}

/* ____________________Дерево_______________________ */

.tree {
  width: 48%;
  aspect-ratio: 897/1080;
  max-width: 897px;
  max-height: 1080px;
  position: relative;
  background-image: url("../images/tree.png");
  background-repeat: no-repeat;
  background-size: cover;
}

.lights__container {
  width: 100%;
  height: 100%;
  position: relative;
  list-style-type: none;
}

.light {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
}

.light-red {
  background-color: #ff0037;
  animation: flash-red 1s infinite;
}

.light-blue {
  background-color: #3c68ff;
  animation: flash-blue 1.2s infinite;
}

.light-yellow {
  background-color: #ffcc1b;
  animation: flash-yellow 1.5s infinite;
}

.light-violet {
  background-color: #6443fa;
  animation: flash-violet 2s infinite;
}

/* ____________________Подарки_______________________ */

.gift_container {
  width: 100%;
  height: 40%;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.gifts {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 1%;
  margin-top: 20px;
  list-style-type: none;
  /* border: #ff0021 2px solid; */
}

.gift {
  width: 20%;
  aspect-ratio: 1/1;
  position: absolute;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.gift_img {
  width: 100%;
  height: 100%;
}

.gift:hover {
  scale: 1.01;
  opacity: 1;
}

.gift_1 {
  bottom: 53%;
  left: 15%;
  background-image: url("../images/gift_1.png");
}

.gift_2 {
  bottom: 50%;
  left: 26.5%;
  background-image: url("../images/gift_2.png");
}

.gift_3 {
  aspect-ratio: 1/1.1;
  bottom: 40%;
  left: 41%;
  background-image: url("../images/gift_3.png");
}

.gift_4 {
  aspect-ratio: 1/1.2;
  bottom: 50%;
  left: 54%;
  background-image: url("../images/gift_4.png");
}

.gift_5 {
  width: 18%;
  bottom: 59%;
  left: 68%;
  background-image: url("../images/gift_5.png");
}

/* ____________________Поздравления_______________________ */

.popap {
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(103, 80, 190, 0.1);
  backdrop-filter: blur(8.4px);
  -webkit-backdrop-filter: blur(8.4px);
  transition: opacity 0.5s ease-in-out, visibility 0.1s ease-in-out;
  z-index: 99;
}

.popap.is-active {
  visibility: visible;
  opacity: 1;
}

.container {
  border-radius: 40px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px;
}

.container__title {
  color: #ff0021;
  text-align: center;

  font-size: 40px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%;
  margin: 0 0 8px 0;
}

.container__subtitle {
  color: #2f2f38;
  text-align: center;

  font-size: 24px;
  font-style: normal;
  font-weight: normal;
  line-height: 110%;
  margin: 0 0 24px 0;
}

.container__close {
  width: 100%;
  background-color: #5d8ed0;
  border-radius: 100px;
  border: #5d8ed0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-style: normal;
  font-weight: normal;
  line-height: 26px;
  outline: none;
  padding: 24px 0px;
  transition: background-color 1s ease-in-out;
}

.container__close:hover {
  background-color: #87bbff;
  cursor: pointer;
}

/* ____________________Подсказка_______________________ */

.modal {
  width: 234px;
  height: 110px;
  position: absolute;
  top: 50%;
  left: 60%;
  display: none;
  justify-content: center;
  align-items: center;
  background-image: url("../images/cloud.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 0px 0px 30px 0px;

  transition: background-color 1s ease-in-out;
  z-index: 5;
}

.modal.is-active {
  display: flex;
}

.modal__text {
  color: color(display-p3 0.1608 0.1608 0.1608);
  font-feature-settings: "liga" off, "clig" off;

  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 110%;
}

.modal__text span {
  color: #ff0021;
}

/* ____________________Адаптив_______________________ */

@media screen and (max-width: 1500px) and (orientation: landscape) {
  .light {
    width: 15px;
    height: 15px;
  }
}

@media screen and (max-width: 1200px) {
  .light {
    width: 12px;
    height: 12px;
  }
}

@media screen and (max-width: 780px) and (orientation: portrait) {
  .modal {
    width: 234px;
    height: 110px;
    top: 50%;
    left: 50%;
    padding: 0px 0px 30px 0px;
  }

  .modal__text {
    font-size: 20px;
    font-weight: normal;
  }
}

/* ____________________Мобилка_______________________ */

@media screen and (max-width: 500px) {
  .main {
    background-image: url("../images/bg_mob.png");
    background-position-x: center;
    background-position-y: bottom;
  }

  .tree {
    width: 100%;
  }

  .light {
    width: 9px;
    height: 9px;
  }

  .gift:hover {
    scale: 1;
    opacity: 0;
  }

  .container {
    width: 80%;
    padding: 30px;
  }

  .container__title {
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    margin: 0 0 8px 0;
  }

  .container__subtitle {
    font-size: 16px;
    margin: 0 0 24px 0;
  }

  .container__close {
    font-size: 16px;
    padding: 14px 0px;
  }

  .modal {
    width: 170px;
    height: 80px;
    top: auto;
    bottom: 40%;
    padding: 0px 0px 20px 0px;
  }

  .modal__text {
    font-size: 16px;
    font-weight: normal;
  }
}

@media screen and (max-width: 400px) {
  .container__title {
    font-size: 28px;
  }
  .container__subtitle {
    font-size: 14px;
  }
}

/* ____________________Анимации_______________________ */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes flash-red {
  0%,
  100% {
    box-shadow: 0px 0px 30px 6px #ff0037;
  }
  50% {
    box-shadow: 0px 5px 24px 3px rgba(255, 0, 55, 0.3);
  }
}

@keyframes flash-blue {
  0%,
  100% {
    box-shadow: 0px 0px 30px 8px #3c68ff;
  }
  50% {
    box-shadow: 0px 5px 24px 3px rgba(60, 104, 255, 0.3);
  }
}

@keyframes flash-yellow {
  0%,
  100% {
    box-shadow: 0px 5px 30px 6px #ffcc1b;
  }
  50% {
    box-shadow: 0px 15px 24px 13px rgba(255, 204, 27, 0.3);
  }
}

@keyframes flash-violet {
  0%,
  100% {
    box-shadow: 0px 0px 20px 8px #6443fa;
  }
  50% {
    box-shadow: 10px 10px 20px 10px rgba(130, 103, 251, 0.3);
  }
}
