.app-scroll.is-slots {
  background: #141414;
}

.screen-game.is-slots {
  padding:
    16px
    var(--app-gutter)
    calc(20px + var(--tg-safe-bottom) + var(--tg-content-safe-bottom));
}

.slots-screen {
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

/* Заголовок и подзаголовок сверху, кнопка демо-режима под ними — как в остальных режимах */
.slots-screen > .slots-heading {
  order: -2;
}

.slots-screen > .slots-lead {
  order: -1;
}

.slots-demo-slot {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 2px 0 6px;
}

.slots-lead,
.slots-hint {
  margin: 0 0 2px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 15px;
}

.slots-lead[hidden],
.slots-hint[hidden] {
  display: none;
}

.slots-machines {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slots-machines[data-count="2"],
.slots-machines[data-count="3"],
.slots-machines[data-count="4"],
.slots-machines[data-count="5"] {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.slots-machine,
.slots-reel,
.slots-count__btn,
.slots-count__menu,
.slots-btn,
.slots-tab,
.slots-row,
.slots-prize,
.slots-row__check,
.slots-cell,
.slots-modal__card {
  isolation: isolate;
  backdrop-filter: blur(40px) saturate(120%);
  -webkit-backdrop-filter: blur(40px) saturate(120%);
}

.slots-machine {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 132px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.slots-machine.is-compact {
  width: calc((100% - 8px) / 2);
  height: 72px;
  padding: 8px;
  border-radius: 16px;
}

.slots-machines[data-count="3"] .slots-machine.is-compact:last-child,
.slots-machines[data-count="5"] .slots-machine.is-compact:last-child {
  margin-left: calc((100% - 8px) / 4);
}

.slots-reels {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
}

.slots-machine.is-compact .slots-reels {
  gap: 6px;
}

.slots-reel {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.slots-machine.is-compact .slots-reel {
  border-radius: 12px;
}

.slots-reel__window {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.slots-reel__strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.slots-reel__strip.is-spinning {
  animation: slots-reel-scroll 0.28s linear infinite;
}

.slots-reel__strip.is-landing {
  filter: blur(0.35px);
}

.slots-reel__strip.is-idle {
  filter: none;
}

@keyframes slots-reel-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -50%, 0);
  }
}

.slots-sym {
  flex: 0 0 106px;
  height: 106px;
  display: grid;
  place-items: center;
}

.slots-machine.is-compact .slots-sym {
  flex-basis: 54px;
  height: 54px;
}

.slots-sym img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}

.slots-machine.is-compact .slots-sym img {
  width: 28px;
  height: 28px;
}

.slots-result {
  margin: 4px 0 0;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.slots-result__combo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  vertical-align: -3px;
}

.slots-result__combo .slots-prize__combo-icon {
  width: 14px;
  height: 14px;
}

.slots-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
  height: 52px;
  margin: 4px 0 2px;
}

.slots-count {
  position: relative;
  width: 110px;
  height: 52px;
  flex-shrink: 0;
}

.slots-count__btn,
.slots-btn,
.slots-tab,
.slots-row__check {
  border: none;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.slots-count__btn {
  width: 110px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 600;
  white-space: pre;
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.slots-count__btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.slots-count__menu {
  position: absolute;
  left: 0;
  bottom: 58px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  width: 110px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.92);
}

.slots-count__menu[hidden] {
  display: none;
}

.slots-count__opt {
  appearance: none;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.slots-count__opt.is-active {
  background: rgba(255, 191, 50, 0.18);
  color: #ffbf32;
}

.slots-btn {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  box-shadow:
    inset 1px 1px 0.5px -1px #fff,
    inset -1px -1px 0.5px -1px #fff,
    inset 0 0 3.5px rgba(255, 255, 255, 0.4);
}

.slots-btn:active {
  filter: brightness(0.94);
}

.slots-btn:disabled {
  opacity: 0.55;
  cursor: default;
  filter: none;
}

.slots-spin__star,
.slots-btn .star-icon {
  width: 14px;
  height: 14px;
  object-fit: cover;
}

.slots-tabs {
  display: flex;
  gap: 6px;
  height: 32px;
  margin: 6px 0 2px;
}

.slots-tab {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.slots-tab.is-active {
  border: 1px solid rgba(255, 191, 50, 0.9);
  background: rgba(255, 191, 50, 0.18);
  color: #ffbf32;
}

.slots-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
}

.slots-panel[hidden] {
  display: none;
}

.slots-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slots-feed__empty {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
}

.slots-row,
.slots-prize {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.55),
    inset 0 0 3.5px rgba(255, 255, 255, 0.4);
}

.slots-prize {
  gap: 10px;
  border-radius: 16px;
}

.slots-row__avatar {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: #3a3a3a;
}

.slots-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slots-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.slots-row__top span:last-child,
.slots-row__game {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 600;
}

.slots-row__combo {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slots-row__combo img,
.slots-prize__combo-icon,
.slots-prizes__note img {
  display: block;
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}

.slots-row__combo span {
  font-size: 10px;
  font-weight: 600;
}

.slots-row__win {
  color: #ffbf32;
}

.slots-row__miss {
  color: rgba(255, 255, 255, 0.4);
}

.slots-row__check {
  flex-shrink: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 9px;
  font-weight: 600;
}

.slots-feed__demo {
  display: inline-block;
  margin-left: 6px;
  color: #ffbf32;
  font-size: 9px;
  font-weight: 700;
}

.slots-prizes {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slots-prizes__note {
  margin: 0 0 4px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

.slots-prize__art,
.slots-prize__nft {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.slots-prize__art {
  overflow: hidden;
}

.slots-prize__art canvas,
.slots-prize__art svg,
.slots-prize__art img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.slots-prize__nft {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffbf32;
  font-size: 12px;
  font-weight: 800;
}

.slots-prize__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.slots-prize__name {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.slots-prize__price {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffbf32;
  font-size: 11px;
  font-weight: 600;
}

.slots-prize__price img,
.slots-prize__price .star-icon {
  width: 12px;
  height: 12px;
  object-fit: cover;
}

.slots-prize__how {
  margin: 0;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
}

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

.slots-prize__combos span {
  display: flex;
  gap: 2px;
}

.slots-prize__or {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
  font-weight: 600;
}

.slots-bonus {
  margin: 4px 0;
}

.slots-bonus[hidden] {
  display: none;
}

.slots-bonus__title {
  margin: 0 0 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.slots-cell {
  appearance: none;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
  overflow: hidden;
  box-shadow:
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.55),
    inset 0 0 3.5px rgba(255, 255, 255, 0.4);
}

.slots-cell:active:not(:disabled) {
  transform: scale(0.96);
}

.slots-cell.is-open {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
}

.slots-cell.is-picked {
  border-color: rgba(255, 191, 50, 0.9);
  background: rgba(255, 191, 50, 0.18);
}

.slots-cell__lottie {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.slots-cell__lottie canvas,
.slots-cell__lottie svg,
.slots-cell__lottie img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  background: transparent;
}

.slots-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.slots-modal[hidden] {
  display: none;
}

.slots-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.slots-modal__card {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100% - 32px, 318px);
  padding: 24px 20px 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.94);
  transform: translate(-50%, -50%);
  box-shadow:
    inset -1px -1px 0.5px -1px rgba(255, 255, 255, 0.35),
    inset 1px 1px 0.5px -1px rgba(255, 255, 255, 0.7),
    inset 0 0 3.5px rgba(255, 255, 255, 0.45);
}

.slots-modal__lottie {
  width: 96px;
  height: 96px;
}

.slots-modal__lottie canvas,
.slots-modal__lottie svg,
.slots-modal__lottie img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.slots-modal__lottie.is-nft-gift img {
  object-fit: cover;
  border-radius: 20px;
}

.slots-modal__title {
  margin: 12px 0 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  line-height: 27px;
}

.slots-modal__sub {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 500;
}

.slots-modal__card .slots-btn {
  width: 100%;
  flex: none;
  margin-top: 12px;
}
