.roulette-screen {
  width: min(100%, 420px);
  margin: 0 auto;
  min-height: calc(var(--tg-viewport-height, 100dvh) - 40px);
  display: flex;
  flex-direction: column;
}

.roulette-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.roulette-heading {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.roulette-spins {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffffb3;
}

.roulette-progress {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff0a;
  border: 1px solid #ffffff14;
}

.roulette-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffffcc;
}

.roulette-progress__meta .star-icon,
.roulette-progress__hint .star-icon {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-left: 2px;
}

.roulette-progress__bar {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #ffffff18;
  overflow: hidden;
}

.roulette-progress__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd54a, #ff9f1a);
  transition: width 0.35s ease;
}

.roulette-progress__hint {
  margin: 8px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff80;
  text-align: center;
}

.roulette-screen [data-roulette-buy] {
  width: 100%;
  margin-top: 8px;
}

.rwheel-wrap {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  margin: 8px auto 16px;
}

.rwheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.rwheel-pointer::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
}

.rwheel {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 4px solid #ffffff22;
  box-shadow:
    inset 0 0 0 6px #00000033,
    0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  will-change: transform;
}

.rwheel__items {
  position: absolute;
  inset: 0;
}

.rwheel__item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px;
  transform: rotate(var(--angle)) translateY(-118px) rotate(calc(-1 * var(--angle)));
  display: grid;
  place-items: center;
  pointer-events: none;
}

.rwheel__icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

.rwheel__icon canvas,
.rwheel__icon svg,
.rwheel__icon img,
.rfeed__prize-lottie canvas,
.rfeed__prize-lottie svg,
.rfeed__prize-lottie img {
  width: 100% !important;
  height: 100% !important;
  display: block;
  object-fit: contain;
  background: transparent;
}

.rwheel__hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a4250, #12151c 70%);
  border: 3px solid #ffffff22;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.roulette-screen > .mines-btn {
  margin-bottom: 14px;
  flex-shrink: 0;
}

.rfeed {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff10;
  border-radius: 18px;
  padding: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.rfeed__title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff99;
  margin-bottom: 10px;
}

.rfeed__list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.rfeed__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff12;
  border-radius: 14px;
  padding: 8px 10px;
  flex-shrink: 0;
}

.rfeed__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff22;
  flex-shrink: 0;
}

.rfeed__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rfeed__nick {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rfeed__prize {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.rfeed__prize-lottie {
  width: 32px;
  height: 32px;
  overflow: hidden;
}

.rfeed__prize-name {
  font-size: 13px;
  font-weight: 700;
  color: #cfe0ff;
  white-space: nowrap;
}

.rfeed__empty {
  margin: 8px 0 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff66;
}

.roulette-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.roulette-modal[hidden] {
  display: none !important;
}

.roulette-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.roulette-modal__card {
  position: relative;
  width: min(100%, 340px);
  background: #1a1d22;
  border-radius: 24px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.roulette-modal__lottie {
  width: 160px;
  height: 160px;
  margin: 0 auto 12px;
}

.roulette-modal__lottie canvas,
.roulette-modal__lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.roulette-modal__title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.roulette-modal__sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: #ffffff99;
}

.app-scroll.is-roulette {
  background: radial-gradient(163% 82% at 50% 50%, rgb(255, 140, 40), rgb(90, 35, 5) 100%);
}

.app-scroll.is-mines {
  background: radial-gradient(100% 100%, rgb(117, 34, 206), rgb(43, 33, 88) 100%);
}
