/* ==========================================================================
   왕립 마법 동물 농장 (Royal Pet Farm) - Minigame CSS
   ========================================================================== */

/* 미니게임 전체 모달 */
.minigame-modal-card {
  max-width: 500px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
}

/* 미니게임 목록 화면 */
.mg-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px dashed #fbcfe8;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.mg-list-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mg-list-card {
  background: #ffffff;
  border: 2px solid #f1f5f9;
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.mg-list-card:hover {
  border-color: #f472b6;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 114, 182, 0.15);
}

.mg-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mg-card-icon {
  font-size: 32px;
  width: 48px;
  height: 48px;
  background: #fdf2f8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mg-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
}

.mg-card-desc {
  font-size: 12px;
  color: #64748b;
}

.mg-card-badge {
  font-size: 11px;
  font-weight: 800;
  color: #db2777;
  background: #fce7f3;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==========================================================================
   미니게임 내부 래퍼 & 홀짝 게임 스타일
   ========================================================================== */
.mg-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mg-header {
  text-align: center;
}

.mg-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 700;
  color: #db2777;
}

.mg-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

/* 캐릭터 & 말풍선 스테이지 */
.mg-character-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fefce8;
  border: 2px solid #fef08a;
  border-radius: 20px;
  padding: 16px;
}

.mg-char-avatar {
  font-size: 54px;
  animation: bounceChar 2s infinite ease-in-out;
}

@keyframes bounceChar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.mg-hands-box {
  display: flex;
  gap: 16px;
  font-size: 48px;
  transition: transform 0.1s;
}

.mg-hands-box.shaking {
  animation: handShake 0.15s infinite;
}

@keyframes handShake {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-4px, -4px) rotate(-6deg); }
  50% { transform: translate(4px, 4px) rotate(6deg); }
  75% { transform: translate(-4px, 4px) rotate(-6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

.mg-speech-bubble {
  background: #ffffff;
  border: 1px solid #fde047;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: #713f12;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  max-width: 90%;
}

/* 난이도 선택 버튼 카드 */
.mg-diff-select-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mg-diff-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.mg-diff-btn:hover {
  border-color: #fbcfe8;
  background: #fffdfc;
}

.mg-diff-btn.selected {
  border-color: #ec4899;
  background: #fdf2f8;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
}

.mg-diff-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mg-diff-badge {
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.mg-diff-reward {
  font-size: 13px;
  color: #d97706;
}

.mg-diff-desc {
  font-size: 11px;
  color: #64748b;
}

/* 인게임 상태 바 */
.mg-status-bar {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.mg-status-chip {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-align: center;
}

.mg-status-chip.reward {
  background: #fef3c7;
  border-color: #fde047;
  color: #b45309;
}

.mg-next-reward-banner {
  background: #fffbeb;
  border: 1px solid #fde047;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  text-align: center;
}

/* 홀 / 짝 선택 버튼 2열 */
.mg-choice-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mg-choice-btn {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mg-choice-btn:active {
  transform: scale(0.95);
}

.mg-choice-btn.odd {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

.mg-choice-btn.odd:hover {
  background: #dcfce7;
  border-color: #34d399;
}

.mg-choice-btn.even {
  border-color: #fed7aa;
  background: #fff7ed;
}

.mg-choice-btn.even:hover {
  background: #ffedd5;
  border-color: #fb923c;
}

.choice-icon {
  font-size: 32px;
}

.choice-label {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
}

.choice-sub {
  font-size: 11px;
  color: #64748b;
}

/* 결과 카드 (성공, 실패, 정산) */
.mg-result-card {
  background: #ffffff;
  border-radius: 24px;
  border: 2px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.mg-result-card.success {
  border-color: #86efac;
  background: radial-gradient(circle at 50% 20%, #f0fdf4 0%, #ffffff 80%);
}

.mg-result-card.fail {
  border-color: #fca5a5;
  background: radial-gradient(circle at 50% 20%, #fef2f2 0%, #ffffff 80%);
}

.mg-result-card.finish {
  border-color: #fde047;
  background: radial-gradient(circle at 50% 20%, #fffbeb 0%, #ffffff 80%);
}

.mg-result-badge {
  font-size: 18px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 6px 18px;
  border-radius: 999px;
}

.mg-result-badge.fail {
  color: #be123c;
  background: #ffe4e6;
}

.mg-result-badge.gold {
  color: #92400e;
  background: #fef08a;
}

.mg-revealed-acorns {
  font-size: 28px;
  letter-spacing: 4px;
  max-width: 90%;
  word-break: break-all;
  margin: 6px 0;
  animation: popInAcorns 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popInAcorns {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.mg-reveal-info {
  font-size: 14px;
  color: #334155;
}

.mg-streak-box {
  background: #ffffff;
  border: 1px dashed #86efac;
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mg-accumulated-reward {
  font-size: 16px;
  color: #047857;
}

.mg-fail-box {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 13px;
  color: #be123c;
}

.mg-decision-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mg-decision-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.mg-decision-buttons {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mg-final-reward-chip {
  background: #fef08a;
  border: 2px solid #facc15;
  color: #713f12;
  font-size: 20px;
  font-weight: 800;
  padding: 10px 24px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}
