/* EP03 Player Styling - Bibi's Bouncy Trampoline (Action & Interaction) */

body.ep03-mode #ep1StartBtn,
body.ep03-mode #ep1RocketFx,
body.ep03-mode #ep1CompleteWrap,
body.ep03-mode #ep2InteractiveLayer,
body.ep03-mode #ep2CompleteWrap {
  display: none !important;
}

#ep3InteractiveLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  overflow: clip;
}

body:not(.ep03-mode) #ep3InteractiveLayer {
  display: none !important;
}

/* Trampoline Tap Button (Positioned at bottom-right to protect center trampoline and jump path) */
#ep3TrampolineBtn {
  position: absolute;
  bottom: 16px;
  right: 24px;
  left: auto;
  transform: none;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #facc15, #eab308);
  border: 3px solid #ffffff;
  border-radius: 9999px;
  padding: 10px 24px;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(234, 179, 8, 0.45);
  font-size: 1.05rem;
  font-weight: 800;
  color: #713f12;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
  z-index: 25;
}

#ep3TrampolineBtn:hover {
  transform: scale(1.06);
  box-shadow: 0 14px 30px rgba(234, 179, 8, 0.6);
}

#ep3TrampolineBtn:active {
  transform: scale(0.96);
}

#ep3TrampolineBtn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

#ep3TrampolineBtn.hidden {
  display: none;
}

/* Electric Star Particles */
.ep3-spark-particle {
  position: absolute;
  pointer-events: none;
  font-size: 1.6rem;
  animation: ep3SparkAnim 0.75s ease-out forwards;
}

@keyframes ep3SparkAnim {
  0% { transform: translate(0, 0) scale(0.4); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1.3); opacity: 0; }
}

/* EP03 Completion Card */
#ep3CompleteWrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.96), rgba(254, 240, 138, 0.96));
  border: 2px solid #eab308;
  border-radius: 20px;
  padding: 16px 24px;
  margin: 12px auto;
  max-width: 580px;
  width: 92%;
  box-shadow: 0 12px 28px rgba(202, 138, 4, 0.2);
  text-align: center;
  z-index: 30;
}

#ep3CompleteWrap.active {
  display: flex !important;
  animation: ep3SlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ep3SlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.ep3-complete-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #854d0e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ep3-complete-desc {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.4;
}

.ep3-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.ep3-btn-secondary {
  background: #ffffff;
  color: #ca8a04;
  border: 1.5px solid #eab308;
  border-radius: 9999px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ep3-btn-secondary:hover {
  background: #fefce8;
  transform: translateY(-2px);
}

.ep3-btn-primary {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  padding: 8px 22px;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(202, 138, 4, 0.4);
  transition: all 0.2s ease;
}

.ep3-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(202, 138, 4, 0.55);
}

@media (max-width: 640px) {
  #ep3TrampolineBtn {
    padding: 8px 16px;
    font-size: 0.92rem;
    bottom: 10px;
    right: 12px;
    left: auto;
    transform: none;
  }
}
