/* === 🦞 Pet Widget — Fishbowl + Panel === */

.pet-fishbowl {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  cursor: pointer;
  transition: transform 0.3s;
  width: 100px;
}
.pet-fishbowl:hover { transform: scale(1.08); }

.pet-bowl {
  width: 100px;
  height: 80px;
  background: linear-gradient(180deg, rgba(173,216,230,0.25) 0%, rgba(100,180,220,0.45) 100%);
  border-radius: 0 0 44px 44px;
  border: 2px solid rgba(100,180,220,0.35);
  position: relative;
  overflow: hidden;
}

.pet-bowl::before {
  content: '';
  position: absolute;
  top: 6px; left: -15px; right: -15px;
  height: 4px;
  background: rgba(255,255,255,0.35);
  border-radius: 50%;
  animation: petWave 3s ease-in-out infinite;
}
@keyframes petWave { 0%,100% { transform: translateX(-4px); } 50% { transform: translateX(4px); } }

.pet-bubble {
  position: absolute;
  width: 5px; height: 5px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  animation: petBubble 4s ease-in-out infinite;
}
@keyframes petBubble { 0% { transform: translateY(0); opacity: 0.5; } 100% { transform: translateY(-60px); opacity: 0; } }

.pet-lobster {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: petSwim 4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes petSwim {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  25% { transform: translateX(-40%) translateY(-4px) rotate(-3deg); }
  75% { transform: translateX(-60%) translateY(-2px) rotate(3deg); }
}

.pet-xp-bar {
  width: 80px;
  height: 3px;
  background: #e0e0e0;
  border-radius: 2px;
  margin: 4px auto 0;
  overflow: hidden;
}
.pet-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff6b35, #ff4e45);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s;
}

.pet-level-text {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #004e98;
  margin-top: 2px;
}

/* === Panel (C-style iOS Widget) === */
.pet-panel {
  position: fixed;
  bottom: 130px;
  right: 20px;
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.14);
  z-index: 901;
  width: 260px;
  display: none;
  animation: petPanelIn 0.2s ease;
}
.pet-panel.show { display: block; }
@keyframes petPanelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.pet-panel-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.pet-panel-avatar {
  width: 40px; height: 40px;
  background: #fdf2f8;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.pet-panel-name { font-weight: 700; font-size: 15px; }
.pet-panel-sub { font-size: 11px; color: #999; }

.pet-panel-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.pet-panel-stat {
  text-align: center;
  background: #f0f4ff;
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 10px;
  color: #888;
}
.pet-panel-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: #004e98;
  display: block;
}

.pet-panel-badges {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pet-panel-badges::-webkit-scrollbar { display: none; }

.pet-badge {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: #f5f5f5;
}
.pet-badge.earned { background: #fef3c7; }
.pet-badge.locked { filter: grayscale(1) opacity(0.2); }

.pet-panel-tip {
  background: #f0f4ff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  border-left: 3px solid #004e98;
}

/* Mobile */
@media (max-width: 640px) {
  .pet-fishbowl { bottom: 12px; right: 12px; width: 80px; }
  .pet-bowl { width: 80px; height: 64px; }
  .pet-panel { right: 12px; bottom: 110px; width: 240px; }
}
