/* 小猫咪看板娘样式 */

#cat-mascot {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 9998;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#cat-mascot:active {
  cursor: grabbing;
}

#cat-mascot.hidden {
  opacity: 0;
  pointer-events: none;
}

#cat-mascot .cat-body {
  position: relative;
  width: 100px;
  height: 100px;
  animation: cat-breathe 3s ease-in-out infinite;
}

#cat-mascot .cat-body {
  position: relative;
  width: 100px;
  height: 100px;
  animation: cat-breathe 3s ease-in-out infinite;
  background: transparent !important;
}

#cat-mascot .cat-body img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  /* 将黑色线条反转为白色，screen混合模式去除黑底 */
  filter: invert(1);
  mix-blend-mode: screen;
}

#cat-mascot .cat-body img:hover {
  transform: scale(1.08);
}

/* 猫晃动动画 */
@keyframes cat-breathe {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-3px) rotate(-1deg); }
  75% { transform: translateY(1px) rotate(1deg); }
}

/* 弹跳入场 */
.cat-enter {
  animation: cat-enter 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) both;
}

@keyframes cat-enter {
  0% {
    opacity: 0;
    transform: scale(0) translateY(100px);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translateY(-10px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

/* 说话气泡 */
.cat-speech-bubble {
  position: absolute;
  top: -50px;
  right: 60px;
  background: white;
  border: 2px solid #333;
  border-radius: 16px;
  padding: 10px 16px;
  font-size: 13px;
  color: #333;
  max-width: 180px;
  min-width: 60px;
  text-align: center;
  font-family: 'Microsoft YaHei', sans-serif;
  line-height: 1.5;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(10px) scale(0.9);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  pointer-events: none;
  white-space: nowrap;
}

.cat-speech-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 气泡三角 */
.cat-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid white;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.05));
}

.cat-speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -13px;
  right: 19px;
  width: 0;
  height: 0;
  border-left: 11px solid transparent;
  border-right: 11px solid transparent;
  border-top: 11px solid #333;
  z-index: -1;
}

/* 菜单 */
.cat-menu {
  position: absolute;
  bottom: 110px;
  right: 0;
  background: white;
  border: 1.5px solid #ddd;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  min-width: 120px;
}

.cat-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cat-menu .cat-menu-item {
  padding: 8px 18px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
  font-family: 'Microsoft YaHei', sans-serif;
  white-space: nowrap;
}

.cat-menu .cat-menu-item:hover {
  background: #f5f5f5;
  color: #222;
}

.cat-menu .cat-menu-item i {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
  #cat-mascot {
    bottom: 60px;
    right: 10px;
  }
  #cat-mascot .cat-body {
    width: 75px;
    height: 75px;
  }
  .cat-speech-bubble {
    font-size: 12px;
    padding: 8px 12px;
    right: 50px;
  }
}
