/**
 * Estilos do Sistema de Alimentação Interativa
 */

.feeding-game-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-out;
}

.feeding-game-content {
  position: relative;
  width: 90%;
  max-width: 500px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.feeding-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.feeding-close-btn:hover {
  background: rgba(0, 0, 0, 0.2);
  transform: rotate(90deg);
  color: #333;
}

.feeding-header {
  text-align: center;
  margin-bottom: 2rem;
}

.feeding-header h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #ff8ce0, #7a83ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titlePulse 2s ease-in-out infinite;
}

.feeding-header p {
  margin: 0;
  color: #666;
  font-size: 1rem;
}

.feeding-area {
  position: relative;
  height: 400px;
  background: linear-gradient(180deg, #e3f2fd 0%, #f5f5f5 100%);
  border-radius: 20px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Alvo da boca */
.feeding-mouth-target {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 182, 193, 0.3), transparent 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseTarget 2s ease-in-out infinite;
}

@keyframes pulseTarget {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 1;
  }
}

.mouth-indicator {
  font-size: 64px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  transition: all 0.3s ease;
}

.mouth-indicator.chewing {
  animation: chewAnimation 0.5s ease-in-out;
}

@keyframes chewAnimation {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.2) rotate(-5deg);
  }
  50% {
    transform: scale(0.9) rotate(5deg);
  }
  75% {
    transform: scale(1.1) rotate(-3deg);
  }
}

/* Comida arrastável */
.feeding-food {
  position: absolute;
  left: 50%;
  bottom: 50px;
  transform: translate(-50%, 0);
  width: 80px;
  height: 80px;
  cursor: grab;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 5;
}

.feeding-food:hover {
  transform: translate(-50%, -10px) scale(1.1);
}

.feeding-food.dragging {
  cursor: grabbing;
  transform: translate(-50%, -50%) rotate(5deg) scale(1.2);
  transition: none;
  z-index: 10;
}

.food-icon {
  font-size: 64px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
  animation: foodFloat 2s ease-in-out infinite;
}

@keyframes foodFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

.feeding-food.dragging .food-icon {
  animation: foodRotate 0.5s linear infinite;
}

@keyframes foodRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Dica de arrasto */
.feeding-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  animation: hintBounce 1.5s ease-in-out infinite;
}

.feeding-hint p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #7a83ff;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(122, 131, 255, 0.3);
}

@keyframes hintBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
    opacity: 0.7;
  }
}

/* Info da comida */
.feeding-info {
  text-align: center;
  padding: 1rem;
  background: rgba(122, 131, 255, 0.1);
  border-radius: 12px;
  margin-top: 1rem;
}

.feeding-info strong {
  font-size: 1.1rem;
  color: #7a83ff;
  text-transform: capitalize;
}

/* Mensagem de sucesso */
.feeding-success {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: successAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes successAppear {
  from {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.feeding-success-content {
  text-align: center;
  animation: successPulse 1s ease-in-out infinite;
}

.feeding-success-content h2 {
  font-size: 3rem;
  margin: 0 0 1rem 0;
  animation: emojiJump 0.6s ease-in-out;
}

@keyframes emojiJump {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-30px) scale(1.3);
  }
}

.feeding-success-content p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #ff8ce0, #7a83ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Reações do Pukito */
.pukito-character.reaction-love {
  animation: reactionLove 1.5s ease-in-out;
}

.pukito-character.reaction-happy {
  animation: reactionHappy 1.5s ease-in-out;
}

.pukito-character.reaction-satisfied {
  animation: reactionSatisfied 1s ease-in-out;
}

.pukito-character.reaction-neutral {
  animation: reactionNeutral 0.8s ease-in-out;
}

@keyframes reactionLove {
  0%, 100% {
    transform: scale(1);
  }
  20%, 40% {
    transform: scale(1.15) rotate(-5deg);
  }
  30%, 50% {
    transform: scale(1.15) rotate(5deg);
  }
  60% {
    transform: scale(1.2);
  }
}

@keyframes reactionHappy {
  0%, 100% {
    transform: scale(1) translateY(0);
  }
  30% {
    transform: scale(1.1) translateY(-20px);
  }
  50% {
    transform: scale(1.05) translateY(-10px);
  }
  70% {
    transform: scale(1.1) translateY(-20px);
  }
}

@keyframes reactionSatisfied {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes reactionNeutral {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .feeding-game-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  .feeding-header h2 {
    font-size: 1.5rem;
  }
  
  .feeding-area {
    height: 350px;
  }
  
  .feeding-mouth-target {
    width: 100px;
    height: 100px;
  }
  
  .mouth-indicator {
    font-size: 48px;
  }
  
  .feeding-food {
    width: 70px;
    height: 70px;
  }
  
  .food-icon {
    font-size: 56px;
  }
  
  .feeding-success-content h2 {
    font-size: 2rem;
  }
  
  .feeding-success-content p {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .feeding-header h2 {
    font-size: 1.3rem;
  }
  
  .feeding-header p {
    font-size: 0.9rem;
  }
  
  .feeding-area {
    height: 300px;
  }
  
  .feeding-mouth-target {
    width: 80px;
    height: 80px;
  }
  
  .mouth-indicator {
    font-size: 40px;
  }
  
  .feeding-food {
    width: 60px;
    height: 60px;
    bottom: 40px;
  }
  
  .food-icon {
    font-size: 48px;
  }
}
