/* 达妮娅桌宠 */
#sxg-pet {
  position: fixed;
  right: 26px;
  bottom: 168px;
  z-index: 9998;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  user-select: none;
}

.sxg-pet-body {
  cursor: pointer;
  transition: transform .15s ease;
  filter: drop-shadow(0 8px 18px rgba(80, 40, 120, .35));
}

.sxg-pet-body:hover { transform: translateY(-4px) scale(1.03); }

.sxg-pet-body.poked { animation: sxgPetPoke .6s ease; }

@keyframes sxgPetPoke {
  0%   { transform: translateY(0) rotate(0); }
  20%  { transform: translateY(-18px) rotate(-6deg); }
  45%  { transform: translateY(0) rotate(5deg); }
  70%  { transform: translateY(-8px) rotate(-3deg); }
  100% { transform: translateY(0) rotate(0); }
}

.sxg-pet-img {
  width: 150px;
  height: auto;
  display: block;
  pointer-events: none;
}

.sxg-pet-bubble {
  max-width: 190px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, .96);
  color: #4a3a63;
  border: 1px solid rgba(120, 90, 180, .22);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 6px 18px rgba(60, 40, 110, .18);
  position: relative;
  animation: sxgPetBubble .25s ease;
  word-break: break-word;
}

.sxg-pet-bubble::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: inherit;
  border-right: 1px solid rgba(120, 90, 180, .22);
  border-bottom: 1px solid rgba(120, 90, 180, .22);
  transform: rotate(45deg);
}

@keyframes sxgPetBubble {
  from { opacity: 0; transform: translateY(6px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sxg-pet-chat-btn {
  margin-top: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #5e72e4;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(94, 114, 228, .4);
  transition: transform .15s ease;
}

.sxg-pet-chat-btn:hover { transform: scale(1.1); }

/* 聊天面板 */
#sxg-pet-panel {
  position: fixed;
  right: 190px;
  bottom: 168px;
  z-index: 9999;
  width: 300px;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(120, 90, 180, .18);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(60, 40, 110, .22);
  overflow: hidden;
  font-size: 13px;
}

.sxg-pet-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #7b61c9, #a98bea);
  color: #fff;
  font-weight: 600;
}

.sxg-pet-panel-head img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.sxg-pet-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}

.sxg-pet-log {
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
  max-height: 300px;
}

.sxg-pet-msg { margin-bottom: 8px; line-height: 1.5; }
.sxg-pet-msg.me { text-align: right; color: #5e72e4; }
.sxg-pet-msg.her { color: #4a3a63; }
.sxg-pet-msg.sys { color: #b0a9c4; font-size: 12px; }

.sxg-pet-form {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  border-top: 1px solid rgba(120, 90, 180, .14);
}

.sxg-pet-form input {
  flex: 1;
  border: 1px solid rgba(120, 90, 180, .25);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.sxg-pet-form button {
  border: none;
  background: #5e72e4;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

@media (max-width: 900px) {
  #sxg-pet { width: 104px; right: 8px; bottom: 78px; }
  .sxg-pet-img { width: 104px; }
  #sxg-pet-panel { right: 8px; bottom: 78px; width: calc(100vw - 24px); }
}

/* 带路导航条 */
.sxg-pet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(120, 90, 180, .14);
  max-height: 92px;
  overflow-y: auto;
}

.sxg-pet-nav-item {
  font-size: 12px;
  color: #6b4fa8;
  background: rgba(123, 97, 201, .1);
  border: 1px solid rgba(123, 97, 201, .18);
  border-radius: 999px;
  padding: 3px 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}

.sxg-pet-nav-item:hover {
  background: #7b61c9;
  color: #fff;
}