:root {
  --page-width: 430px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: #ffffff;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: start center;
}

.promo {
  position: relative;
  width: min(100%, var(--page-width));
  min-height: 100vh;
  background: #ffffff url("assets/background.webp") center top / 100% 88% no-repeat;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.55);
}

.page-fireworks {
  position: absolute;
  z-index: 5;
  top: 6px;
  right: 10px;
  left: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 240ms ease;
}

.page-fireworks.is-visible {
  visibility: visible;
  opacity: 1;
}

.page-fireworks img {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
}

.scratch-section {
  position: absolute;
  right: 0;
  bottom: 184px;
  left: 0;
  padding: 0 16px;
}

.country-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 82px;
  padding: 15px 16px 20px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-radius: 0 0 12px 12px;
  background: #ffffff;
}

.country-footer__flags {
  position: relative;
  top: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  align-self: center;
}

.country-footer__flags img {
  display: block;
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.country-footer__copyright {
  align-self: center;
  margin-top: -6px;
  color: #6d5660;
  font: 10px/1.2 Arial, Helvetica, sans-serif;
  text-align: center;
}

.country-footer__copyright p {
  margin: 0;
}

.scratch-pointer {
  position: relative;
  top: 20px;
  z-index: 3;
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 7px;
  object-fit: contain;
  animation: pointer-bounce 1.15s ease-in-out infinite;
}

@keyframes pointer-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

.scratch-card {
  position: relative;
  z-index: 1;
  width: min(100%, 250px);
  height: 58px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #ffd700;
  border-radius: 8px;
  background: #000000;
  box-shadow:
    0 0 0 1px #ffd700,
    0 0 8px rgba(255, 215, 0, 0.65);
  animation: gold-outline-blink 1s ease-in-out infinite;
}

@keyframes gold-outline-blink {
  0%,
  100% {
    border-color: #8f6000;
    box-shadow:
      0 0 0 1px #8f6000,
      0 0 4px rgba(255, 183, 0, 0.35);
  }

  50% {
    border-color: #fff1a6;
    box-shadow:
      0 0 0 2px #ffd700,
      0 0 15px rgba(255, 215, 0, 0.95);
  }
}

.scratch-reward {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 800;
  background: #000000;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.75);
}

.scratch-reward span,
.scratch-reward strong {
  white-space: nowrap;
}

.scratch-reward strong {
  color: #ffffff;
  font-size: 15px;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#scratchCanvas:active {
  cursor: grabbing;
}

.bonus-modal {
  width: min(350px, calc(100% - 32px));
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 2px solid #ffd700;
  border-radius: 18px;
  color: #ffffff;
  background:
    #170705
    url("assets/pop-up reward2.webp")
    center / 100% 100%
    no-repeat;
  box-shadow:
    0 0 0 1px #ffd700,
    0 0 12px rgba(255, 215, 0, 0.65),
    0 20px 70px rgba(0, 0, 0, 0.72);
  animation: modal-gold-blink 1.1s ease-in-out infinite;
}

@keyframes modal-gold-blink {
  0%,
  100% {
    border-color: #8f6000;
    box-shadow:
      0 0 0 1px #8f6000,
      0 0 5px rgba(255, 183, 0, 0.35),
      0 20px 70px rgba(0, 0, 0, 0.72);
  }

  50% {
    border-color: #fff1a6;
    box-shadow:
      0 0 0 2px #ffd700,
      0 0 18px rgba(255, 215, 0, 0.95),
      0 20px 70px rgba(0, 0, 0, 0.72);
  }
}

.bonus-modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
}

.bonus-modal__content {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 38px 34px 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.bonus-modal h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.2;
}

.bonus-modal p {
  margin: 0;
  font-size: 19px;
  line-height: 1.35;
}

.bonus-modal p strong {
  display: block;
}

.bonus-modal button {
  margin-top: 17px;
  padding: 9px 19px;
  border: 0;
  border-radius: 5px;
  color: #ffffff;
  background: #ffb400;
  font: 17px Arial, Helvetica, sans-serif;
  cursor: pointer;
  outline: none;
  box-shadow: 0 3px 0 rgba(181, 111, 0, 0.42);
}

.bonus-modal button:focus,
.bonus-modal button:focus-visible {
  outline: none;
}

.bonus-modal button:hover {
  background: #ffc126;
}

.bonus-modal button:active {
  transform: translateY(1px);
}
