/* ═══════════════════════════════════════════════════════════════
   MiniMümin — Maskot "Nur" stilleri (v1.0)
   js/mascot.js kendi DOM'unu inject eder; bu dosya pozları çizer.
   Ekran yerleşimi: .on-home / .on-game / .on-result sınıflarıyla.
   ═══════════════════════════════════════════════════════════════ */

.mascot-wrap {
  position: fixed;
  width: 78px;
  height: 84px;
  z-index: 40;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity .3s ease, transform .3s ease;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.15));
}
.mascot-wrap.mascot-hidden,
.mascot-wrap.is-hidden-screen {
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
}

/* ── Ekran yerleşimi ── */
.mascot-wrap.on-home    { right: 12px;  bottom: calc(14px + var(--safe-bot)); width: 66px; height: 72px; }
.mascot-wrap.on-game    { right: 14px;  top: 84px; width: 64px; height: 70px; }
.mascot-wrap.on-result  { left: 50%;    bottom: calc(18px + var(--safe-bot)); width: 88px; height: 96px;
                          transform: translateX(-50%); }
.mascot-wrap.on-result.mascot-hidden { transform: translateX(-50%) translateY(16px); }

.nur-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.nur-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 8px rgba(0,0,0,.15)); user-select: none; }
.mascot-has-png .nur-svg { display: none !important; }

/* ── Parça transform origin'leri ── */
.nur-head     { transform-origin: 60px 58px; }
.nur-arm-l    { transform-origin: 50px 78px; }
.nur-arm-r    { transform-origin: 70px 78px; }
.nur-body,
.nur-legs     { transform-origin: 60px 120px; }

/* ════════ POZLAR ════════ */

/* IDLE — hafif nefes salınımı + göz kırpma */
.mascot-idle .nur-head,
.mascot-idle .nur-body { animation: nur-breathe 3.2s ease-in-out infinite; }
.mascot-idle .nur-eye  { animation: nur-blink 4.2s infinite; }

/* HAPPY — gülümseme + kol sallama */
.mascot-happy .nur-arm-r { animation: nur-wave 0.9s ease-in-out infinite; transform-origin: 70px 76px; }
.mascot-happy .nur-arm-l { transform: rotate(18deg); }
.mascot-happy .nur-body  { animation: nur-bounce-s 0.9s ease-in-out infinite; }
.mascot-happy .nur-mouth { d: path("M50 47 Q60 59 70 47"); }
.mascot-happy .nur-eye   { animation: nur-blink 4.2s infinite; }

/* THINK — el çeneye yakın, kafa hafif yana eğik, ağız küçük o */
.mascot-think .nur-head     { transform: rotate(-7deg) translateY(1px); }
.mascot-think .nur-arm-r    { transform: rotate(-48deg) translateY(-6px); }
.mascot-think .nur-mouth    { d: path("M54 50 Q60 47 66 50"); }
.mascot-think .nur-glasses  { transform-origin: 60px 37px; animation: nur-think-look 2.6s ease-in-out infinite; }

/* SAD — kafa öne düşük, ağız ters, kollar sarkık */
.mascot-sad .nur-head  { transform: translateY(3px) rotate(4deg); }
.mascot-sad .nur-mouth { d: path("M53 53 Q60 47 67 53"); }
.mascot-sad .nur-arm-l,
.mascot-sad .nur-arm-r { transform: rotate(6deg); }
.mascot-sad .nur-body  { transform: translateY(1px); }

/* DANCE — zıplama + iki kol havada */
.mascot-dance .nur-body  { animation: nur-dance-jump 0.55s ease-in-out infinite; }
.mascot-dance .nur-head  { animation: nur-dance-tilt 0.55s ease-in-out infinite; }
.mascot-dance .nur-arm-l { transform-origin: 50px 76px; animation: nur-dance-arm-l 0.55s ease-in-out infinite; }
.mascot-dance .nur-arm-r { transform-origin: 70px 76px; animation: nur-dance-arm-r 0.55s ease-in-out infinite; }
.mascot-dance .nur-mouth { d: path("M50 47 Q60 59 70 47"); }
.mascot-dance .nur-shadow { animation: nur-shadow-pulse 0.55s ease-in-out infinite; }

/* ════════ KEYFRAMES ════════ */
@keyframes nur-breathe {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(1.6px); }
}
@keyframes nur-blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96%           { transform: scaleY(0.12); }
}
.nur-eyes { transform-origin: 60px 38px; }
@keyframes nur-wave {
  0%, 100% { transform: rotate(150deg); }
  50%      { transform: rotate(195deg); }
}
@keyframes nur-bounce-s {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5px); }
}
@keyframes nur-think-look {
  0%, 100% { transform: translateX(1px); }
  50%      { transform: translateX(-2px); }
}
@keyframes nur-dance-jump {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-7px); }
}
@keyframes nur-dance-tilt {
  0%, 100% { transform: rotate(-5deg); }
  50%      { transform: rotate(5deg); }
}
@keyframes nur-dance-arm-l {
  0%, 100% { transform: rotate(-155deg); }
  50%      { transform: rotate(-120deg); }
}
@keyframes nur-dance-arm-r {
  0%, 100% { transform: rotate(155deg); }
  50%      { transform: rotate(120deg); }
}
@keyframes nur-shadow-pulse {
  0%, 100% { transform: scaleX(1);   opacity: .12; }
  40%      { transform: scaleX(.72); opacity: .07; }
}

/* ════════ KONUŞMA BALONU ════════ */
.mascot-bubble {
  position: absolute;
  bottom: calc(100% + 8px);
  right: -6px;
  max-width: 168px;
  background: #FFFFFF;
  color: #2D2D2D;
  font: 800 12.5px/1.35 'Nunito', 'Segoe UI', sans-serif;
  padding: 7px 11px;
  border-radius: 14px 14px 3px 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.16);
  white-space: normal;
  animation: bubble-in .18s ease-out;
}
.mascot-wrap.on-home .mascot-bubble { right: auto; left: -6px; border-radius: 14px 14px 14px 3px; }
.mascot-wrap.on-result .mascot-bubble { right: auto; left: 50%; transform: translateX(-50%); }
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(5px) scale(.94); }
  to   { opacity: 1; transform: translateY(0)   scale(1);  }
}

/* ════════ HAREKET AZLIĞI ════════ */
@media (prefers-reduced-motion: reduce) {
  .mascot-wrap *, .mascot-wrap { animation: none !important; transition: none !important; }
}
