/* Feed the Monsters — game-specific styles. Base UI: shared/css/game-base.css */

:root {
  --game-bg: linear-gradient(180deg, #fff9c4 0%, #fffde7 50%, #e0f2f1 100%);
  --game-ink: #2c3e50;
  --game-accent: #2e7d32;
}

.monsters-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.monsters-arena {
  flex: 1 1 55%;
  min-height: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.monster-card {
  flex: 1 1 0;
  max-width: 220px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 3px solid transparent;
  border-radius: 24px;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.2s ease;
}

.monster-card:focus-visible {
  outline: 4px solid var(--game-focus);
  outline-offset: 2px;
}

.awaiting-monster .monster-card {
  border-color: rgba(41, 182, 246, 0.5);
  border-style: dashed;
}

.monster-card.drop-target {
  background: rgba(255, 235, 59, 0.35);
  transform: scale(1.06);
}

.monster-svg-wrap {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
}

.monster-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

.monster-card.happy .monster-svg {
  animation: monster-happy 0.6s ease;
}

.monster-card.refuse .monster-svg {
  animation: monster-refuse 0.45s ease;
}

.monster-label {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #37474f;
  text-align: center;
  overflow-wrap: anywhere;
}

.items-tray-section {
  flex: 0 1 45%;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: #ffffff;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  overflow-y: auto;
}

.items-tray {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.food-item {
  position: relative;
  width: 76px;
  height: 76px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 3px solid #e0e0e0;
  border-radius: 20px;
  font: inherit;
  cursor: grab;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
  touch-action: none;
}

.food-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

.food-symbol {
  font-size: 0.8rem;
  line-height: 1;
  margin-top: 2px;
}

.food-item.selected {
  border-color: #0288d1;
  background: #e1f5fe;
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(2, 136, 209, 0.35);
}

.food-item.dragging {
  opacity: 0.9;
  cursor: grabbing;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  transition: none;
}

.food-item.eaten {
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}

@keyframes monster-happy {
  0% { transform: scale(1); }
  30% { transform: scale(1.18) translateY(-12px); }
  60% { transform: scale(0.95) translateY(4px); }
  100% { transform: scale(1) translateY(0); }
}

@keyframes monster-refuse {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px) rotate(-4deg); }
  50% { transform: translateX(10px) rotate(4deg); }
  75% { transform: translateX(-6px) rotate(-2deg); }
}

@media (max-width: 600px) {
  .monster-card {
    padding: 4px;
  }

  .monster-label {
    font-size: 0.85rem;
  }

  .food-item {
    width: 60px;
    height: 60px;
  }

  .food-emoji {
    font-size: 1.8rem;
  }
}

@media (max-height: 520px) {
  .monster-svg-wrap {
    max-width: 90px;
  }
}
