* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  width: 100%;
}

html {
  font-size: 10px;
  line-height: 1.5;
}

@media screen and (max-width: 400px), (max-height: 400px) {
  html {
    font-size: calc(5px + 1vmin);
  }
}
body {
  color: #000;
  display: flex;
  font-family: ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  text-align: center;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h3 {
  font-weight: 700;
}

h1 {
  font-size: 3.6rem;
  line-height: 4rem;
}

h3 {
  font-size: 2.4rem;
  line-height: 3.2rem;
}

img {
  display: block;
}

p {
  font-size: 2rem;
  line-height: 2.8rem;
}

.background,
.background__stars {
  height: 100%;
  width: 100%;
}

.background {
  background-image: url("./background.png");
  background-size: cover;        /* растягивается пропорционально на весь блок */
  background-position: center;   /* всегда по центру */
  background-repeat: no-repeat;  /* не повторять */
  width: 100%;                   /* занимает всю ширину экрана */
  min-height: 100vh;             /* минимум — весь экран по высоте */
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  padding-top: 7rem;
  position: absolute;
  z-index: 0;
}
.background__left,
.background__right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.background__left__bottom,
.background__right__bottom {
  position: relative;
}

.background__right__top {
  margin-top: 50%;
}

.background__cloud {
  display: block;
}

.background__cloud-left-1 {
  height: 8.4rem;
  width: 9.3rem;
}

.background__cloud-left-2 {
  height: 11.7rem;
  width: 14.6rem;
}

.background__cloud-left-3,
.background__cloud-left-4 {
  bottom: 0;
  position: absolute;
}

.background__cloud-left-3 {
  height: 14.5rem;
  width: 16.9rem;
}

.background__cloud-left-4 {
  height: 14.2rem;
  width: 13.1rem;
}

.background__cloud-right-1 {
  height: 11.5rem;
  width: 11.4rem;
}

.background__cloud-right-2,
.background__cloud-right-3 {
  bottom: 0;
  right: 0;
  position: absolute;
}

.background__cloud-right-2 {
  height: 14.5rem;
  width: 20.5rem;
}

.background__cloud-right-3 {
  height: 8.7rem;
  width: 17.3rem;
}

.background__stars {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.background__star {
  position: absolute;
}

.background__star-1 {
  height: 2.4rem;
  left: 2rem;
  top: 32%;
  width: 2.4rem;
}

.background__star-2 {
  bottom: 32%;
  height: 3.2rem;
  left: 4rem;
  width: 3.2rem;
}

.background__star-3 {
  height: 3.2rem;
  opacity: 0.75;
  right: 3rem;
  top: 8%;
  width: 3.2rem;
}

.background__star-4 {
  height: 1.6rem;
  opacity: 0.3;
  right: 6rem;
  top: 50%;
  width: 1.6rem;
}

.background__star-5 {
  height: 2.4rem;
  right: -1rem;
  top: 63%;
  width: 2.4rem;
}

.background__star-6 {
  bottom: 10%;
  height: 2.6rem;
  right: 40%;
  width: 2.6rem;
}

.modal {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  padding: 1.2rem;
  position: absolute;
  width: 100%;
  z-index: 3;
}

.modal__window {
  background-color: #fff;
  border-radius: 1.6rem;
  max-width: 38.4rem;
  padding: 2rem;
}

.modal__window__title {
  margin-bottom: 1.2rem;
}

.modal__window__text {
  color: rgb(122, 122, 122);
  font-size: 2rem;
  font-weight: 700;
  line-height: 2.8rem;
  margin-bottom: 3.2rem;
}

.modal__window__button {
  background-color: rgb(24, 139, 120);
  border-radius: 0.8rem;
  color: #fff;
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 3.2rem;
  padding: 0.8rem;
  text-transform: uppercase;
}

.game {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 2.8rem;
  position: relative;
  width: 100%;
  z-index: 1;
}

@media screen and (orientation: landscape) and (max-height: 550px) {
  .game {
    flex-direction: row;
  }
}
.game__header {
  max-width: 55rem;
  text-transform: uppercase;
}

.game__header__h1 {
  color: #fff;
}

.game__header__h1 b {
  color: rgb(253, 196, 82);
}

.game__header__h3 {
  color: rgb(212, 212, 216);
  font-weight: 700;
}

.game__header__text {
  color: #fff;
  text-transform: initial;
}

.game__main {
  max-height: 35.7rem;
  max-width: 35.7rem;
  position: relative;
}

.game__main__image {
  transform: rotate(0);
  transition: transform 1s;
  max-height: 100%;
  max-width: 100%;
}

.game__main__image-rotate-1 {
  transform: rotate(8deg);
}

.game__main__image-rotate-2 {
  transform: rotate(-8deg);
}

.game__main__image-hand {
  bottom: 5.5rem;
  height: 8rem;
  position: absolute;
  right: 7rem;
  width: 8rem;
}

.game__main__image-hand-animation-pulse {
  animation: handPulse 2s ease-in-out infinite;
}

@keyframes handPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}
.game__main__bonus-container {
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1;
}

.game__main__bonus-value {
  animation: fadeOut 3s forwards;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 700;
  opacity: 1;
  position: absolute;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.game__footer {
  bottom: 2.8rem;
  left: 2.8rem;
  position: absolute;
  right: 2.8rem;
}

.game__progress {
  align-items: center;
  background-color: rgb(10, 96, 76);
  border-radius: 1.6rem;
  color: #fff;
  display: flex;
  height: 5.6rem;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.game__progress__bar {
  bottom: 0;
  background-color: rgb(254, 189, 42);
  left: 0;
  position: absolute;
  top: 0;
  transition: width 1s linear;
  width: 0;
  z-index: 0;
}

.game__progress__text {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 2.8rem;
  position: relative;
  z-index: 1;
}

.game-final-screen {
  align-items: center;
  background-image: linear-gradient(to bottom, #ffbd39, #ffe1a5);
  bottom: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  left: 0;
  padding: 2.8rem;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  z-index: 2;
  overflow: hidden;
}

@media screen and (orientation: landscape) and (max-height: 550px) {
  .game-final-screen {
    flex-direction: row;
  }
}
.game-final-screen .game__header {
  max-width: 35.7rem;
}

.game-final-screen .game__header__h3 {
  color: rgba(88, 59, 0, 0.5019607843);
}

.game-final-screen .game__main__image {
  transform: scale(1.45);
}

.game__button {
  background-color: rgb(88, 59, 0);
  border-radius: 0.8rem;
  color: rgb(253, 196, 82);
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 3.2rem;
  padding: 1.2rem;
  text-transform: uppercase;
  width: 100%;
  margin: auto;
  max-width: 42rem;
}

.color-yellow {
  color: rgb(253, 196, 82);
}

.blur {
  filter: blur(8px);
}

.hidden {
  display: none;
}

.visible {
  animation: makeVisible 1s ease forwards;
  display: flex;
  opacity: 0;
}

@keyframes makeVisible {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
html[dir=rtl] .background__cloud {
  transform: scaleX(-1);
}
.coin-rain__coin {
  position: fixed;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff4b0 0%, #ffe066 35%, #f7b32d 60%, #b66f00 100%);
  box-shadow: 0 0 8px rgba(253, 196, 82, 0.7);
  border: 1px solid rgba(182, 111, 0, 0.7);
  pointer-events: none;
  z-index: 5;
  transform: translate(0, 0) rotate(0deg) scale(var(--coin-scale, 1));
  animation: coin-rain-fall var(--coin-fall-duration, 1400ms) ease-in forwards;
  will-change: transform, opacity;
}

@keyframes coin-rain-fall {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate(
        var(--coin-translate-x, 0),
        calc(100vh + 5rem - var(--coin-start-top, 0px))
      )
      rotate(var(--coin-rotate, 360deg))
      scale(var(--coin-scale, 1));
    opacity: 0;
  }
}

/* Пульсация кнопки Claim Reward */
.game__button--pulse {
  animation: claimPulse 1.8s ease-in-out infinite;
  transform-origin: center;
  will-change: transform, box-shadow;
}

@keyframes claimPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(253, 196, 82, 0.0);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 0 24px 6px rgba(253, 196, 82, 0.45);
  }
}

.game__button--pulse:hover,
.game__button--pulse:active {
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .game__button--pulse {
    animation: none;
  }
}

/* === CRIT word effect — на 100% лёгкий === */
.game__hint-crit {
  font-size: 3rem;
  font-weight: 900;
  color: #FFD24A;          /* мягкий золото-жёлтый как нижняя полоса */
  animation: critPopLight 600ms ease-out forwards;
  z-index: 4;
  letter-spacing: 1px;
}

/* лёгкий подъём — без теней, без свечения */
@keyframes critPopLight {
  0%   { transform: translateY(0) scale(0.85); opacity: 0.1; }
  30%  { transform: translateY(-10px) scale(1.0); opacity: 1;   }
  70%  { transform: translateY(-25px) scale(1.0); opacity: 0.8; }
  100% { transform: translateY(-40px) scale(1.0); opacity: 0;   }
}
}