/* ========== Q版卡通猫咪角色（带表情变化） ========== */

/* 首页大猫咪 */
.real-cat {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 220px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.real-cat:hover {
  transform: translateX(-50%) scale(1.03);
}

.real-cat.tapped {
  animation: catWiggle 0.5s ease-in-out;
}

@keyframes catWiggle {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  25% { transform: translateX(-50%) rotate(-4deg); }
  75% { transform: translateX(-50%) rotate(4deg); }
}

.real-cat.bounce {
  animation: catBounce 2s ease-in-out infinite;
}

@keyframes catBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.real-cat img {
  width: 180px;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.25));
  pointer-events: none;
}

.real-cat .cat-shadow {
  width: 140px;
  height: 18px;
  background: rgba(0,0,0,0.14);
  border-radius: 50%;
  margin-top: -6px;
  animation: shadowScale 2s ease-in-out infinite;
}

@keyframes shadowScale {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.85); }
}

/* 猫咪对话气泡 */
.cat-speech-bubble {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 10px 16px;
  border-radius: 18px 18px 18px 4px;
  font-size: 14px;
  color: #5D4037;
  font-weight: bold;
  box-shadow: 0 3px 15px rgba(0,0,0,0.15);
  border: 2px solid #FFB74D;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 16;
}

.real-cat:hover .cat-speech-bubble,
.real-cat.show-bubble .cat-speech-bubble {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* 小猫咪助手（学习/游戏页） */
.helper-cat {
  position: absolute;
  bottom: 110px;
  left: 25px;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.cat-bubble {
  background: white;
  padding: 12px 18px;
  border-radius: 18px 18px 18px 4px;
  font-size: 14px;
  color: #5D4037;
  font-weight: bold;
  box-shadow: 0 3px 15px rgba(0,0,0,0.15);
  border: 2px solid #FFB74D;
  max-width: 220px;
  position: relative;
  animation: bubbleBounce 2s ease-in-out infinite;
}

@keyframes bubbleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.mini-cat {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 
    0 6px 0 #e0e0e0,
    0 10px 20px rgba(0,0,0,0.2);
  background: #f5f5f5;
  flex-shrink: 0;
  animation: miniCatBounce 1.8s ease-in-out infinite;
  border: 3px solid white;
}

.mini-cat img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15));
}

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

/* 表情状态 */
.mini-cat.happy { animation: miniCatHappy 0.6s ease-in-out; }
.mini-cat.thinking { animation: miniCatThink 1s ease-in-out; }
.mini-cat.surprised { animation: miniCatSurprise 0.5s ease-in-out; }
.mini-cat.blink { animation: miniCatBlink 0.4s ease-in-out; }

@keyframes miniCatHappy {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) rotate(-4deg); }
}

@keyframes miniCatThink {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-3px) rotate(-2deg); }
  75% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes miniCatSurprise {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes miniCatBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
