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

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

.reals-mg-modal {
  position: relative;
  width: min(1100px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: radial-gradient(ellipse at 50% 0%, #2a0845 0%, #040109 55%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  padding: 20px 18px 28px;
}

.reals-mg-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.reals-mg-layout {
  display: grid;
  gap: 24px;
  align-items: start;
}

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

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

.reals-mg-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.35);
}

.reals-mg-wheel-outer {
  position: relative;
  filter: drop-shadow(0 0 28px rgba(57, 255, 20, 0.45));
}

.reals-mg-pointer {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 28px solid #39ff14;
}

.reals-mg-wheel {
  transition: transform 5s cubic-bezier(0.16, 0.8, 0.24, 1);
  box-sizing: border-box;
}

.reals-mg-wheel-seg-label {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  max-width: 72px;
  line-height: 1.15;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.reals-mg-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: linear-gradient(145deg, #4c1d95, #220439);
  border: 3px solid #39ff14;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 10px;
  color: #c4b5fd;
  text-align: center;
  padding: 4px;
}

.reals-mg-spin-btn {
  min-width: 200px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #5dff3a 0%, #22c55e 100%);
  color: #04240f;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.5);
}

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

.reals-mg-spin-secondary {
  min-width: 200px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.55);
  background: rgba(26, 10, 46, 0.9);
  color: rgba(245, 243, 255, 0.45);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: not-allowed;
}

.reals-mg-panel {
  background: rgba(26, 10, 46, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reals-mg-panel-block {
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 12px;
  padding: 14px;
}

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

.reals-mg-big-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: #39ff14;
  line-height: 1;
}

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

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

.reals-mg-result {
  text-align: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(57, 255, 20, 0.12);
  border: 1px solid rgba(57, 255, 20, 0.35);
  font-weight: 700;
}

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

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