/* Type B: 결과 중심형 전용 스타일 */
/* 2026-02-11 생성 */

/* 시작 영역 */
.start-section {
  text-align: center;
  padding: 40px 0;
}

.start-section .desc {
  color: var(--text-secondary);
  margin: 16px 0 32px;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* 셔플 애니메이션 영역 */
.shuffle-area {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
  position: relative;
  margin: 30px 0;
}

.shuffle-area .shuffle-stack {
  position: relative;
  width: 70px;
  height: 100px;
}

.shuffle-area .shuffle-card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(
      45deg,
      transparent, transparent 4px,
      rgba(255,255,255,0.03) 4px,
      rgba(255,255,255,0.03) 5px
    ),
    linear-gradient(135deg, #1a0a0a 0%, #2d1515 50%, #1a0a0a 100%);
  border: 2px solid #8b2020;
  box-shadow: var(--shadow-card);
}

.shuffle-area.shuffling .shuffle-card {
  animation: shuffleSpin 0.35s ease-in-out infinite alternate;
}

.shuffle-area.shuffling .shuffle-card:nth-child(1) { animation-delay: 0s; }
.shuffle-area.shuffling .shuffle-card:nth-child(2) { animation-delay: 0.07s; }
.shuffle-area.shuffling .shuffle-card:nth-child(3) { animation-delay: 0.14s; }
.shuffle-area.shuffling .shuffle-card:nth-child(4) { animation-delay: 0.21s; }
.shuffle-area.shuffling .shuffle-card:nth-child(5) { animation-delay: 0.28s; }

@keyframes shuffleSpin {
  0% { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(25px) rotate(8deg); }
}

.shuffle-text {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
}

/* 4묶음 그리드 */
.bundles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 500px;
  margin: 30px auto;
}

.bundle-box {
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bundle-box:hover {
  border-color: rgba(212, 165, 32, 0.3);
  box-shadow: 0 0 15px rgba(212, 165, 32, 0.1);
}

.bundle-box.opened {
  cursor: default;
}

.bundle-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
}

/* 묶음 뒷면 스택 */
.bundle-stack {
  position: relative;
  width: 60px;
  height: 90px;
  margin: 10px 0;
}

.bundle-stack .stack-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  background:
    repeating-linear-gradient(
      45deg, transparent, transparent 4px,
      rgba(255,255,255,0.03) 4px, rgba(255,255,255,0.03) 5px
    ),
    linear-gradient(135deg, #1a0a0a 0%, #2d1515 50%, #1a0a0a 100%);
  border: 2px solid #8b2020;
}

.bundle-stack .stack-card:nth-child(1) { top: 0; left: 0; }
.bundle-stack .stack-card:nth-child(2) { top: 2px; left: 2px; }
.bundle-stack .stack-card:nth-child(3) { top: 4px; left: 4px; }

/* 묶음 펼침 */
.bundle-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.bundle-box .bundle-cards .card-wrapper {
  width: 48px;
  height: 72px;
}

.bundle-box .bundle-cards .card-wrapper.size-lg {
  width: 48px;
  height: 72px;
}

.bundle-box .bundle-cards .card-emoji {
  font-size: 1.1rem;
}

.bundle-box .bundle-cards .card-month {
  font-size: 0.55rem;
}

.bundle-box .bundle-cards .card-type-label {
  font-size: 0.42rem;
}

/* 완성 월 배지 — 강괘 (4장 완성) */
.bundle-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--accent-gold), #b8860b);
  color: #1a1a2e;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 8px;
  animation: fadeIn 0.5s ease;
}

/* 점괘 결과 패널 */
.fortune-panel {
  margin-top: 30px;
  animation: slideUp 0.6s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.fortune-card {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border: 1px solid rgba(212, 165, 32, 0.2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 16px;
}

.fortune-card .fortune-emoji {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 12px;
}

.fortune-card .fortune-month {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 4px;
}

.fortune-card .fortune-keyword {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.fortune-card .fortune-detail {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
  text-align: center;
}

.fortune-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
  font-size: 1rem;
  line-height: 1.8;
}

.fortune-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

/* 하단 액션 */
.bottom-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 40px;
}

/* 등장 애니메이션 */
.bundle-box.appear {
  animation: bundleAppear 0.5s ease forwards;
}

@keyframes bundleAppear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* 반응형 */
@media (max-width: 480px) {
  .bundles-grid {
    gap: 12px;
  }

  .bundle-box {
    padding: 12px 8px;
    min-height: 120px;
  }

  .bundle-box .bundle-cards .card-wrapper {
    width: 40px;
    height: 60px;
  }

  .bundle-box .bundle-cards .card-emoji {
    font-size: 0.9rem;
  }

  .fortune-card {
    padding: 20px 16px;
  }
}
