.lucky-spin-root {
  --ls-bg: linear-gradient(160deg, #ff6b35 0%, #f7931e 45%, #ffcc00 100%);
  --ls-card: #fff8f0;
  --ls-text: #1a0f0a;
  --ls-muted: #6b5344;
  --ls-accent: #e63946;
  --ls-green: #2a9d8f;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  max-width: 420px;
  margin: 1rem auto;
  padding: 0.5rem;
}

.lucky-spin-root *,
.lucky-spin-root *::before,
.lucky-spin-root *::after {
  box-sizing: border-box;
}

.ls-card {
  background: var(--ls-card);
  border-radius: 20px;
  padding: 1.25rem 1rem 1.5rem;
  box-shadow: 0 12px 40px rgba(230, 57, 70, 0.25), 0 4px 0 #c1121f inset;
  border: 2px solid #ffb703;
}

.ls-header {
  text-align: center;
  margin-bottom: 0.75rem;
}

.ls-badge {
  display: inline-block;
  background: var(--ls-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.ls-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--ls-text);
}

.ls-assist-banner {
  background: linear-gradient(90deg, #2a9d8f, #264653);
  color: #fff;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.ls-testing-banner {
  background: linear-gradient(90deg, #7f1d1d, #dc2626);
  color: #fff;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.82rem;
  margin-bottom: 0.65rem;
  text-align: center;
  font-weight: 700;
}

.ls-wheel-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem 0 1rem;
  padding-top: 16px;
}

.ls-wheel-stage {
  position: relative;
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  overflow: visible;
}

.ls-wheel {
  display: block;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  transform-origin: 50% 50%;
}

/*
 * Pointer at 12 o’clock (top): tip points down into the rim.
 * Bottom placement was hidden behind the overlapping Spin button (higher z-index).
 */
.ls-wheel-pointer {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 40px;
  height: 34px;
  margin-left: -20px;
  z-index: 8;
  pointer-events: none;
  background: linear-gradient(180deg, #fff 0%, #ffb703 28%, #e63946 62%, #7f1017 100%);
  clip-path: polygon(50% 100%, 0% 0%, 100% 0%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 3px 4px rgba(193, 18, 31, 0.55));
}

.ls-spin-result {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ls-accent);
  margin: 0 0 0.35rem;
  min-height: 1.35em;
  line-height: 1.3;
}

.ls-spin-result:empty {
  min-height: 0;
  margin: 0;
}

.ls-spin-result[hidden] {
  display: none !important;
}

.ls-spin-btn {
  margin-top: -2.5rem;
  z-index: 6;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: radial-gradient(circle at 30% 30%, #ffdd55, #ff6b35);
  color: #1a0f0a;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ls-spin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ls-progress-wrap {
  margin-top: 0.5rem;
}

.ls-progress-label {
  font-size: 0.85rem;
  color: var(--ls-muted);
  margin-bottom: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ls-progress-bar {
  height: 12px;
  background: #e9ecef;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #dee2e6;
}

.ls-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e63946, #ffb703);
  transition: width 0.35s ease;
}

.ls-meta {
  font-size: 0.8rem;
  color: var(--ls-muted);
  text-align: center;
  margin: 0.75rem 0 0.5rem;
}

.ls-actions,
.ls-assist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.ls-btn {
  appearance: none;
  border: 1px solid #ced4da;
  background: #fff;
  color: var(--ls-text);
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ls-btn-primary {
  background: linear-gradient(180deg, #ff6b35, #e63946);
  color: #fff;
  border: none;
  flex: 1 1 100%;
}

.ls-btn-wa {
  background: #25d366;
  color: #fff;
  border: none;
}

.ls-btn-ghost {
  border-style: dashed;
}

.ls-note {
  font-size: 0.75rem;
  color: var(--ls-muted);
  margin: 1rem 0 0;
  text-align: center;
}

.lucky-spin-root.ls-assist-mode .ls-wheel-wrap {
  opacity: 0.92;
}

.lucky-spin-root.ls-assist-mode .ls-spin-btn {
  display: none;
}

/* --- Fullscreen prize burst (cash win) --- */
.ls-epic {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.ls-epic:not([hidden]) {
  pointer-events: auto;
}

.ls-epic[hidden] {
  display: none !important;
}

.ls-epic__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 77, 77, 0.35) 0%, rgba(20, 8, 5, 0.88) 72%);
  animation: ls-epic-fade-in 0.35s ease;
}

@keyframes ls-epic-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.ls-epic__rays {
  position: absolute;
  left: 50%;
  top: 44%;
  width: 140vmax;
  height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 215, 0, 0.14) 0deg 12deg,
    transparent 12deg 24deg
  );
  animation: ls-epic-spin 10s linear infinite;
  pointer-events: none;
}

@keyframes ls-epic-spin {
  to {
    transform: rotate(360deg);
  }
}

.ls-epic__confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ls-epic__confetti span {
  position: absolute;
  width: 10px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: ls-confetti-fall 2.4s ease-out forwards;
}

.ls-epic__confetti span:nth-child(1) {
  left: 10%;
  background: #e63946;
  animation-delay: 0.05s;
}
.ls-epic__confetti span:nth-child(2) {
  left: 22%;
  background: #ffb703;
  animation-delay: 0.12s;
}
.ls-epic__confetti span:nth-child(3) {
  left: 35%;
  background: #25d366;
  animation-delay: 0.08s;
}
.ls-epic__confetti span:nth-child(4) {
  left: 48%;
  background: #9b5de5;
  animation-delay: 0.15s;
}
.ls-epic__confetti span:nth-child(5) {
  left: 58%;
  background: #00bbf9;
  animation-delay: 0.06s;
}
.ls-epic__confetti span:nth-child(6) {
  left: 68%;
  background: #e63946;
  animation-delay: 0.18s;
}
.ls-epic__confetti span:nth-child(7) {
  left: 78%;
  background: #ffb703;
  animation-delay: 0.1s;
}
.ls-epic__confetti span:nth-child(8) {
  left: 88%;
  background: #2a9d8f;
  animation-delay: 0.14s;
}
.ls-epic__confetti span:nth-child(9) {
  left: 15%;
  background: #ff006e;
  animation-delay: 0.2s;
}
.ls-epic__confetti span:nth-child(10) {
  left: 92%;
  background: #ffbe0b;
  animation-delay: 0.16s;
}

@keyframes ls-confetti-fall {
  0% {
    opacity: 1;
    transform: translateY(-20px) rotate(0deg);
  }
  100% {
    opacity: 0.85;
    transform: translateY(100vh) rotate(720deg);
  }
}

.ls-epic__box {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 340px;
  animation: ls-epic-pop 0.55s cubic-bezier(0.34, 1.65, 0.64, 1);
}

@keyframes ls-epic-pop {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.ls-epic__burst {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 200px;
  height: 200px;
  margin: -100px 0 0 -100px;
  background: radial-gradient(circle, rgba(255, 230, 120, 0.95) 0%, rgba(255, 180, 50, 0.45) 45%, transparent 70%);
  animation: ls-epic-pulse 0.9s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes ls-epic-pulse {
  from {
    transform: scale(0.92);
    opacity: 0.85;
  }
  to {
    transform: scale(1.08);
    opacity: 1;
  }
}

.ls-epic__pretitle {
  position: relative;
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.ls-epic__amount {
  position: relative;
  font-size: clamp(2.8rem, 12vw, 3.8rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 4px 0 #c1121f, 0 6px 16px rgba(0, 0, 0, 0.5);
  letter-spacing: -0.02em;
  animation: ls-epic-shake 0.5s ease 0.2s;
}

@keyframes ls-epic-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px) rotate(-2deg);
  }
  40% {
    transform: translateX(4px) rotate(2deg);
  }
  60% {
    transform: translateX(-2px);
  }
}

.ls-epic__label {
  position: relative;
  margin: 0.5rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff8e7;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.ls-epic__hint {
  position: relative;
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ls-gate__summary {
  background: linear-gradient(180deg, #fff9e6, #fff3cd);
  border: 1px solid #ffc107;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  margin: 0 0 0.75rem;
  text-align: left;
}

.ls-gate__sum-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #856404;
}

.ls-gate__sum-line {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--ls-text);
  line-height: 1.35;
}

.ls-gate__sum-strong {
  font-weight: 800;
  font-size: 0.95rem;
  color: #c1121f;
}

/* --- PDD-style “must share / help” gate after 3 spins --- */
.ls-gate {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.ls-gate:not([hidden]) {
  pointer-events: auto;
}

.ls-gate[hidden] {
  display: none !important;
}

.ls-gate__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 8, 0.58);
  backdrop-filter: blur(3px);
}

.ls-gate__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #fffef8 0%, #fff5e6 100%);
  border-radius: 20px;
  padding: 1.35rem 1.2rem 1.1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 3px #ffb703, inset 0 1px 0 #fff;
  text-align: center;
  animation: ls-gate-pop 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ls-gate-pop {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.ls-gate__icon {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.ls-gate__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ls-text);
  line-height: 1.3;
}

.ls-gate__lead {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  color: var(--ls-muted);
  line-height: 1.45;
}

.ls-gate__reset {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: #8b6914;
  background: #fff3cd;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  line-height: 1.35;
}

.ls-gate__btn-main {
  width: 100%;
  margin-bottom: 0.55rem;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 14px rgba(230, 57, 70, 0.45);
}

.ls-gate__row {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.ls-gate__row .ls-btn {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.55rem 0.5rem;
}

.ls-gate__dismiss {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.4rem;
  border: none;
  background: transparent;
  color: var(--ls-muted);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ls-gate__dismiss:hover {
  color: var(--ls-text);
}

.ls-spin-btn.ls-spin-exhausted {
  opacity: 0.95;
  cursor: pointer;
  background: radial-gradient(circle at 30% 30%, #e0e0e0, #9e9e9e);
  color: #333;
}

.ls-spin-btn.ls-spin-exhausted:not(:disabled) {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
