* {
  box-sizing: border-box;
  outline: 0;
}
html {
  scroll-behavior: smooth;
  color-scheme: light;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
p {
  margin: 0;
}
a {
  text-decoration: none;
  color: inherit;
}
a:hover {
  color: inherit;
}
a button {
  cursor: pointer;
}
body {
  background: linear-gradient(113deg, #250850 1.78%, #6625e4 132.34%);

  background-size: cover;
  background-position: center;
  height: 100vh;
  margin: 0;
  font-family: "Poppins";
  overflow: hidden;
  transition: transform 0.25s ease, filter 0.25s ease,
    background-image 0.3s linear;
}

h1 {
  color: #dcff31;

  font-family: Poppins;
  font-size: 54px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  text-transform: uppercase;
}

.bonus-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 20px 16px;
  border-radius: 43.674px;

  background: transparent;

  box-shadow: 0 27.334px 32.638px rgba(8, 9, 79, 0.13),
    0 11.42px 13.635px rgba(8, 9, 79, 0.09),
    0 6.105px 7.29px rgba(8, 9, 79, 0.08),
    0 3.423px 4.087px rgba(8, 9, 79, 0.06),
    0 1.818px 2.17px rgba(8, 9, 79, 0.05),
    0 0.756px 0.903px rgba(8, 9, 79, 0.04);
  -webkit-backdrop-filter: blur(4.08px);
  backdrop-filter: blur(4.08px);

  color: #fff;

  font-family: Poppins;
  font-size: 44px;
  font-style: normal;
  font-weight: 700;
  line-height: 14.652px;
  text-transform: uppercase;
  transform: rotate(-2.224deg) translate(5px, -9px);
  cursor: pointer;
}
.bonus-box:hover {
  filter: brightness(1.1);
  transition: 0.5s;
}

.bonus-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 43.674px;

  padding: 2px;

  background: linear-gradient(90deg, #c4fff21a, #76faff);

  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events: none;
}

.btn {
  cursor: pointer;
  position: relative;
  z-index: 2;
  margin-top: 15px;
  margin-bottom: 149px;
}

.btn button {
  color: #041b42;

  font-family: Poppins;
  font-size: 16.916px;
  font-style: normal;
  font-weight: 700;
  line-height: 19.031px;
  border-radius: 8.458px;
  background: #37ffe6;

  cursor: pointer;
  padding: 21px 31px;
  border: none;
}
.btn:hover button {
  background-color: #9cf893f0;
  transition: 0.9s;
}
h4 {
  color: #fff;

  font-family: Poppins;
  font-size: 26.182px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;
  margin-bottom: 10px;
}
header {
  padding: 28px 62px;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.nav-bar__logo {
  width: 138px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 100px 64px 20px 64px;
}
.main-title {
  display: flex;
  gap: 5px;
  align-items: flex-end;
}
p strong {
  color: #fff;

  font-family: Poppins;
  font-size: 54px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  text-transform: uppercase;
}
p {
  margin-top: 5px;
  color: #fff;
  font-family: Poppins;
  font-size: 54px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;
  display: flex;
  gap: 10px;
}
#timer {
  display: flex;
  align-items: center;
}

#timer .time_item {
  display: flex;
  gap: 2.5px;
  position: relative;
}

#hours::after,
#minutes::after {
  content: ":";
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
  color: #fff;
  opacity: 0.9;
  font-size: 29.468px;
  font-weight: 500;
  line-height: 100%;
}

#timer .digit {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  color: #fff;
  text-align: center;
  font-size: 29.468px;
  font-style: normal;
  font-weight: 500;
  line-height: 100%;
  text-transform: uppercase;

  border-radius: 3.157px;
  background: rgba(217, 217, 217, 0.42);
  padding: 4px 2.5px;
  box-shadow: 0 1.052px 12.945px 0 rgba(215, 211, 255, 0.5);

  min-width: 22px;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

#preloader img {
  width: 120px;
  height: auto;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
}

.desc {
  display: block;
}
.mobile {
  display: none;
}
.anima {
  position: absolute;
  top: 16%;
  left: 53%;
}
.treasure-desktop {
  position: relative;
  display: inline-block;
  width: 340px;
  --coinY: 50%;
}

.treasure-desktop .boom--closed {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.treasure-desktop .boom--open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.treasure-desktop:hover .boom--open {
  opacity: 1;
}
.treasure-desktop:hover .boom--closed {
  opacity: 0;
}

.treasure-desktop .coin {
  position: absolute;
  left: 50%;
  top: var(--coinY);
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 1;
}

.boom {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.25s ease;
  transform: rotate(-30.709deg);
  z-index: 2;
}
.boom--open {
  opacity: 0;

  transform: scale(1.8) translate(0, 21px);
}

body {
  background-image: url(../img/bg-main.jpg);
  max-width: 1400px;
  margin: 0 auto;
}
body:has(.treasure-desktop:hover) {
  background-image: url(../img/bg-main-open.jpg);
}
body:has(.burst-trigger:hover),
body:has(.burst-trigger.hover) {
  background-image: url(../img/bg-main-open.jpg);
  transition: transform 0.25s ease, filter 0.25s ease,
    background-image 0.3s linear;
}

.treasure-desktop .d1 {
  width: 183px;
}
.treasure-desktop .d2 {
  width: 171px;
}
.treasure-desktop .d3 {
  width: 225px;
}
.treasure-desktop .d4 {
  width: 375px;
  z-index: 3;
}
.treasure-desktop .d5 {
  width: 251px;
}
.treasure-desktop:hover .boom--open,
body:has(.burst-trigger:hover) .treasure-desktop .boom--open,
body:has(.burst-trigger.hover) .treasure-desktop .boom--open {
  opacity: 1;
}

.treasure-desktop:hover .boom--closed,
body:has(.burst-trigger:hover) .treasure-desktop .boom--closed,
body:has(.burst-trigger.hover) .treasure-desktop .boom--closed {
  opacity: 0;
}

.treasure-desktop:hover .d1,
body:has(.burst-trigger:hover) .treasure-desktop .d1,
body:has(.burst-trigger.hover) .treasure-desktop .d1 {
  animation: desk-fly-ul 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.treasure-desktop:hover .d2,
body:has(.burst-trigger:hover) .treasure-desktop .d2,
body:has(.burst-trigger.hover) .treasure-desktop .d2 {
  animation: desk-fly-ur 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.treasure-desktop:hover .d3,
body:has(.burst-trigger:hover) .treasure-desktop .d3,
body:has(.burst-trigger.hover) .treasure-desktop .d3 {
  animation: desk-fly-dl 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.treasure-desktop:hover .d4,
body:has(.burst-trigger:hover) .treasure-desktop .d4,
body:has(.burst-trigger.hover) .treasure-desktop .d4 {
  animation: desk-fly-dr 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.treasure-desktop:hover .d5,
body:has(.burst-trigger:hover) .treasure-desktop .d5,
body:has(.burst-trigger.hover) .treasure-desktop .d5 {
  animation: desk-fly-up 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
@keyframes desk-fly-ul {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: translate(calc(-50% - 390px), calc(-50% - 320px));
  }
  100% {
    opacity: 1;
    transform: translate(calc(-50% - 390px), calc(-50% - 320px));
  }
}
@keyframes desk-fly-ur {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: translate(calc(-50% - 100px), calc(-50% + -270px));
  }
  100% {
    opacity: 1;
    transform: translate(calc(-50% - 100px), calc(-50% + -270px));
  }
}
@keyframes desk-fly-dl {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: translate(calc(-50% + 301px), calc(-50% + -184px));
  }
  100% {
    opacity: 1;
    transform: translate(calc(-50% + 301px), calc(-50% + -184px));
  }
}
@keyframes desk-fly-dr {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: translate(calc(-50% + 190px), calc(-50% + 212px));
  }
  100% {
    opacity: 1;
    transform: translate(calc(-50% + 190px), calc(-50% + 212px));
  }
}
@keyframes desk-fly-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  50% {
    opacity: 1;
    transform: translate(calc(50% - 631px), calc(50% + 106px));
  }
  100% {
    opacity: 1;
    transform: translate(calc(50% - 631px), calc(50% + 106px));
  }
}

@media screen and (max-width: 735px) {
  body {
    background-image: url(../img/bg-mobile.jpg);

    overflow: hidden;
    height: 100vh;
    transition: background 0.35s ease, background-image 0.35s ease;
  }
  body.bg-alt {
    background-image: url(../img/bg-mobile-open.png);
  }

  main {
    flex-direction: column;
    padding: 0 12px;
    padding-bottom: 20px;
    overflow: hidden;
  }

  header {
    padding: 28px 125px 0 28px;
  }
  .nav-bar__logo {
    width: 109px;
  }
  .mobile-wraper {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 0;
    display: grid;
    place-items: center;
    overflow: clip;
    contain: layout paint size;
    isolation: isolate;
    touch-action: none;
    overscroll-behavior: contain;
    background: transparent;
  }

  .desc {
    display: none;
  }
  .mobile {
    display: block;
  }
  .btn {
    margin: 0 auto;
    width: 100%;

    padding: 0 10px;
    order: 5;
    margin-top: 265px;
  }
  .btn button {
    font-size: 20px;
    font-style: normal;
    font-weight: 800;
    line-height: 18px;
    width: 100%;

    padding: 22px 12px;
  }
  .nav-bar {
    justify-content: center;
  }
  .main-bonus {
    display: none;
  }
  h1 {
    font-size: 36px;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
  }
  .main-title {
    margin-top: 30px;
  }
  p strong {
    font-size: 36px;
    font-style: normal;
    font-weight: 700;
    line-height: 100%;
    text-transform: uppercase;
  }
  p {
    font-size: 36px;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
    text-transform: lowercase;
  }
  h4 {
    margin-top: 28px;
    font-size: 26.182px;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
  }
  #hours::after,
  #minutes::after,
  #timer .digit {
    font-size: 29.468px;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
  }
  .bonus-box::before {
    background: linear-gradient(90deg, #76faff1a, #76faff);
  }
  .bonus-box {
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    line-height: 14.652px;
    padding: 12px 16px;
  }
  .anima {
    top: 314px;
    left: 57%;
    transform: translate(-50%, 0);
  }
  .treasure-desktop {
    display: none;
  }

  .treasure {
    position: relative;
    display: inline-block;
    width: 212.767px;
    height: 282.466px;
    transform: rotate(-28.089deg);
    --coinY: 50%;
  }
  .treasure.burst .main-bonus-mobile {
    transform: rotate(17.911deg) scale(1.2);
  }
  .treasure .coin {
    position: absolute;
    left: 50%;
    top: var(--coinY);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    will-change: transform, opacity;
  }
  .treasure .main-bonus-mobile {
    display: block;
    width: 240px;
    height: auto;
    position: relative;
    z-index: 1;
  }

  .treasure .c1 {
    width: 86px;
    height: 86px;
    transform: rotate(2deg);
  }
  .treasure .c2 {
    width: 65.591px;
    height: 65.591px;
    transform: rotate(-20.242deg);
  }
  .treasure .c3 {
    width: 95px;
    height: 95px;
  }
  .treasure .c4 {
    width: 148.302px;
    height: 148.302px;
    transform: rotate(162.664deg);
  }
  .treasure .c5 {
    width: 96px;
    height: 96px;
  }

  .treasure.burst .c1 {
    animation: mob-fly-ul 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .treasure.burst .c2 {
    animation: mob-fly-ur 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .treasure.burst .c3 {
    animation: mob-fly-dl 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .treasure.burst .c4 {
    animation: mob-fly-dr 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }
  .treasure.burst .c5 {
    animation: mob-fly-up 4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  }

  @keyframes mob-fly-ul {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(2deg);
    }
    50% {
      opacity: 1;
      transform: translate(calc(-50% - 130px), calc(-50% - 90px)) rotate(2deg);
    }
    100% {
      opacity: 1;
      transform: translate(calc(-50% - 130px), calc(-50% - 90px)) rotate(2deg);
    }
  }
  @keyframes mob-fly-ur {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%);
    }
    50% {
      opacity: 1;
      transform: translate(calc(-50% + 10px), calc(-50% - -118px));
    }
    100% {
      opacity: 1;
      transform: translate(calc(-50% + 10px), calc(-50% - -118px));
    }
  }
  @keyframes mob-fly-dl {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%);
    }
    50% {
      opacity: 1;
      transform: translate(calc(-50% - -150px), calc(-50% + -29px));
    }
    100% {
      opacity: 1;
      transform: translate(calc(-50% - -150px), calc(-50% + -29px));
    }
  }
  @keyframes mob-fly-dr {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(162.664deg);
    }
    50% {
      opacity: 1;
      transform: translate(calc(-50% + 62px), calc(-50% + 166px))
        rotate(22.664deg);
    }
    100% {
      opacity: 1;
      transform: translate(calc(-50% + 62px), calc(-50% + 166px))
        rotate(22.664deg);
    }
  }
  @keyframes mob-fly-up {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%);
    }
    50% {
      opacity: 1;
      transform: translate(calc(-50% - 180px), calc(-50% + 50px));
    }
    100% {
      opacity: 1;
      transform: translate(calc(-50% - 180px), calc(-50% + 50px));
    }
  }
}
