* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: #03004a;
}

body {
  font-family: 'DM Sans', Arial, sans-serif;
  font-variation-settings: 'opsz' 14;
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2 {
  margin: 0;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Fixed design stage, scaled by script.js through --scale */
.page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: #03004a;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
}

.art {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.m {
  display: none;
}

.logo,
.t-sub,
.t-title,
.t-prize,
.tries {
  position: absolute;
}

.logo {
  left: 70px;
  top: 70px;
  width: 166px;
  height: 56px;
  z-index: 6;
}

/* Desktop text column: Figma stacks these with a 32px gap starting at y=267 */
.t-sub {
  left: 70px;
  top: 267px;
  width: 879px;
  z-index: 5;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.02;
  color: #d8ffd8;
}

.t-title {
  left: 70px;
  top: 392.84px;
  width: 911px;
  z-index: 5;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: 2.16px;
  text-transform: uppercase;
  color: #d8ffd8;
}

.t-prize {
  left: 70px;
  top: 581.8px;
  z-index: 5;
  font-size: 46px;
  font-weight: 500;
  line-height: 1.02;
  text-transform: uppercase;
  white-space: nowrap;
  color: #91fd44;
}

.tries {
  left: 70px;
  top: 690px;
  width: 397px;
  height: 128px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #91fd44;
  border-radius: 39px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tries p {
  width: 329px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: #91fd44;
}

/* Wheel: every part box matches its Figma frame, images carry a transparent margin */
.wheel {
  position: absolute;
  left: 1026px;
  top: 166px;
  width: 730px;
  height: 727px;
  z-index: 21;
  cursor: pointer;
}

.wheel__part {
  position: absolute;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.wheel__part img {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.wheel__back {
  left: 0;
  top: 0;
  width: 730px;
  height: 726px;
}

.wheel__back img {
  left: -0.548%;
  top: -0.551%;
  width: 101.096%;
  height: 101.102%;
}

.wheel__outer {
  left: 55px;
  top: 56px;
  width: 619.891px;
  height: 615px;
}

.wheel__outer img {
  left: -1.2906%;
  top: -1.3008%;
  width: 102.599%;
  height: 102.602%;
}

.wheel__inner {
  left: 142px;
  top: 141px;
  width: 445px;
  height: 445px;
}

.wheel__inner img {
  left: -1.7978%;
  top: -1.7978%;
  width: 103.596%;
  height: 103.596%;
}

.wheel__disc {
  transition: transform 5s cubic-bezier(0.15, 0.85, 0.25, 1);
  will-change: transform;
}

.wheel__btn {
  left: 299px;
  top: 297px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  cursor: pointer;
  animation: pulse 1.2s ease-in-out infinite;
}

.wheel__btn img {
  left: -12.121%;
  top: -12.121%;
  width: 124.242%;
  height: 124.242%;
}

.wheel__btn:focus-visible {
  outline: 3px solid #91fd44;
  outline-offset: 4px;
}

.is-busy .wheel,
.is-busy .wheel__btn {
  cursor: default;
}

.is-busy .wheel__btn {
  animation: none;
}

.wheel__pointer {
  left: 335px;
  top: 0;
  width: 58px;
  height: 78px;
}

.wheel__pointer img {
  left: -6.897%;
  top: -5.128%;
  width: 113.793%;
  height: 110.256%;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

.footer {
  position: absolute;
  left: 0;
  top: 1000px;
  width: 100%;
  height: 80px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 29px 0 30px;
  background: #020034;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.16px;
  color: #fff;
  white-space: nowrap;
}

.footer__icons {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer__seal {
  display: block;
}

.footer__age {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #91fd44;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.12px;
  color: #91fd44;
}

.footer__group {
  display: flex;
  align-items: center;
  gap: 97px;
}

.footer a:hover {
  text-decoration: underline;
}

.footer__pay {
  width: 113.846px;
  height: 40px;
  opacity: 0.7;
}

.footer__pay img {
  display: block;
  width: 108.613px;
  height: 38.462px;
  margin-left: 1.537px;
}

/* Pop-ups */
.overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 1000px;
  z-index: 40;
  background: rgba(3, 0, 74, 0.9);
  animation: fade-in 0.3s ease-out;
}

.popup {
  position: absolute;
  top: 298px;
  width: 892px;
  height: 484px;
  z-index: 41;
  background: #020034;
  border-radius: 16px;
  text-align: center;
  animation: fade-in 0.3s ease-out;
}

.popup:focus {
  outline: none;
}

.popup--lose {
  left: 515px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #91fd44, -8px -8px 8px 0 rgba(145, 253, 68, 0.25), 8px 8px 8px 0 rgba(145, 253, 68, 0.25);
}

.popup--win {
  left: 514px;
  box-shadow: inset 0 0 0 1px #91fd44;
  filter: drop-shadow(-8px -8px 4px rgba(145, 253, 68, 0.25)) drop-shadow(8px 8px 4px rgba(145, 253, 68, 0.25));
}

.popup__title,
.popup__text {
  position: absolute;
  left: 50%;
  width: 819px;
  transform: translateX(-50%);
  font-size: 56px;
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: 1.68px;
  text-transform: uppercase;
}

.popup__title {
  bottom: 315px;
  color: #91fd44;
}

.popup--win .popup__title {
  bottom: 376px;
}

.popup__text {
  bottom: 153px;
  color: #d8ffd8;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 59px;
  padding: 9px 16px;
  border: 1px solid #91fd44;
  border-radius: 8px;
  background: #91fd44;
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.48px;
  text-transform: uppercase;
  white-space: nowrap;
  color: #03004a;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 22.3px 7px rgba(145, 253, 68, 0.25);
}

/* Touch screens keep :hover after a tap, so the glow is for real pointers only */
@media (hover: hover) {
  .btn:hover {
    box-shadow: 0 0 22.3px 7px rgba(145, 253, 68, 0.25);
  }
}

.popup__btn {
  position: absolute;
  left: 50%;
  top: 378px;
  width: 242px;
  height: 56px;
  transform: translateX(-50%);
  font-size: 20px;
  letter-spacing: 0.4px;
}

.popup--win .popup__btn {
  top: 379px;
  width: 303px;
  height: 59px;
  font-size: 24px;
  letter-spacing: 0.48px;
}

.popup__decor {
  position: absolute;
  display: block;
  pointer-events: none;
}

.popup__bomb {
  left: 818.208px;
  top: -37.585px;
  width: 107.187px;
  height: 94.087px;
  transform: rotate(9.77deg);
}

.popup__seven {
  left: -38.4px;
  top: 398.81px;
  width: 128.8px;
  height: 136.41px;
  transform: rotate(20.46deg);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* Mobile: 390px design stage scaled to the viewport width, page scrolls */
@media (max-width: 767px), (orientation: portrait) and (max-width: 1199px) {
  .page {
    height: calc(953px * var(--scale, 1));
  }

  .stage {
    left: 0;
    top: 0;
    width: 390px;
    height: 953px;
    transform: scale(var(--scale, 1));
    transform-origin: 0 0;
  }

  .d {
    display: none;
  }

  .m {
    display: block;
  }

  .grad {
    position: absolute;
    left: 0;
    top: 0;
    width: 392px;
    background: linear-gradient(to bottom, #03004a, rgba(3, 0, 74, 0));
  }

  .grad--1 {
    height: 535px;
    z-index: 3;
  }

  .grad--2 {
    height: 353px;
    z-index: 4;
  }

  .logo {
    left: 148px;
    top: 16px;
    width: 95px;
    height: 32px;
    z-index: 5;
  }

  .t-sub {
    left: 37px;
    top: 72px;
    width: 317px;
    z-index: 6;
    font-size: 18px;
    text-align: center;
  }

  .t-title {
    left: 195px;
    top: auto;
    bottom: 798px;
    width: auto;
    z-index: 9;
    font-size: 28px;
    letter-spacing: 0.84px;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .br-d {
    display: none;
  }

  .t-prize {
    left: 200.5px;
    top: 167px;
    z-index: 7;
    font-size: 24px;
    font-weight: 600;
    transform: translateX(-50%);
  }

  .tries {
    left: 102px;
    top: 647px;
    width: 191px;
    height: 68px;
    z-index: 15;
    border-width: 2px;
  }

  .tries p {
    width: 163px;
    font-size: 18px;
    line-height: 1.09;
    letter-spacing: 0.54px;
  }

  .wheel {
    left: 16px;
    top: 273px;
    width: 358px;
    height: 370px;
    z-index: 17;
  }

  .wheel__back {
    left: 0;
    top: 13.91px;
    width: 358px;
    height: 356px;
  }

  .wheel__outer {
    left: 27px;
    top: 41px;
    width: 304px;
    height: 302px;
  }

  .wheel__inner {
    left: 82px;
    top: 95px;
    width: 194px;
    height: 195px;
  }

  .wheel__btn {
    left: 147px;
    top: 160px;
    width: 64px;
    height: 64px;
  }

  .wheel__pointer {
    left: 159px;
    top: 1px;
    width: 40px;
    height: 52px;
  }

  .footer {
    top: 735px;
    height: 218px;
    z-index: 19;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 0 0;
    font-size: 14px;
    letter-spacing: -0.14px;
  }

  .footer__contacts {
    display: contents;
  }

  .footer__links {
    gap: 24.088px;
    margin-top: 1px;
  }

  .footer__links a:first-child {
    width: 124.912px;
  }

  .footer__pay {
    position: absolute;
    left: 50%;
    top: 162px;
    transform: translateX(-50%);
  }

  .overlay {
    width: 390px;
    height: 735px;
  }

  .popup {
    left: 16px;
    top: 243px;
    width: 358px;
    height: 250px;
  }

  .popup__title,
  .popup__text {
    width: 345px;
    font-size: 24px;
    letter-spacing: 0.72px;
  }

  .popup__title {
    width: 292px;
    bottom: 175px;
  }

  .popup--win .popup__title {
    bottom: 201px;
  }

  .popup__text {
    bottom: 105px;
  }

  .btn {
    height: 48px;
    font-size: 18px;
    letter-spacing: 0.36px;
  }

  .popup__btn {
    top: 177px;
    width: 184px;
    height: 48px;
    font-size: 18px;
    letter-spacing: 0.36px;
  }

  .popup--win .popup__btn {
    top: 177px;
    width: 223px;
    height: 48px;
    font-size: 18px;
    letter-spacing: 0.36px;
  }

  .popup__bomb {
    left: 306.395px;
    top: -13.87px;
    width: 65.355px;
    height: 57.368px;
  }

  .popup__seven {
    left: -16.485px;
    top: 211.56px;
    width: 63.01px;
    height: 66.77px;
  }
}
