/**
 * FRIENDS Premium Feel 9.5/10 Pass — presentation-only polish.
 * Loaded after overnight-wow.css. Does not change logo typography.
 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;900&family=Rajdhani:wght@600;700&display=swap');

:root {
  --pf95-font-hud: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --pf95-font-jackpot: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --pf95-font-bigwin: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --pf95-font-wheel: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
  --pf95-font-bonus-total: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
}

/* ===== 11 — Typography (logo excluded) ===== */
.big-win-title,
.big-win-amount,
.jackpot-intro-title,
.treasure-chest-tier-label,
.bonus-wheel-title,
.bonus-hud-stat--total .bonus-hud-stat-value,
.bonus-result-summary h2 {
  font-family: var(--pf95-font-bigwin);
  letter-spacing: 0.06em;
}

.jackpot-intro-title,
.treasure-chest-tier-label {
  font-family: var(--pf95-font-jackpot);
}

.bonus-wheel-title {
  font-family: var(--pf95-font-wheel);
}

.slot-hud-stat strong,
.showcase-balance-chip strong,
.bonus-hud-stat-value {
  font-family: var(--pf95-font-hud);
  font-variant-numeric: tabular-nums;
}

/* ===== 1 — Premium Spin Button ===== */
.slot-hud-spin--premium {
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.slot-hud-spin--premium::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  background: conic-gradient(
    from 0deg,
    rgba(255, 215, 0, 0.55),
    rgba(168, 85, 247, 0.45),
    rgba(234, 88, 12, 0.5),
    rgba(255, 215, 0, 0.55)
  );
  opacity: 0.35;
  filter: blur(6px);
  z-index: -1;
  animation: pf95-spin-chrome-spin 8s linear infinite;
}

.slot-hud-spin--premium::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

@keyframes pf95-spin-chrome-spin {
  to { transform: rotate(360deg); }
}

.slot-spin-idle-pulse.slot-hud-spin--premium {
  animation: pf95-spin-breathe 2.6s ease-in-out infinite;
}

@keyframes pf95-spin-breathe {
  0%, 100% {
    box-shadow:
      0 0 14px rgba(168, 85, 247, 0.4),
      0 0 28px rgba(255, 215, 0, 0.25),
      inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow:
      0 0 24px rgba(255, 215, 0, 0.55),
      0 0 38px rgba(124, 58, 237, 0.45),
      inset 0 2px 0 rgba(255, 255, 255, 0.35);
    transform: scale(1.045);
  }
}

.slot-hud-spin--premium:hover:not(:disabled) {
  animation: none !important;
  transform: scale(1.06);
  box-shadow:
    0 0 28px rgba(255, 215, 0, 0.65),
    0 0 42px rgba(168, 85, 247, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  filter: brightness(1.08);
}

.slot-hud-spin--premium:active:not(:disabled) {
  transform: scale(0.92) !important;
  transition: transform 0.08s ease-out;
}

.slot-hud-spin--cooldown {
  animation: pf95-spin-cooldown 0.55s ease-out !important;
  pointer-events: none;
}

@keyframes pf95-spin-cooldown {
  0% { filter: brightness(1.15) saturate(1.1); transform: scale(0.94); }
  100% { filter: brightness(1); transform: scale(1); }
}

.slot-hud-spin--win-pulse {
  animation: pf95-spin-win-pulse 0.85s ease-out !important;
}

@keyframes pf95-spin-win-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(255, 215, 0, 0.4); }
  35% { transform: scale(1.12); box-shadow: 0 0 32px rgba(255, 215, 0, 0.85); }
  70% { transform: scale(1.04); }
}

/* ===== 2 — Premium Reel Stage ===== */
.game-stage-reels {
  backdrop-filter: blur(0.5px);
}

.pf95-reel-stage-premium .game-stage-reels::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 14%, transparent 86%, rgba(255, 215, 0, 0.08) 100%);
  mix-blend-mode: screen;
  opacity: 0.85;
}

.pf95-reel-stage-premium .game-stage-reels::after {
  box-shadow:
    inset 0 0 32px rgba(168, 85, 247, 0.22),
    inset 0 -16px 28px rgba(255, 215, 0, 0.1),
    inset 0 0 80px rgba(4, 8, 18, 0.45);
}

.pf95-reel-top-light {
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 28%;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 72%);
  animation: pf95-top-light-drift 11s ease-in-out infinite;
}

.pf95-reel-bottom-reflection {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 22%;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(0deg, rgba(255, 215, 0, 0.1), transparent 80%);
  opacity: 0.7;
}

.pf95-reel-glass-highlight {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.09) 48%, transparent 56%);
  animation: pf95-glass-sweep 9s ease-in-out infinite;
}

.pf95-reel-vignette {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: radial-gradient(ellipse 72% 68% at 50% 46%, transparent 42%, rgba(4, 8, 18, 0.55) 100%);
}

.pf95-reel-particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 215, 0, 0.35) 1px, transparent 1px),
    radial-gradient(circle, rgba(168, 85, 247, 0.28) 1px, transparent 1px);
  background-size: 64px 64px, 96px 96px;
  opacity: 0.35;
  animation: pf95-reel-particles-drift 24s linear infinite;
}

@keyframes pf95-top-light-drift {
  0%, 100% { opacity: 0.75; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(6px); }
}

@keyframes pf95-glass-sweep {
  0%, 100% { opacity: 0; transform: translateX(-12%); }
  45%, 55% { opacity: 1; transform: translateX(12%); }
}

@keyframes pf95-reel-particles-drift {
  to { transform: translate3d(-18px, -12px, 0); }
}

/* ===== 3 — Living Background ===== */
.game-stage-bg-smoke,
.game-stage-bg-dust,
.game-stage-bg-neon,
.game-stage-bg-beams,
.game-stage-bg-reflections,
.game-stage-bg-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.game-stage-bg-smoke {
  z-index: 1;
  background: radial-gradient(ellipse 60% 40% at 30% 80%, rgba(148, 163, 184, 0.08), transparent 70%);
  animation: pf95-smoke-drift 18s ease-in-out infinite;
}

.game-stage-bg-dust {
  z-index: 1;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 120px 120px;
  animation: pf95-dust-float 32s linear infinite;
}

.game-stage-bg-neon {
  z-index: 1;
  box-shadow: inset 0 0 80px rgba(168, 85, 247, 0.06);
  animation: pf95-neon-flicker 4.8s ease-in-out infinite;
}

.game-stage-bg-beams {
  z-index: 1;
  background: linear-gradient(118deg, transparent 44%, rgba(255, 215, 0, 0.05) 50%, transparent 56%);
  animation: pf95-beam-sweep 16s ease-in-out infinite;
}

.game-stage-bg-reflections {
  z-index: 1;
  background: linear-gradient(0deg, rgba(74, 222, 128, 0.04), transparent 35%);
  animation: pf95-reflection-pulse 7s ease-in-out infinite;
}

.game-stage-bg-sparks {
  z-index: 2;
  opacity: 0;
  background:
    radial-gradient(circle at 22% 68%, rgba(255, 215, 0, 0.45) 0, transparent 3px),
    radial-gradient(circle at 78% 32%, rgba(168, 85, 247, 0.4) 0, transparent 2px);
  animation: pf95-spark-pop 9s ease-in-out infinite;
}

@keyframes pf95-smoke-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  50% { transform: translate(12px, -8px) scale(1.04); opacity: 0.85; }
}

@keyframes pf95-dust-float {
  to { transform: translate3d(-20px, -14px, 0); }
}

@keyframes pf95-neon-flicker {
  0%, 100% { opacity: 0.55; }
  48% { opacity: 0.85; }
  50% { opacity: 0.45; }
  52% { opacity: 0.9; }
}

@keyframes pf95-beam-sweep {
  0%, 100% { opacity: 0; transform: translateX(-10%) rotate(0deg); }
  40% { opacity: 0.9; }
  60% { opacity: 0.9; transform: translateX(10%); }
}

@keyframes pf95-reflection-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.85; }
}

@keyframes pf95-spark-pop {
  0%, 88%, 100% { opacity: 0; }
  90% { opacity: 1; }
  94% { opacity: 0.2; }
}

/* Baseline 30% ambient before idle director */
.playground--player-view .game-stage-bg-grid,
.playground--player-view .game-stage-bg-glow,
.playground--player-view .game-stage-bg-particles {
  animation: pf95-ambient-drift 36s linear infinite;
  opacity: 0.38;
}

@keyframes pf95-ambient-drift {
  to { transform: translate3d(-8px, -6px, 0); }
}

/* ===== 4 — Scatter Premium ===== */
.scatter-idle-heartbeat .pixi-root--showcase {
  animation: pf95-scatter-idle-heartbeat 1.1s ease-in-out infinite;
}

@keyframes pf95-scatter-idle-heartbeat {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.06) saturate(1.08); }
}

.scatter-landing-particles {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.85);
  pointer-events: none;
  z-index: 3;
  animation: pf95-scatter-particle 0.62s ease-out forwards;
}

@keyframes pf95-scatter-particle {
  from { transform: scale(1); opacity: 1; }
  to { transform: translate(var(--sx, 0), var(--sy, -24px)) scale(0); opacity: 0; }
}

.scatter-landing-ring--ripple::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 215, 0, 0.5);
  animation: pf95-scatter-ripple 0.72s ease-out forwards;
}

@keyframes pf95-scatter-ripple {
  from { transform: scale(0.7); opacity: 0.9; }
  to { transform: scale(1.8); opacity: 0; }
}

/* ===== 5 — Near Miss Premium ===== */
.near-miss-heartbeat-active {
  animation: pf95-near-miss-creep 2.4s ease-in-out infinite alternate;
}

@keyframes pf95-near-miss-creep {
  from { transform: scale(1.062); }
  to { transform: scale(1.078); }
}

.near-miss-light-focus::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  background: radial-gradient(circle at 50% 42%, rgba(255, 140, 0, 0.12) 0%, transparent 55%);
  animation: pf95-light-focus-pulse 1.1s ease-in-out infinite;
}

@keyframes pf95-light-focus-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.near-miss-audio-lowpass .game-stage-v2 {
  filter: saturate(0.92) brightness(0.96);
  transition: filter 0.35s ease;
}

.near-bonus-mode .game-stage-reels {
  animation: pf95-reel-drag 1.4s ease-in-out infinite alternate;
}

@keyframes pf95-reel-drag {
  from { transform: translateY(0); }
  to { transform: translateY(2px); }
}

/* ===== 6 — Chill Dude Premium (Pigeon) ===== */
.scatter-save-overlay--premium {
  background: rgba(4, 8, 18, 0.88);
}

.scatter-save-chill-character {
  position: absolute;
  left: 10%;
  top: 22%;
  width: 120px;
  height: 120px;
  pointer-events: none;
  animation: pf95-pigeon-entrance 1.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.scatter-save-chill-character__body {
  display: block;
  font-size: 3.2rem;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.35));
  animation: pf95-pigeon-peck 0.45s ease-in-out 0.9s 2;
}

.scatter-save-chill-character__wing {
  position: absolute;
  right: 8px;
  top: 28px;
  font-size: 1.4rem;
  animation: pf95-pigeon-flap 0.28s ease-in-out infinite;
}

.scatter-save-chill-character__crumb {
  position: absolute;
  left: 42%;
  bottom: -8px;
  font-size: 0.65rem;
  opacity: 0.7;
  animation: pf95-crumb-fall 0.8s ease-out 1.1s forwards;
}

@keyframes pf95-pigeon-entrance {
  from { transform: translate(-140px, 80px) rotate(-22deg) scale(0.6); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translate(0, 0) rotate(6deg) scale(1); opacity: 1; }
}

@keyframes pf95-pigeon-flap {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-18deg); }
}

@keyframes pf95-pigeon-peck {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px) rotate(8deg); }
}

@keyframes pf95-crumb-fall {
  from { opacity: 0.8; transform: translateY(0); }
  to { opacity: 0; transform: translateY(18px); }
}

[data-chill-dude-anchor] {
  position: absolute;
  left: 18%;
  top: 30%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ===== 7 — Full Line Celebration ===== */
.full-line-celebration {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.full-line-celebration__halo {
  position: absolute;
  width: min(72%, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(255, 215, 0, 0.75);
  box-shadow:
    0 0 40px rgba(255, 215, 0, 0.55),
    0 0 80px rgba(168, 85, 247, 0.35);
  animation: pf95-full-line-halo 1.1s ease-out forwards;
}

.full-line-celebration__particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 215, 0, 0.8) 2px, transparent 2px),
    radial-gradient(circle, rgba(168, 85, 247, 0.65) 1px, transparent 1px);
  background-size: 48px 48px, 32px 32px;
  animation: pf95-full-line-particles 0.9s ease-out forwards;
}

.full-line-celebration__label {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--pf95-font-bigwin);
  font-size: clamp(1rem, 2.8vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: #fde68a;
  text-shadow: 0 0 18px rgba(255, 215, 0, 0.65);
  animation: pf95-full-line-label 0.85s ease-out forwards;
}

@keyframes pf95-full-line-halo {
  from { transform: scale(0.4); opacity: 0; }
  40% { opacity: 1; }
  to { transform: scale(1.35); opacity: 0; }
}

@keyframes pf95-full-line-particles {
  from { opacity: 0.9; transform: scale(0.8); }
  to { opacity: 0; transform: scale(1.4); }
}

@keyframes pf95-full-line-label {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.full-line-celebration-active .game-stage-reels {
  filter: brightness(1.12) saturate(1.1);
}

/* ===== 9 — HUD Polish ===== */
.slot-hud-digit--tick {
  animation: pf95-hud-digit-tick 0.42s ease-out;
}

.slot-hud-digit--win {
  animation: pf95-hud-digit-win 0.62s ease-out;
  color: #fde68a !important;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
}

@keyframes pf95-hud-digit-tick {
  0% { transform: translateY(4px); opacity: 0.65; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes pf95-hud-digit-win {
  0% { transform: scale(0.85); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.slot-hud-stat--pulse {
  animation: pf95-stat-pulse 0.52s ease-out;
}

.slot-hud-stat--win-reveal {
  animation: pf95-win-stat-reveal 0.55s ease-out;
}

@keyframes pf95-stat-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 14px rgba(168, 85, 247, 0.35); }
}

@keyframes pf95-win-stat-reveal {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slot-hud-stat--bonus strong {
  font-family: var(--pf95-font-bonus-total);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .slot-hud-spin--premium::before,
  .slot-hud-spin--premium,
  .pf95-reel-glass-highlight,
  .game-stage-bg-smoke,
  .game-stage-bg-dust,
  .game-stage-bg-neon,
  .game-stage-bg-beams,
  .game-stage-bg-reflections,
  .game-stage-bg-sparks,
  .near-miss-heartbeat-active,
  .scatter-save-chill-character,
  .full-line-celebration__halo {
    animation: none !important;
  }
}

.slot-reduced-motion .slot-hud-spin--premium::before,
.slot-reduced-motion .pf95-reel-glass-highlight,
.slot-reduced-motion .game-stage-bg-smoke,
.slot-reduced-motion .game-stage-bg-dust,
.slot-reduced-motion .game-stage-bg-neon,
.slot-reduced-motion .game-stage-bg-beams,
.slot-reduced-motion .game-stage-bg-reflections,
.slot-reduced-motion .game-stage-bg-sparks {
  animation: none !important;
}
