/* ResultOverlay — fixed top-level casino result. z-index 9999, never clipped. */

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.result-overlay--visible {
  opacity: 1;
  visibility: visible;
}

.result-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.result-overlay__banner {
  position: relative;
  z-index: 1;
  padding: 1rem 2rem;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  text-align: center;
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 40px rgba(255, 255, 255, 0.08);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.result-overlay--animate-in .result-overlay__banner {
  opacity: 1;
  transform: scale(0.96);
}

.result-overlay--thump .result-overlay__banner {
  transform: scale(1);
  transition-duration: 0.2s;
}

.result-overlay--animate-out .result-overlay__banner {
  opacity: 0;
  transform: scale(0.97);
  transition-duration: 0.35s;
}

/* WIN */
.result-overlay__banner--win {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95) 0%, rgba(22, 163, 74, 0.95) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 50px rgba(34, 197, 94, 0.4);
}

/* LOSE */
.result-overlay__banner--lose {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(185, 28, 28, 0.95) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 50px rgba(239, 68, 68, 0.35);
}

/* PUSH */
.result-overlay__banner--push {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.95) 0%, rgba(71, 85, 105, 0.95) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 40px rgba(148, 163, 184, 0.25);
}

/* BLACKJACK */
.result-overlay__banner--blackjack {
  background: linear-gradient(135deg, rgba(212, 168, 75, 0.98) 0%, rgba(184, 134, 11, 0.98) 100%);
  color: #1a1a1a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.3),
    0 0 60px rgba(212, 168, 75, 0.5);
}

/* BUST */
.result-overlay__banner--bust {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95) 0%, rgba(153, 27, 27, 0.95) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 50px rgba(239, 68, 68, 0.4);
}

/* DEALER BUST — YOU WIN */
.result-overlay__banner--dealer_bust {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95) 0%, rgba(22, 163, 74, 0.95) 100%);
  color: #fff;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 50px rgba(34, 197, 94, 0.4);
}
