/* PIZZA HERO GAMING SPLASH SCREEN (v3 — Studio Bumper) */

@import url('https://fonts.googleapis.com/css2?family=Bungee&family=Outfit:wght@400;600;800&display=swap');

.phs-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  font-family: 'Outfit', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at 50% 40%, #2a0810 0%, #100308 55%, #000 100%);
  opacity: 0;
  animation: phs-fade-in 0.4s ease-out forwards;
}
.phs-splash.phs-out {
  /* Slowed from 0.55s for a more cinematic cross-fade into the title
     screen. The JS setTimeout in splash.js (showRewarded -> dismiss)
     must stay >= this duration so onComplete fires after the fade. */
  animation: phs-fade-out 1.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.phs-splash.phs-shake {
  animation: phs-fade-in 0.4s ease-out forwards, phs-shake 0.45s ease-out;
}
@keyframes phs-fade-in  { to { opacity: 1; } }
/* Explicit 0% keyframe so the fade-out starts from visible (opacity 1).
   Without it, the browser interpolates from the base rule's
   opacity:0 to the target opacity:0 — a hard cut to black. */
@keyframes phs-fade-out {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}
@keyframes phs-shake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(5px, -3px); }
  60% { transform: translate(-3px, 4px); }
  80% { transform: translate(3px, -1px); }
}

.phs-splash::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,200,100,0.07) 1px, transparent 1.5px);
  background-size: 7px 7px;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.phs-splash::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

.phs-rays {
  position: absolute;
  top: 50%; left: 50%;
  width: 160vmax; height: 160vmax;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(244, 197, 66, 0.16) 0deg 3deg,
    transparent 3deg 22deg
  );
  transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  opacity: 0;
  animation:
    phs-rays-in 0.7s 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) forwards,
    phs-rays-spin 40s 1s linear infinite;
}
@keyframes phs-rays-in {
  to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(15deg); }
}
@keyframes phs-rays-spin {
  from { transform: translate(-50%, -50%) scale(1) rotate(15deg); }
  to   { transform: translate(-50%, -50%) scale(1) rotate(375deg); }
}

.phs-shockwave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid #f4c542;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  animation: phs-shockwave 0.9s 1.05s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes phs-shockwave {
  0%   { opacity: 0.85; transform: translate(-50%, -50%) scale(0); border-width: 5px; }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(7); border-width: 1px; }
}

.phs-title {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: 'Bungee', sans-serif;
  font-size: clamp(44px, 9.5vw, 104px);
  color: #f4c542;
  letter-spacing: 0.035em;
  line-height: 0.95;
  text-shadow:
    2px 2px 0 #c8102e,
    4px 4px 0 #8b0a1f,
    6px 6px 0 #4a0410,
    8px 10px 24px rgba(0,0,0,0.65);
  display: flex;
  flex-wrap: nowrap;
  gap: 0.015em;
}
.phs-title span {
  display: inline-block;
  opacity: 0;
  transform: scale(2.5) translateY(-30px) rotate(-6deg);
  animation: phs-letter 0.5s cubic-bezier(0.34, 1.7, 0.64, 1) forwards;
}
.phs-title .phs-space { width: 0.35em; }
@keyframes phs-letter {
  0%   { opacity: 0; transform: scale(2.5) translateY(-30px) rotate(-6deg); }
  60%  { opacity: 1; transform: scale(0.9) translateY(0) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotate(0); }
}

.phs-tagline {
  position: relative;
  z-index: 2;
  margin: 18px 0 0;
  padding-left: 0.5em;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: clamp(13px, 1.9vw, 19px);
  letter-spacing: 0.5em;
  color: #f5e6c8;
  opacity: 0;
  transform: translateY(16px);
  animation: phs-tagline-in 0.6s 1.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes phs-tagline-in { to { opacity: 1; transform: translateY(0); } }

.phs-loader {
  position: relative;
  z-index: 2;
  width: clamp(180px, 22vw, 260px);
  height: 3px;
  margin-top: 36px;
  background: rgba(245, 230, 200, 0.14);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: phs-fade-up 0.4s 2.1s ease-out forwards;
}
.phs-loader-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #c8102e 0%, #f4c542 100%);
  box-shadow: 0 0 14px rgba(244, 197, 66, 0.65);
  border-radius: 2px;
  animation: phs-loader-fill 1.5s 2.1s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes phs-fade-up { to { opacity: 1; } }
@keyframes phs-loader-fill { to { width: 100%; } }

.phs-prompt {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(245, 230, 200, 0.75);
  opacity: 0;
  animation:
    phs-fade-up 0.4s 2.6s ease-out forwards,
    phs-prompt-pulse 1.8s 2.6s ease-in-out infinite;
}
@keyframes phs-prompt-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.95; }
}

.phs-mark {
  position: absolute;
  top: 28px;
  right: 30px;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: rgba(245, 230, 200, 0.45);
  text-transform: uppercase;
  opacity: 0;
  animation: phs-fade-up 0.5s 2.3s ease-out forwards;
}
.phs-mark::before {
  content: '◆';
  margin-right: 8px;
  color: #c8102e;
}
