/* Gift reveal — 3-stage cinematic drop */
#gift-reveal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(250, 58, 58, 0.22), transparent 50%), #050505f2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  overflow: hidden;
  font-family: "Unbounded", "SF Pro Display", sans-serif;
}
#gift-reveal.is-on {
  opacity: 1;
  pointer-events: auto;
}
#gift-reveal .gr-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 16px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
#gift-reveal.is-on .gr-stage.is-active {
  opacity: 1;
  transform: scale(1);
}
#gift-reveal.is-on .gr-stage.is-active .gr-cta {
  pointer-events: auto;
}

/* Stage 1 — prep (same mark as boot splash) */
.gr-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 28px rgba(250, 58, 58, 0.45));
  animation:
    gr-logo-in 0.95s cubic-bezier(0.22, 1, 0.36, 1) both,
    gr-logo-pulse 2.2s ease-in-out 0.95s infinite;
  user-select: none;
  pointer-events: none;
}
.gr-title {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gr-sub {
  color: #bebebe;
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  line-height: 1.45;
  font-family: "SF Pro Display", system-ui, sans-serif;
  font-weight: 500;
}

/* Stage 2 — character reel (full-body portrait slots) */
.gr-reel-wrap {
  --gr-slot: min(72vw, 280px);
  --gr-slot-h: min(62vh, 420px);
  width: var(--gr-slot);
  height: var(--gr-slot-h);
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  border: 1px solid #ffffff14;
  background: #0a0a0a;
  box-shadow: 0 20px 50px #000a, 0 0 0 1px #fa3a3a22;
}
.gr-reel-wrap::before,
.gr-reel-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 36px;
  z-index: 2;
  pointer-events: none;
}
.gr-reel-wrap::before {
  top: 0;
  background: linear-gradient(#0a0a0aee, transparent);
}
.gr-reel-wrap::after {
  bottom: 0;
  background: linear-gradient(transparent, #0a0a0aee);
}
.gr-reel-pointer {
  position: absolute;
  inset: 8px;
  border: 2px solid #fa3a3a;
  border-radius: 18px;
  z-index: 3;
  box-shadow: 0 0 24px #fa3a3a55, inset 0 0 16px #fa3a3a22;
  pointer-events: none;
}
.gr-reel {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.gr-reel-item {
  height: var(--gr-slot-h);
  width: 100%;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.gr-reel-item video,
.gr-reel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  background: #0a0a0a;
}
.gr-reel-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a1a1a, #2a1010);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 16px;
}

/* Winner card + nameplate ON the block */
.gr-char-final {
  --gr-slot: min(72vw, 280px);
  --gr-slot-h: min(62vh, 420px);
  width: var(--gr-slot);
  height: var(--gr-slot-h);
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid #fa3a3a99;
  box-shadow: 0 0 40px #fa3a3a66, 0 25px 60px #000c;
  background: #0a0a0a;
  opacity: 0;
  transform: scale(0.88);
  position: relative;
  display: none;
}
.gr-char-final.is-show {
  display: block;
  animation: gr-pop 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.gr-char-media {
  width: 100%;
  height: 100%;
}
.gr-char-media video,
.gr-char-media img,
.gr-char-final > video,
.gr-char-final > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  background: #0a0a0a;
}
.gr-char-final .gr-reel-fallback {
  position: absolute;
  inset: 0;
}
.gr-char-nameplate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 16px;
  background: linear-gradient(transparent, #000000ee 55%);
  color: #fff;
  font-size: clamp(18px, 5.2vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  text-shadow: 0 2px 16px #fa3a3acc, 0 0 24px #000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  z-index: 4;
}
.gr-char-nameplate.is-show {
  animation: gr-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stage 3 — days */
.gr-days-reel {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.gr-day {
  width: 64px;
  height: 76px;
  border-radius: 14px;
  background: #171717;
  border: 1px solid #ffffff14;
  color: #838383;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  transition: transform 0.25s ease, border-color 0.25s, color 0.25s, box-shadow 0.25s, background 0.25s;
}
.gr-day .n { font-size: 26px; line-height: 1; }
.gr-day .u { font-size: 10px; margin-top: 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.gr-day.is-spin {
  animation: gr-day-flicker 0.12s steps(2) infinite;
}
.gr-day.is-win {
  background: linear-gradient(160deg, #fa3a3a, #a01010);
  border-color: #ff6b6b;
  color: #fff;
  transform: scale(1.18);
  box-shadow: 0 0 28px #fa3a3a99;
}
.gr-day.is-jackpot {
  background: linear-gradient(160deg, #f4ca80, #fa3a3a 55%, #7a1010);
  border-color: #f4ca80;
  box-shadow: 0 0 40px #f4ca80aa, 0 0 80px #fa3a3a66;
  animation: gr-jackpot-glow 0.9s ease-in-out infinite alternate;
}
.gr-days-label {
  color: #bebebe;
  font-size: 13px;
  font-family: "SF Pro Display", system-ui, sans-serif;
}
.gr-jackpot-banner {
  color: #f4ca80;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 0 18px #f4ca8088;
  opacity: 0;
}
.gr-jackpot-banner.is-show { animation: gr-fade-up 0.45s ease forwards; }

.gr-cta {
  margin-top: 8px;
  background: #fa3a3a;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 28px;
  font-weight: 800;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
}
.gr-cta.is-show { animation: gr-fade-up 0.45s ease forwards; }
.gr-cta:active { transform: scale(0.97); }

.gr-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.gr-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fa3a3a;
  opacity: 0;
}

@keyframes gr-logo-in {
  from { opacity: 0; transform: scale(0.72); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes gr-logo-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 22px rgba(250, 58, 58, 0.35)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 36px rgba(250, 58, 58, 0.55)); }
}
@keyframes gr-pop {
  0% { opacity: 0; transform: scale(0.7) rotate(-4deg); }
  60% { opacity: 1; transform: scale(1.06) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes gr-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gr-day-flicker {
  0% { border-color: #ffffff22; color: #bebebe; }
  100% { border-color: #fa3a3a88; color: #fff; }
}
@keyframes gr-jackpot-glow {
  from { filter: brightness(1); }
  to { filter: brightness(1.2); }
}
