/* ==========================================================================
   MOMO PIXEL COMPANION - ULTRA-FLUID DRAGGABLE SUPER ADMIN COMPANION
   Joy In Sweet • Joyce Costa Couto • 60 FPS Hardware-Accelerated
   ========================================================================== */

/* 1. Main Floating Container */
#momoRoot {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Let clicks through */
  z-index: 50;
  user-select: none;
  -webkit-user-select: none;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
}

#momoRoot.hidden {
  display: none !important;
}

/* 2. Character Actor Box (Freely Draggable with Mouse or Touch) */
.momo-actor {
  position: fixed;
  top: 0;
  left: 0;
  width: 78px;
  height: 100px;
  pointer-events: auto;
  cursor: grab;
  touch-action: none; /* Crucial: Prevents mobile page scroll while dragging Momo */
  user-select: none;
  -webkit-user-select: none;
  z-index: 52;
  will-change: transform;
  filter: drop-shadow(0 8px 14px rgba(219, 39, 119, 0.28));
  transition: transform 0.15s ease-out;
}

.momo-actor:active {
  cursor: grabbing;
}

.momo-actor.is-dragging {
  cursor: grabbing;
  transition: none !important; /* Zero latency tracking during drag */
  filter: drop-shadow(0 14px 22px rgba(219, 39, 119, 0.4));
  transform: scale(1.06);
}

.momo-actor.momo-sleeping {
  opacity: 0.35;
  filter: grayscale(0.5);
}

.momo-actor.momo-sleeping:hover {
  opacity: 0.9;
  filter: none;
}

/* Character Sprite Image */
.momo-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* 3. Speech Bubble (Wide, beautiful, never a vertical pole!) */
.momo-bubble {
  position: fixed;
  width: 270px;
  max-width: calc(100vw - 28px);
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #ec4899;
  border-radius: 18px;
  padding: 11px 13px;
  box-shadow: 0 10px 25px -4px rgba(219, 39, 119, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(8px);
  pointer-events: auto;
  z-index: 55;
  box-sizing: border-box;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.momo-bubble.visible {
  opacity: 1;
  visibility: visible;
}

/* 4. Mini Floating Actions Pill (Docked beside Momo or toggleable) */
.momo-controls-pill {
  position: fixed;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid #fbcfe8;
  border-radius: 9999px;
  padding: 4px 7px;
  box-shadow: 0 4px 16px rgba(219, 39, 119, 0.2);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 51;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.momo-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  color: #831843;
  background: #fdf2f8;
  border: 1px solid #fbcfe8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.momo-ctrl-btn:hover {
  background: #fce7f3;
  border-color: #f472b6;
  transform: translateY(-1px);
}

.momo-ctrl-btn:active {
  transform: scale(0.92);
}

.momo-ctrl-btn.highlight {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: white;
  border: none;
}

/* 5. Floating Heart Particles */
.momo-particle-heart {
  position: fixed;
  color: #ec4899;
  font-size: 18px;
  pointer-events: none;
  z-index: 60;
  animation: momo-float-up 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes momo-float-up {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 1; }
  50% { transform: translateY(-35px) scale(1.15) rotate(-10deg); opacity: 0.9; }
  100% { transform: translateY(-70px) scale(0.8) rotate(15deg); opacity: 0; }
}

/* 6. Rage Screen Shake (Lightweight transform on body, zero reflow) */
@keyframes momo-rumble {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-3px, 2px, 0); }
  50% { transform: translate3d(3px, -2px, 0); }
  75% { transform: translate3d(-2px, 1px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.momo-screen-shake {
  animation: momo-rumble 0.35s ease-in-out;
}

/* 7. Retro Note Modal */
.momo-note-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  animation: momo-fade-in 0.2s ease;
}

.momo-note-modal.hidden {
  display: none !important;
}

.momo-note-card {
  position: relative;
  max-width: 520px;
  width: 100%;
  background: #ffffff;
  border: 3px solid #334155;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}

.momo-note-img {
  width: 100%;
  max-height: 250px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  margin-bottom: 12px;
}

@keyframes momo-fade-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

/* 8. Combo Click Badge */
.momo-combo-badge {
  position: fixed;
  padding: 3px 10px;
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(219, 39, 119, 0.45);
  pointer-events: none;
  z-index: 58;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.7);
  transition: opacity 0.15s ease, transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.momo-combo-badge.visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

/* 9. Controlled Actor Neon Aura */
.momo-actor.is-controlled {
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.8)) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
}

/* 10. Floating Arcade Gamepad */
.momo-gamepad {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(95vw, 560px);
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #ec4899;
  border-radius: 20px;
  padding: 10px 14px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(236, 72, 153, 0.4);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  z-index: 65;
  color: #ffffff;
  animation: momo-slide-up 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  touch-action: manipulation;
}

.momo-gamepad.hidden {
  display: none !important;
}

.momo-gamepad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 114, 182, 0.25);
  margin-bottom: 8px;
}

.momo-gamepad-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #f472b6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.momo-gamepad-exit {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.6);
  color: #fca5a5;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.momo-gamepad-exit:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #ffffff;
}

.momo-emotes-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.momo-emote-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.35);
  color: #ffffff;
  border-radius: 10px;
  padding: 4px 7px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
}

.momo-emote-btn:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: #ec4899;
  transform: translateY(-1px);
}

.momo-emote-btn:active {
  transform: scale(0.92);
}

.momo-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.momo-dpad {
  display: flex;
  align-items: center;
  gap: 6px;
}

.momo-dpad-btn {
  width: 58px;
  height: 48px;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1.5px solid #64748b;
  border-radius: 12px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

.momo-dpad-btn:active,
.momo-dpad-btn.active {
  background: linear-gradient(135deg, #ec4899, #db2777);
  border-color: #f472b6;
  transform: scale(0.93);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

.momo-jump-btn {
  flex: 1;
  max-width: 170px;
  height: 48px;
  background: linear-gradient(135deg, #ec4899, #be185d);
  border: 1.5px solid #f472b6;
  border-radius: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.5);
  transition: all 0.1s ease;
  text-transform: uppercase;
}

.momo-jump-btn:active {
  transform: scale(0.93);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.8);
}

@keyframes momo-slide-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* 11. Mobile Docked Mode State
   When active, completely hides all floating elements so they NEVER pollute or overlap the admin dashboard */
body.momo-mobile-docked .momo-actor,
body.momo-mobile-docked .momo-bubble,
body.momo-mobile-docked .momo-controls-pill,
body.momo-mobile-docked .momo-combo-badge,
body.momo-mobile-docked .momo-gamepad {
  display: none !important;
}

/* 12. Minimized Floating Tab (Aba Minimizada) */
.momo-minimized-tab {
  position: fixed;
  bottom: 16px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #ec4899;
  border-radius: 9999px;
  padding: 6px 12px 6px 8px;
  box-shadow: 0 10px 25px rgba(219, 39, 119, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  z-index: 60;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease;
  animation: momo-float-badge 3.5s ease-in-out infinite;
}

.momo-minimized-tab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 30px rgba(219, 39, 119, 0.55);
}

.momo-minimized-tab:active {
  transform: scale(0.95);
}

.momo-minimized-tab.hidden {
  display: none !important;
}

@keyframes momo-float-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.momo-mini-avatar {
  position: relative;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #fbcfe8, #f472b6);
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.momo-mini-avatar img {
  width: 26px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.momo-mini-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #10b981;
  border: 1.5px solid #0f172a;
  border-radius: 50%;
}

.momo-mini-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.momo-mini-title {
  font-size: 11px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.momo-mini-sub {
  font-size: 9px;
  font-weight: 700;
  color: #f472b6;
}

.momo-mini-badge {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
  font-size: 9px;
  font-weight: 900;
  padding: 3px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.4);
}

/* 13. Arcade Dock Backdrop */
.momo-arcade-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 68;
  animation: momo-fade-in 0.2s ease;
}

.momo-arcade-backdrop.hidden {
  display: none !important;
}

/* 14. Arcade Dock Bottom Sheet / Joguinho de Pixel */
.momo-arcade-dock {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(105%);
  width: 100%;
  max-width: 520px;
  background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
  border: 2.5px solid #ec4899;
  border-bottom: none;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  padding: 12px 14px 20px 14px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(236, 72, 153, 0.4);
  backdrop-filter: blur(16px);
  z-index: 70;
  color: #ffffff;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2);
  box-sizing: border-box;
}

.momo-arcade-dock.active {
  transform: translateX(-50%) translateY(0);
}

.momo-dock-handle {
  width: 44px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  margin: 0 auto 10px auto;
}

.momo-dock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(244, 114, 182, 0.2);
  margin-bottom: 10px;
}

.momo-dock-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  color: #f472b6;
  text-transform: uppercase;
}

.momo-dock-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.momo-dock-minimize {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #ffffff;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.momo-dock-minimize:hover {
  background: rgba(236, 72, 153, 0.3);
}

/* 15. Stage Arena: Dedicated Pixel Game Room */
.momo-stage-area {
  position: relative;
  width: 100%;
  height: 155px;
  background: linear-gradient(180deg, #2e1065 0%, #172554 85%, #0f172a 100%);
  border: 2px solid #a21caf;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.momo-stage-stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.25) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.momo-stage-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: repeating-linear-gradient(45deg, #be185d 0, #be185d 12px, #9d174d 12px, #9d174d 24px);
  border-top: 2px solid #f472b6;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.3);
}

.momo-stage-actor {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 64px;
  height: 84px;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.08s ease-out;
}

.momo-stage-actor.jumping {
  transition: none !important;
}

.momo-stage-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Speech bubble inside the stage */
.momo-stage-bubble {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid #ec4899;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  z-index: 5;
}

.momo-stage-bubble.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stage Emote Pills */
.momo-stage-emotes {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.momo-stage-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 114, 182, 0.3);
  color: #ffffff;
  border-radius: 10px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.momo-stage-btn:hover {
  background: rgba(236, 72, 153, 0.25);
  border-color: #ec4899;
}

.momo-stage-btn:active {
  transform: scale(0.93);
}

/* Stage Controls Row */
.momo-stage-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.momo-stage-dpad {
  display: flex;
  align-items: center;
  gap: 6px;
}

.momo-stage-dpad-btn {
  width: 60px;
  height: 46px;
  background: linear-gradient(135deg, #334155, #1e293b);
  border: 1.5px solid #64748b;
  border-radius: 12px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.1s ease;
}

.momo-stage-dpad-btn:active,
.momo-stage-dpad-btn.active {
  background: linear-gradient(135deg, #ec4899, #db2777);
  border-color: #f472b6;
  transform: scale(0.93);
}

.momo-stage-jump-btn {
  flex: 1;
  max-width: 180px;
  height: 46px;
  background: linear-gradient(135deg, #ec4899, #be185d);
  border: 1.5px solid #f472b6;
  border-radius: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(219, 39, 119, 0.5);
  transition: all 0.1s ease;
  text-transform: uppercase;
}

.momo-stage-jump-btn:active {
  transform: scale(0.93);
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.8);
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .momo-actor {
    width: 68px;
    height: 88px;
  }
  .momo-bubble {
    width: 250px;
    font-size: 11px;
    padding: 10px 12px;
  }
  .momo-controls-pill {
    padding: 3px 5px;
    gap: 3px;
  }
  .momo-ctrl-btn {
    padding: 3px 6px;
    font-size: 10px;
  }
  .momo-gamepad {
    bottom: 8px;
    padding: 8px 10px;
    border-radius: 16px;
  }
  .momo-dpad-btn {
    width: 50px;
    height: 44px;
    font-size: 16px;
  }
  .momo-jump-btn {
    height: 44px;
    font-size: 11px;
  }
  .momo-emote-btn {
    padding: 3px 5px;
    font-size: 9px;
  }
  .momo-arcade-dock {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 10px 12px 18px 12px;
  }
}

/* 16. Battle Mode HUD & Gamification Elements */
.momo-battle-hud {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 10;
  pointer-events: none;
}

.momo-battle-hud.hidden {
  display: none !important;
}

.momo-hp-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: 10px;
  padding: 4px 8px;
  min-width: 125px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.momo-hp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 900;
  color: #ffffff;
}

.momo-hp-bar-bg {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 3px;
}

.momo-hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ec4899, #10b981);
  border-radius: 9999px;
  transition: width 0.25s ease-out;
}

.momo-hp-bar-fill.villain {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* 17. Villain Actor in Stage */
.momo-stage-villain {
  position: absolute;
  bottom: 20px;
  right: 14px;
  width: 60px;
  height: 82px;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.6));
  transition: transform 0.1s ease-out, filter 0.1s ease;
  z-index: 4;
}

.momo-stage-villain.hidden {
  display: none !important;
}

.momo-stage-villain.hit {
  filter: brightness(2.6) saturate(2) drop-shadow(0 0 18px #ef4444);
  transform: translateX(6px) scale(0.96);
}

.momo-stage-villain.defeated {
  opacity: 0;
  transform: translateY(35px) scale(0.2) rotate(45deg);
  transition: all 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.momo-stage-villain img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* 18. Flying Heart / Magic Projectiles */
.momo-projectile {
  position: absolute;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 15;
  filter: drop-shadow(0 0 8px #f43f5e);
  transition: transform 0.22s linear;
}

.momo-damage-text {
  position: absolute;
  font-size: 13px;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 4px #000000, 0 0 8px #ef4444;
  pointer-events: none;
  z-index: 20;
  animation: momo-damage-float 0.8s ease-out forwards;
}

@keyframes momo-damage-float {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  50% { transform: translateY(-22px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-38px) scale(0.9); opacity: 0; }
}

/* 19. Arcade Attack / Power Button */
.momo-power-btn {
  flex: 1;
  max-width: 165px;
  height: 46px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border: 1.5px solid #fbbf24;
  border-radius: 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5), 0 0 10px rgba(245, 158, 11, 0.4);
  transition: all 0.1s ease;
  animation: momo-btn-pulse 1.8s infinite;
}

.momo-power-btn:active {
  transform: scale(0.93);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.9);
}

@keyframes momo-btn-pulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5); }
  50% { box-shadow: 0 4px 18px rgba(245, 158, 11, 0.8); }
}

/* 20. Victory Modal with Cute Message */
.momo-victory-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: momo-fade-in 0.25s ease;
}

.momo-victory-modal.hidden {
  display: none !important;
}

.momo-victory-card {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
  border: 3px solid #ec4899;
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(219, 39, 119, 0.4);
}

.momo-victory-couple-img {
  width: 110px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 12px auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 8px 16px rgba(219, 39, 119, 0.35));
}

