#fx-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 95;
  pointer-events: none;
}

.fx-flash {
  position: fixed;
  inset: 0;
  z-index: 94;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--flash) 30%, transparent), transparent 65%);
  animation: fx-flash 700ms var(--ease-out) forwards;
}
@keyframes fx-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fx-shake { animation: fx-shake 420ms var(--ease-out); }
@keyframes fx-shake {
  15% { transform: translate(calc(var(--shake) * -1), calc(var(--shake) * 0.5)); }
  30% { transform: translate(var(--shake), calc(var(--shake) * -0.6)); }
  45% { transform: translate(calc(var(--shake) * -0.6), calc(var(--shake) * 0.3)); }
  60% { transform: translate(calc(var(--shake) * 0.4), 0); }
  80% { transform: translate(calc(var(--shake) * -0.15), 0); }
}

.fx-pop { animation: fx-pop 420ms var(--ease-spring); }
@keyframes fx-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---------- Big win overlay ---------- */

.bigwin-overlay {
  position: fixed;
  inset: 0;
  z-index: 93;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 45%, rgb(20 14 0 / 0.55), rgb(3 6 12 / 0.82) 70%);
  cursor: pointer;
  animation: fade-in 240ms var(--ease-out);
}
.bigwin-overlay.is-leaving { pointer-events: none; animation: bigwin-out 320ms var(--ease-in-out) forwards; }
@keyframes bigwin-out { to { opacity: 0; transform: scale(1.04); } }

.bigwin {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 56px;
  text-align: center;
  animation: bigwin-in 700ms var(--ease-spring);
}
@keyframes bigwin-in {
  from { opacity: 0; transform: scale(0.4) rotate(-4deg); }
}

.bigwin__rays {
  position: absolute;
  inset: -45%;
  z-index: -1;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgb(255 197 61 / 0.16) 0deg 9deg, transparent 9deg 22.5deg);
  mask-image: radial-gradient(circle, black 20%, transparent 68%);
  animation: spin 14s linear infinite;
}

.bigwin__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff4cf;
  text-shadow: 0 3px 0 #b87a00, 0 6px 0 #6d4700, 0 16px 40px rgb(255 179 0 / 0.55);
  animation: bigwin-title 1.4s var(--ease-in-out) infinite alternate;
}
@keyframes bigwin-title { to { transform: scale(1.04); } }

.bigwin__amount {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 46px);
  font-weight: 800;
  color: var(--accent);
}
.bigwin__mult {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--win);
  color: var(--win-ink);
  font-weight: 800;
  font-size: 18px;
}
.bigwin--epic .bigwin__title {
  background: linear-gradient(180deg, #fff 10%, #ffdf85 45%, #ff9f1a 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 4px 0 #8a5200) drop-shadow(0 18px 40px rgb(255 159 26 / 0.6));
}
