/* Baby Animals styles */

:root {
  --meadow-bg: linear-gradient(180deg, #dbeafe 0%, #bae6fd 45%, #86efac 45%, #4ade80 100%);
  --choice-bg: radial-gradient(circle at 50% 30%, #ffffff 0%, #fef3c7 75%, #fde68a 100%);
  --choice-border: #d97706;
}

.animal-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0.5rem 1rem 1rem;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
}

/* Progress Stars Bar */
.progress-bar {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
}

.prog-star {
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.prog-star.completed {
  transform: scale(1.2);
  filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.45));
}

/* Family Pair Banner */
.family-banner {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  border: 3px solid #f59e0b;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #78350f;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  animation: banner-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
}

@keyframes banner-pop {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Reunion Meadow Stage */
.meadow-stage {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 220px;
  border-radius: 1.5rem;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  background: var(--meadow-bg);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.reunion-area {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  padding-bottom: 16px;
}

/* Baby Card */
.baby-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 3px solid #f59e0b;
  border-radius: 1.25rem;
  padding: 0.6rem 0.85rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.baby-card:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.baby-card.celebrating {
  transform: scale(1.08);
}

.baby-card.baby-bounce {
  animation: baby-jump 0.35s ease-in-out;
}

@keyframes baby-jump {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.08); }
}

.baby-icon {
  font-size: 3.6rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
  animation: baby-breathe 2.5s ease-in-out infinite alternate;
}

@keyframes baby-breathe {
  0% { transform: scale(0.98); }
  100% { transform: scale(1.04); }
}

.baby-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #78350f;
  margin-top: 0.3rem;
}

.baby-bubble {
  position: absolute;
  top: -16px;
  right: -14px;
  font-size: 1.5rem;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  animation: bubble-float 1.8s ease-in-out infinite alternate;
}

@keyframes bubble-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

/* Mother Card in Stage */
.mother-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border: 3px solid #10b981;
  border-radius: 1.25rem;
  padding: 0.6rem 0.85rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
  animation: mother-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mother-slide-in {
  0% { transform: translateX(40px) scale(0.8); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

.mother-icon {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
}

.mother-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: #15803d;
  margin-top: 0.3rem;
}

/* Heart layer when hugging */
.hug-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.float-heart {
  position: absolute;
  font-size: 1.8rem;
  animation: heart-up 1.6s ease-out forwards;
}

@keyframes heart-up {
  0% { transform: translateY(0) scale(0.6); opacity: 1; }
  100% { transform: translateY(-80px) scale(1.4); opacity: 0; }
}

/* Choices Section */
.choices-section {
  width: 100%;
  max-width: 520px;
}

.choices-rack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.mother-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.35rem;
  background: var(--choice-bg);
  border: 3px solid var(--choice-border);
  border-radius: 1.25rem;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.16);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease, opacity 0.2s ease;
  min-height: 110px;
}

@media (hover: hover) {
  .mother-choice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(180, 83, 9, 0.24);
  }
}

.mother-choice-btn:active {
  transform: translateY(1px) scale(0.96);
}

.mother-choice-btn:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.mother-choice-btn:disabled {
  cursor: default;
}

.mother-choice-btn.correct {
  border-color: #10b981;
  background: radial-gradient(circle at 50% 30%, #ffffff 0%, #d1fae5 75%, #a7f3d0 100%);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4), 0 6px 16px rgba(16, 185, 129, 0.3);
  transform: scale(1.04);
}

.mother-choice-btn.dimmed {
  opacity: 0.5;
  transform: scale(0.96);
}

.mother-choice-btn.wobble {
  animation: gentle-wobble 0.4s ease-in-out;
  border-color: #ef4444;
}

@keyframes gentle-wobble {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.choice-icon {
  font-size: 3.2rem;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.choice-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: #78350f;
  margin-top: 0.35rem;
  pointer-events: none;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}

/* Action Controls Bar */
.action-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  min-height: 48px;
}

.action-pill-btn {
  padding: 0.65rem 1.6rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: pop-btn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .action-pill-btn:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
  }
}

.action-pill-btn:active {
  transform: translateY(1px) scale(0.98);
}

.action-pill-btn:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

.again-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

@keyframes pop-btn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Sparks & Confetti */
.sparks-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: burst 0.85s ease-out forwards;
}

@keyframes burst {
  0% { transform: translate(0, 0) scale(0.5); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(1.35); opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .meadow-stage {
    height: 185px;
  }
  .baby-icon { font-size: 2.8rem; }
  .mother-icon { font-size: 3rem; }
  .choice-icon { font-size: 2.5rem; }
  .choice-name { font-size: 0.8rem; }
  .mother-choice-btn {
    min-height: 90px;
    padding: 0.7rem 0.2rem;
  }
}

@media (max-width: 360px) {
  .animal-field {
    padding: 0.4rem 0.5rem 0.75rem;
  }
  .meadow-stage {
    height: 165px;
  }
  .reunion-area {
    gap: 0.75rem;
    padding-bottom: 10px;
  }
  .baby-card, .mother-card {
    padding: 0.4rem 0.5rem;
  }
  .baby-icon { font-size: 2.3rem; }
  .mother-icon { font-size: 2.5rem; }
  .choice-icon { font-size: 2.1rem; }
  .choices-rack {
    gap: 0.4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .baby-icon,
  .baby-bubble,
  .baby-card,
  .baby-card.baby-bounce,
  .mother-card,
  .prog-star,
  .family-banner,
  .float-heart,
  .sparkle,
  .action-pill-btn,
  .mother-choice-btn.wobble {
    animation: none !important;
    transition: none !important;
  }
}
