/* ===== Mascot Styles — น้องพูลโต ===== */

.mascot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: -8px;
  position: relative;
  height: 160px;
  overflow: visible;
}

.mascot-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.08));
  position: absolute;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.mascot-img.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* Idle — gentle floating animation */
.mascot-img.mascot-idle.active {
  animation: mascotFloat 3s ease-in-out infinite;
}

/* Cry — shake animation */
.mascot-img.mascot-cry.active {
  animation: mascotShake 0.5s ease-in-out 3;
}

/* Happy — bounce animation */
.mascot-img.mascot-happy.active {
  animation: mascotBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 3;
}

/* Watch — gentle tilt */
.mascot-img.mascot-watch.active {
  animation: mascotTilt 2s ease-in-out infinite;
}

/* Peek — peek from side */
.mascot-img.mascot-peek.active {
  animation: mascotPeek 0.4s ease-out forwards;
}

/* Wave — wave animation */
.mascot-img.mascot-wave.active {
  animation: mascotWave 1s ease-in-out 2;
}

/* Speech bubble */
.mascot-speech {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 2px solid #e0d5c7;
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 12px;
  color: #5d4037;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 10;
}

.mascot-speech.show {
  opacity: 1;
}

.mascot-speech::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #e0d5c7;
}

.mascot-speech::after {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
}

/* ===== Animations ===== */

@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1); }
}

@keyframes mascotShake {
  0%, 100% { transform: translateX(0) scale(1); }
  20% { transform: translateX(-6px) scale(1); }
  40% { transform: translateX(6px) scale(1); }
  60% { transform: translateX(-4px) scale(1); }
  80% { transform: translateX(4px) scale(1); }
}

@keyframes mascotBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2) rotate(-5deg); }
  50% { transform: scale(0.95); }
  70% { transform: scale(1.1) rotate(3deg); }
  100% { transform: scale(1); }
}

@keyframes mascotTilt {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-3deg) scale(1); }
  75% { transform: rotate(3deg) scale(1); }
}

@keyframes mascotPeek {
  0% { transform: scale(0.7) translateY(20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes mascotWave {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-10deg) scale(1.05); }
  75% { transform: rotate(10deg) scale(1.05); }
}

/* ===== Auth Card adjustment ===== */
.auth-card-with-mascot .auth-header {
  padding-top: 0;
}

/* Responsive */
@media (max-width: 480px) {
  .mascot-container {
    height: 130px;
  }
  .mascot-img {
    width: 120px;
    height: 120px;
  }
}
