/* ============================================
   로또 페이지 — 3단계 분석 + 전략 가이드 스타일
   ============================================ */

/* ── 메인 추첨 결과 카드 (전략별 5세트) ─────────────────────────── */
.analysis-card-main {
  background: linear-gradient(135deg, #fff 0%, #eff6ff 100%);
  border: 2px solid #3b82f6;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.copy-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.copy-btn:hover {
  background: #3b82f6;
  color: #fff;
  transform: translateY(-1px);
}
.lotto-sets-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.lotto-set-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.lotto-set-row:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59,130,246,0.1);
}
.set-number {
  font-weight: 700;
  font-size: 0.875rem;
  color: #6b7280;
  min-width: 1.25rem;
  flex-shrink: 0;
}
.set-balls {
  display: flex;
  gap: 0.3rem;
  flex: 1;
  flex-wrap: wrap;
}
.set-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.75rem;
  color: #6b7280;
  text-align: right;
  flex-shrink: 0;
}
.set-action-bar {
  padding-top: 0.75rem;
  border-top: 1px dashed #e5e7eb;
  text-align: center;
  color: #9ca3af;
  font-size: 0.75rem;
}
@media (max-width: 480px) {
  .lotto-set-row { flex-wrap: wrap; }
  .set-meta { flex-direction: row; width: 100%; justify-content: flex-end; gap: 1rem; }
}

/* ── ⓘ 정보 버튼 (좌측 전략 버튼 안) ─────────────────────────── */
.strat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
}
.info-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
  width: 20px; height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.6875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.15s;
  line-height: 1;
}
.info-btn:hover,
.info-btn:focus {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
  transform: scale(1.15);
  outline: none;
}

/* ── 슬라이드 패널 — 데스크톱: 우측 슬라이드인 ─────────────────── */
.guide-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.guide-panel.open { right: 0; }

.guide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
  flex-shrink: 0;
}
.guide-panel-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.guide-close-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.guide-close-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
}

.guide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

/* 패널 안 카드 강조 애니메이션 */
.guide-panel .strategy-guide-card.highlight {
  animation: highlight-pulse 2s ease;
}
@keyframes highlight-pulse {
  0%, 100% { background: #f9fafb; }
  40%       { background: rgba(59,130,246,0.12); }
}

/* ── 백드롭 (모바일 전용) ────────────────────────────────────────── */
.guide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.guide-backdrop.open { opacity: 1; pointer-events: auto; }
@media (min-width: 768px) { .guide-backdrop { display: none; } }

/* ── 모바일: 하단에서 올라오는 모달 ─────────────────────────────── */
@media (max-width: 767px) {
  .guide-panel {
    right: 0;
    bottom: -100vh;
    top: auto;
    width: 100vw;
    height: 90vh;
    border-left: none;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .guide-panel.open { bottom: 0; right: 0; }
}

/* ── 좌측 분석 영역 — compact 공 (36px) ─────────────────────────── */
.lotto-ball.compact {
  width: 2.25rem;   /* 36px */
  height: 2.25rem;
  font-size: 0.8125rem;
}

/* compact AI 카드 (좌측용 소형) */
.ai-number-card-compact .ai-number-header { margin-bottom: 0.4rem; }
.ai-number-card-compact .ai-reason-box { padding: 0.375rem 0.625rem; }
.ai-number-card-compact .reason-list li { font-size: 0.75rem; }
.ai-number-card-compact .ai-strategy-tag { font-size: 0.6875rem; }
.ai-number-card-compact .ai-stars { font-size: 0.75rem; }

/* ── AI 최종 8��� 카드 ──────────────────────────────────────────── */
.ai-number-card {
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.875rem;
  background: #fff;
}
.ai-number-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}
.ai-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}
.ai-strategy-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
}
.ai-stars {
  color: #f59e0b;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
}
.ai-reason-box {
  background: #f8fafc;
  border-left: 3px solid #3b82f6;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
}
.reason-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
  color: #475569;
}
.reason-list li {
  padding: 0.125rem 0 0.125rem 0.875rem;
  position: relative;
}
.reason-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #3b82f6;
}

/* ── 추천 조합 행 ──────────────────────────────────────────────── */
.combo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.combo-row:last-child { border-bottom: none; }

/* 6단 번호 그리드 */
#funatsu-numbers,
#strategy-spread-numbers {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  place-items: center;
}
@media (max-width: 480px) {
  #funatsu-numbers,
  #strategy-spread-numbers {
    grid-template-columns: repeat(4, 1fr);
  }
}



/* 가이드 카드 호버 */
.strategy-guide-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.strategy-guide-card:hover {
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

/* 전략 선택 버튼 */
.select-strategy-btn {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.select-strategy-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.select-strategy-btn:active {
  transform: translateY(0);
}

/* 전략 버튼 flash 애니메이션 (가이드에서 선택 시) */
@keyframes flash-highlight {
  0%, 100% { background-color: transparent; }
  40% { background-color: rgba(59, 130, 246, 0.15); }
}
.strategy-btn.flash-active {
  animation: flash-highlight 1.2s ease;
}

/* 모바일 대응 */
@media (max-width: 640px) {
  .strategy-guide-card {
    padding: 0.875rem !important;
  }
}
