/* Prize Box Overlay & Animations */
.prize-box-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(120% 100% at 50% 30%, rgba(0,0,0,0.72), rgba(0,0,0,0.82)), rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 200ms ease-out;
}
.prize-box-overlay.visible { opacity: 1; }
.prize-box-overlay.hidden { display: none; }
/* Removed opened overlay styling per request */

.prize-box-panel {
  width: 100%;
  max-width: min(88vw, 380px);
  padding: 20px 16px 24px 16px;
  background: linear-gradient(180deg, rgba(10,14,20,0.96), rgba(6,9,14,0.96));
  border: 1px solid #2b3240;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 32px rgba(0, 229, 255, 0.08) inset;
  text-align: center;
  max-height: 80vh;
  overflow: auto;
  /* Prepare for entrance animation */
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

/* Entrance animation for the panel */
@keyframes panel-pop-in {
  0%   { opacity: 0; transform: translateY(10px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.prize-box-overlay.visible .prize-box-panel { animation: panel-pop-in 260ms cubic-bezier(0.22,1,0.36,1) forwards; }
.panel-anim { animation: panel-pop-in 260ms cubic-bezier(0.22,1,0.36,1) forwards; }

/* Elevated, prettier look after opening */
/* Removed opened panel special background/shimmer per request */

.prize-box-stage {
  position: relative;
  height: clamp(140px, 28vh, 180px);
  margin-bottom: 8px;
  overflow: hidden;
}

.shockwave {
  position: absolute;
  top: 50%; left: 50%;
  width: 40px; height: 40px;
  border-radius: 9999px;
  border: 3px solid rgba(0,229,255,0.75);
  transform: translate(-50%, -50%);
  animation: shockwave-anim 800ms ease-out forwards;
  box-shadow: 0 0 18px rgba(0,229,255,0.55);
}
@keyframes shockwave-anim {
  0%   { opacity: 0.9; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0;   transform: translate(-50%, -50%) scale(6.5); }
}

/* Cartoonish jumping box */
.prize-box-bounce { position: absolute; top: 56%; left: 50%; transform: translate(-50%, -50%); }
.prize-box.cartoon {
  position: relative;
  width: min(48vw, 140px);
  aspect-ratio: 4 / 3;
  height: auto;
  cursor: pointer;
  transform-origin: bottom center;
  animation: box-bob 1200ms ease-in-out infinite;
}
.prize-box.cartoon.opened { animation: none; }
.prize-box.cartoon:hover { animation-duration: 900ms; }
.box-shadow-blob {
  position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  width: 72%; height: 12%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.45), transparent 70%);
  filter: blur(2px);
  animation: shadow-pulse 1200ms ease-in-out infinite;
}
.prize-box.treasure .chest-body {
  position: absolute; bottom: 0; left: 0; right: 0; height: 100px;
  height: 68%;
  border-radius: 16px;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 6px, rgba(0,0,0,0.0) 6px, rgba(0,0,0,0.0) 18px),
    linear-gradient(180deg, #80471C, #4b2a12);
  border: 3px solid #3a2412;
  box-shadow: inset 0 10px 0 rgba(255,255,255,0.12), 0 8px 0 rgba(0,0,0,0.25);
}
.prize-box.treasure.opened .chest-body {
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 6px, rgba(0,0,0,0.0) 6px, rgba(0,0,0,0.0) 18px),
    linear-gradient(180deg, #8c531f, #523015);
  border-color: #3a2412;
  box-shadow: inset 0 12px 0 rgba(255,255,255,0.16), 0 8px 0 rgba(0,0,0,0.2);
}
.prize-box.treasure .chest-lid {
  position: absolute; top: -18%; left: 50%; width: 100%; height: 28%; transform: translateX(-50%);
  border-radius: 18px;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 6px, rgba(0,0,0,0.0) 6px, rgba(0,0,0,0.0) 18px),
    linear-gradient(180deg, #8a4e1b, #4b2a12);
  border: 3px solid #3a2412;
  transform-origin: center bottom;
}
.prize-box.treasure.opened .chest-lid { transform: translateX(-50%) translateY(-34px) rotate(-32deg); box-shadow: 0 8px 12px rgba(0,0,0,0.35); }
.prize-box.treasure .metal-band {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; transform: translateX(-50%);
  background: linear-gradient(180deg, #d1b46a, #9c7a2e);
  border-left: 3px solid #6b521c;
  border-right: 3px solid #6b521c;
  box-shadow: inset 0 0 12px rgba(255,255,255,0.22), 0 0 10px rgba(0,0,0,0.25);
}
.prize-box.treasure .metal-band.h { top: 45%; height: 16px; width: 100%; left: 0; transform: none; border-left: 0; border-right: 0; border-top: 3px solid #6b521c; border-bottom: 3px solid #6b521c; }
.prize-box.treasure .metal-band.h.lid { top: 36%; }
.prize-box.treasure .metal-band.v { width: 18px; }
.prize-box.treasure .lock-plate { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); width: 28px; height: 34px; border-radius: 6px; background: linear-gradient(180deg, #c9ac5f, #9a782f); border: 2px solid #6b521c; box-shadow: inset 0 0 10px rgba(0,0,0,0.25); }
.prize-box.treasure .keyhole { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 6px; height: 10px; background: #1a1006; border-radius: 3px 3px 2px 2px; box-shadow: 0 0 6px rgba(0,0,0,0.4) inset; }
.prize-box.cartoon.opened .cartoon-lid { animation: lid-pop 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.treasure-content { position: absolute; left: 8%; right: 8%; bottom: 6%; height: 40%; pointer-events: none; opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity 300ms ease-out, transform 300ms ease-out; }
.treasure-glow { position: absolute; inset: -6%; border-radius: 12px; background: radial-gradient(60% 60% at 50% 20%, rgba(255,222,100,0.35), rgba(255,222,100,0.08) 60%, rgba(0,0,0,0) 80%); filter: blur(6px); }
.treasure-pile { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.treasure-pile .coin, .treasure-pile .gem { font-size: 18px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); animation: treasure-bob 1200ms ease-in-out infinite; }
.treasure-pile .coin:nth-child(1) { transform: translateY(4px) rotate(-8deg); animation-delay: 0.1s; }
.treasure-pile .coin:nth-child(2) { transform: translateY(0) rotate(6deg); animation-delay: 0.2s; }
.treasure-pile .gem { transform: translateY(-2px) rotate(0deg); animation-delay: 0.15s; }
.prize-box.treasure.opened .treasure-content { opacity: 1; transform: translateY(0) scale(1); }
@keyframes treasure-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-2px) } }
.click-hint { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); color: #86e7ff; font-weight: 800; font-size: 0.85rem; text-shadow: 0 2px 0 rgba(0,0,0,0.6); letter-spacing: 0.06em; animation: hint-pulse 1200ms ease-in-out infinite; display: flex; align-items: center; gap: 6px; }
.hint-arrow { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #86e7ff; filter: drop-shadow(0 0 4px rgba(134,231,255,0.6)); animation: arrow-bounce 1200ms ease-in-out infinite; }
@keyframes hint-pulse { 0%,100%{ opacity: 0.6 } 50% { opacity: 1 } }
@keyframes arrow-bounce { 0%,100%{ transform: translateY(0) } 50% { transform: translateY(-4px) } }

/* Pulse ring under the box to suggest interaction */
.pulse-ring { position: absolute; top: 52%; left: 50%; width: 100%; height: 100%; border-radius: 9999px; transform: translate(-50%, -50%); pointer-events: none; }
.pulse-ring::before, .pulse-ring::after { content: ''; position: absolute; inset: 0; border-radius: 9999px; border: 2px solid rgba(0,229,255,0.4); animation: ring-pulse 1400ms ease-out infinite; }
.pulse-ring::after { animation-delay: 400ms; }
@keyframes ring-pulse { 0% { opacity: 0.5; transform: scale(0.75) } 100% { opacity: 0; transform: scale(1.2) } }

/* Sparkles on open */
.prize-skip-row { display: flex; justify-content: center; margin-top: 6px; }
.prize-sparkles {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 25% 20%, rgba(255,255,255,0.7), transparent 35%),
              radial-gradient(circle at 70% 30%, rgba(0,229,255,0.6), transparent 40%),
              radial-gradient(circle at 50% 70%, rgba(0,162,255,0.5), transparent 45%);
  opacity: 0; filter: blur(1px);
  animation: sparkle-rise 900ms ease-out forwards;
}

.prize-box-header .prize-title {
  font-weight: 900;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  background: linear-gradient(90deg, #00E5FF, #F73A8E);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 229, 255, 0.25), 0 0 6px rgba(247, 58, 142, 0.18);
  margin-bottom: 6px;
}
.prize-box-header .prize-level {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(0,229,255,0.14), rgba(0,162,255,0.08));
  border: 1px solid rgba(0,229,255,0.45);
  box-shadow: inset 0 0 18px rgba(0,229,255,0.09), 0 6px 18px rgba(0,0,0,0.35);
}
.prize-box-header .prize-level.swap { flex-direction: row-reverse; }

.lvl-medal { position: relative; width: 56px; height: 56px; }
.lvl-ring, .lvl-core { position: absolute; inset: 0; border-radius: 9999px; }
/* Neon ring with animated sweep */
.lvl-ring {
  --ring-size: 6px;
  background: conic-gradient(
    from 0deg,
    rgba(0,229,255,0.0) 0deg,
    rgba(0,229,255,0.35) 60deg,
    rgba(247,58,142,0.55) 120deg,
    rgba(124,77,255,0.45) 180deg,
    rgba(0,162,255,0.55) 240deg,
    rgba(0,229,255,0.35) 300deg,
    rgba(0,229,255,0.0) 360deg
  );
  -webkit-mask: radial-gradient(circle calc(50% - var(--ring-size)), transparent 98%, #000 101%);
  mask: radial-gradient(circle calc(50% - var(--ring-size)), transparent 98%, #000 101%);
  filter: drop-shadow(0 0 10px rgba(0,229,255,0.45));
  animation: ring-rotate 3.5s linear infinite;
}
@keyframes ring-rotate { to { transform: rotate(360deg); } }

/* Core with subtle pulse */
.lvl-core {
  inset: 6px;
  background: radial-gradient(circle at 30% 30%, #0cf 0%, #069 60%, #034 100%);
  border: 2px solid rgba(0,229,255,0.35);
  box-shadow: inset 0 0 18px rgba(0,229,255,0.3), 0 0 20px rgba(0,229,255,0.16);
  animation: core-pulse 2.2s ease-in-out infinite;
}
@keyframes core-pulse {
  0%,100% { box-shadow: inset 0 0 18px rgba(0,229,255,0.28), 0 0 16px rgba(0,229,255,0.12); }
  50%     { box-shadow: inset 0 0 28px rgba(0,229,255,0.42), 0 0 28px rgba(0,229,255,0.2); }
}

.lvl-num {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.4rem; letter-spacing: 0.04em;
  color: #eaffff;
  text-shadow: 0 0 10px rgba(0,229,255,0.45), 0 0 18px rgba(0,162,255,0.25);
}
.lvl-caption { font-size: 0.65rem; font-weight: 800; letter-spacing: 0.22em; color: #9fdcff; opacity: 0.9; }
/* Emphasis toggle removed per request; only order swap remains */

.lvl-badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #001622;
  background: linear-gradient(180deg, #00E5FF, #00A2FF);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0,229,255,0.35);
}
.lvl-number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(180deg, #E6F7FF, #86e7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(0,229,255,0.25);
  animation: lvl-glow 1800ms ease-in-out infinite;
}

@keyframes lvl-glow {
  0%,100% { filter: drop-shadow(0 0 6px rgba(0,229,255,0.25)); }
  50%     { filter: drop-shadow(0 0 10px rgba(0,229,255,0.45)); }
}

.prize-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}
@media (min-width: 460px) {
  .prize-items { grid-template-columns: 1fr 1fr; }
}

/* Compact layout for small screens */
@media (max-width: 480px) {
  .prize-box-panel { max-width: min(94vw, 340px); }
  .prize-box-stage { height: clamp(130px, 26vh, 170px); }
  /* Move chest slightly up so it doesn't touch the hint text */
  .prize-box-bounce { top: 56%; }
  .prize-box.cartoon { width: min(56vw, 130px); }
}

@media (max-height: 680px) {
  .prize-box-panel { max-height: 76vh; }
  .prize-box-stage { height: clamp(120px, 24vh, 160px); }
  .prize-box-bounce { top: 56%; }
}

@media (max-height: 560px) {
  .prize-box-panel { max-height: 72vh; }
  .prize-box-stage { height: clamp(110px, 22vh, 150px); }
  .prize-box-bounce { top: 56%; }
  .prize-box.cartoon { width: min(54vw, 120px); }
}
.prize-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  /* Reserve more space for the rarity badge so it never overlaps text */
  padding-right: 120px;
  background: linear-gradient(180deg, rgba(6,12,20,0.95), rgba(4,8,14,0.95));
  border: 1px solid #113049;
  border-radius: 10px;
  color: #e8f1ff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25), inset 0 0 20px rgba(0,229,255,0.06);
  transform: translateY(8px);
  opacity: 0;
  animation: prize-pop 600ms cubic-bezier(0.25, 1, 0.5, 1) forwards;
  position: relative;
  overflow: hidden;
}
@media (max-width: 480px) {
  .prize-item { padding-right: 90px; }
}
.prize-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, #00E5FF, #F73A8E);
  box-shadow: 0 0 12px rgba(0,229,255,0.5);
}
.prize-item::after {
  content: '';
  position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  animation: shine 1.2s ease-out forwards;
  animation-delay: 0.35s;
}
@keyframes shine { to { transform: translateX(120%); } }

.prize-item .icon {
  font-size: 1.25rem; width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 8px; background: rgba(0,229,255,0.08);
  box-shadow: inset 0 0 10px rgba(0,229,255,0.15), 0 0 10px rgba(0,229,255,0.12);
}
.prize-item .label { font-weight: 600; letter-spacing: 0.02em; }

/* Rarity accents */
.prize-item .rarity-badge {
  position: absolute; top: 8px; right: 10px;
  font-size: 0.62rem; line-height: 1; font-weight: 900; letter-spacing: 0.12em;
  padding: 4px 8px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: 1;
}
.prize-item .label { flex: 1; min-width: 0; margin-right: 16px; }

/* Inline rarity chips for clear visibility next to item name */
.rarity-chip { display: inline-block; margin-left: 8px; padding: 3px 8px; font-size: 0.65rem; font-weight: 900; letter-spacing: 0.12em; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.14); }
.rarity-chip-common { background: linear-gradient(180deg, rgba(0,229,255,0.18), rgba(0,162,255,0.10)); color: #d9fbff; }
.rarity-chip-uncommon { background: linear-gradient(180deg, rgba(34,197,94,0.22), rgba(16,185,129,0.12)); color: #eafff4; }
.rarity-chip-rare { background: linear-gradient(180deg, rgba(124,77,255,0.22), rgba(247,58,142,0.14)); color: #f6eaff; }
.rarity-chip-epic { background: linear-gradient(180deg, rgba(255,193,7,0.24), rgba(255,111,0,0.16)); color: #fff7de; }
.rarity-chip-legendary { background: linear-gradient(180deg, rgba(255,215,0,0.28), rgba(255,165,0,0.18)); color: #fff7e6; }

/* Add background accents per rarity for the left bar too */
.prize-item.rarity-uncommon::before { background: linear-gradient(180deg, #22c55e, #10b981); box-shadow: 0 0 12px rgba(16,185,129,0.45); }
.prize-item.rarity-legendary::before { background: linear-gradient(180deg, #ffd700, #ffa500); box-shadow: 0 0 16px rgba(255,215,0,0.5); }

/* Skip button in prize box header */
.prize-skip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 6px 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-radius: 8px;
  color: #9fdcff;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(159,220,255,0.35);
  backdrop-filter: blur(2px);
  transition: transform .15s ease, box-shadow .15s ease, opacity .2s ease;
}
.prize-skip-btn:hover { transform: translateY(-1px); box-shadow: 0 0 10px rgba(0,229,255,0.35); }
.prize-skip-btn.hidden { display: none; }

/* Main menu treasure notification button */
.prize-notification-btn { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 9999px; display: grid; place-items: center; background: rgba(1,4,9,0.85); border: 2px solid #00E5FF; box-shadow: 0 6px 16px rgba(0,0,0,0.55), 0 0 14px rgba(0,229,255,0.25); cursor: pointer; animation: badge-pulse 2.4s ease-in-out infinite; z-index: 100; visibility: visible; opacity: 1; }
.prize-notification-btn svg { width: 22px; height: 22px; filter: drop-shadow(0 0 4px rgba(255,215,0,0.55)); }
/* CTA bubble next to the badge */
.prize-notification-btn .cta-bubble { position: absolute; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: rgba(1,4,9,0.9); color: #E6EDF3; border: 1px solid rgba(255,255,255,0.2); border-radius: 9999px; padding: 6px 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,0.5); animation: cta-pop 3.2s ease-in-out infinite; }
.prize-notification-btn .cta-bubble::after { content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%); border-width: 6px; border-style: solid; border-color: transparent transparent transparent rgba(255,255,255,0.2); }
@keyframes cta-pop { 0%, 70% { opacity: 0; transform: translateY(-50%) scale(0.96); } 75%, 92% { opacity: 1; transform: translateY(-50%) scale(1); } 100% { opacity: 0; transform: translateY(-50%) scale(0.96); } }
@media (hover: none) and (pointer: coarse) {
  .prize-notification-btn { width: 44px; height: 44px; }
  .prize-notification-btn svg { width: 24px; height: 24px; }
}
.prize-notification-btn .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 9999px; background: #ff3b30; box-shadow: 0 0 6px rgba(255,59,48,0.8); }

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.4), 0 0 10px rgba(255,215,0,0.25); }
  50% { transform: scale(1.06); box-shadow: 0 6px 16px rgba(0,0,0,0.45), 0 0 14px rgba(255,215,0,0.38); }
}
.prize-item.rarity-common::before { background: linear-gradient(180deg, #00E5FF, #00A2FF); box-shadow: 0 0 10px rgba(0,229,255,0.45); }
.prize-item.rarity-rare::before { background: linear-gradient(180deg, #7C4DFF, #F73A8E); box-shadow: 0 0 12px rgba(247,58,142,0.5); }
.prize-item.rarity-epic::before { background: linear-gradient(180deg, #FFC107, #FF6F00); box-shadow: 0 0 14px rgba(255,193,7,0.5); }
.badge-common { background: linear-gradient(180deg, rgba(0,229,255,0.22), rgba(0,162,255,0.12)); color: #d9fbff; }
.badge-rare { background: linear-gradient(180deg, rgba(247,58,142,0.25), rgba(124,77,255,0.18)); color: #ffe9f5; }
.badge-epic { background: linear-gradient(180deg, rgba(255,193,7,0.3), rgba(255,111,0,0.22)); color: #fff7de; }

@keyframes box-bob {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-8px) scale(1.02); }
}
@keyframes shadow-pulse {
  0%,100% { transform: translateX(-50%) scaleX(1); opacity: 0.6; }
  50%     { transform: translateX(-50%) scaleX(0.9); opacity: 0.8; }
}
@keyframes lid-pop {
  0%   { transform: translateX(-50%) rotate(-2deg); }
  40%  { transform: translateX(-50%) translateY(-22px) rotate(-12deg); }
  100% { transform: translateX(-50%) translateY(-18px) rotate(-8deg); }
}
@keyframes sparkle-rise {
  0%   { opacity: 0; transform: translateY(24px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes prize-pop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.92); }
  60%  { opacity: 1; transform: translateY(-3px) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Claim particles (coins/cores) */
.claim-particles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.particle { position: absolute; bottom: 60px; left: 50%; font-size: 20px; opacity: 0; transform: translateX(-50%) translateY(0); }
.particle.coin { animation: coin-burst 1000ms ease-out forwards; }
.particle.core { animation: core-burst 1000ms ease-out forwards; }
@keyframes coin-burst {
  0% { opacity: 0; transform: translateX(-50%) translateY(0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(-50% - 60px)) translateY(-140px) rotate(-180deg); }
}
@keyframes core-burst {
  0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(1); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(-50% + 60px)) translateY(-160px) scale(1.2); }
}

/* Coin shower (JS-driven physics; layer only styles) */
.coin-shower-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.coin-shower-coin { position: absolute; width: 18px; height: 18px; will-change: transform, opacity; }

/* Spark trail from lid edges */
.spark-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.spark { position: absolute; width: 6px; height: 6px; border-radius: 9999px; background: radial-gradient(circle, #c8fbff 0%, #00e5ff 60%, rgba(0,229,255,0) 70%); box-shadow: 0 0 8px rgba(0,229,255,0.7); opacity: 0; }
.spark.left { animation: spark-left 700ms ease-out forwards; }
.spark.right { animation: spark-right 700ms ease-out forwards; }
@keyframes spark-left {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(-70px, -60px) scale(0.5); }
}
@keyframes spark-right {
  0% { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(70px, -60px) scale(0.5); }
}

/* Branded confetti palette */
.confetti-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti { position: absolute; width: 6px; height: 10px; opacity: 0; transform: translate(0,0) rotate(0deg); will-change: transform, opacity; }
.confetti.c1 { background: #00E5FF; box-shadow: 0 0 6px rgba(0,229,255,0.6); }
.confetti.c2 { background: #00C8FF; box-shadow: 0 0 6px rgba(0,200,255,0.6); }
.confetti.c3 { background: #00A2FF; box-shadow: 0 0 6px rgba(0,162,255,0.6); }
.confetti.c4 { background: #0BA5D5; box-shadow: 0 0 6px rgba(11,165,213,0.6); }
.confetti.c5 { background: #14B8FF; box-shadow: 0 0 6px rgba(20,184,255,0.6); }
.confetti.fly { animation: confetti-fly 1200ms ease-out forwards; }
@keyframes confetti-fly {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, -140px)) rotate(var(--rot, 180deg)); }
}

/* Subtle vignette + cyan glow when chest opens */
.prize-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  /* Layer 1: soft cyan glow in center; Layer 2: dark edge vignette */
  background:
    radial-gradient(60% 45% at 50% 45%, rgba(0,229,255,0.12), rgba(0,229,255,0.04) 40%, rgba(0,229,255,0) 70%),
    radial-gradient(120% 120% at 50% 50%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
  animation: vignette-in 420ms ease-out forwards;
}
.prize-vignette.pulse {
  animation: vignette-in 420ms ease-out forwards, vignette-pulse 1600ms ease-in-out 420ms 2;
}
@keyframes vignette-in { to { opacity: 1; } }
@keyframes vignette-pulse {
  0%,100% { filter: drop-shadow(0 0 0 rgba(0,229,255,0)); }
  50%     { filter: drop-shadow(0 0 14px rgba(0,229,255,0.25)); }
}
.prize-notification-global { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; width: 44px; height: 44px; border-radius: 9999px; display: grid; place-items: center; background: rgba(1,4,9,0.75); border: 1px solid rgba(255,255,255,0.2); box-shadow: 0 6px 16px rgba(0,0,0,0.55), 0 0 14px rgba(0,229,255,0.25); cursor: pointer; z-index: 2100; animation: badge-pulse 2.4s ease-in-out infinite; backdrop-filter: blur(6px); }
.prize-notification-global svg { width: 24px; height: 24px; filter: drop-shadow(0 0 4px rgba(255,215,0,0.55)); }
@media (hover: none) and (pointer: coarse) {
  .prize-notification-global { width: 48px; height: 48px; }
  .prize-notification-global svg { width: 26px; height: 26px; }
}
