#wheel-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(72, 40, 130, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#wheel-overlay.wheel-hidden {
  display: none !important;
}

.wheel-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(165deg, #7b4dff 0%, #5a2fd6 48%, #4a22c4 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 22px 16px 26px;
  box-shadow: 0 24px 60px rgba(58, 24, 140, 0.45), 0 0 40px rgba(134, 82, 255, 0.28);
  text-align: center;
  animation: wheelPopIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.wheel-modal::before {
  content: '';
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.2), transparent 62%);
  pointer-events: none;
}

.wheel-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
  line-height: 32px;
  cursor: pointer;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
}

.wheel-close:active {
  background: rgba(255, 255, 255, 0.28);
}

#wheel-overlay.wheel-locked .wheel-close {
  display: none;
}

@keyframes wheelPopIn {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wheel-title {
  position: relative;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.wheel-subtitle {
  position: relative;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 18px;
}

.wheel-stage {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto 16px;
  overflow: visible;
}

.wheel-disc-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  padding: 0;
  background:
    linear-gradient(145deg, #ffd08a 0%, #ff8a1f 42%, #ff5c1a 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 8px rgba(120, 30, 0, 0.25);
}

.wheel-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: relative;
  border: 3px solid #fff;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: rotate(0deg);
  will-change: transform;
}

.wheel-disc::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wheel-divider);
  pointer-events: none;
  z-index: 1;
}

.wheel-disc.wheel-idle {
  animation: wheelIdleSpin 18s linear infinite;
}

.wheel-disc.wheel-spinning {
  transition: transform 4.2s cubic-bezier(0.12, 0.75, 0.08, 1);
}

@keyframes wheelIdleSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wheel-labels {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.wheel-label {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transform-origin: center center;
  line-height: 1.05;
  pointer-events: none;
}

.wheel-label-main {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.wheel-label-sub {
  font-size: 9px;
  font-weight: 600;
  opacity: 0.92;
}

.wheel-label-icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 50%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.wheel-spin-hit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 156px;
  height: 156px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 4;
  -webkit-tap-highlight-color: transparent;
}

.wheel-spin-art {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 6px 14px rgba(80, 30, 180, 0.35));
  transition: transform 0.15s ease;
}

.wheel-spin-hit:active:not(:disabled) .wheel-spin-art {
  transform: scale(0.96);
}

.wheel-spin-hit:disabled {
  cursor: not-allowed;
}

.wheel-spin-hit:disabled .wheel-spin-art {
  opacity: 0.85;
  filter: grayscale(0.15) drop-shadow(0 6px 14px rgba(80, 30, 180, 0.25));
}

.wheel-tip {
  position: relative;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.wheel-claim {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 8px;
  position: relative;
}

.wheel-claim.active {
  display: flex;
}

.wheel-spin-stage.hidden {
  display: none;
}

.wheel-claim-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffb347, #ff7a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  animation: wheelPulse 1.5s ease-in-out infinite;
}

.wheel-claim-icon img {
  width: 36px;
  height: 36px;
}

@keyframes wheelPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 180, 70, 0.45); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(255, 180, 70, 0); }
}

.wheel-claim-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.wheel-claim-amount {
  font-size: 36px;
  font-weight: 800;
  color: #ffe08a;
  margin-bottom: 16px;
  font-family: 'DIN Alternate', 'PingFang SC', sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.wheel-claim-status {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

.wheel-progress-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.wheel-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ffd36a, #ff7a1a);
  border-radius: 3px;
  transition: width 0.3s linear;
}

.wheel-claim-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.wheel-dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 2px;
}

.wheel-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 224, 138, 0.85);
  animation: wheelDot 1.2s ease-in-out infinite;
}

.wheel-dots span:nth-child(2) { animation-delay: 0.2s; }
.wheel-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wheelDot {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 360px) {
  .wheel-stage {
    width: 270px;
    height: 270px;
  }

  .wheel-spin-hit {
    width: 150px;
    height: 150px;
  }

  .wheel-label {
    width: 58px;
  }

  .wheel-label-main {
    font-size: 12px;
  }
}
