/**
 * FRIENDS RC7+ Art Director Pass — living world, cinematic loading, feature impact polish.
 * Loaded last. Presentation-only. Respects reduced motion.
 */

/* ===== Living world — winner B (neon city: fog + windows, no rain) ===== */
.game-stage-bg {
  position: relative;
}

.game-stage-bg-windows,
.game-stage-bg-fog,
.game-stage-bg-rain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-stage-bg-rain {
  display: none;
}

.game-stage-bg-windows {
  opacity: 0.24;
  background:
    radial-gradient(ellipse 8% 12% at 8% 22%, rgba(255, 200, 120, 0.35), transparent 70%),
    radial-gradient(ellipse 6% 10% at 92% 28%, rgba(120, 180, 255, 0.28), transparent 70%),
    radial-gradient(ellipse 5% 8% at 18% 78%, rgba(255, 140, 90, 0.2), transparent 70%);
  mix-blend-mode: screen;
}

.game-stage-bg-fog {
  opacity: 0.2;
  background: radial-gradient(ellipse 80% 50% at 50% 100%, rgba(120, 140, 180, 0.38), transparent 65%);
}

@media (prefers-reduced-motion: no-preference) {
  .playground--player-view.slot-idle-motion-active:not(.slot-reduced-motion) .game-stage-bg-fog {
    animation: rc7-fog-drift 36s ease-in-out infinite alternate;
  }

  .playground--player-view.slot-idle-motion-active:not(.slot-reduced-motion) .game-stage-bg-neon {
    animation: rc7-neon-idle 5s ease-in-out infinite;
    opacity: 0.85;
  }
}

@keyframes rc7-fog-drift {
  from { transform: translate3d(-2%, 0, 0); opacity: 0.16; }
  to { transform: translate3d(2%, -1%, 0); opacity: 0.24; }
}

@keyframes rc7-neon-idle {
  0%, 100% { opacity: 0.55; filter: brightness(1); }
  50% { opacity: 0.72; filter: brightness(1.08); }
}

.game-stage-bg.rc7-neon-flicker .game-stage-bg-neon {
  animation: rc7-neon-flicker-burst 0.28s ease-out;
}

@keyframes rc7-neon-flicker-burst {
  0% { opacity: 0.4; filter: brightness(0.85); }
  35% { opacity: 1; filter: brightness(1.35); }
  100% { opacity: 0.6; filter: brightness(1); }
}

.game-stage-bg.rc7-world-win-pulse .game-stage-bg-glow {
  animation: rc7-win-glow-pulse 0.85s ease-out;
}

.game-stage-bg.rc7-world-scatter-pulse .game-stage-bg-glow {
  animation: rc7-scatter-glow-pulse 1s ease-out;
}

@keyframes rc7-win-glow-pulse {
  0% { opacity: 0.5; transform: scale(1); }
  40% { opacity: 0.95; transform: scale(1.06); filter: hue-rotate(-8deg); }
  100% { opacity: 0.55; transform: scale(1); }
}

@keyframes rc7-scatter-glow-pulse {
  0% { opacity: 0.55; }
  45% { opacity: 1; filter: saturate(1.2); }
  100% { opacity: 0.55; }
}

/* Subtle camera breathing during near-bonus */
@media (prefers-reduced-motion: no-preference) {
  [data-game-stage-aspect].rc7-camera-breathe-active {
    animation: rc7-camera-breathe 2.8s ease-in-out infinite;
  }
}

@keyframes rc7-camera-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

/* ===== Loading ritual — winner B (centered neon ring) ===== */
.game-loading-screen {
  position: relative;
}

.game-loading-ritual {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  gap: 0.35rem;
}

.game-loading-ritual-ring {
  position: absolute;
  width: min(52vw, 280px);
  height: min(52vw, 280px);
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.35);
  box-shadow:
    0 0 40px rgba(255, 140, 0, 0.25),
    inset 0 0 30px rgba(168, 85, 247, 0.12);
  animation: rc7-loading-ring-breathe 2.4s ease-in-out infinite;
}

@keyframes rc7-loading-ring-breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.65; }
  50% { transform: scale(1.04); opacity: 1; }
}

.game-loading-ritual-title {
  position: relative;
  font-family: var(--pf95-font-jackpot, 'Orbitron', system-ui, sans-serif);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  letter-spacing: 0.24em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 28px rgba(255, 215, 0, 0.5);
  margin: 0;
}

.game-loading-ritual-tagline {
  position: relative;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(200, 210, 230, 0.78);
  margin: 0 0 0.5rem;
}

.game-loading-ritual-cta {
  position: relative;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 215, 0, 0.98);
  animation: rc7-loading-cta-pulse 1.8s ease-in-out infinite;
  margin: 0;
}

@keyframes rc7-loading-cta-pulse {
  0%, 100% { opacity: 0.6; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.game-loading-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, transparent 30%, rgba(4, 8, 18, 0.55) 100%);
}

/* ===== Impact FX rings ===== */
.rc7-impact-ring {
  position: absolute;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  animation: rc7-impact-ring-pop 0.68s ease-out forwards;
}

.rc7-impact-ring--sticky {
  border: 2px solid rgba(255, 105, 180, 0.85);
  box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

.rc7-impact-ring--giant {
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border: 3px solid rgba(255, 215, 0, 0.9);
  box-shadow: 0 0 32px rgba(255, 140, 0, 0.55);
}

.rc7-impact-ring--curtain {
  border: 2px solid rgba(220, 38, 38, 0.85);
  box-shadow: 0 0 22px rgba(220, 38, 38, 0.45);
}

.rc7-impact-ring--wild {
  border: 2px solid rgba(74, 222, 128, 0.85);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.45);
}

.rc7-impact-ring--full-line {
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.65);
}

@keyframes rc7-impact-ring-pop {
  from { transform: scale(0.4); opacity: 0.95; }
  to { transform: scale(1.55); opacity: 0; }
}

.rc7-impact-shockwave {
  position: absolute;
  width: 120px;
  height: 4px;
  margin: -2px 0 0 -60px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  animation: rc7-impact-shockwave 0.52s ease-out forwards;
  opacity: 0.75;
}

@keyframes rc7-impact-shockwave {
  from { transform: scaleX(0.2); opacity: 0.9; }
  to { transform: scaleX(1.8); opacity: 0; }
}

[data-game-stage-reels].rc7-impact-flash.rc7-impact--giant {
  animation: rc7-stage-giant-flash 0.48s ease-out;
}

[data-game-stage-reels].rc7-impact-flash.rc7-impact--sticky {
  animation: rc7-stage-sticky-flash 0.32s ease-out;
}

[data-game-stage-reels].rc7-impact-flash.rc7-impact--curtain {
  animation: rc7-stage-curtain-flash 0.36s ease-out;
}

@keyframes rc7-stage-giant-flash {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.45) saturate(1.15); }
  100% { filter: brightness(1); }
}

@keyframes rc7-stage-sticky-flash {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.25) hue-rotate(-6deg); }
  100% { filter: brightness(1); }
}

@keyframes rc7-stage-curtain-flash {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.3) contrast(1.05); }
  100% { filter: brightness(1); }
}

/* ===== 6 — Wheel premium mini-game feel ===== */
.bonus-wheel-overlay.rc7-wheel-premium .bonus-wheel-disc-wrap {
  filter: drop-shadow(0 0 28px rgba(255, 140, 0, 0.35));
}

.bonus-wheel-overlay.rc7-wheel-premium .bonus-wheel-pointer-glow {
  animation: rc7-wheel-pointer-glow 0.9s ease-in-out infinite alternate;
}

@keyframes rc7-wheel-pointer-glow {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 1; transform: scale(1.06); }
}

/* ===== 7 — Jackpot hosted game feel ===== */
.profitrolya-chest-game.rc7-jackpot-hosted {
  backdrop-filter: blur(4px);
}

.treasure-chest.rc7-chest-hover-premium:hover {
  transform: translateY(-4px) scale(1.03);
  filter: drop-shadow(0 8px 16px rgba(255, 215, 0, 0.35));
}

/* ===== 8 — Hidden event film language accents ===== */
.hidden-event-overlay.rc7-film-shnauzer {
  --he-accent: #ffb347;
}

.hidden-event-overlay.rc7-film-leo {
  --he-accent: #ff6b35;
}

.hidden-event-overlay.rc7-film-grulex {
  --he-accent: #39ff14;
}

/* ===== Bonus summary cinematic outro hint ===== */
.bonus-result-summary.rc7-summary-cinematic {
  animation: rc7-summary-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes rc7-summary-enter {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== HUD micro polish ===== */
@media (prefers-reduced-motion: no-preference) {
  .slot-hud-icon-btn:hover {
    transform: translateY(-2px);
    transition: transform 0.18s ease, filter 0.18s ease;
    filter: brightness(1.12);
  }
}
