body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  overflow: hidden;
}

/* Основной контейнер лоадера */
#loader {
  width: 100vw;
  height: 100vh;
  background:
    url(./assets/bg.svg) no-repeat 0 -30px,
    var(--brand-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

@supports (height: 100dvh) {
  #loader {
    height: 100dvh;
  }
}

/* Звезды */
.star {
  width: 4px;
  height: 4px;
  background-color: #fefeff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #fefeffa3;
  position: absolute;
  display: var(--stars-display, block);
}

#star-1 {
  top: 30%;
  left: 5%;
  opacity: 0.5;
}
#star-2 {
  top: 20%;
  left: 20%;
  opacity: 0.9;
}
#star-3 {
  top: 12%;
  right: 40%;
  opacity: 0.8;
}
#star-4 {
  top: 38%;
  right: 6%;
  opacity: 0.6;
}
#star-5 {
  bottom: 35%;
  left: 12%;
  opacity: 0.7;
}
#star-6 {
  bottom: 20%;
  left: 28%;
  opacity: 0.2;
}
#star-7 {
  bottom: 17%;
  right: 23%;
  opacity: 0.5;
}

/* Фоновые изображения */
#bg-up,
#bg-down {
  position: absolute;
  display: var(--bg-elements-display, none);
  z-index: 2;
}

#bg-up {
  width: 65%;
  left: 0;
  top: 0;
}

#bg-down {
  width: 100%;
  left: 2%;
  bottom: 0;
}

/* Игровой логотип */
#game-logo {
  width: 100%;
  max-width: 900px;
  text-align: center;
  position: relative;
  margin-top: auto;
  z-index: var(--game-logo-z-index, 1);
}

#main-game-image-wrap {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

#main-game-image-wrap img {
  max-width: var(--game-image-max-width, 452px);
  position: relative;
  z-index: 2;
  margin-top: 10%;
}

#main-game-image-wrap::before {
  content: '';
  position: absolute;
  width: 100%;
  max-width: var(--game-image-width, 415px);
  z-index: 2;
  background: radial-gradient(
    ellipse at center,
    var(--glow-color, rgba(255, 255, 255, 0.4)) 20%,
    transparent 70%
  );
  height: 110%;
  border-radius: 100%;
  display: var(--glow-display, block);
  left: var(--light-position, 0);
}

#plinko-text {
  margin-top: 42px;
  width: var(--game-text-width, 359px);
  margin-bottom: 20px;
}

/* Контент лоадера */
#loader-content {
  text-align: center;
  margin-top: auto;
  margin-bottom: 40px;
  z-index: 2;
}

#logo {
  text-align: center;
  margin-bottom: var(--logo-margin, 16px);
}

#logo img {
  height: var(--logo-height, auto);
  width: var(--logo-width, auto);
}

#progress {
  width: var(--progress-width, 330px);
  height: var(--progress-height, 8px);
  border-radius: 10px;
  box-sizing: border-box;
  padding: 2px;
  position: relative;
  background-color: #fff;
}

#bar {
  position: absolute;
  border-radius: 10px;
  width: 98%;
  right: 2px;
  height: var(--bar-height, 4px);
  background-color: var(--bar-color);
}

#percent {
  margin-top: 13px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.09px;
  color: var(--fg-content-primary, #ffffff);
}

/* Медиа-запросы */
@media screen and (max-width: 1100px) {
  #bg-up {
    width: 100%;
    left: 0;
  }

  #bg-down {
    left: -10%;
    width: 110%;
  }
}

@media screen and (max-width: 744px) {
  #loader {
    background-position: var(--bg-position-mobile, -269px) 0;
  }

  #main-game-image-wrap img,
  #main-game-image-wrap::before {
    width: var(--game-image-width-mobile, 330px);
  }

  #main-game-image-wrap::before {
    left: var(--light-position-mobile, 0);
  }

  #plinko-text {
    margin-top: 24px;
    width: var(--game-text-width-mobile, 261px);
  }

  #logo {
    margin-bottom: var(--logo-margin-mobile, 20px);
  }

  #logo img {
    height: var(--logo-height-mobile, auto);
    width: var(--logo-width-mobile, auto);
  }

  #progress {
    width: 246px;
  }

  #percent {
    margin-top: 9px;
    line-height: 20px;
    font-size: 14px;
  }
}

@media screen and (max-height: 550px) {
  #plinko-text {
    margin: 10px 0;
  }
}

@media screen and (min-width: 550px) and (max-width: 744px) {
  #bg-down {
    left: -60%;
    width: 170%;
  }
}

@media screen and (max-width: 549px) {
  #bg-down {
    left: -145%;
    width: 250%;
  }
}
