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;
  }
}

#backlight-img {
  position: absolute;
  transform: translate(-27%, -94%);
  width: 137%;
  z-index: 1;
}

#backlight-img-mobile {
  display: none;
  position: absolute;
  transform: translate(17%, -105%);
  width: 100%;
  z-index: 1;
}

#coinflip-text {
  width: 452px;
  margin-top: 35px;
}

/* Стили для звезд */
.star {
  width: 4px;
  height: 4px;
  background-color: #fefeff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #fefeffa3;
  position: absolute;
}

#bg-up {
  position: absolute;
  z-index: 2;
  width: 74%;
  left: 0;
  top: 0;
}

#bg-down {
  position: absolute;
  z-index: 2;
  width: 96%;
  right: 0;
  bottom: 0;
}

#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 {
  bottom: 55%;
  right: 35%;
  opacity: 0.5;
}

#star-9 {
  bottom: 50%;
  left: 37.5%;
  opacity: 0.5;
}

#star-10 {
  top: 22%;
  left: 40%;
  opacity: 0.9;
}

#star-11 {
  bottom: 23%;
  right: 4%;
  opacity: 0.5;
}

#star-12 {
  top: 18%;
  right: 16%;
  opacity: 0.6;
}

/* Стили для блока с лого игры */
#game-logo {
  width: 100%;
  max-width: 900px;
  text-align: center;
  position: relative;
  margin-top: auto;
}

#wave {
  position: absolute;
  left: -14%;
  top: -44%;
  width: 140%;
  max-height: 82vh;
  z-index: 1;
  mix-blend-mode: screen;
}

#main-game-image-wrap {
  position: relative;
  width: fit-content;
  margin: 0 auto;
}

#main-image {
  max-height: 50vh;
  max-width: 372px;
  position: relative;
  z-index: 2;
}

#main-image-mobile {
  display: none;
  position: absolute;
  max-width: 500px;
  transform: translate(-50%, -50%);
}

/* Контент лоадера (логотип, прогресс) */
#loader-content {
  text-align: center;
  margin-top: auto;
  margin-bottom: 40px;
  z-index: 2;
}

#logo {
  text-align: center;
  margin-bottom: 20px;
}

#logo img {
  height: var(--logo-height, 28px);
  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);
}

@media screen and (max-width: 1100px) {
  #bg-up {
    width: 120%;
    left: -12%;
    bottom: 47%;
  }
  #bg-down {
    left: -25%;
    width: 140%;
    bottom: 0;
  }
}

/* Медиа-запросы для адаптивности */
@media screen and (max-width: 744px) {
  #wave {
    width: 170%;
    left: -22%;
    top: -30%;
    transform: translate(-5%, -31%);
    max-height: 75vh;
  }

  #main-image {
    max-width: 225px;
  }

  #logo {
    margin-bottom: var(--logo-margin-bottom-mobile, 20px);
  }

  #logo img {
    height: var(--logo-height-mobile, 22px);
    width: var(--logo-width-mobile, auto);
  }

  #backlight-img {
    display: none;
  }

  #backlight-img-mobile {
    display: block;
    left: 50%;
    top: 50%;
    transform: translate(-45%, -81%);
    width: 518px;
  }

  #coinflip-text {
    width: 278px;
  }

  #progress {
    width: 246px;
  }

  #percent {
    margin-top: 9px;
    line-height: 20px;
    font-size: 14px;
  }
}

@media screen and (max-width: 550px) {
  #wave {
    top: -10%;
  }
}

@media screen and (max-height: 550px) {
  #game-logo {
    margin-top: 20px;
  }

  #main-image {
    max-height: 35vh;
  }

  #wave {
    left: -16%;
    top: -44%;
    max-height: 60vh;
  }
}
