/* Cinematic hero & global FX */

.hero-canvas,
.opening-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.case-hero__beams {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.case-hero__beams::before,
.case-hero__beams::after {
  content: "";
  position: absolute;
  top: -30%;
  left: 50%;
  width: 140%;
  height: 160%;
  transform-origin: 50% 0;
  opacity: 0.22;
  animation: beam-sweep 10s ease-in-out infinite;
}

.case-hero__beams::before {
  transform: translateX(-50%) rotate(-16deg);
  background: linear-gradient(180deg, rgba(124, 60, 255, 0.55), transparent 72%);
}

.case-hero__beams::after {
  transform: translateX(-50%) rotate(14deg);
  background: linear-gradient(180deg, rgba(139, 44, 255, 0.45), transparent 68%);
  animation-delay: -4s;
}

@keyframes beam-sweep {
  0%, 100% { opacity: 0.16; }
  50% { opacity: 0.32; }
}

.case-hero__orbs {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.case-hero__orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  animation: orb-float 9s ease-in-out infinite;
}

.case-hero__orbs span:nth-child(1) {
  width: 180px;
  height: 180px;
  left: 12%;
  top: 18%;
  background: rgba(124, 60, 255, 0.35);
}

.case-hero__orbs span:nth-child(2) {
  width: 140px;
  height: 140px;
  right: 10%;
  top: 28%;
  background: rgba(139, 44, 255, 0.28);
  animation-delay: -3s;
}

.case-hero__orbs span:nth-child(3) {
  width: 220px;
  height: 90px;
  left: calc(50% - 110px);
  bottom: 8%;
  background: rgba(245, 185, 66, 0.2);
  animation-delay: -5s;
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.55; }
  50% { transform: translateY(-18px) scale(1.08); opacity: 0.9; }
}

.case-hero__scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.012) 2px,
    rgba(255, 255, 255, 0.012) 4px
  );
  opacity: 0.28;
}

.case-hero__fog { z-index: 2; }
.case-hero__vignette { z-index: 3; }

.case-platform {
  position: relative;
  width: min(420px, 88vw);
  height: 320px;
  display: grid;
  place-items: center;
}

.case-platform__aura {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(245, 185, 66, 0.55) 40deg,
    transparent 90deg,
    rgba(124, 60, 255, 0.45) 180deg,
    transparent 240deg,
    rgba(245, 185, 66, 0.35) 300deg,
    transparent 360deg
  );
  filter: blur(22px);
  animation: aura-spin 9s linear infinite;
  opacity: 0.75;
  z-index: 0;
}

@keyframes aura-spin {
  to { transform: rotate(360deg); }
}

.case-platform__ring {
  position: absolute;
  bottom: 22px;
  width: 72%;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(124, 60, 255, 0.35);
  box-shadow:
    0 0 40px rgba(124, 60, 255, 0.28),
    inset 0 0 30px rgba(124, 60, 255, 0.1);
  animation: ring-pulse 4s ease-in-out infinite;
  z-index: 1;
}

.case-platform__ring--outer {
  width: 88%;
  height: 36px;
  bottom: 16px;
  border-color: rgba(245, 185, 66, 0.22);
  box-shadow: 0 0 28px rgba(245, 185, 66, 0.15);
  animation-delay: -1.5s;
}

.case-platform__ring::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 1px solid rgba(245, 185, 66, 0.12);
}

.case-platform__glow {
  position: absolute;
  bottom: 8px;
  width: 62%;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(124, 60, 255, 0.5), transparent 70%);
  filter: blur(18px);
  animation: glow-breathe 3s ease-in-out infinite;
  z-index: 1;
}

.case-platform__floor {
  position: absolute;
  bottom: 10px;
  width: 58%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(245, 185, 66, 0.45), transparent 70%);
  filter: blur(6px);
  z-index: 1;
}

.case-platform__crown {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  z-index: 4;
  filter: drop-shadow(0 0 14px rgba(245, 185, 66, 0.9));
  animation: crown-float 3.2s ease-in-out infinite;
}

@keyframes crown-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.case-float {
  position: relative;
  z-index: 3;
  width: min(360px, 78vw);
  animation: case-float 5s ease-in-out infinite;
  filter:
    drop-shadow(0 30px 60px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 80px rgba(124, 60, 255, 0.28))
    drop-shadow(0 0 40px rgba(245, 185, 66, 0.12));
}

.case-platform--gold .case-platform__glow {
  background: radial-gradient(ellipse, rgba(245, 185, 66, 0.65), rgba(124, 60, 255, 0.25), transparent 72%);
}

.case-platform--gold .case-platform__ring {
  border-color: rgba(245, 185, 66, 0.45);
  box-shadow:
    0 0 48px rgba(245, 185, 66, 0.32),
    inset 0 0 24px rgba(245, 185, 66, 0.12);
}

.case-float--gold {
  filter:
    drop-shadow(0 36px 50px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 24px rgba(255, 215, 0, 0.85))
    drop-shadow(0 0 70px rgba(245, 185, 66, 0.6))
    drop-shadow(0 0 120px rgba(245, 185, 66, 0.35))
    drop-shadow(0 0 50px rgba(124, 60, 255, 0.35));
}

@keyframes case-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(0.8deg); }
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}

.jackpot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #111;
  background: linear-gradient(135deg, #b84cff, #8b2cff);
  box-shadow: 0 0 24px rgba(245, 185, 66, 0.35);
  animation: jackpot-pulse 2.5s ease-in-out infinite;
}

@keyframes jackpot-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 185, 66, 0.25); }
  50% { box-shadow: 0 0 36px rgba(245, 185, 66, 0.45); }
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  animation: btn-shine 3.5s ease-in-out infinite;
}

@keyframes btn-shine {
  0%, 80% { left: -100%; }
  100% { left: 180%; }
}

.item-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 0;
  background: var(--r-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--r-color) 70%, transparent);
}

.opening-status {
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-purple-light);
  text-shadow: 0 0 24px rgba(124, 60, 255, 0.7);
  z-index: 10;
  text-align: center;
  width: max-content;
}

.result-weapon {
  position: relative;
  z-index: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.result-rays {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 240%;
  aspect-ratio: 1;
  min-width: 620px;
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  /* 8 even god-rays (4 gold + 4 purple): ~30° soft beams, not a 20-spoke fan */
  background: repeating-conic-gradient(
    from -15deg,
    rgba(245, 185, 66, 0) 0deg,
    rgba(245, 185, 66, 0.36) 15deg,
    rgba(245, 185, 66, 0) 30deg,
    rgba(245, 185, 66, 0) 44deg,
    rgba(124, 60, 255, 0) 45deg,
    rgba(124, 60, 255, 0.30) 60deg,
    rgba(124, 60, 255, 0) 75deg,
    rgba(124, 60, 255, 0) 89deg,
    rgba(245, 185, 66, 0) 90deg
  );
  filter: blur(3px);
  -webkit-mask-image: radial-gradient(
    circle at center,
    transparent 8%,
    #000 24%,
    #000 50%,
    transparent 74%
  );
  mask-image: radial-gradient(
    circle at center,
    transparent 8%,
    #000 24%,
    #000 50%,
    transparent 74%
  );
  animation: rays-spin 12s linear infinite;
}

@keyframes rays-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.stat-item {
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 60, 255, 0.55), transparent);
  box-shadow: 0 0 10px rgba(124, 60, 255, 0.4);
}

.featured-case::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.08) 50%, transparent 60%);
  transform: translateX(-80%);
  animation: featured-shine 5.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes featured-shine {
  0%, 70% { transform: translateX(-80%); }
  100% { transform: translateX(80%); }
}

@media (prefers-reduced-motion: reduce) {
  .case-hero__orbs span,
  .case-platform__aura,
  .case-hero__beams::before,
  .case-hero__beams::after,
  .featured-case::after,
  .case-title--gold,
  .result-rays {
    animation: none;
  }
}
