.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.loading-screen__board {
  height: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loading-screen__logo-container {
  position: relative;
  margin-top: auto;
  margin-right: auto;
  margin-bottom: auto;
  margin-left: auto;
  width: 80px;
  height: 93px;
  perspective: 1000px; /* Добавляем перспективу */
  transform-style: preserve-3d; /* Сохраняем 3D-трансформации */
}

.loading-screen__logo-container_loaded {
  animation-name: logoToTop;
  animation-duration: 1s;
  animation-fill-mode: forwards;
}

.loading-screen--started {
  pointer-events: none;
  transition: 1.5s ease-in-out;
  transition-delay: 2s;
  opacity: 0;
}

.loading-screen__logo {
  position: absolute;
  width: 80px;
  z-index: 2;
  transition: transform 1s ease-in-out;
}

.loading-screen__logo:nth-of-type(1) {
  z-index: 999;
  transform: translateZ(10px); /* Сдвигаем первый слой вперед */
}

.loading-screen__logo:nth-of-type(2) {
  z-index: -1;
  transform: translateZ(-10px); /* Сдвигаем второй слой назад */
}

.loading-screen__percentage {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  color: #fff;
}

.loading-screen__logo_started {
  animation-name: logoExplode;
  animation-duration: 1.3s;
  animation-fill-mode: forwards;
  animation-delay: 2.1s;
}

.lineUp {
  will-change: transform, opacity;
  opacity: 0;
  animation: textFadeInUp 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
    opacity 1.5s linear forwards;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
  text-align: center;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
}

.lineUp_started {
  opacity: 1;
  animation: textFadeInUp 1.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards,
    opacityBack 1.5s linear forwards;
  animation-iteration-count: 1;
  animation-fill-mode: forwards;
}

.opacity1 {
  animation-delay: 2s;
}

.opacity2 {
  animation-delay: 2.2s;
}

.opacity3 {
  animation-delay: 2.4s;
}

.opacity4 {
  animation-delay: 2.6s;
}

.opacity5 {
  animation-delay: 2.8s;
}

.opacity6 {
  animation-delay: 3s;
}

.opacityBack1 {
  animation-delay: 0s;
}

.opacityBack2 {
  animation-delay: 0.2s;
}

.opacityBack3 {
  animation-delay: 0.4s;
}

.opacityBack4 {
  animation-delay: 0.6s;
}

.opacityBack5 {
  animation-delay: 0.8s;
}

.opacityBack6 {
  animation-delay: 1s;
}

.loading__border {
  width: 1px;
  height: 16px;
  background-color: white;
  margin: 10px auto 10px auto;
}

.loading-screen__logo-poster {
  width: 80px;
  position: absolute;
  background-color: black;
  transition: height 3s;
}

.loading-screen__title {
  font-size: 4rem;
  color: rgba(0, 0, 0, 0.5);
  margin: 0;
  margin-bottom: 8px;
}

.loading-screen__rules {
  margin: 0 auto auto auto;
  opacity: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.loading-screen__rules_loaded {
  will-change: opacity, transform;
  opacity: 1;
  transition: height 3s;
  transition-delay: 0.5s;
}

.loading__button {
  position: relative;
  display: inline-block;
  padding: 10px 25px;
  margin: auto;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  transition: 0.5s;
  letter-spacing: 2px;
  overflow: hidden;
  font-family: 'bebasBold', sans-serif;
  line-height: 1.5;
}

.loading__button span.text-content {
  position: relative;
  top: 1px
}

.loading__button:hover {
  background: #ffffff;
  color: #050801;
  box-shadow: 0 0 5px #ffffff, 0 0 25px #ffffff, 0 0 50px #ffffff, 0 0 200px #ffffff;
  cursor: url('../cursor.png'), auto;
}

.loading__button:nth-child(1) {
  filter: hue-rotate(270deg);
}

.loading__button:nth-child(2) {
  filter: hue-rotate(110deg);
}

.loading__button span {
  position: absolute;

  transition: opacity 3s;
  opacity: 1 !important;
}

.loading__button span:nth-child(1) {
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff);
  animation: animate1 1s linear infinite;
}

.loading__button span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #ffffff);
  animation: animate2 1s linear infinite;
  animation-delay: 0.25s;
}

.loading__button span:nth-child(3) {
  bottom: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, #ffffff);
  animation: animate3 1s linear infinite;
  animation-delay: 0.5s;
}

.loading__button span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #ffffff);
  animation: animate4 1s linear infinite;
  animation-delay: 0.75s;
}

h2 {
  text-align: center;
  color: white;
  font-family: 'Arial', sans-serif;
  font-size: 19px;
  font-weight: 300;
  line-height: 23px;
}

.line {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 75%;
  overflow: hidden;
  margin: auto;
  color: white;
  font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;

  text-rendering: optimizeLegibility;
  font-size: 16px;
  font-weight: 300;
}

@media screen and (max-width: 1700px) {
  .loading-screen__rules {
    width: 70% !important;
  }
}

@media screen and (max-width: 1200px) {
  .loading-screen__rules {
    width: 75% !important;
  }
}

@media screen and (min-width: 1160px) and (max-width: 1170px) {

  .line,
  .loading-screen__title,
  .loading-screen__subtitle {
    font-size: 17px;
    font-weight: 400;
  }
}

@media screen and (max-width: 1100px) {
  .loading-screen__rules {
    width: 100% !important;
  }
}

@media screen and (max-width: 500px) and (max-height: 875px) {
  .line {
    width: 90%;
  }
}

@media (orientation: landscape) {
  .loading-screen__board {
    scale: 0.9;
  }
}

@keyframes animate1 {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 100%;
  }
}

@keyframes animate2 {
  0% {
    top: -100%;
  }

  50%,
  100% {
    top: 100%;
  }
}

@keyframes animate3 {
  0% {
    right: -100%;
  }

  50%,
  100% {
    right: 100%;
  }
}

@keyframes animate4 {
  0% {
    bottom: -100%;
  }

  50%,
  100% {
    bottom: 100%;
  }
}

@keyframes logoExplode {
  from {
    transform: translateY(0) scale(1) rotateY(0deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  }

  to {
    transform: translateY(140px) scale(4) rotateY(360deg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
  }
}

/* iPhone SE (2020) */
@media screen and (min-width: 375px) and (max-width: 667px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* iPhone XR */
@media screen and (min-width: 414px) and (max-width: 896px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* iPhone 12 Pro */
@media screen and (min-width: 390px) and (max-width: 844px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* iPhone 14 Pro Max */
@media screen and (min-width: 430px) and (max-width: 932px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(10);
    }
  }
}

/* Google Pixel 7 */
@media screen and (min-width: 412px) and (max-width: 915px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* Samsung Galaxy S8+ */
@media screen and (min-width: 360px) and (max-width: 740px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* Samsung Galaxy S20 Ultra */
@media screen and (min-width: 412px) and (max-width: 915px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3);
    }
  }
}

/* iPad Mini */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(3.5);
    }
  }
}

/* iPad Air */
@media screen and (min-width: 820px) and (max-width: 1180px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(4);
    }
  }
}

/* iPad Pro */
@media screen and (min-width: 834px) and (max-width: 1194px) {
  @keyframes logoExplode {
    from {
      transform: translateY(0) scale(1);
    }

    to {
      transform: translateY(140px) scale(5);
    }
  }
}

@keyframes opacity {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0.2;
  }

  40% {
    opacity: 0.4;
  }

  60% {
    opacity: 0.6;
  }

  80% {
    opacity: 0.8;
  }

  100% {
    opacity: 1;
  }
}

@keyframes opacityBack {
  0% {
    opacity: 1;
  }

  20% {
    opacity: 0.8;
  }

  40% {
    opacity: 0.6;
  }

  60% {
    opacity: 0.4;
  }

  80% {
    opacity: 0.2;
  }

  100% {
    opacity: 0;
  }
}

@keyframes logoToTop {
  0% {
    transform: translate3d(0, 0px, 0);
  }

  100% {
    transform: translate3d(0, 0px, 0);
  }
}

@keyframes textFadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0px);
  }
}

@keyframes logo3D {
  0% {
    transform: perspective(400px) rotateX(0deg) rotateY(0deg) scale(1);
  }

  50% {
    transform: perspective(400px) rotateX(20deg) rotateY(20deg) scale(1.5);
  }

  100% {
    transform: perspective(400px) rotateX(0deg) rotateY(0deg) scale(2);
  }
}

@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
  100% { opacity: 1; }
}

.blinking {
  animation: blink 1s infinite;
}
