/* ==========================================================================
   Reward Nest — ULTRA PREMIUM WHEEL MODAL v3.0
   Casino Royale Obsidian · Liquid Gold Bezel · Neon Win Effects
   ========================================================================== */

.wheel-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(1, 2, 6, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.wheel-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.wheel-modal-card {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(245,200,66,0.12) 0%, transparent 60%),
    radial-gradient(circle at 50% 0%, #141f38 0%, #080e1f 55%, #020408 100%);
  border: 1px solid rgba(245,200,66,0.45);
  box-shadow:
    0 0 70px rgba(245,200,66,0.25),
    0 30px 80px rgba(0,0,0,0.97),
    inset 0 1px 0 rgba(255,255,255,0.14),
    inset 0 -1px 0 rgba(0,0,0,0.5);
  border-radius: 28px;
  width: 100%;
  max-width: 500px;
  padding: 2.25rem 1.75rem;
  position: relative;
  text-align: center;
  transform: scale(0.88) translateY(28px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

/* Top gold shimmer line */
.wheel-modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #fff3b0 20%, #f5c842 50%, #fff3b0 80%, transparent);
  opacity: 0.9;
}

/* Inner glow effect */
.wheel-modal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, rgba(245,200,66,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.wheel-modal-overlay.active .wheel-modal-card {
  transform: scale(1) translateY(0);
}

/* Close Button */
.wheel-close-btn {
  position: absolute;
  top: 16px; right: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 1.35rem;
  width: 38px; height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
  line-height: 1;
}

.wheel-close-btn:hover {
  background: rgba(255,77,109,0.85);
  border-color: #ff4d6d;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 0 18px rgba(255,77,109,0.7);
}

/* Wheel Header */
.wheel-header { margin-bottom: 1.5rem; }

.wheel-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(245,200,66,0.22) 0%, rgba(184,134,11,0.1) 100%);
  border: 1px solid rgba(245,200,66,0.55);
  color: #fff3b0;
  padding: 5px 16px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 10px;
  box-shadow: 0 0 18px rgba(245,200,66,0.22), inset 0 1px 0 rgba(255,255,255,0.15);
}

.wheel-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 0%, #fde68a 60%, #f5c842 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 5px;
  letter-spacing: -0.3px;
  filter: drop-shadow(0 0 10px rgba(245,200,66,0.3));
}

.wheel-subtitle {
  font-size: 0.87rem;
  color: #8794a8;
}

/* Wheel Stage Container */
.wheel-stage {
  position: relative;
  width: 290px; height: 290px;
  margin: 0 auto 1.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Spinning outer glow rim */
.wheel-outer-rim {
  position: absolute;
  width: 304px; height: 304px;
  border-radius: 50%;
  border: 7px solid transparent;
  background: linear-gradient(135deg, #fff3b0, #f5c842, #c79000, #f5c842, #fff3b0) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  box-shadow:
    0 0 40px rgba(245,200,66,0.55),
    0 0 80px rgba(245,200,66,0.25),
    inset 0 0 25px rgba(245,200,66,0.4);
  pointer-events: none;
  z-index: 2;
}

.wheel-canvas {
  width: 280px; height: 280px;
  border-radius: 50%;
  display: block;
  box-shadow:
    0 0 30px rgba(0,0,0,0.8),
    inset 0 0 15px rgba(0,0,0,0.5);
}

/* Neon pointer */
.wheel-pointer {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 28px solid #ff4d6d;
  filter:
    drop-shadow(0 4px 10px rgba(0,0,0,0.9))
    drop-shadow(0 0 12px rgba(255,77,109,0.9));
  z-index: 5;
}

/* Gold center cap */
.wheel-center-cap {
  position: absolute;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e1 0%, #f5c842 40%, #c79000 75%, #7a5200 100%);
  border: 3px solid rgba(255,255,255,0.7);
  box-shadow:
    0 4px 16px rgba(0,0,0,0.8),
    0 0 25px rgba(245,200,66,0.7),
    0 0 50px rgba(245,200,66,0.3),
    inset 0 2px 4px rgba(255,255,255,0.5);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.7rem;
  color: #040c1a;
  letter-spacing: 0.5px;
  text-shadow: none;
}

/* Winner Announcement Box */
.wheel-winner-box {
  background: linear-gradient(135deg, rgba(16,217,143,0.16) 0%, rgba(5,150,105,0.08) 100%);
  border: 1px solid rgba(16,217,143,0.45);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  display: none;
}

.wheel-winner-box.active {
  display: block;
  animation: winnerReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes winnerReveal {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

@keyframes winnerPulse {
  0%,100% { box-shadow: 0 0 18px rgba(16,217,143,0.3); }
  50%      { box-shadow: 0 0 40px rgba(16,217,143,0.65); }
}

.wheel-winner-box.active {
  animation: winnerReveal 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
             winnerPulse 2s ease-in-out 0.5s infinite;
}

.winner-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #2dffb5;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.winner-name {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  margin: 5px 0;
  letter-spacing: -0.3px;
}

.winner-prize {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: #f5c842;
  text-shadow: 0 0 16px rgba(245,200,66,0.55), 0 0 32px rgba(245,200,66,0.25);
}

/* Real Distribution Counter */
.real-distribution-counter-card {
  background: rgba(4, 7, 16, 0.75);
  border: 1px solid rgba(245,200,66,0.28);
  border-radius: 14px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 16px rgba(245,200,66,0.08);
  transition: all 0.3s;
}

.real-distribution-counter-card:hover {
  border-color: rgba(245,200,66,0.45);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.5), 0 0 28px rgba(245,200,66,0.15);
}

.counter-label {
  font-size: 0.72rem;
  color: #6b7d9a;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.counter-val {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #f5c842;
  text-shadow: 0 0 18px rgba(245,200,66,0.55), 0 0 36px rgba(245,200,66,0.25);
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
}

/* Confetti Layer */
.confetti-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 20;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 8px; height: 14px;
  opacity: 0.9;
  animation: confettiFall 2.5s ease-out forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg);   opacity: 1; }
  100% { transform: translateY(500px) rotate(720deg); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
