.game-mode {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 20px;
}

.game-mode__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 7, 18, .78);
  backdrop-filter: blur(8px);
  cursor: default;
}

.game-mode__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100vw - 32px));
  min-height: 356px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(121, 155, 209, .2);
  border-radius: 8px;
  background: #111a2c;
  color: #f7f9ff;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .58);
  animation: game-mode-in .2s cubic-bezier(.2, .8, .2, 1) both;
}

.game-mode__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  background: rgba(5, 12, 25, .7);
  cursor: pointer;
}

.game-mode__close img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

.game-mode__art {
  position: relative;
  min-height: 356px;
  overflow: hidden;
  background: #0b1221;
}

.game-mode__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 8, 18, .88));
  pointer-events: none;
}

.game-mode__art-image,
.game-mode__art-fallback {
  width: 100%;
  height: 100%;
  min-height: 356px;
}

.game-mode__art-image {
  display: block;
  object-fit: cover;
}

.game-mode__art-fallback {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 70% 25%, rgba(255, 211, 79, .28), transparent 27%),
    linear-gradient(145deg, var(--mode-from), var(--mode-to));
}

.game-mode__art-fallback span {
  max-width: 210px;
  color: #fff;
  font-size: 25px;
  line-height: 1.08;
  font-weight: 950;
  text-align: center;
  text-shadow: 0 3px 12px rgba(0, 0, 0, .56);
}

.game-mode__provider {
  position: absolute;
  z-index: 2;
  left: 20px;
  bottom: 18px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  color: #fff;
}

.game-mode__content {
  min-width: 0;
  padding: 46px 30px 26px;
}

.game-mode__eyebrow {
  margin: 0 0 8px;
  color: #50c7ff;
  font-size: 11px;
  font-weight: 900;
}

.game-mode__content h2 {
  margin: 0 42px 26px 0;
  font-size: 25px;
  line-height: 1.14;
  letter-spacing: 0;
}

.game-mode__options {
  display: grid;
  gap: 10px;
}

.game-mode__option {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 15px;
  border: 1px solid rgba(112, 147, 201, .22);
  border-radius: 8px;
  background: #19253b;
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.game-mode__option:hover:not(:disabled),
.game-mode__option:focus-visible {
  border-color: #37baf6;
  background: #20314c;
  transform: translateY(-1px);
  outline: none;
}

.game-mode__option:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.game-mode__option-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #243652;
}

.game-mode__option--demo .game-mode__option-icon {
  background: #15598a;
}

.game-mode__option--wallet .game-mode__option-icon {
  background: #6f5415;
}

.game-mode__option--free-spins .game-mode__option-icon {
  background: #087f65;
}

.game-mode__option-icon img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.game-mode__option strong,
.game-mode__option small {
  display: block;
  letter-spacing: 0;
}

.game-mode__option strong {
  font-size: 15px;
  line-height: 1.25;
}

.game-mode__option small {
  margin-top: 4px;
  color: #9aabc5;
  font-size: 12px;
  line-height: 1.2;
}

.game-mode__option.is-loading {
  pointer-events: none;
}

.game-mode__error {
  min-height: 17px;
  margin: 12px 0 0;
  color: #ff8294;
  font-size: 12px;
  line-height: 1.35;
}

.demo-launch__title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-launch__mode {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(56, 190, 255, .16);
  color: #76d5ff;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
}

.demo-launch__mode.is-free-spins {
  background: rgba(64, 222, 161, .14);
  color: #63e4b2;
}

.demo-launch__money.is-free-spins {
  background: #178d69;
  color: #fff;
  opacity: 1;
}

.demo-launch__close {
  display: grid;
  place-items: center;
  padding: 0;
}

.demo-launch__close img {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

.demo-launch__loader {
  gap: 10px;
  align-content: center;
}

.demo-launch__loader span {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, .18);
  border-top-color: #46c5ff;
  border-radius: 50%;
  animation: game-loader-spin .8s linear infinite;
}

.demo-launch__money.is-wallet {
  background: #183b2f;
  color: #83e4b1;
  cursor: default;
}

@keyframes game-mode-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes game-loader-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .game-mode { padding: 12px; }
  .game-mode__dialog {
    width: min(430px, calc(100vw - 24px));
    max-height: calc(100vh - 24px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .game-mode__art,
  .game-mode__art-image,
  .game-mode__art-fallback {
    min-height: 168px;
    height: 168px;
  }
  .game-mode__art-fallback span { font-size: 22px; }
  .game-mode__content { padding: 24px 18px 18px; }
  .game-mode__content h2 { margin-bottom: 18px; font-size: 21px; }
  .game-mode__option { min-height: 70px; }
  .demo-launch__mode { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-mode__dialog,
  .demo-launch__loader span { animation: none; }
  .game-mode__option { transition: none; }
}
