/* ============================================================
   ULTRAPARI WHEEL — 1920px desktop landing
   ============================================================ */

/* ---------- Fonts ----------
   Science Gothic is NOT on Google Fonts with its full axis set (only `wght`,
   no slant/italic). We self-reference the complete variable font from
   Fontsource via jsDelivr (SIL OFL-1.1). The `standard` files carry the
   wght + wdth + slnt axes, so the slanted display headings use the real
   `slnt` axis instead of a synthetic italic. Montserrat + Open Sans are
   loaded from Google Fonts via <link> in index.html. */
@font-face {
  font-family: 'Science Gothic';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/science-gothic:vf@latest/cyrillic-standard-normal.woff2') format('woff2-variations');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Science Gothic';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('https://cdn.jsdelivr.net/fontsource/fonts/science-gothic:vf@latest/latin-standard-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- Tokens ---------- */
:root {
  --bg-primary-0: #420031;
  --bg-primary-minus40: #28001d;
  --color-mint: #43ffa8;
  --color-gold: #fcd900;
  --color-white: #ffffff;
  --color-grey: #afa1ac;
  --color-deep-dark: #02010b;
  --color-deep-blue: #0a0934;
  --color-deep-blue-light: #1e1c5a;
  --color-pink: #de0160;
  --color-sep: #FFFFFF33;
  --color-header-bg: #420031;
  --color-lang-bg: #5e0046;
  --color-btn-text: #090103;

  --font-display: 'Science Gothic', 'Montserrat', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-ui: 'Open Sans', sans-serif;
}

body {
  background: var(--bg-primary-minus40) url('../assets/full-bg-new.png') no-repeat center top;
  background-size: cover;
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.4;
  min-width: 1920px;
  overflow-x: hidden;
}

html.is-mobile body {
  min-width: 480px;
  background-image: url('../assets/full-bg-mobile-new.png');
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  width: 1920px;
  height: 72px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  box-shadow: 0 5px 24px rgba(23, 0, 16, 0.3);
  position: relative;
  z-index: 10;
}

.header__logo {
  display: flex;
  align-items: center;
  width: 125px;
  height: 40px;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ----- Language switcher ----- */
.lang-switcher {
  position: relative;
}

.lang-switcher__button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 8px 12px;
  background: var(--color-lang-bg);
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 18px;
  line-height: 16px;
  color: var(--color-white);
  transition: background 0.2s ease;
}

.lang-switcher__button:hover {
  background: #75095a;
}

.lang-switcher__flag {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  background: #fff;
}

.lang-switcher__flag-stripe {
  position: absolute;
  left: -2px;
  width: 28px;
  height: 8px;
  display: block;
}

.lang-switcher__flag-stripe--top { top: -0.5px; }
.lang-switcher__flag-stripe--mid { top: 7.5px; height: 9px; }
.lang-switcher__flag-stripe--bot { top: 16.5px; }

/* RU: white / blue / red */
.lang-switcher__flag[data-lang="ru"] .lang-switcher__flag-stripe--top { background: #fff; }
.lang-switcher__flag[data-lang="ru"] .lang-switcher__flag-stripe--mid { background: #0c47b7; }
.lang-switcher__flag[data-lang="ru"] .lang-switcher__flag-stripe--bot { background: #e53b35; }

/* EN: St George's Cross — red cross on white */
.lang-switcher__flag[data-lang="en"] { background: #fff; }
.lang-switcher__flag[data-lang="en"] .lang-switcher__flag-stripe { display: none; }
.lang-switcher__flag[data-lang="en"]::before,
.lang-switcher__flag[data-lang="en"]::after {
  content: '';
  position: absolute;
  background: #cf142b;
}
.lang-switcher__flag[data-lang="en"]::before {
  top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 6px;
}
.lang-switcher__flag[data-lang="en"]::after {
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 6px;
}

/* UZ: blue / white / green */
.lang-switcher__flag[data-lang="uz"] .lang-switcher__flag-stripe--top { background: #1ba5e4; }
.lang-switcher__flag[data-lang="uz"] .lang-switcher__flag-stripe--mid { background: #fff; }
.lang-switcher__flag[data-lang="uz"] .lang-switcher__flag-stripe--bot { background: #32ad28; }

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: #5e0046;
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.lang-switcher--open .lang-switcher__menu {
  display: flex;
}

.lang-switcher__menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-white);
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-switcher__menu li:hover {
  background: #75095a;
}

.lang-switcher__menu li.is-active {
  background: rgba(252, 217, 0, 0.18);
  color: var(--color-gold);
}

.lang-switcher__name {
  font-weight: 400;
  font-size: 14px;
  opacity: 0.8;
}

/* ============================================================
   MAIN
   ============================================================ */
.main {
  position: relative;
  width: 1920px;
  height: 840px;
  overflow: hidden;
  background: transparent;
}

.main__inner {
  position: relative;
  height: 100%;
  width: 1920px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 120px 60px;
  border-bottom: 4px solid rgba(252, 217, 0, 0);
  gap: 60px;
}

/* ============================================================
   LEFT BLOCK
   ============================================================ */
.block-left {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  width: 721px;
  z-index: 2;
}

.block-left__text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.block-left__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 174px;
  position: relative;
}

.block-left__title-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 66px;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'slnt' -10;
  font-size: 27px;
  line-height: 1.1;
  color: var(--color-mint);
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
  transform: rotate(-3.36deg);
  transform-origin: center;
}

.block-left__title-bottom {
  position: absolute;
  left: 0;
  right: 0;
  top: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 148px;
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'slnt' -10;
  font-size: 100px;
  line-height: 1;
  color: var(--color-white);
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  transform: rotate(-3.85deg);
  transform-origin: center;
}

.block-left__line {
  width: 642px;
  height: 52px;
  margin: -4px 0 0;
}

.block-left__line img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.block-left__subtitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  width: 100%;
}

.block-left__subtitle-primary {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-gold);
  text-align: center;
  white-space: pre-line;
  max-width: 480px;
}

.block-left__subtitle-secondary {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-white);
  text-align: center;
}

/* ============================================================
   CTA BUTTONS
   ============================================================ */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60px;
  padding: 16px 24px;
  border-radius: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
  color: var(--color-btn-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(to top, #fcd900 0%, #43ffa8 100%);
  filter: drop-shadow(0 0 5px rgba(252, 177, 49, 0.3));
  transition: transform 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 12px rgba(252, 217, 0, 0.6));
}

.cta-button:active {
  transform: translateY(0);
}

.cta-button--small {
  font-size: 16px;
  height: 60px;
  padding: 16px 24px;
}

.cta-button--final {
  font-size: 18px;
  height: 60px;
  padding: 16px 32px;
}

.cta-subtext {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 13px;
  line-height: 18px;
  color: var(--color-grey);
  text-align: center;
}

.cta-button--pulse {
  animation: ctaPulse 1.6s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(67, 255, 168, 0.55),
                0 0 0 0 rgba(252, 217, 0, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 16px rgba(67, 255, 168, 0),
                0 0 0 28px rgba(252, 217, 0, 0);
    transform: scale(1.035);
  }
}

/* ----- Rules link ----- */
.rules-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: 'slnt' -10;
  font-size: 24px;
  color: var(--color-mint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(67, 255, 168, 0.6);
  margin-top: 4px;
  transition: opacity 0.15s ease;
}

.rules-link:hover {
  opacity: 0.85;
}

/* ----- Secondary link (Забрать только 1 бонус) ----- */
.secondary-link {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  text-align: center;
  color: var(--color-white);
  opacity: 0.55;
  transition: opacity 0.15s ease;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.secondary-link:hover {
  opacity: 0.85;
}

/* ============================================================
   RIGHT BLOCK
   ============================================================ */
.block-right {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 764px;
  height: 720px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  z-index: 2;
}

.block-right__top-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
  margin-bottom: 6px;
  min-height: 106px;
  justify-content: flex-end;
}

.block-right__top-text-small {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.1;
  color: var(--color-white);
}

.block-right__top-text-big {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: 'slnt' -10;
  font-size: 52px;
  line-height: 1;
  color: var(--color-gold);
  text-transform: uppercase;
  text-shadow: 4px 0 14px var(--color-pink), 0 0 24px rgba(222, 1, 96, 0.6);
}

/* ============================================================
   WHEEL
   ============================================================ */
.wheel-area {
  position: relative;
  width: 568px;
  height: 480px;
  margin: 0 auto;
}

.wheel {
  position: absolute;
  left: 50%;
  top: 0;
  width: 480px;
  height: 480px;
  transform: translateX(-50%);
  z-index: 2;
}

.wheel__rotator {
  position: absolute;
  inset: 0;
  width: 480px;
  height: 480px;
  transition: transform 4s cubic-bezier(0.16, 0.74, 0.18, 1);
  transform: rotate(0deg);
  will-change: transform;
}

/* The slice SVG (wheel-base.svg) has viewBox 820.928 where the slice circle
   only occupies the inner ~71.6% of the viewBox (radius 293.8). To make the
   visible slices fill the inside of the wheel ring like in Figma, the SVG is
   rendered at 600×600 (larger than the 480 wheel container) and offset by
   (-60, -60) so its center stays at the wheel center (240, 240). This yields
   a visible slice diameter ≈ 430px, which sits just inside the 460px ring of
   wheel-center.png and matches the Figma reference. */
.wheel__base {
  position: absolute;
  inset: 0;
  left: 51px;
  top: 53px;
  width: 377px;
  height: 377px;
  filter: drop-shadow(0 0 15px var(--color-deep-dark));
}

.wheel__labels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.wheel__label {
  position: absolute;
  width: 132px;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-mint);
  text-align: center;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  line-height: 1.1;
  user-select: none;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.65);
}

.wheel__label .lbl-big {
  display: block;
  font-size: 16px;
  line-height: 14px;
}

.wheel__label .lbl-small {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 8px;
  line-height: 12px;
  margin-top: 2px;
}

/* Two-line label with big amount + small description (e.g., 30 FS / Sugar Rush) */
.wheel__label.lbl-two-line .lbl-big {
  font-size: 16px;
  line-height: 14px;
}

/* Single line large or 2-line text (e.g., 7 000 000 UZS, 10 000 000 UZS + 100FS) */
.wheel__label.lbl-multiline-large .lbl-big {
  font-size: 14px;
  line-height: 16px;
}

/* 100% + 150 FS */
.wheel__label.lbl-multiline-percent .lbl-big {
  font-size: 16px;
  line-height: 16px;
}

.wheel__center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 460px;
  height: 460px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 15.5px var(--color-deep-dark));
  pointer-events: none;
  z-index: 3;
}

.wheel__pointer {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  width: 75px;
  height: 64px;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.75));
  z-index: 4;
  pointer-events: none;
}

/* ============================================================
   BONUS SLOTS
   ============================================================ */
.bonus-slots {
  position: absolute;
  left: 0;
  right: 0;
  top: 312px;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  width: 568px;
  z-index: 5;
}

.bonus-slot {
  width: 168px;
  height: 168px;
  border-radius: 40px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
}

/* Locked / Closed state (gift box with question mark) */
.bonus-slot[data-state="locked"] {
  background-image: linear-gradient(154deg, rgb(10, 9, 52) 3%, rgb(2, 1, 11) 100%);
  border-color: rgba(67, 255, 168, 0.28);
}

.bonus-slot[data-state="locked"]::before {
  content: '';
  position: absolute;
  inset: 16px;
  background-image: url('../assets/bonus-closed.png');
  background-size: cover;
  background-position: center;
  border-radius: 28px;
}

/* Upcoming (next) - highlighted */
.bonus-slot[data-state="upcoming"] {
  background-image: linear-gradient(154deg, rgb(10, 9, 52) 3%, rgb(2, 1, 11) 100%);
  border-color: rgba(252, 217, 0, 0);
  box-shadow: 0 0 0 0 rgba(252, 217, 0, 0);
}

.bonus-slot[data-state="upcoming"]::before {
  content: '';
  position: absolute;
  inset: 16px;
  background-image: url('../assets/expected-bonuses.png');
  background-size: cover;
  background-position: center;
  border-radius: 28px;
}

/* Empty - won nothing (X) */
.bonus-slot[data-state="empty"] {
  background-image: linear-gradient(169.6deg, rgb(222, 1, 96) -100%, rgb(10, 9, 52) 102%);
  border-color: rgba(222, 1, 96, 0.5);
}

.bonus-slot[data-state="empty"]::before {
  content: '';
  position: absolute;
  inset: 16px;
  background-image: url('../assets/bonus-empty.png');
  background-size: cover;
  background-position: center;
  border-radius: 28px;
}

/* Won bonus 1 - 100% + 150 FS gift */
.bonus-slot[data-state="won-100-150"] {
  background-image: linear-gradient(239deg, rgb(30, 28, 90) 5%, rgb(2, 1, 11) 98%);
  border-color: var(--color-gold);
  box-shadow: 0 0 14px rgba(67, 255, 168, 0.5);
}

.bonus-slot[data-state="won-100-150"]::before {
  content: '';
  position: absolute;
  inset: 16px;
  background-image: url('../assets/bokus-1st.png');
  background-size: cover;
  background-position: center;
  border-radius: 28px;
}

/* Won bonus - Aviator */
.bonus-slot[data-state="won-aviator"] {
  background-image: linear-gradient(234deg, rgb(30, 28, 90) 15%, rgb(2, 1, 11) 93%);
  border-color: var(--color-gold);
  box-shadow: 0 0 28px rgba(67, 255, 168, 0.5);
}

.bonus-slot[data-state="won-aviator"]::before {
  content: '';
  position: absolute;
  inset: 16px;
  background-image: url('../assets/bonus-aviator.png');
  background-size: cover;
  background-position: center;
  border-radius: 28px;
}

/* Mini for popup slots */
.popup__slots .bonus-slot {
  width: 168px;
  height: 168px;
}

/* ============================================================
   BOTTOM BLOCK (under wheel)
   ============================================================ */
.block-right__bottom {
  margin-top: 24px;
  width: 100%;
  text-align: center;
  min-height: 96px;
}

.bottom-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.bottom-state[hidden] {
  display: none !important;
}

.bottom-text-mint {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--color-mint);
  line-height: 1.1;
}

.bottom-text-white {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  color: var(--color-white);
  line-height: 1.1;
}

/* Timer block (in main page) */
.timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  margin-top: 85px;
}

.timer-block__label {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-white);
}

.timer {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--color-gold);
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 10px rgba(252, 217, 0, 0.5);
  transition: color 0.2s ease;
}

.timer.is-warning {
  color: #ff3a3a;
  text-shadow: 0 0 14px rgba(255, 58, 58, 0.7);
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  width: 1920px;
  background: transparent;
  padding: 32px 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.footer__logo {
  width: 164px;
  height: 52px;
}

.footer__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer__nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-left: 120px;
}

.footer__age {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--color-gold);
  padding: 6px 12px;
  border: 2px solid var(--color-gold);
  border-radius: 8px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.footer__menu {
  flex: 1;
  display: flex;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
}

.footer__menu button {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 14px;
  line-height: 18px;
  color: var(--color-grey);
  transition: color 0.15s ease;
  white-space: nowrap;
}

.footer__menu button:hover {
  color: var(--color-white);
}

.footer__social {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

.footer__social a {
  width: 48px;
  height: 48px;
  background: rgba(9, 1, 3, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.footer__social a:hover {
  transform: translateY(-2px);
  background: rgba(9, 1, 3, 0.4);
}

.footer__social a img {
  width: 24px;
  height: 24px;
}

.footer__divider {
  width: 100%;
  height: 2px;
  background: var(--color-sep);
}

.footer__responsible {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-grey);
}

.footer__copyright {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: var(--color-grey);
}

/* ============================================================
   OVERLAY + POPUPS
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 1, 11, 0.75);
  backdrop-filter: blur(2px);
  z-index: 998;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.popup {
  position: fixed;
  z-index: 999;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 884px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: popupIn 0.35s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: translate(-50%, -45%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.popup__card {
  position: relative;
  z-index: 2;
  width: 100%;
  background:
    linear-gradient(180deg, #02010b 0%, #0a0934 75%, rgba(10, 9, 52, 0.85) 100%) padding-box,
    linear-gradient(155deg, #FCD900, #FFFFFF1A 41%) border-box;
  border: 2px solid transparent;
  border-radius: 57px;
  padding: 40px 100px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  box-shadow: 0 -30px 50px rgba(2, 1, 11, 0.4), 0 30px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  top: 70px;
  max-height: 730px;
}

.popup__card::before {
  content: '';
  position: absolute;
  left: -96px;
  top: -224px;
  width: 1353px;
  height: 874px;
  background-image: url('../assets/bg-ellipse-pink.svg');
  background-size: cover;
  mix-blend-mode: screen;
  opacity: 0.6;
  transform: rotate(14.67deg);
  pointer-events: none;
}

.popup__close {
  position: absolute;
  right: 32px;
  top: 32px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s ease, transform 0.2s ease;
}

.popup__close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.popup__close[hidden] {
  display: none !important;
}

.popup__close img {
  width: 24px;
  height: 24px;
}

/* ----- Spin popup ----- */
.popup--spin {
  width: 884px;
}

.popup__spin-stage {
  width: 884px;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.popup__spin-stage[hidden] {
  display: none !important;
}

.popup__spin-stage--behind {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.popup__spin-stage--behind .wheel--popup {
  transform: scale(1.60) rotate(90deg);
  transition: transform 0.6s ease;
  top: 50px;
}

.wheel--popup {
  /* width: 772px;
  height: 772px; */
  margin-bottom: 0;
  transform: scale(1.60);
  transform-origin: center center;
  left: auto;
}

/* ----- Result popup ----- */
.popup__card[hidden] {
  display: none !important;
}

.popup__result-icon {
  width: 181px;
  height: 181px;
  position: relative;
  z-index: 2;
}

.popup__result-icon[data-state="won-100-150"] {
  background-image: url('../assets/bokus-1st.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.popup__result-icon[data-state="empty"] {
  background-image: url('../assets/bonus-empty.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.popup__result-icon[data-state="won-aviator"] {
  background-image: url('../assets/bonus-aviator.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

.popup__result-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-gold);
  text-align: center;
  text-shadow: 0 0 18px rgba(252, 217, 0, 0.5);
  position: relative;
  z-index: 2;
}

.popup__result-text {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.3;
  color: var(--color-white);
  text-align: center;
  max-width: 582px;
  position: relative;
  z-index: 2;
}

.popup__slots {
  display: flex;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.popup__timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.popup__timer-block[hidden] {
  display: none !important;
}

.popup__timer-text {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  color: var(--color-white);
  text-align: center;
  max-width: 700px;
}

.popup__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
}

/* ----- Content popups (rules, about, privacy, cookies) ----- */
.popup--content {
  width: 1395px;
  max-width: calc(100vw - 64px);
}

.popup__card--scroll {
  top: 0px;
  padding: 60px;
  max-height: calc(100vh - 64px);
  gap: 40px;
  border-width: 3px;
  background: 
    linear-gradient(180deg, #02010b 0%, #0a0934 75%, rgba(10, 9, 52, 0.85) 100%) padding-box,
    linear-gradient(165deg, #FCD900, #FFFFFF1A 41%) border-box;
}

.popup__content-inner {
  position: relative;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 30px;
  padding: 40px 20px 0 40px;
  overflow: hidden;
}

.popup__content-inner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 90px;
  background: url('../assets/popup-fade.png') center bottom / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 3;
}

.popup__content-inner .popup__scroll {
  width: 100%;
  max-height: 500px;
  overflow-y: scroll;
  padding: 0 40px 60px 0;
  position: relative;
  z-index: 2;
  scrollbar-width: auto;
  scrollbar-color: var(--color-gold) #181923;
}

.popup__content-inner .popup__scroll::-webkit-scrollbar {
  width: 28px;
}

.popup__content-inner .popup__scroll::-webkit-scrollbar-track {
  background: #181923;
  border-radius: 20px;
}

.popup__content-inner .popup__scroll::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 20px;
  border: 4px solid #181923;
}

.popup__heading {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: 'slnt' -10;
  font-size: 36px;
  line-height: 56px;
  color: var(--color-gold);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 0.02em;
}

.popup__subheading {
  margin: 28px 0 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  color: var(--color-white);
}

.popup__subsub-heading {
  margin: 24px 0 16px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-white);
}

.popup__responsible {
  margin: 24px 0 0;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  color: var(--color-grey);
  font-style: italic;
}

.popup__scroll p {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: #f0f3fe;
}

.popup__scroll ol {
  margin: 0 0 16px;
  padding-left: 36px;
  list-style: decimal;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: #f0f3fe;
}

.popup__scroll ol li {
  margin-bottom: 4px;
}

.popup__scroll ul {
  margin: 0 0 16px;
  padding-left: 36px;
  list-style: disc;
}

.popup__scroll ul li {
  margin-bottom: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.2;
  color: #f0f3fe;
}

.popup__scroll a {
  color: var(--color-mint);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.popup__ok-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 56px;
  background: var(--color-mint);
  border-radius: 16px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  line-height: 20px;
  color: var(--color-btn-text);
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.popup__ok-btn:hover {
  opacity: 0.85;
}

/* ============================================================
   STATE: After-spin layout adjustments
   ============================================================ */
/* When in spin12/final states, hide the initial CTA in left block */
.block-left[data-state="spin12"] .cta-button,
.block-left[data-state="final"] .cta-button,
.block-left[data-state="spin12"] .rules-link,
.block-left[data-state="final"] .rules-link {
  display: none;
}

/* Final state on right block */
.block-right[data-state="final"] {
  width: 764px;
}

/* ============================================================
   Utility
   ============================================================ */
[hidden] {
  display: none !important;
}

/* ============================================================
   ============================================================
   MOBILE (480px design) — applied when zoom.js detects a small
   viewport and adds `is-mobile` on <html>. Everything below
   overrides the 1920px desktop layout.
   ============================================================
   ============================================================ */
html.is-mobile .header {
  width: 480px;
  height: 72px;
  padding: 16px 20px;
}

html.is-mobile .header__actions {
  gap: 4px;
}

html.is-mobile .lang-switcher__button {
  height: 40px;
  padding: 8px 10px;
  gap: 6px;
  font-size: 16px;
}

html.is-mobile .lang-switcher__menu {
  min-width: 150px;
  font-size: 14px;
}

/* ----- MAIN ----- */
html.is-mobile .main {
  width: 480px;
  height: auto;
}

html.is-mobile .main__inner {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 480px;
  height: auto;
  padding: 40px 20px 50px;
  gap: 32px;
}

/* ----- LEFT BLOCK (hero text + initial CTA) ----- */
html.is-mobile .block-left {
  width: 100%;
  max-width: 428px;
  gap: 32px;
}

html.is-mobile .block-left__text {
  gap: 20px;
}

html.is-mobile .block-left__title {
  height: 114px;
}

html.is-mobile .block-left__title-top {
  font-size: 16px;
  line-height: 1.1;
  height: 30px;
  top: 18px;
}

html.is-mobile .block-left__title-bottom {
  font-size: 48px;
  line-height: 1;
  height: 70px;
  top: 50px;
}

html.is-mobile .block-left__line {
  width: 407px;
  height: 22px;
  margin: 0;
}

html.is-mobile .block-left__subtitle {
  gap: 20px;
  width: 100%;
}

html.is-mobile .block-left__subtitle-primary {
  font-size: 20px;
  line-height: 1.2;
  width: 360px;
  max-width: 100%;
  white-space: pre-line;
}

html.is-mobile .block-left__subtitle-secondary {
  font-size: 20px;
  line-height: 1.2;
  width: 100%;
}

/* Mobile CTA in hero block */
html.is-mobile .block-left .cta-button {
  width: 284px;
  height: 60px;
  padding: 16px 24px;
  font-size: 20px;
  border-radius: 16px;
}

/* ----- RIGHT BLOCK (heading + wheel + slots + bottom) ----- */
html.is-mobile .block-right {
  width: 100%;
  max-width: 428px;
  height: auto;
  gap: 0;
}

html.is-mobile .block-right__top-text {
  min-height: 79px;
  margin-bottom: 12px;
  gap: 8px;
  justify-content: flex-start;
}

html.is-mobile .block-right__top-text-small {
  font-size: 20px;
  line-height: 1.2;
}

html.is-mobile .block-right__top-text-big {
  font-size: 32px;
  line-height: 1.1;
  text-shadow: 3px 0 0 var(--color-pink), 0 0 18px rgba(222, 1, 96, 0.5);
}

/* ----- WHEEL (scaled from 480 to 400) ----- */
html.is-mobile .wheel-area {
  width: 428px;
  height: 400px;
  margin: 0;
}

html.is-mobile .wheel {
  width: 480px;
  height: 480px;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scale(0.8333);
  transform-origin: top center;
}

/* ----- BONUS SLOTS (3x 120px below wheel, overlapping bottom 120px) ----- */
html.is-mobile .bonus-slots {
  top: 280px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 392px;
  gap: 16px;
  justify-content: space-between;
}

html.is-mobile .bonus-slot {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  border-width: 1.5px;
}

html.is-mobile .bonus-slot::before {
  inset: 11px;
  border-radius: 20px;
}

/* ----- BOTTOM BLOCK ----- */
html.is-mobile .block-right__bottom {
  margin-top: 28px;
  width: 100%;
  text-align: center;
  min-height: 0;
}

html.is-mobile .bottom-state {
  gap: 16px;
}

/* Initial-state text below the wheel */
html.is-mobile .bottom-text-mint {
  font-size: 20px;
  line-height: 1.2;
}

html.is-mobile .bottom-text-white {
  font-size: 18px;
  line-height: 1.2;
}

/* Spin-again CTA + secondary link (after spin 1 / 2) */
html.is-mobile .bottom-state--spin {
  gap: 24px;
}

html.is-mobile .bottom-state--spin .cta-button--small {
  width: 284px;
  height: 60px;
  font-size: 18px;
  padding: 16px 24px;
}

html.is-mobile .secondary-link {
  font-size: 16px;
}

/* Final state */
html.is-mobile .bottom-state--final {
  gap: 16px;
}

html.is-mobile .timer-block {
  gap: 6px;
  margin-bottom: 4px;
}

html.is-mobile .timer-block__label {
  font-size: 14px;
}

html.is-mobile .timer {
  font-size: 30px;
}

html.is-mobile .cta-button--final {
  width: 320px;
  max-width: 100%;
  height: 60px;
  font-size: 16px;
  padding: 16px 24px;
}

/* ----- FOOTER ----- */
html.is-mobile .footer {
  width: 480px;
  padding: 32px 32px 20px;
  gap: 20px;
  align-items: center;
}

html.is-mobile .footer__top {
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
}

html.is-mobile .footer__logo {
  width: 164px;
  height: 52px;
}

html.is-mobile .footer__nav {
  flex-direction: column;
  align-items: center;
  padding-left: 0;
  gap: 40px;
  flex: none;
  width: 100%;
}

html.is-mobile .footer__menu {
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 213px;
}

html.is-mobile .footer__menu li {
  display: flex;
  justify-content: center;
}

html.is-mobile .footer__menu button {
  font-size: 14px;
  line-height: 18px;
}

html.is-mobile .footer__social {
  width: 252px;
  gap: 20px;
  justify-content: center;
}

html.is-mobile .footer__divider {
  width: 416px;
  margin: 0 auto;
}

html.is-mobile .footer__copyright {
  text-align: center;
  font-size: 12px;
  line-height: 16px;
  width: 416px;
  margin: 0 auto;
}

/* ============================================================
   MOBILE POPUPS
   ============================================================ */
html.is-mobile .popup {
  width: 430px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
}

html.is-mobile .popup--spin {
  width: 430px;
}

html.is-mobile .popup__card {
  border-radius: 32px;
  padding: 28px 24px;
  gap: 16px;
  top: 0;
  max-height: 500px;
  /* Tighter accent gradient border in mobile */
  background:
    linear-gradient(180deg, #02010b 0%, #0a0934 75%, rgba(10, 9, 52, 0.85) 100%) padding-box,
    linear-gradient(155deg, #FCD900, #FFFFFF1A 41%) border-box;
}

html.is-mobile .popup__card::before {
  left: -100px;
  top: -120px;
  width: 700px;
  height: 540px;
}

html.is-mobile .popup__close {
  right: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
}

html.is-mobile .popup__close img {
  width: 16px;
  height: 16px;
}

/* Spin stage with the rotating wheel — fixed 430x400 box, popup wheel
   absolutely centered (the inline wheel CSS positions itself via left:50%
   and a width of 480px, so we re-anchor it to the popup stage center).
   We scope to :not(--behind) so the desktop-shared --behind rule (which
   makes the stage an absolute backdrop) still wins after the result shows. */
html.is-mobile .popup__spin-stage:not(.popup__spin-stage--behind) {
  width: 430px;
  height: 400px;
  position: relative;
}

html.is-mobile .wheel--popup {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%) scale(0.8333);
  transform-origin: center center;
}

/* When the result card overlays the spin popup, the wheel sits behind it as
   a faint visual backdrop. Keep it absolutely centered, scaled, dimmed. */
html.is-mobile .popup__spin-stage--behind .wheel--popup {
  transform: translate(-50%, -50%) scale(0.95) rotate(90deg);
  left: 24%;
  top: 19%;
}

/* Result icon */
html.is-mobile .popup__result-icon {
  width: 100px;
  height: 100px;
  margin-top: 4px;
}

html.is-mobile .popup__result-title {
  font-size: 22px;
  line-height: 1.1;
}

html.is-mobile .popup__result-text {
  font-size: 14px;
  line-height: 1.3;
  max-width: 340px;
}

html.is-mobile .popup__slots {
  gap: 16px;
}

html.is-mobile .popup__slots .bonus-slot {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  border-width: 1.5px;
}

html.is-mobile .popup__slots .bonus-slot::before {
  inset: 8px;
  border-radius: 16px;
}

html.is-mobile .popup__timer-block {
  gap: 8px;
}

html.is-mobile .popup__timer-block .timer {
  font-size: 28px;
}

html.is-mobile .popup__timer-text {
  font-size: 13px;
  max-width: 320px;
}

html.is-mobile .popup__buttons {
  gap: 12px;
  width: 100%;
}

html.is-mobile .popup__buttons .cta-button {
  width: 284px;
  height: 56px;
  font-size: 15px;
  padding: 14px 22px;
}

/* ----- MOBILE CONTENT POPUPS (rules / about / privacy / cookies) ----- */
html.is-mobile .popup--content {
  width: 430px;
  max-width: calc(100vw - 24px);
}

html.is-mobile .popup__card--scroll {
  padding: 24px 20px;
  gap: 20px;
  border-width: 2px;
  border-radius: 28px;
  max-height: calc(100vh - 24px);
}

html.is-mobile .popup__content-inner {
  border-radius: 20px;
  padding: 24px 8px 0 16px;
}

html.is-mobile .popup__content-inner::after {
  left: 12px;
  right: 12px;
  height: 60px;
}

html.is-mobile .popup__content-inner .popup__scroll {
  max-height: 320px;
  padding: 0 14px 40px 0;
}

html.is-mobile .popup__content-inner .popup__scroll::-webkit-scrollbar {
  width: 12px;
}

html.is-mobile .popup__content-inner .popup__scroll::-webkit-scrollbar-thumb {
  border-width: 2px;
}

html.is-mobile .popup__heading {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 16px;
}

html.is-mobile .popup__subheading {
  font-size: 16px;
  line-height: 1.2;
  margin: 18px 0 12px;
}

html.is-mobile .popup__subsub-heading {
  font-size: 14px;
  margin: 14px 0 10px;
}

html.is-mobile .popup__scroll p,
html.is-mobile .popup__scroll ol,
html.is-mobile .popup__scroll ul,
html.is-mobile .popup__scroll ul li,
html.is-mobile .popup__scroll ol li {
  font-size: 13px;
  line-height: 1.35;
}

html.is-mobile .popup__scroll ol,
html.is-mobile .popup__scroll ul {
  padding-left: 24px;
}

html.is-mobile .popup__ok-btn {
  width: 200px;
  height: 48px;
  font-size: 14px;
  border-radius: 14px;
}

/* In after-spin states the left-block CTA stays hidden (same as desktop rule),
   but in mobile we must also hide the empty left-block container so it doesn't
   eat vertical space above the wheel. The block-left has hero text + CTA;
   we keep the hero text visible in all states (it's the page header) and
   only hide the CTA via the existing rule. */
