/* Crie um arquivo chamado mascote.css */

/* Painel de Status */
.pet-status-panel {
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.status-icon { font-size: 1.4rem; }
.status-bar-bg {
  flex: 1;
  background: #eee;
  height: 18px;
  border-radius: 9px;
  overflow: hidden;
}
.status-bar-fill {
  height: 100%;
  border-radius: 9px;
  transition: width 0.4s ease, background-color 0.3s;
}
.status-value {
  font-size: 0.9rem;
  font-weight: 900;
  min-width: 40px;
  text-align: right;
}
.fill-green  { background: #4CAF7D; }
.fill-purple { background: #9B72CF; }
.fill-yellow { background: #F5C842; }
.fill-red    { background: #ff5f5f !important; } /* Alerta de necessidade crítica */

/* Ambiente do Mascote */
.mascot-display-zone {
  position: relative;
  background: #fff;
  border: 4px solid var(--text-dark);
  border-radius: 24px;
  height: 28px;
  height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: background 0.5s;
}
.mascot-render {
  height: 160px;
  width: auto;
  object-fit: contain;
  z-index: 5;
  transition: transform 0.2s;
}

/* Balão de Fala */
.mascot-speech-bubble {
  position: absolute;
  top: 20px;
  background: var(--blue-light);
  color: var(--blue);
  padding: 8px 16px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  z-index: 10;
}
.mascot-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: var(--blue-light) transparent;
}

/* Efeito Dormir (Luz Apagada) */
.sleep-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
  z-index: 4;
}
.mascot-display-zone.lights-out {
  background: #111122;
}
.mascot-display-zone.lights-out .sleep-overlay {
  opacity: 1;
}

/* Grelha de Ações */
.pet-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.btn-pet-action {
  border: none;
  border-radius: 18px;
  padding: 14px 8px;
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: transform 0.1s;
}
.btn-pet-action:active { transform: scale(0.95); }
.btn-pet-action.card-purple { color: #fff; }

/* Animações de Interação */
@keyframes petEat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15) translateY(-10px); }
}
@keyframes petPlay {
  0% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-20px) rotate(-5deg); }
  75% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
@keyframes petFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-eat { animation: petEat 0.4s ease 3; }
.anim-play { animation: petPlay 0.5s ease 2; }
.anim-sleep { animation: petFloat 2s ease-in-out infinite; }

/* ==============================
   INTERAÇÃO DE ARRASTAR (DRAG)
============================== */
.food-tray {
  text-align: center;
  background: var(--bg);
  border: 3px dashed var(--blue-light);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 20px;
}

.tray-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.draggable-item {
  font-size: 3rem;
  display: inline-block;
  cursor: grab;
  touch-action: none; /* Impede que a tela role quando a criança tenta arrastar a maçã */
  user-select: none;
  transition: transform 0.1s;
  z-index: 100; /* Garante que passe por cima de tudo */
}

.draggable-item:active {
  cursor: grabbing;
  transform: scale(1.2); /* A maçã cresce um pouquinho quando segura */
}
/* =========================================
   ANIMAÇÕES DO BLUE (CONECTADAS AO SEU JS)
========================================= */

/* 1. Animação de Comer (Pula e cresce um pouco) */
@keyframes animEat {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.15) translateY(-15px); }
}

/* 2. Animação de Brincar (Balança para os lados) */
@keyframes animPlay {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  25% { transform: rotate(-10deg) translateY(-20px); }
  75% { transform: rotate(10deg) translateY(-20px); }
}

/* 3. Animação de Dormir (Flutua respirando) */
@keyframes animSleep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Conectando com as classes do seu script.js */
.anim-eat { 
  animation: animEat 0.4s ease 3; /* Repete 3 vezes rápido */
}

.anim-play { 
  animation: animPlay 0.5s ease 2; /* Repete 2 vezes */
}

.anim-sleep { 
  animation: animSleep 2.5s ease-in-out infinite; /* Flutua para sempre até acordar */
  filter: brightness(0.6); /* Deixa o Blue um pouco mais escuro para simular o sono */
}