*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
img {
  display: block;
  width: 100%;
  height: auto;
}

.page {
  position: relative;
  background-image: url(./img/bg.png);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrapper {
  position: relative;
  display: grid;
  grid-template: auto auto auto/ 1fr 1fr;
  text-align: center;
  height: 100%;
  z-index: 5;
}

.wheel {
  grid-row: 1/4;
  position: relative;
  align-self: center;
}

.wheel__inside {
  overflow: hidden;
}

.wheel__part {
  pointer-events: none;
  user-select: none;
}

.wheel__outer {
  position: relative;
  z-index: 2;
}

.wheel__inner {
  position: absolute;
  top: 5%;
  left: 5%;
  z-index: 1;
  width: 90%;
}

.logo {
  grid-column: 2/3;
  max-width: 640px;
  align-self: center;
  width: 95%;
  animation: scaling 4s ease-in-out infinite;
}

@keyframes scaling {
  0% {
    scale: 1;
  }
  50% {
    scale: 1.1;
  }
}

.title {
  grid-column: 2/3;
  font-family: Inter, sans-serif;
  font-size: 48px;
  font-weight: 800;
  font-style: italic;
  color: white;
  -webkit-text-stroke: 2px #264265;
  text-shadow: 0px 4px 15px #264265;
  paint-order: stroke fill;
  text-align: center;
}

.button {
  grid-column: 2/3;
  max-width: 374px;
  align-self: center;
  min-width: 134px;
  justify-self: center;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
}

.button__main-bg {
  background-color: #3d5c00;
  border: 12px solid #3d5c00;
}

.button__gradient-bg-box {
  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 100px;
  border: 9px solid transparent;
}

.button__gradient-bg {
  position: absolute;
  width: 200%;
  height: 500%;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background: conic-gradient(
    from 0deg,
    #8aca0c 0%,
    #ffffff 50%,
    rgba(170, 217, 79, 1) 100%
  );
  animation: gradientMove 5s ease infinite;
}

@keyframes gradientMove {
  0% {
    rotate: translateX(-50%) translateY(-50%) rotateZ(0deg);
  }
  50% {
    transform: translateX(-50%) translateY(-50%) rotateZ(180deg);
  }
  100% {
    transform: translateX(-50%) translateY(-50%) rotateZ(360deg);
  }
}

.button__inner {
  position: relative;

  background-color: #88aa45;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  padding: 25px 20px;

  border-radius: 100px;
  overflow: hidden;
}

.button__inner-shadow-box {
  z-index: 5;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 100px;
  width: 100%;
  height: 100%;
  box-shadow: inset 0px 0px 20px #201047, 0px 0px 20px rgba(32, 16, 71, 0.696);
}

.button__inner-shadow {
  position: absolute;
  top: 60%;
  left: 0;
  width: 100%;
  height: 150%;
  background: radial-gradient(
    #9de5ff 0%,
    rgba(157, 229, 255, 0.732) 45%,
    transparent 72%
  );
  animation: blurTopDown 7s ease-in-out infinite;
}

@keyframes blurTopDown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(15%);
  }
}

.button__decor {
  max-width: 66px;
  max-height: 66px;
  animation: wheelSpin 5s ease-in-out infinite;
}

@keyframes wheelSpin {
  0% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(180deg);
  }
}

.button__text {
  font-size: 32px;
  font-family: sans-serif;
  font-weight: 800;
  font-style: italic;
  color: white;
  line-height: 39px;
  animation: textTopDown 5s ease infinite;
}

@keyframes textTopDown {
  0% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-5%);
  }
  50% {
    transform: translateY(0);
  }
  65% {
    transform: translateY(-5%);
  }
  75% {
    transform: translateY(0);
  }
  85% {
    transform: translateY(-5%);
  }
  95% {
    transform: translateY(0);
  }
}

.button:active {
  scale: 0.98;
}

.decoration {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

.decorations__top {
  top: -25%;
  left: 0;
  width: 50%;
  animation: topdown 3s ease-in-out infinite;
}

@keyframes topdown {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20%);
  }
}

.decorations-wrapper {
  z-index: 1;
  overflow: hidden;
  position: absolute;
  bottom: 0;
  left: 0;
  height: 50%;
  width: 100%;
}
.decorations__bottom {
  bottom: 0;
  max-width: 1440px;
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  animation: downtop 3s ease-in-out infinite;
}

@keyframes downtop {
  0% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(20%);
  }
}

.popup {
  margin: 0 auto;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-40%);
  z-index: 10;

  display: none;
  visibility: hidden;

  opacity: 0;

  flex-direction: column;
  align-items: center;

  width: 100%;
  max-width: 589px;
  background-color: #ffffff;
  border: #88aa45 solid 25px;
  border-radius: 127px;
  box-shadow: inset 0px 0px 20px 20px rgba(0, 0, 0, 0.25);

  padding: 28px 30px;

  font-family: Inter, sans-serif;

  transition: all 0.2s ease-in-out;
}

.popup__icon {
  width: 100px;
  margin: 0 auto;
}

.popup__code {
  color: #1c4367c2;
  position: relative;
  margin: 24px 0 30px 0;
  padding: 10px 58px 10px 24px;
  font-size: 48px;
  font-weight: 600;
  line-height: 58px;
  font-style: italic;
  border: 2px dashed #000000;
  border-radius: 40px;
  cursor: pointer;
  transition: opacity 0.1s ease-in-out;
}

.popup__code::before {
  position: absolute;
  text-align: center;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 19px;
  line-height: 1.2;
  content: "Enter during registration";
  font-size: 14px;
  font-weight: 400;
  cursor: default;
}

.popup__code::after {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 24px;
  width: 24px;
  height: 24px;
  background-image: url(./img/copyIcon.svg);
  content: "";
  font-size: 16px;
}

.popup__code:hover {
  opacity: 0.85;
}

.popup__link {
  display: block;
  width: 75%;
  text-decoration: none;
}

.popup-button {
  display: block;
  margin: 0 auto;
  width: 83%;
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: 100px;
  position: relative;
  overflow: hidden;
}

.popup-button__inner {
  position: relative;

  background-color: #88aa45;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;

  padding: 22px 16px 21px 18px;

  border-radius: 100px;
  overflow: hidden;
}

.popup-button__decor {
  /* position: relative; */
}

.popup-button__spark {
  position: absolute;
}
.popup-button__spark path {
  animation: sparkColor 6s ease infinite;
}

.popup-button__spark_one {
  top: 22px;
  left: 18px;
  width: 10px;
  height: 10px;
  animation: sparkOne 3s ease infinite;
}

.popup-button__spark_two {
  top: 25px;
  left: 35px;
  width: 16px;
  height: 19px;
  animation: sparks 3s ease 1s infinite;
}

.popup-button__spark_three {
  top: 36px;
  left: 20px;
  width: 15px;
  height: 15px;
  animation: sparks 5s ease 3s infinite;
}

@keyframes sparkOne {
  0% {
    transform: translateX(0) scale(1);
  }
  33% {
    transform: translateX(2px) scale(1.3);
  }
  66% {
    transform: translateX(4px) scale(1);
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes sparks {
  0% {
    transform: translateX(0) scale(1);
  }
  50% {
    transform: translateX(5px) scale(1.5);
    fill: #ffffff;
  }

  100% {
    transform: translateX(0) scale(1);
  }
}

@keyframes sparkColor {
  33% {
    fill: #ffffff;
  }
  66% {
    fill: #bce765;
  }
}

.popup-button__text {
  font-size: 24px;
  font-family: sans-serif;
  font-weight: 500;
  color: white;
  line-height: 29px;
  animation: textTopDown 5s ease 1s infinite;
}

.backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
}

.msg {
  position: absolute;
  opacity: 0;
  transform: translateY(0%) translateX(-50%);
  font-size: 10px;
  top: 50%;
  left: 50%;
  transition: all 0.5s ease-in-out;
}

@media screen and (max-width: 996px) {
  .title {
    font-size: 38px;
  }

  .button {
    width: 75%;
  }

  .button__inner {
    padding: 20px 5px;
  }

  .button__text {
    font-size: 25px;
    line-height: 28px;
  }
}

@media screen and (max-width: 768px) {
  .page {
    background-image: url(./img/bg-mobi.png);
  }
  .wrapper {
    grid-template: auto auto auto auto / 1fr;
    padding: 0 10px;
    row-gap: 10px;
  }

  .logo {
    justify-self: center;
    width: 90%;
  }

  .wheel {
    grid-row: 2/3;
    grid-column: 1/2;
    max-width: 450px;
    justify-self: center;
    overflow: hidden;
  }
  .title {
    grid-column: 1/2;
    margin: 10px 0;
    font-size: 32px;
  }

  .popup {
    max-width: 95%;
    padding: 20px 40px;

    border: #88aa45 solid 15px;
  }

  .popup__code {
    font-size: 32px;
    margin: 17px 0 30px 0;
  }

  .decorations__top {
    width: 100%;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
  }

  @keyframes topdown {
    0% {
      transform: translateX(-50%) translateY(0);
    }
    50% {
      transform: translateX(-50%) translateY(-15%);
    }
  }

  .logo {
    grid-column: 1/2;
    grid-row: 1/2;
  }

  .button {
    grid-column: 1/2;
    width: 75%;
  }
  .popup-button {
    max-width: 286px;
  }
}

@media screen and (max-width: 576px) {
  .title {
    font-size: 24px;
  }
  .button__decor {
    width: 50px;
    height: 50px;
  }
  .button__text {
    font-size: 21px;
  }
  .popup {
    border-radius: 50px;
    padding: 20px 20px;
  }
  .popup__code {
    font-size: 24px;
    line-height: 29px;
  }

  .popup__code::before {
    font-size: 12px;
  }
  .popup__link {
    width: 100%;
  }
  .popup-button {
    width: 100%;
  }
  .popup-button__inner {
    padding: 17px 11px 16px 13px;
  }
  .popup-button__text {
    font-size: 24px;
  }
}
@media screen and (max-width: 356px) {
  .button {
    width: 90%;
  }
  .popup {
    padding: 10px 10px;
    border: #88aa45 solid 10px;
  }
  .popup-button__text {
    font-size: 23px;
  }
}

@media screen and (max-width: 315px) {
  .popup-button__decor {
    display: none;
    visibility: hidden;
  }
}
