/* ═══════════════════════════════════════
   MASCOT (FOXY / DUO-STYLE)
═══════════════════════════════════════ */
.mascot-container {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  right: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: max-content;
  height: max-content;
  pointer-events: none;
}

/* Home already shows the full-body Foxy hero — hide the floating mascot
   there so the child sees one consistent Foxy, not two different crops. */
body[data-sec="home"] .mascot-container { display: none; }

.mascot-btn {
  background: linear-gradient(135deg, #7c5bf8, #4936e8);
  border: none;
  width: clamp(52px, 11vw, 64px);
  height: clamp(52px, 11vw, 64px);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(73,54,232,0.45), 0 2px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  pointer-events: auto;
  transform-origin: bottom center;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* idle animation managed by GSAP */
}
/* image inside fills the circle */
.mascot-btn img.fox-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.mascot-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.mascot-btn:active {
  transform: scale(0.88) !important;
}

.mascot-tooltip {
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 16px 16px 0 16px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  transition: all 0.3s var(--spring);
  transform-origin: bottom right;
  border: 2px solid var(--primary);
  pointer-events: none;
  max-width: 260px;
  min-width: 120px;
  text-align: center;
  direction: rtl;
  position: relative;
  line-height: 1.4;
}

.mascot-tooltip::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-bottom: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  transform: rotate(45deg);
}

.mascot-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes mascotBounce {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-16px) scale(1.05);
  }
}

@keyframes mascotShake {
  0%, 100% { transform: rotate(0deg); }
  20%       { transform: rotate(-12deg) translateX(-3px); }
  40%       { transform: rotate(12deg)  translateX(3px); }
  60%       { transform: rotate(-8deg)  translateX(-2px); }
  80%       { transform: rotate(8deg)   translateX(2px); }
}

/* Idle breathing — gentle float + tiny tilt */
@keyframes foxyBreath {
  0%, 100% { transform: translateY(0)    scale(1)    rotate(-0.8deg); }
  35%       { transform: translateY(-5px) scale(1.04) rotate(0.8deg); }
  65%       { transform: translateY(-3px) scale(1.02) rotate(0deg); }
}

/* Gold glow burst on success */
@keyframes mascotGlow {
  0%, 100% { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2)); }
  50%       { filter: drop-shadow(0 0 22px rgba(255,200,0,0.95))
                      drop-shadow(0 0 8px rgba(255,100,0,0.55)); }
}

/* Party spin — level up / badge */
@keyframes mascotExcited {
  0%   { transform: scale(1)    rotate(0deg); }
  18%  { transform: scale(1.38) rotate(-22deg); }
  36%  { transform: scale(1.38) rotate(22deg); }
  54%  { transform: scale(1.38) rotate(-16deg); }
  72%  { transform: scale(1.18) rotate(10deg); }
  88%  { transform: scale(1.06) rotate(-5deg); }
  100% { transform: scale(1)    rotate(0deg); }
}

/* Thinking tilt — used for hints */
@keyframes mascotThink {
  0%, 100% { transform: rotate(0deg)    translateY(0); }
  28%       { transform: rotate(-11deg) translateY(-4px); }
  72%       { transform: rotate(11deg)  translateY(-4px); }
}

/* Greeting wave */
@keyframes mascotWave {
  0%   { transform: rotate(0deg); }
  18%  { transform: rotate(-22deg) scale(1.1); }
  40%  { transform: rotate(22deg)  scale(1.1); }
  60%  { transform: rotate(-16deg) scale(1.05); }
  80%  { transform: rotate(16deg)  scale(1.05); }
  100% { transform: rotate(0deg); }
}

/* ════ FEED FOXY ════ */
.foxy-pet-area {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  transition: transform 0.3s;
}
.foxy-pet-area.eating {
  animation: foxyEat 0.8s ease;
}
.foxy-pet-area.playing {
  animation: foxyPlay 1s ease infinite;
}
@keyframes foxyEat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
@keyframes foxyPlay {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(10deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-10px) rotate(-10deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
.foxy-pet-status {
  text-align: center;
  font-family: 'Sora', sans-serif;
  color: var(--text-mid);
  font-weight: 700;
  font-size: 14px;
}

