.page-prize-wheel .main-scroll {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 18px);
}

.prize-wheel-page {
  position: relative;
}

.prize-wheel-root {
  display: grid;
  gap: 14px;
}

.prize-wheel-loading,
.prize-wheel-locked,
.prize-wheel-card,
.prize-wheel-history {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(238, 248, 242, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 42px rgba(6, 38, 22, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
}

.prize-wheel-loading {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 800;
}

.prize-wheel-loading i {
  font-size: 30px;
}

.prize-wheel-head {
  margin-bottom: 10px;
}

.prize-wheel-card {
  position: relative;
  overflow: hidden;
  padding: 16px 14px 14px;
}

.prize-wheel-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.prize-wheel-card__top h2 {
  margin-top: 8px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.prize-wheel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 157, 88, 0.12);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.prize-wheel-sound {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 18px rgba(6, 38, 22, 0.08);
}

.prize-wheel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  margin: 2px auto 12px;
  isolation: isolate;
}

.prize-wheel-pointer {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  margin-left: -24px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #10251b, #0f9d58);
  box-shadow: 0 10px 22px rgba(8, 45, 25, 0.28);
}

.prize-wheel-pointer i {
  transform: translateY(7px);
  font-size: 30px;
}

.prize-wheel-ring {
  position: relative;
  width: min(292px, 82vw);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 12px;
  background:
    linear-gradient(145deg, #f7fff9, #b9f0d1 42%, #10251b 43%, #06341f 100%);
  box-shadow:
    0 28px 54px rgba(4, 30, 17, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.prize-wheel-ring::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.prize-wheel-disk {
  --wheel-rot: 0deg;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transform: rotate(var(--wheel-rot));
  transition: transform 5.6s cubic-bezier(0.08, 0.78, 0.08, 1);
  box-shadow:
    inset 0 0 0 7px rgba(255, 255, 255, 0.72),
    inset 0 0 34px rgba(0, 0, 0, 0.16);
}

.prize-wheel-disk::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -90deg, rgba(255,255,255,0.18) 0 1deg, transparent 1deg 30deg),
    radial-gradient(circle at 50% 50%, transparent 0 58%, rgba(0, 0, 0, 0.16) 100%);
  pointer-events: none;
}

.prize-wheel__label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 34px;
  margin-left: -38px;
  margin-top: -17px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(calc((360deg / 12) * var(--i) + 15deg)) translateY(-91px) rotate(90deg);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.prize-wheel__label strong {
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.prize-wheel__label small {
  margin-top: 2px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.prize-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, #f2b705 0%, #0f9d58 44%, #06341f 100%);
  border: 7px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 16px 28px rgba(6, 38, 22, 0.3),
    inset 0 2px 0 rgba(255, 255, 255, 0.54),
    inset 0 -10px 18px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.prize-wheel-hub span {
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.prize-wheel-quota {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -4px 0 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(15, 157, 88, 0.12);
}

.prize-wheel-quota span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.prize-wheel-quota strong {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  text-align: right;
}

.prize-wheel-stage.is-spinning .prize-wheel-ring {
  animation: wheelPulse 0.9s ease-in-out infinite alternate;
}

@keyframes wheelPulse {
  from { filter: saturate(1); }
  to { filter: saturate(1.25) brightness(1.04); }
}

.prize-wheel-spin {
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 15px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, #10251b 0%, #0f9d58 48%, #f2b705 100%);
  box-shadow: 0 14px 26px rgba(15, 157, 88, 0.28);
}

.prize-wheel-spin:disabled {
  cursor: wait;
  opacity: 0.82;
}

.prize-wheel-result {
  min-height: 66px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(15, 157, 88, 0.12);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.prize-wheel-result strong {
  display: block;
  margin-top: 2px;
  color: var(--green-dark);
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.prize-wheel-result small {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
}

.prize-wheel-result.is-win {
  background: linear-gradient(135deg, rgba(242, 183, 5, 0.22), rgba(15, 157, 88, 0.12));
}

.prize-wheel-confetti {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  width: 8px;
  height: 12px;
  border-radius: 3px;
  transform: translate(-50%, -50%);
  animation: wheelConfetti 1.15s cubic-bezier(0.1, 0.72, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes wheelConfetti {
  to {
    opacity: 0;
    transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(var(--r));
  }
}

.prize-wheel-history {
  padding: 14px;
}

.prize-wheel-history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.prize-wheel-history__head h2 {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.prize-wheel-history__head span {
  flex-shrink: 0;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(15, 157, 88, 0.11);
  font-size: 10px;
  font-weight: 900;
}

.prize-wheel-history__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(15, 157, 88, 0.1);
}

.prize-wheel-history__item span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.prize-wheel-history__item i {
  color: #f2b705;
}

.prize-wheel-history__item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.prize-wheel-history__empty {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.prize-wheel-locked {
  min-height: 360px;
  padding: 26px 18px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
}

.prize-wheel-locked__icon {
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #10251b, #0f9d58);
  box-shadow: 0 18px 34px rgba(6, 38, 22, 0.2);
  font-size: 30px;
}

.prize-wheel-locked h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}

.prize-wheel-locked p {
  max-width: 280px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 18px;
}

.prize-wheel-locked__btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15, 157, 88, 0.26);
}

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

  .prize-wheel-ring {
    width: min(270px, 84vw);
  }

  .prize-wheel__label {
    transform: rotate(calc((360deg / 12) * var(--i) + 15deg)) translateY(-83px) rotate(90deg);
  }
}

[data-theme="dark"] .prize-wheel-loading,
[data-theme="dark"] .prize-wheel-locked,
[data-theme="dark"] .prize-wheel-card,
[data-theme="dark"] .prize-wheel-history {
  background: linear-gradient(160deg, rgba(16, 26, 21, 0.96), rgba(8, 13, 10, 0.94));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .prize-wheel-result,
[data-theme="dark"] .prize-wheel-sound,
[data-theme="dark"] .prize-wheel-quota {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
