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

/* Основной контейнер лоадера */
#loader {
  width: 100vw;
  height: 100vh;
  background: var(--brand-gradient);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

@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;
}

#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;
}

#star-8 {
  top: 25%;
  right: 43%;
  opacity: 0.8;
}

#star-9 {
  top: 25%;
  right: 52%;
  opacity: 0.9;
}

#star-10 {
  top: 52%;
  right: 45%;
  opacity: 0.9;
}

#star-11 {
  bottom: 23%;
  right: 4%;
  opacity: 0.5;
}

#bg-up {
  position: absolute;
  z-index: 2;
  width: 65%;
  left: 0;
  top: 0;
}

#bg-down {
  position: absolute;
  z-index: 2;
  width: 100%;
  left: 4%;
  bottom: 0;
}

#wave {
  position: absolute;
  left: 15%;
  top: -12%;
  max-height: 70vh;
  z-index: 1;
}

/* Стили для блока с лого игры */
#game-logo {
  width: 100%;
  max-width: 900px;
  text-align: center;
  position: relative;
  margin-top: auto;
  z-index: 2;
}

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

#main-image {
  max-width: 484px;
  position: relative;
  z-index: 2;
  margin-top: 24%;
}

#main-game-image-wrap::before {
  content: '';
  position: absolute;
  width: 100%;
  max-width: 415px;
  z-index: 2;
  background: var(
    --spotlight-color,
    radial-gradient(ellipse at center, #ffffff 20%, transparent 70%)
  );
  height: 90%;
  border-radius: 100%;
}

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

#logo {
  text-align: center;
  margin-bottom: var(--logo-margin-bottom, 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(--progress-bar-height, 4px);
  background-color: var(--progress-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, #fff);
}

#dice-text {
  margin-top: var(--dice-text-margin-top, 0);
  max-height: 10vh;
  margin-bottom: 58px;
}

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 744px) {
  #wave {
    width: 150%;
    left: 10%;
    top: -8%;
  }

  #dice-text {
    margin-top: 20px;
    max-width: 45%;
  }

  #main-image {
    width: 70%;
    max-width: 500px;
  }

  #main-game-image-wrap::before {
    width: var(--spotlight-width-mobile, 77%);
    max-width: var(--spotlight-max-width-mobile, 500px);
  }

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

  #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;
  }

  #bg-up {
    width: var(--bg-up-width-mobile, 140%);
    left: var(--bg-up-left-mobile, -26%);
  }

  #bg-down {
    width: var(--bg-down-width-mobile, 250%);
    left: var(--bg-down-left-mobile, -90%);
  }
}

@media screen and (max-width: 550px) {
  #main-image {
    max-width: var(--main-image-max-width-small, 80%);
  }
}

@media screen and (max-height: 550px) {
  #game-logo {
    margin-top: 20px;
  }

  #main-image {
    max-height: 35vh;
  }

  #wave {
    left: -16%;
    top: -44%;
    max-height: 60vh;
  }
}

@media screen and (max-width: 350px) {
  #bg-up {
    left: 0;
    width: 120%;
  }

  #bg-down {
    right: 0;
    width: 330%;
  }
}
