.reals-mg-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(4, 0, 12, 0.78);
  backdrop-filter: blur(8px);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #fff;
}

.reals-mg-modal-root[hidden] {
  display: none !important;
}

.reals-mg-modal {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(94vh, 920px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(124, 58, 237, 0.55);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(124, 58, 237, 0.28), transparent 46%),
    radial-gradient(ellipse at 80% 80%, rgba(57, 255, 20, 0.08), transparent 40%),
    linear-gradient(180deg, #160428 0%, #07010f 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 28px 22px 32px;
}

.reals-mg-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.reals-mg-layout {
  display: grid;
  gap: 28px;
  align-items: center;
}

@media (min-width: 900px) {
  .reals-mg-layout {
    grid-template-columns: minmax(360px, 1fr) 320px;
  }
}

.reals-mg-wheel-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.reals-mg-stage {
  position: relative;
  width: min(380px, 86vw);
  height: min(380px, 86vw);
  filter: drop-shadow(0 0 18px rgba(57, 255, 20, 0.55)) drop-shadow(0 0 42px rgba(57, 255, 20, 0.28));
}

.reals-mg-stage.is-spinning {
  animation: realsMgPulse 0.45s ease-in-out infinite alternate;
}

@keyframes realsMgPulse {
  from { filter: drop-shadow(0 0 14px rgba(57, 255, 20, 0.45)); }
  to { filter: drop-shadow(0 0 36px rgba(57, 255, 20, 0.9)); }
}

.reals-mg-pointer {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 5;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-top: 28px solid #39ff14;
  filter: drop-shadow(0 4px 8px rgba(57, 255, 20, 0.8));
}

.reals-mg-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: transform 5.2s cubic-bezier(0.12, 0.72, 0.08, 1);
  will-change: transform;
}

.reals-mg-spin-btn {
  min-width: 220px;
  height: 52px;
  padding: 0 36px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(180deg, #7dff4a 0%, #22e022 48%, #12b312 100%);
  color: #06240a;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(180, 255, 140, 0.5),
    0 8px 0 #0a7a12,
    0 12px 28px rgba(57, 255, 20, 0.35);
}

.reals-mg-spin-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 5px 0 #0a7a12, 0 8px 16px rgba(57, 255, 20, 0.3);
}

.reals-mg-spin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.reals-mg-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reals-mg-panel-block {
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(48, 12, 92, 0.92), rgba(18, 4, 36, 0.95));
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.reals-mg-panel-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d8b4fe;
  margin-bottom: 8px;
}

.reals-mg-big-num {
  font-size: 2.6rem;
  font-weight: 900;
  color: #39ff14;
  line-height: 1;
  text-shadow: 0 0 18px rgba(57, 255, 20, 0.45);
}

.reals-mg-muted {
  color: rgba(245, 243, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.reals-mg-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.reals-mg-spin-btn.block,
.reals-mg-spin-secondary {
  width: 100%;
  min-width: 0;
  letter-spacing: 0.04em;
  font-size: 0.82rem;
}

.reals-mg-spin-secondary {
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.7);
  background: linear-gradient(180deg, #3b0764, #1e0538);
  color: #e9d5ff;
  font-weight: 800;
  cursor: not-allowed;
}

.reals-mg-history-item {
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.reals-mg-error {
  color: #fca5a5;
  text-align: center;
  font-size: 0.9rem;
  margin: 0;
}

.reals-mg-loading {
  text-align: center;
  padding: 64px 16px;
  color: rgba(245, 243, 255, 0.75);
}

.reals-mg-prize-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 0, 12, 0.72);
  animation: realsMgFade 0.25s ease;
}

@keyframes realsMgFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.reals-mg-prize-card {
  width: min(420px, 100%);
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
  background: linear-gradient(180deg, #2a0850 0%, #12041f 100%);
  border: 1px solid rgba(57, 255, 20, 0.55);
  box-shadow: 0 0 40px rgba(57, 255, 20, 0.25), 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: realsMgPop 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes realsMgPop {
  from { transform: scale(0.86); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.reals-mg-prize-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  font-weight: 800;
  color: #39ff14;
}

.reals-mg-prize-title {
  margin: 8px 0 0;
  font-size: 1.8rem;
  font-weight: 900;
}

.reals-mg-modal.is-game {
  width: min(1180px, 100%);
  padding: 10px;
}

.reals-mg-host {
  display: block;
}

.reals-mg-prize-icon {
  width: 120px;
  height: 96px;
  object-fit: contain;
  margin: 10px auto 0;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}

.reals-mg-prize-value {
  margin: 14px 0 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #f5f3ff;
}

.reals-mg-prize-sub {
  margin: 8px 0 18px;
  color: rgba(245, 243, 255, 0.7);
  font-size: 0.92rem;
}

.reals-mg-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.reals-mg-confetti i {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: realsMgFall 1.4s linear forwards;
}

@keyframes realsMgFall {
  to { transform: translateY(110vh) rotate(220deg); opacity: 0.2; }
}
