.mystery-feature {
  max-width: 1100px;
  margin: 0 auto 1.75rem;
  padding: 0 1.25rem;
  display: grid;
  gap: 1rem;
}
.mystery-card[data-wheel="epic"] {
  border-color: rgba(90, 170, 255, 0.35);
  background:
    radial-gradient(circle at 85% 20%, rgba(90, 170, 255, 0.16), transparent 45%),
    linear-gradient(145deg, rgba(10, 16, 24, 0.96) 0%, rgba(8, 12, 18, 0.98) 100%);
}
.mystery-card[data-wheel="epic"] .mystery-copy h2 { color: #7ec8ff; }
.mystery-card[data-wheel="legendary"] {
  border-color: rgba(255, 196, 70, 0.4);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 196, 70, 0.16), transparent 45%),
    linear-gradient(145deg, rgba(22, 16, 8, 0.96) 0%, rgba(8, 12, 18, 0.98) 100%);
}
.mystery-card[data-wheel="legendary"] .mystery-copy h2 { color: #ffd56a; }
.mystery-card[data-wheel="partyhat"] {
  border-color: rgba(255, 120, 200, 0.4);
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 120, 200, 0.16), transparent 45%),
    linear-gradient(145deg, rgba(22, 10, 18, 0.96) 0%, rgba(8, 12, 18, 0.98) 100%);
}
.mystery-card[data-wheel="partyhat"] .mystery-copy h2 { color: #ff9ad4; }
.mystery-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(57, 255, 20, 0.22);
  background:
    radial-gradient(circle at 85% 20%, rgba(57, 255, 20, 0.12), transparent 45%),
    linear-gradient(145deg, rgba(12, 18, 12, 0.96) 0%, rgba(8, 12, 18, 0.98) 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  padding: 1.35rem;
}
.mystery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, rgba(57, 255, 20, 0.05) 50%, transparent 60%);
  pointer-events: none;
}
.mystery-copy h2 {
  margin: 0 0 0.45rem;
  font-family: "Cinzel", serif;
  font-size: 1.35rem;
  color: var(--accent, #5dff2e);
  letter-spacing: 0.06em;
}
.mystery-copy p {
  margin: 0 0 0.75rem;
  color: var(--text-muted, #9bb09b);
  font-size: 0.92rem;
  max-width: 38rem;
}
.mystery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.mystery-tags span {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(57, 255, 20, 0.18);
  color: #cfeecf;
  background: rgba(57, 255, 20, 0.06);
}
.mystery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.mystery-price {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.mystery-btn {
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.mystery-btn-buy {
  background: linear-gradient(180deg, #6dff3a 0%, #39ff14 100%);
  color: #081208;
  box-shadow: 0 8px 24px rgba(57, 255, 20, 0.25);
}
.mystery-btn-buy:hover { transform: translateY(-1px); }
.mystery-btn-ghost {
  background: transparent;
  color: var(--accent, #5dff2e);
  border: 1px solid rgba(57, 255, 20, 0.35);
}
a.mystery-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: inherit;
  font-family: inherit;
}
a.mystery-btn-demo:hover {
  transform: translateY(-1px);
  background: rgba(57, 255, 20, 0.08);
}
.mystery-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  align-content: center;
}
.mystery-preview .chip {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem;
  text-align: center;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.mystery-preview img {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  object-fit: contain;
}
.mystery-preview span {
  font-size: 0.58rem;
  color: #b8c9b8;
  line-height: 1.2;
}
@media (max-width: 860px) {
  .mystery-card { grid-template-columns: 1fr; }
  .mystery-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mystery-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}
.mystery-page h1 {
  margin: 0 0 0.35rem;
  font-family: "Cinzel", serif;
  color: var(--accent, #5dff2e);
  letter-spacing: 0.08em;
  text-align: center;
}
.mystery-page .lead {
  text-align: center;
  color: var(--text-muted, #9bb09b);
  margin: 0 0 1.5rem;
}
.demo-banner {
  margin: 0 auto 1rem;
  max-width: 720px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 193, 7, 0.35);
  background: rgba(255, 193, 7, 0.08);
  color: #ffe082;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
}
.demo-banner strong {
  color: #ffd54f;
  letter-spacing: 0.04em;
}
.spin-shell {
  border-radius: 16px;
  border: 1px solid rgba(57, 255, 20, 0.2);
  background: rgba(8, 14, 10, 0.92);
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.spin-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #10141c 0%, #07090d 100%);
  height: 118px;
}
.spin-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 16px solid #39ff14;
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(57, 255, 20, 0.6));
}
.spin-track {
  display: flex;
  gap: 0.55rem;
  padding: 1.15rem 0.75rem 0.75rem;
  will-change: transform;
}
.spin-item {
  flex: 0 0 92px;
  height: 86px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-align: center;
}
.spin-item img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  object-fit: contain;
}
.spin-item span {
  font-size: 0.58rem;
  color: #c6d5c6;
  line-height: 1.15;
  padding: 0 0.2rem;
}
.spin-item.is-winner {
  border-color: rgba(57, 255, 20, 0.7);
  box-shadow:
    0 0 0 1px rgba(57, 255, 20, 0.35),
    0 0 22px rgba(57, 255, 20, 0.4);
  animation: spin-winner-pulse 1.1s ease-in-out infinite;
}
@keyframes spin-winner-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.spin-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1rem;
}
.spin-btn {
  min-width: 180px;
  border: none;
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(180deg, #6dff3a 0%, #39ff14 100%);
  color: #081208;
}
.spin-btn-again {
  background: linear-gradient(180deg, #5dff9a 0%, #2ecf6a 100%);
}
.spin-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.spin-wallet {
  margin: 0.75rem 0 0;
  text-align: center;
  color: #9bb09b;
  font-size: 0.88rem;
}
.spin-wallet strong {
  color: #cfeecf;
}
.spin-wallet a {
  color: #5dff2e;
}
.spin-result {
  margin-top: 1rem;
  text-align: center;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(57, 255, 20, 0.25);
  background: rgba(57, 255, 20, 0.06);
  display: none;
}
.spin-result.show { display: block; }
.spin-result h3 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1rem;
}
.spin-result p {
  margin: 0;
  color: #b8c9b8;
  font-size: 0.9rem;
}
.spin-error {
  margin-top: 0.75rem;
  text-align: center;
  color: #ff8f8f;
  min-height: 1.2rem;
}

.mystery-prizes-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(4, 10, 6, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mystery-prizes-overlay[hidden] {
  display: none !important;
}
.mystery-prizes-modal {
  width: min(760px, 100%);
  max-height: none;
  margin: auto 0;
  overflow: visible;
  border-radius: 16px;
  border: 1px solid rgba(57, 255, 20, 0.28);
  background: linear-gradient(165deg, rgba(10, 18, 12, 0.98), rgba(6, 10, 8, 0.98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 1.1rem 1.1rem 1.25rem;
  position: relative;
}
.mystery-prizes-body {
  display: block;
}
.mystery-prizes-close {
  position: sticky;
  top: 0.35rem;
  float: right;
  z-index: 2;
  border: none;
  background: rgba(6, 10, 8, 0.85);
  color: #cfeecf;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  padding: 0.1rem 0.45rem;
}
.mystery-prizes-modal h2 {
  margin: 0 2rem 0.35rem 0;
  font-family: "Cinzel", serif;
  color: #5dff2e;
  letter-spacing: 0.06em;
  font-size: 1.25rem;
}
.mystery-prizes-lead {
  margin: 0 0 1rem;
  color: #9bb09b;
  font-size: 0.88rem;
}
.mystery-prizes-loading,
.mystery-prizes-error {
  text-align: center;
  color: #b8c9b8;
  padding: 1.5rem 0;
}
.mystery-prizes-error { color: #ff9a9a; }
.mystery-prizes-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.mystery-prizes-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  background: rgba(57, 255, 20, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mystery-prizes-group-head h3 {
  margin: 0;
  font-size: 0.92rem;
  color: #e8f0e8;
}
.mystery-prizes-group-pct {
  font-weight: 700;
  color: #5dff2e;
  font-size: 0.88rem;
  white-space: nowrap;
}
.mystery-prizes-items {
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem 0.65rem;
}
.mystery-prizes-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
}
.mystery-prizes-item img {
  width: 30px;
  height: 30px;
  image-rendering: pixelated;
  object-fit: contain;
}
.mystery-prizes-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.mystery-prizes-item-meta strong {
  font-size: 0.78rem;
  color: #eef6ee;
  font-weight: 600;
}
.mystery-prizes-item-meta span {
  font-size: 0.68rem;
  color: #8fa58f;
}
.mystery-prizes-item-pct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b8ffb8;
  white-space: nowrap;
}
.mystery-prizes-group.tier-mythic .mystery-prizes-group-pct { color: #ff7ad9; }
.mystery-prizes-group.tier-legendary .mystery-prizes-group-pct { color: #ffd56a; }
.mystery-prizes-group.tier-rare .mystery-prizes-group-pct { color: #9fd0ff; }
.mystery-prizes-group.tier-uncommon .mystery-prizes-group-pct { color: #7ec8ff; }
.mystery-prizes-group.tier-common .mystery-prizes-group-pct { color: #b8c9b8; }

/* Congrats popup after spin lands */
.spin-congrats-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 8, 4, 0.78);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.spin-congrats-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.spin-congrats-overlay[hidden] {
  display: none !important;
}
.spin-congrats-sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.spin-congrats-sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9dff6a;
  box-shadow: 0 0 10px rgba(157, 255, 106, 0.85);
  animation: spin-sparkle-fall 2.4s linear infinite;
  opacity: 0;
}
.spin-congrats-sparkles span:nth-child(odd) {
  background: #ffe082;
  box-shadow: 0 0 10px rgba(255, 224, 130, 0.9);
  width: 4px;
  height: 4px;
}
.spin-congrats-sparkles span:nth-child(3n) {
  background: #fff;
  width: 3px;
  height: 3px;
}
@keyframes spin-sparkle-fall {
  0% {
    transform: translate3d(0, -12vh, 0) scale(0.4) rotate(0deg);
    opacity: 0;
  }
  12% { opacity: 1; }
  100% {
    transform: translate3d(18px, 110vh, 0) scale(1) rotate(220deg);
    opacity: 0;
  }
}
.spin-congrats-modal {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  text-align: center;
  border-radius: 18px;
  border: 1px solid rgba(57, 255, 20, 0.4);
  background:
    radial-gradient(circle at 50% 0%, rgba(57, 255, 20, 0.18), transparent 55%),
    linear-gradient(165deg, rgba(12, 20, 14, 0.98), rgba(6, 10, 8, 0.98));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 28px 64px rgba(0, 0, 0, 0.55),
    0 0 48px rgba(57, 255, 20, 0.18);
  padding: 1.5rem 1.25rem 1.35rem;
  transform: translateY(18px) scale(0.94);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.spin-congrats-overlay.is-open .spin-congrats-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.spin-congrats-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9dff6a;
}
.spin-congrats-modal h2 {
  margin: 0 0 1rem;
  font-family: "Cinzel", serif;
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  color: #fff;
}
.spin-congrats-prize {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 0 auto 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(57, 255, 20, 0.28);
  background: rgba(57, 255, 20, 0.06);
  animation: spin-prize-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes spin-prize-pop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.spin-congrats-prize img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(57, 255, 20, 0.45));
}
.spin-congrats-prize strong {
  font-size: 1.05rem;
  color: #eef6ee;
}
.spin-congrats-modal > p#spin-congrats-text {
  margin: 0 0 1.15rem;
  color: #b8c9b8;
  font-size: 0.9rem;
  line-height: 1.45;
}
.spin-congrats-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}
.spin-congrats-close,
.spin-congrats-again {
  border: none;
  border-radius: 12px;
  padding: 0.75rem 1.4rem;
  min-width: 140px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.spin-congrats-close {
  background: linear-gradient(180deg, #6dff3a 0%, #39ff14 100%);
  color: #081208;
  box-shadow: 0 8px 24px rgba(57, 255, 20, 0.28);
}
.spin-congrats-again {
  background: transparent;
  color: #9dff6a;
  border: 1px solid rgba(57, 255, 20, 0.45);
}
.spin-congrats-again:hover,
.spin-congrats-close:hover {
  transform: translateY(-1px);
}
.spin-congrats-again[hidden] {
  display: none !important;
}
